Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
brownplt/strobe-old
src/BrownPLT/TypedJS/TypeTheory.hs
bsd-2-clause
--and (+++) :: Monad m => m Bool -> m Bool -> m Bool m1 +++ m2 = do r1 <- m1 case r1 of True -> m2 False -> return False --or
138
(+++) :: Monad m => m Bool -> m Bool -> m Bool m1 +++ m2 = do r1 <- m1 case r1 of True -> m2 False -> return False --or
132
m1 +++ m2 = do r1 <- m1 case r1 of True -> m2 False -> return False --or
85
true
true
0
10
45
74
35
39
null
null
JoeyEremondi/haskelm
src/Language/Elm/TH/HToE.hs
bsd-3-clause
removeWildcards nameList p = return p
37
removeWildcards nameList p = return p
37
removeWildcards nameList p = return p
37
false
false
1
5
5
18
6
12
null
null
ezyang/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr e@(HsApp {}) = ppr_apps e []
44
ppr_expr e@(HsApp {}) = ppr_apps e []
44
ppr_expr e@(HsApp {}) = ppr_apps e []
44
false
false
0
8
13
26
13
13
null
null
seereason/wl-pprint-text
Text/PrettyPrint/Leijen/Text.hs
bsd-3-clause
-- | The document @(integer i)@ shows the literal integer @i@ using -- 'text'. integer :: Integer -> Doc integer i = text' i
128
integer :: Integer -> Doc integer i = text' i
47
integer i = text' i
19
true
true
0
7
27
28
13
15
null
null
bno1/adventofcode_2016
d02/main.hs
mit
computeKeys :: Problem -> [String] -> String computeKeys p = map (coordToKey p) . tail . scanl (\s i -> execState (execInstructions p i) s) (initialPosition p)
171
computeKeys :: Problem -> [String] -> String computeKeys p = map (coordToKey p) . tail . scanl (\s i -> execState (execInstructions p i) s) (initialPosition p)
171
computeKeys p = map (coordToKey p) . tail . scanl (\s i -> execState (execInstructions p i) s) (initialPosition p)
126
false
true
2
10
38
84
39
45
null
null
kazu-yamamoto/http2
Network/HPACK/Huffman/Decode.hs
bsd-3-clause
step :: HTree -> HTree -> Chara -> [B] -> Pin step root (Tip _ v) x bss | v == idxEos = EndOfString | otherwise = let w = fromIntegral v x' = inc x w in step root root x' bss
305
step :: HTree -> HTree -> Chara -> [B] -> Pin step root (Tip _ v) x bss | v == idxEos = EndOfString | otherwise = let w = fromIntegral v x' = inc x w in step root root x' bss
305
step root (Tip _ v) x bss | v == idxEos = EndOfString | otherwise = let w = fromIntegral v x' = inc x w in step root root x' bss
259
false
true
1
9
173
97
47
50
null
null
caneroj1/Crypto-hs
app/Challenges/Challenge4.hs
bsd-3-clause
eachLine :: Handle -> IO () eachLine h = do eof <- hIsEOF h unless eof $ do mapM_ print =<< (breakCipher . hexString . BS.init) <$> BS.hGetLine h putStrLn "" eachLine h
184
eachLine :: Handle -> IO () eachLine h = do eof <- hIsEOF h unless eof $ do mapM_ print =<< (breakCipher . hexString . BS.init) <$> BS.hGetLine h putStrLn "" eachLine h
184
eachLine h = do eof <- hIsEOF h unless eof $ do mapM_ print =<< (breakCipher . hexString . BS.init) <$> BS.hGetLine h putStrLn "" eachLine h
156
false
true
0
14
48
87
38
49
null
null
brendanhay/gogol
gen/src/Gen/Formatting.hs
mpl-2.0
path :: Format a (Path -> a) path = later (Build.fromText . toTextIgnore)
73
path :: Format a (Path -> a) path = later (Build.fromText . toTextIgnore)
73
path = later (Build.fromText . toTextIgnore)
44
false
true
0
8
12
35
18
17
null
null
ekmett/text
Data/Text/Lazy/Builder/Int.hs
bsd-2-clause
hexadecimal i | i < 0 = error hexErrMsg | otherwise = go i where go n | n < 16 = hexDigit n | otherwise = go (n `quot` 16) <> hexDigit (n `rem` 16)
178
hexadecimal i | i < 0 = error hexErrMsg | otherwise = go i where go n | n < 16 = hexDigit n | otherwise = go (n `quot` 16) <> hexDigit (n `rem` 16)
178
hexadecimal i | i < 0 = error hexErrMsg | otherwise = go i where go n | n < 16 = hexDigit n | otherwise = go (n `quot` 16) <> hexDigit (n `rem` 16)
178
false
false
1
9
66
93
44
49
null
null
m-alvarez/jhc
src/FrontEnd/Tc/Type.hs
mit
ctFun :: CoerceTerm -> CoerceTerm ctFun CTId = CTId
51
ctFun :: CoerceTerm -> CoerceTerm ctFun CTId = CTId
51
ctFun CTId = CTId
17
false
true
0
5
8
18
9
9
null
null
shepheb/graphmind
devel-server.hs
bsd-2-clause
main :: IO () main = do mapM_ putStrLn [ "Starting your server process. Code changes will be automatically" , "loaded as you save your files. Type \"quit\" to exit." , "You can view your app at http://localhost:3000/" , "" ] _ <- forkIO $ run 3000 "Controller" "withGraphm...
472
main :: IO () main = do mapM_ putStrLn [ "Starting your server process. Code changes will be automatically" , "loaded as you save your files. Type \"quit\" to exit." , "You can view your app at http://localhost:3000/" , "" ] _ <- forkIO $ run 3000 "Controller" "withGraphm...
472
main = do mapM_ putStrLn [ "Starting your server process. Code changes will be automatically" , "loaded as you save your files. Type \"quit\" to exit." , "You can view your app at http://localhost:3000/" , "" ] _ <- forkIO $ run 3000 "Controller" "withGraphmind" ["hamlet"...
458
false
true
1
11
166
108
50
58
null
null
Peaker/git-mediate
src/Resolution.hs
gpl-2.0
lineEnding :: String -> LineEnding lineEnding x@(_:_) | last x == '\r' = CRLF
77
lineEnding :: String -> LineEnding lineEnding x@(_:_) | last x == '\r' = CRLF
77
lineEnding x@(_:_) | last x == '\r' = CRLF
42
false
true
0
9
13
41
20
21
null
null
paulrzcz/takusen-oracle
Test/MiniUnit.hs
bsd-3-clause
++ reportFilter isFailure list -- ++ reportFilter isError list -- 2 defns for same result; which is better? --contains pred = filter pred |> null |> not contains p l = maybe False (const True) (find p l)
214
contains p l = maybe False (const True) (find p l)
50
contains p l = maybe False (const True) (find p l)
50
true
false
2
7
47
45
22
23
null
null
fpco/ekg
System/Remote/Wai.hs
bsd-3-clause
serveWrapper :: (IORef Counters -> IORef Gauges -> IORef Labels -> IO BL.ByteString) -> IORef Counters -> IORef Gauges -> IORef Labels -> Application serveWrapper f counters gauges labels _ = do bs <- liftIO $ f counters gauges labels return $ responseLBS status200 jsonHeaders bs
297
serveWrapper :: (IORef Counters -> IORef Gauges -> IORef Labels -> IO BL.ByteString) -> IORef Counters -> IORef Gauges -> IORef Labels -> Application serveWrapper f counters gauges labels _ = do bs <- liftIO $ f counters gauges labels return $ responseLBS status200 jsonHeaders bs
297
serveWrapper f counters gauges labels _ = do bs <- liftIO $ f counters gauges labels return $ responseLBS status200 jsonHeaders bs
139
false
true
0
12
62
110
49
61
null
null
ekmett/hmpfr
src/Data/Number/MPFR/Arithmetic.hs
bsd-3-clause
addw_ :: RoundMode -> Precision -> MPFR -> Word -> (MPFR, Int) addw_ r p d1 d = withMPFRBAui r p d1 (fromIntegral d) mpfr_add_ui
137
addw_ :: RoundMode -> Precision -> MPFR -> Word -> (MPFR, Int) addw_ r p d1 d = withMPFRBAui r p d1 (fromIntegral d) mpfr_add_ui
137
addw_ r p d1 d = withMPFRBAui r p d1 (fromIntegral d) mpfr_add_ui
65
false
true
0
11
33
64
31
33
null
null
green-haskell/ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
fdG :: TrieMap m => (a -> b -> b) -> GenMap m a -> b -> b fdG _ EmptyMap = \z -> z
82
fdG :: TrieMap m => (a -> b -> b) -> GenMap m a -> b -> b fdG _ EmptyMap = \z -> z
82
fdG _ EmptyMap = \z -> z
24
false
true
0
10
24
62
29
33
null
null
rueshyna/gogol
gogol-games/gen/Network/Google/Resource/Games/Scores/Get.hs
mpl-2.0
-- | The maximum number of leaderboard scores to return in the response. For -- any response, the actual number of leaderboard scores returned may be -- less than the specified maxResults. sgMaxResults :: Lens' ScoresGet (Maybe Int32) sgMaxResults = lens _sgMaxResults (\ s a -> s{_sgMaxResults = a}) . mapping _...
326
sgMaxResults :: Lens' ScoresGet (Maybe Int32) sgMaxResults = lens _sgMaxResults (\ s a -> s{_sgMaxResults = a}) . mapping _Coerce
137
sgMaxResults = lens _sgMaxResults (\ s a -> s{_sgMaxResults = a}) . mapping _Coerce
91
true
true
1
9
59
59
30
29
null
null
beni55/fay
src/Fay/Compiler/QName.hs
bsd-3-clause
changeModule _ Special{} = error "changeModule Special{}"
58
changeModule _ Special{} = error "changeModule Special{}"
58
changeModule _ Special{} = error "changeModule Special{}"
58
false
false
0
6
7
18
8
10
null
null
UU-ComputerScience/uu-cco
uu-cco/src/CCO/Parsing.hs
bsd-3-clause
ppDiagnosis (LexicalError (Just msg) srcpos _) = wrapped (describeSourcePos srcpos ++ ": Lexical error: " ++ msg ++ ".")
122
ppDiagnosis (LexicalError (Just msg) srcpos _) = wrapped (describeSourcePos srcpos ++ ": Lexical error: " ++ msg ++ ".")
122
ppDiagnosis (LexicalError (Just msg) srcpos _) = wrapped (describeSourcePos srcpos ++ ": Lexical error: " ++ msg ++ ".")
122
false
false
0
10
20
46
22
24
null
null
karknu/rws
src/PadN.hs
bsd-3-clause
padNWrite :: PadN -> Maybe Packet -> B.ByteString -> Put padNWrite h _ bs = do padNWriteHdr h putLazyByteString bs
118
padNWrite :: PadN -> Maybe Packet -> B.ByteString -> Put padNWrite h _ bs = do padNWriteHdr h putLazyByteString bs
118
padNWrite h _ bs = do padNWriteHdr h putLazyByteString bs
61
false
true
0
8
23
47
21
26
null
null
GaloisInc/saw-script
saw-core-sbv/src/Verifier/SAW/Simulator/SBV.hs
bsd-3-clause
getLabels :: [Labeler] -> Map String CV -> [ExtCns Term] -> Maybe [(ExtCns Term,FirstOrderValue)] getLabels ls d args | length args == length xs = Just (zip args xs) | otherwise = error $ unwords [ "SBV SAT results do not match expected arguments " , show (map (toShortName . e...
1,254
getLabels :: [Labeler] -> Map String CV -> [ExtCns Term] -> Maybe [(ExtCns Term,FirstOrderValue)] getLabels ls d args | length args == length xs = Just (zip args xs) | otherwise = error $ unwords [ "SBV SAT results do not match expected arguments " , show (map (toShortName . ec...
1,253
getLabels ls d args | length args == length xs = Just (zip args xs) | otherwise = error $ unwords [ "SBV SAT results do not match expected arguments " , show (map (toShortName . ecName) args), show xs] where xs = fmap getLabel ls getLabel (BoolLabel s) = FOVBit (cvToBool (...
1,149
false
true
10
12
352
508
228
280
null
null
christiaanb/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getRegister' _ _ (CmmMachOp (MO_UU_Conv W8 W32) [CmmLoad addr _]) = do code <- intLoadCode (MOVZxL II8) addr return (Any II32 code)
135
getRegister' _ _ (CmmMachOp (MO_UU_Conv W8 W32) [CmmLoad addr _]) = do code <- intLoadCode (MOVZxL II8) addr return (Any II32 code)
135
getRegister' _ _ (CmmMachOp (MO_UU_Conv W8 W32) [CmmLoad addr _]) = do code <- intLoadCode (MOVZxL II8) addr return (Any II32 code)
135
false
false
1
11
25
70
31
39
null
null
mcschroeder/ghc
compiler/coreSyn/CoreFVs.hs
bsd-3-clause
idRuleAndUnfoldingVarsDSet :: Id -> DVarSet idRuleAndUnfoldingVarsDSet id = runFVDSet $ idRuleAndUnfoldingVarsAcc id
116
idRuleAndUnfoldingVarsDSet :: Id -> DVarSet idRuleAndUnfoldingVarsDSet id = runFVDSet $ idRuleAndUnfoldingVarsAcc id
116
idRuleAndUnfoldingVarsDSet id = runFVDSet $ idRuleAndUnfoldingVarsAcc id
72
false
true
0
6
11
25
12
13
null
null
ksaveljev/hake-2
src/Game/Monsters/MBoss2.hs
bsd-3-clause
boss2MoveDeath :: MMoveT boss2MoveDeath = MMoveT "boss2MoveDeath" frameDeath2 frameDeath50 boss2FramesDeath (Just boss2Dead)
124
boss2MoveDeath :: MMoveT boss2MoveDeath = MMoveT "boss2MoveDeath" frameDeath2 frameDeath50 boss2FramesDeath (Just boss2Dead)
124
boss2MoveDeath = MMoveT "boss2MoveDeath" frameDeath2 frameDeath50 boss2FramesDeath (Just boss2Dead)
99
false
true
0
7
11
28
14
14
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/DynamicBars.hs
bsd-2-clause
multiPP' :: (PP -> X String) -> PP -> PP -> [Handle] -> X () multiPP' dynlStr focusPP unfocusPP handles = do st <- get let pickPP :: WorkspaceId -> WriterT (Last XState) X String pickPP ws = do let isFoc = (ws ==) . W.tag . W.workspace . W.current $ windowset st put st{ windowset = W.view ws $...
654
multiPP' :: (PP -> X String) -> PP -> PP -> [Handle] -> X () multiPP' dynlStr focusPP unfocusPP handles = do st <- get let pickPP :: WorkspaceId -> WriterT (Last XState) X String pickPP ws = do let isFoc = (ws ==) . W.tag . W.workspace . W.current $ windowset st put st{ windowset = W.view ws $...
654
multiPP' dynlStr focusPP unfocusPP handles = do st <- get let pickPP :: WorkspaceId -> WriterT (Last XState) X String pickPP ws = do let isFoc = (ws ==) . W.tag . W.workspace . W.current $ windowset st put st{ windowset = W.view ws $ windowset st } out <- lift $ dynlStr $ if isFoc then...
593
false
true
0
19
176
282
135
147
null
null
snowleopard/alga
test/Algebra/Graph/Test/Generic.hs
mit
testBfs :: TestsuiteInt g -> IO () testBfs (prefix, API{..}) = do putStrLn $ "\n============ " ++ prefix ++ "bfs ============" test "bfs vs $ empty == []" $ \vs -> bfs vs empty == [] test "bfs [] g ...
2,283
testBfs :: TestsuiteInt g -> IO () testBfs (prefix, API{..}) = do putStrLn $ "\n============ " ++ prefix ++ "bfs ============" test "bfs vs $ empty == []" $ \vs -> bfs vs empty == [] test "bfs [] g ...
2,283
testBfs (prefix, API{..}) = do putStrLn $ "\n============ " ++ prefix ++ "bfs ============" test "bfs vs $ empty == []" $ \vs -> bfs vs empty == [] test "bfs [] g == []" $ \g -> bfs [] ...
2,248
false
true
0
15
1,076
787
407
380
null
null
LukaHorvat/Halt
src/Halt/Printing/Pretty.hs
mit
showStatements :: [Statement] -> String showStatements = indent . map prettyShow
80
showStatements :: [Statement] -> String showStatements = indent . map prettyShow
80
showStatements = indent . map prettyShow
40
false
true
0
6
10
25
13
12
null
null
phischu/fragnix
tests/packages/scotty/Data.Time.Clock.TAI.hs
bsd-3-clause
utcDayLength :: LeapSecondMap -> Day -> Maybe DiffTime utcDayLength lsmap day = do i0 <- lsmap day i1 <- lsmap $ addDays 1 day return $ realToFrac (86400 + i1 - i0)
176
utcDayLength :: LeapSecondMap -> Day -> Maybe DiffTime utcDayLength lsmap day = do i0 <- lsmap day i1 <- lsmap $ addDays 1 day return $ realToFrac (86400 + i1 - i0)
176
utcDayLength lsmap day = do i0 <- lsmap day i1 <- lsmap $ addDays 1 day return $ realToFrac (86400 + i1 - i0)
121
false
true
0
11
43
74
34
40
null
null
HIPERFIT/futhark
src/Futhark/Internalise/LiftLambdas.hs
isc
liftFunction :: VName -> [TypeParam] -> [Pat] -> StructRetType -> Exp -> LiftM Exp liftFunction fname tparams params (RetType dims ret) funbody = do -- Find free variables global <- gets stateGlobal let bound = global <> foldMap patNames params <> S.fromList (map typeParamName tparams)...
2,312
liftFunction :: VName -> [TypeParam] -> [Pat] -> StructRetType -> Exp -> LiftM Exp liftFunction fname tparams params (RetType dims ret) funbody = do -- Find free variables global <- gets stateGlobal let bound = global <> foldMap patNames params <> S.fromList (map typeParamName tparams)...
2,312
liftFunction fname tparams params (RetType dims ret) funbody = do -- Find free variables global <- gets stateGlobal let bound = global <> foldMap patNames params <> S.fromList (map typeParamName tparams) <> S.fromList dims free = let immediate_free = FV.freeVar...
2,229
false
true
8
17
692
719
375
344
null
null
oden-lang/oden
src/Oden/Imports.hs
mit
resolveImports :: ImportResolutionEnvironment -> UntypedPackage ImportReference -> Either PackageImportError ( UntypedPackage (ImportedPackage TypedPackage) , [UnsupportedTypesWarning]) resolveImports env (UntypedPackage pkgDecl imports defs) = do...
1,196
resolveImports :: ImportResolutionEnvironment -> UntypedPackage ImportReference -> Either PackageImportError ( UntypedPackage (ImportedPackage TypedPackage) , [UnsupportedTypesWarning]) resolveImports env (UntypedPackage pkgDecl imports defs) = do...
1,196
resolveImports env (UntypedPackage pkgDecl imports defs) = do (importedPackages, warnings) <- foldM resolveImport' ([], []) imports return (UntypedPackage pkgDecl importedPackages defs, warnings) where resolveImport' :: ([ImportedPackage TypedPackage], [UnsupportedTypesWarning]) -> ImportReferen...
937
false
true
0
14
310
295
149
146
null
null
siddhanathan/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
mkFCallId :: DynFlags -> Unique -> ForeignCall -> Type -> Id mkFCallId dflags uniq fcall ty = ASSERT( isEmptyVarSet (tyVarsOfType ty) ) -- A CCallOpId should have no free type variables; -- when doing substitutions won't substitute over it mkGlobalId (FCallId fcall) name ty info where occ_str = show...
1,512
mkFCallId :: DynFlags -> Unique -> ForeignCall -> Type -> Id mkFCallId dflags uniq fcall ty = ASSERT( isEmptyVarSet (tyVarsOfType ty) ) -- A CCallOpId should have no free type variables; -- when doing substitutions won't substitute over it mkGlobalId (FCallId fcall) name ty info where occ_str = show...
1,512
mkFCallId dflags uniq fcall ty = ASSERT( isEmptyVarSet (tyVarsOfType ty) ) -- A CCallOpId should have no free type variables; -- when doing substitutions won't substitute over it mkGlobalId (FCallId fcall) name ty info where occ_str = showSDoc dflags (braces (ppr fcall <+> ppr ty)) -- The "occur...
1,451
false
true
6
12
428
187
98
89
null
null
kyoungrok0517/linguist
samples/Haskell/HsColour.hs
mit
hscolour output pref anchor partial title True = (if partial then id else top'n'tail output title) . concatMap chunk . joinL . classify . inlines where chunk (Code c) = hscolour' output pref anchor c chunk (Lit c) = c -- | The actual colourising worker, despatched on the chosen output forma...
322
hscolour output pref anchor partial title True = (if partial then id else top'n'tail output title) . concatMap chunk . joinL . classify . inlines where chunk (Code c) = hscolour' output pref anchor c chunk (Lit c) = c -- | The actual colourising worker, despatched on the chosen output forma...
322
hscolour output pref anchor partial title True = (if partial then id else top'n'tail output title) . concatMap chunk . joinL . classify . inlines where chunk (Code c) = hscolour' output pref anchor c chunk (Lit c) = c -- | The actual colourising worker, despatched on the chosen output forma...
322
false
false
0
8
80
99
47
52
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/Dwarf.hs
bsd-3-clause
procToFrame :: UnwindTable -> DebugBlock -> DwarfFrameProc procToFrame initUws blk = DwarfFrameProc { dwFdeProc = dblCLabel blk , dwFdeHasInfo = dblHasInfoTbl blk , dwFdeBlocks = map (uncurry blockToFrame) blockUws } where blockUws :: [(DebugBlock, Unwind...
739
procToFrame :: UnwindTable -> DebugBlock -> DwarfFrameProc procToFrame initUws blk = DwarfFrameProc { dwFdeProc = dblCLabel blk , dwFdeHasInfo = dblHasInfoTbl blk , dwFdeBlocks = map (uncurry blockToFrame) blockUws } where blockUws :: [(DebugBlock, Unwind...
739
procToFrame initUws blk = DwarfFrameProc { dwFdeProc = dblCLabel blk , dwFdeHasInfo = dblHasInfoTbl blk , dwFdeBlocks = map (uncurry blockToFrame) blockUws } where blockUws :: [(DebugBlock, UnwindTable)] blockUws = map snd $ sortBy (comparing fst)...
680
false
true
5
11
253
211
113
98
null
null
thumphries/weather
src/Types.hs
bsd-3-clause
-- Station units are enforced here, and here only. mkMeasure :: Station -> (DUnit, DUnit) -> TUnit -> Measurement mkMeasure c@AUS (lx, ly) t = Measurement c (Location (Kilometres lx) (Kilometres ly)) (Celsius t)
213
mkMeasure :: Station -> (DUnit, DUnit) -> TUnit -> Measurement mkMeasure c@AUS (lx, ly) t = Measurement c (Location (Kilometres lx) (Kilometres ly)) (Celsius t)
162
mkMeasure c@AUS (lx, ly) t = Measurement c (Location (Kilometres lx) (Kilometres ly)) (Celsius t)
99
true
true
0
9
35
79
42
37
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/ParseLazy.hs
bsd-3-clause
extparsedent :: XParser (ExtParsedEnt Posn) extparsedent = do t <- maybe textdecl c <- content return (ExtParsedEnt t c)
132
extparsedent :: XParser (ExtParsedEnt Posn) extparsedent = do t <- maybe textdecl c <- content return (ExtParsedEnt t c)
132
extparsedent = do t <- maybe textdecl c <- content return (ExtParsedEnt t c)
88
false
true
0
9
30
51
23
28
null
null
szatkus/haste-compiler
libraries/haste-lib/src/Haste/DOM/JSString.hs
bsd-3-clause
-- | Create a text node. newTextElem :: MonadIO m => JSString -> m Elem newTextElem = liftIO . jsCreateTextNode
111
newTextElem :: MonadIO m => JSString -> m Elem newTextElem = liftIO . jsCreateTextNode
86
newTextElem = liftIO . jsCreateTextNode
39
true
true
0
7
19
30
15
15
null
null
brendanhay/gogol
gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs
mpl-2.0
-- | Explicit permission grants or denials for the app. These values override -- the default_permission_policy and permission_grants which apply to all -- apps. apPermissionGrants :: Lens' ApplicationPolicy [PermissionGrant] apPermissionGrants = lens _apPermissionGrants (\ s a -> s{_apPermissionGrants = a}) ...
349
apPermissionGrants :: Lens' ApplicationPolicy [PermissionGrant] apPermissionGrants = lens _apPermissionGrants (\ s a -> s{_apPermissionGrants = a}) . _Default . _Coerce
188
apPermissionGrants = lens _apPermissionGrants (\ s a -> s{_apPermissionGrants = a}) . _Default . _Coerce
124
true
true
2
8
63
59
30
29
null
null
BakerSmithA/Metal
test/State/TapeSpec.hs
mit
leftSpec :: Spec leftSpec = do describe "left" $ do it "does nothing if already zeroed" $ do let tape = fromString "abc" pos (left tape) `shouldBe` 0 it "moves left" $ do let tape = right $ right $ fromString "abc" pos (left tape) `shouldBe` 1
312
leftSpec :: Spec leftSpec = do describe "left" $ do it "does nothing if already zeroed" $ do let tape = fromString "abc" pos (left tape) `shouldBe` 0 it "moves left" $ do let tape = right $ right $ fromString "abc" pos (left tape) `shouldBe` 1
312
leftSpec = do describe "left" $ do it "does nothing if already zeroed" $ do let tape = fromString "abc" pos (left tape) `shouldBe` 0 it "moves left" $ do let tape = right $ right $ fromString "abc" pos (left tape) `shouldBe` 1
295
false
true
0
17
115
116
51
65
null
null
c0deaddict/project-euler
src/Part1/Problem18.hs
bsd-3-clause
foldTriangle :: [[Int]] -> [Int] -> [Int] foldTriangle [] acc = acc
67
foldTriangle :: [[Int]] -> [Int] -> [Int] foldTriangle [] acc = acc
67
foldTriangle [] acc = acc
25
false
true
0
7
11
38
21
17
null
null
Pitometsu/antigen-hs
Antigen.hs
mit
withDirectory :: FilePath -> IO a -> IO a withDirectory p io = do old <- getCurrentDirectory bracket_ (setCurrentDirectory p) (setCurrentDirectory old) io -- | Gather scripts to source for each sourcing location of the plugin.
261
withDirectory :: FilePath -> IO a -> IO a withDirectory p io = do old <- getCurrentDirectory bracket_ (setCurrentDirectory p) (setCurrentDirectory old) io -- | Gather scripts to source for each sourcing location of the plugin.
261
withDirectory p io = do old <- getCurrentDirectory bracket_ (setCurrentDirectory p) (setCurrentDirectory old) io -- | Gather scripts to source for each sourcing location of the plugin.
219
false
true
0
9
70
60
28
32
null
null
apoikos/pkg-xmobar
src/Plugins/Monitors/Volume.hs
bsd-3-clause
percent :: Integer -> Integer -> Integer -> Float percent v' lo' hi' = (v - lo) / (hi - lo) where v = fromIntegral v' lo = fromIntegral lo' hi = fromIntegral hi'
179
percent :: Integer -> Integer -> Integer -> Float percent v' lo' hi' = (v - lo) / (hi - lo) where v = fromIntegral v' lo = fromIntegral lo' hi = fromIntegral hi'
179
percent v' lo' hi' = (v - lo) / (hi - lo) where v = fromIntegral v' lo = fromIntegral lo' hi = fromIntegral hi'
129
false
true
5
9
51
91
39
52
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Script/Concrete.hs
mit
toMaybeLetter (Unicode.Letter 'Θ') = Just C_Θ
45
toMaybeLetter (Unicode.Letter 'Θ') = Just C_Θ
45
toMaybeLetter (Unicode.Letter 'Θ') = Just C_Θ
45
false
false
0
7
5
23
10
13
null
null
HIPERFIT/futhark
src/Futhark/CodeGen/ImpGen/Multicore/Base.hs
isc
segOpString SegHist {} = return "seghist"
41
segOpString SegHist {} = return "seghist"
41
segOpString SegHist {} = return "seghist"
41
false
false
1
5
5
17
7
10
null
null
phadej/streaming-commons
Data/Streaming/ByteString/Builder/Buffer.hs
mit
-- | The size of the whole byte array underlying the buffer. -- -- Since 0.1.10.0 -- bufferSize :: Buffer -> Int bufferSize (Buffer fpbuf _ _ ope) = ope `minusPtr` unsafeForeignPtrToPtr fpbuf
195
bufferSize :: Buffer -> Int bufferSize (Buffer fpbuf _ _ ope) = ope `minusPtr` unsafeForeignPtrToPtr fpbuf
110
bufferSize (Buffer fpbuf _ _ ope) = ope `minusPtr` unsafeForeignPtrToPtr fpbuf
82
true
true
0
7
36
43
24
19
null
null
agentm/project-m36
test/Server/Main.hs
unlicense
testConnection :: Port -> MVar () -> IO (Either ConnectionError (SessionId, Connection)) testConnection serverPort mvar = do let connInfo = RemoteConnectionInfo testDatabaseName "127.0.0.1" (show serverPort) (testNotificationCallback mvar) --putStrLn ("testConnection: " ++ show serverAddress) eConn <- connectProj...
712
testConnection :: Port -> MVar () -> IO (Either ConnectionError (SessionId, Connection)) testConnection serverPort mvar = do let connInfo = RemoteConnectionInfo testDatabaseName "127.0.0.1" (show serverPort) (testNotificationCallback mvar) --putStrLn ("testConnection: " ++ show serverAddress) eConn <- connectProj...
712
testConnection serverPort mvar = do let connInfo = RemoteConnectionInfo testDatabaseName "127.0.0.1" (show serverPort) (testNotificationCallback mvar) --putStrLn ("testConnection: " ++ show serverAddress) eConn <- connectProjectM36 connInfo case eConn of Left err -> pure $ Left err Right conn -> do ...
623
false
true
0
19
140
179
82
97
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ElastiCacheReplicationGroup.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-preferredmaintenancewindow ecrgPreferredMaintenanceWindow :: Lens' ElastiCacheReplicationGroup (Maybe (Val Text)) ecrgPreferredMaintenanceWindow = lens _elastiCacheReplicati...
428
ecrgPreferredMaintenanceWindow :: Lens' ElastiCacheReplicationGroup (Maybe (Val Text)) ecrgPreferredMaintenanceWindow = lens _elastiCacheReplicationGroupPreferredMaintenanceWindow (\s a -> s { _elastiCacheReplicationGroupPreferredMaintenanceWindow = a })
254
ecrgPreferredMaintenanceWindow = lens _elastiCacheReplicationGroupPreferredMaintenanceWindow (\s a -> s { _elastiCacheReplicationGroupPreferredMaintenanceWindow = a })
167
true
true
0
9
22
52
28
24
null
null
anton-dessiatov/ghc
compiler/deSugar/Check.hs
bsd-3-clause
tidy_con _ (InfixCon p1 p2) = PrefixCon [tidy_lpat p1, tidy_lpat p2]
70
tidy_con _ (InfixCon p1 p2) = PrefixCon [tidy_lpat p1, tidy_lpat p2]
70
tidy_con _ (InfixCon p1 p2) = PrefixCon [tidy_lpat p1, tidy_lpat p2]
70
false
false
0
7
12
34
16
18
null
null
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Monad/IOArray.hs
gpl-3.0
emptyN :: Int -> IO (SGr a b); emptyN n = do { m <- newArray (1, n) False; return (SGr (0, array (1, n) [(i, Nothing) | i <- [1 .. n]], m))}
157
emptyN :: Int -> IO (SGr a b) emptyN n = do { m <- newArray (1, n) False; return (SGr (0, array (1, n) [(i, Nothing) | i <- [1 .. n]], m))}
154
emptyN n = do { m <- newArray (1, n) False; return (SGr (0, array (1, n) [(i, Nothing) | i <- [1 .. n]], m))}
124
false
true
0
15
50
106
58
48
null
null
brownsys/pane
src/SpanningTree.hs
bsd-3-clause
spanningTreeTests = TestList [ testST0 , testST1 , testST2 , testST3 , testST4 ]
92
spanningTreeTests = TestList [ testST0 , testST1 , testST2 , testST3 , testST4 ]
92
spanningTreeTests = TestList [ testST0 , testST1 , testST2 , testST3 , testST4 ]
92
false
false
0
5
25
24
14
10
null
null
Hrothen/textwrap
test/Spec.hs
bsd-3-clause
multiLineString :: Text multiLineString = [Interp.text|\ This is a paragraph that already has line breaks. But some of its lines are much longer than the others, so it needs to be wrapped. Some lines are \ttabbed too. What a mess! |]
234
multiLineString :: Text multiLineString = [Interp.text|\ This is a paragraph that already has line breaks. But some of its lines are much longer than the others, so it needs to be wrapped. Some lines are \ttabbed too. What a mess! |]
234
multiLineString = [Interp.text|\ This is a paragraph that already has line breaks. But some of its lines are much longer than the others, so it needs to be wrapped. Some lines are \ttabbed too. What a mess! |]
210
false
true
0
5
41
17
11
6
null
null
coreyoconnor/bind-marshal
test/verify_bind_rules_proto_2.hs
bsd-3-clause
force_7 :: ( T7A0 pre_m, T7A1 post_m, ReifyM pre_m, ReifyM post_m ) => Dyn pre_m post_m SZ () -> Test () force_7 = assert_ops_are [SB 1, SB 1, SB 2]
148
force_7 :: ( T7A0 pre_m, T7A1 post_m, ReifyM pre_m, ReifyM post_m ) => Dyn pre_m post_m SZ () -> Test () force_7 = assert_ops_are [SB 1, SB 1, SB 2]
148
force_7 = assert_ops_are [SB 1, SB 1, SB 2]
43
false
true
0
8
29
79
39
40
null
null
jamwt/lambdiff
src/Lambdiff/UI.hs
bsd-3-clause
nextFile = moveFile (+1)
24
nextFile = moveFile (+1)
24
nextFile = moveFile (+1)
24
false
false
0
6
3
13
7
6
null
null
haslab/SecreC
src/Language/SecreC/Prover/Expression.hs
gpl-3.0
corecall2Prover l "add" [e1,e2] = return $ IBinOp IPlus e1 e2
64
corecall2Prover l "add" [e1,e2] = return $ IBinOp IPlus e1 e2
64
corecall2Prover l "add" [e1,e2] = return $ IBinOp IPlus e1 e2
64
false
false
0
6
13
30
15
15
null
null
jbearer/hspl
src/Control/Hspl/Internal/UI.hs
mit
formatTerm (Modulus t1 t2) = parensTerm t1 ++ ".%." ++ parensTerm t2
68
formatTerm (Modulus t1 t2) = parensTerm t1 ++ ".%." ++ parensTerm t2
68
formatTerm (Modulus t1 t2) = parensTerm t1 ++ ".%." ++ parensTerm t2
68
false
false
0
7
11
32
14
18
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/types/Kind.hs
bsd-3-clause
-- | Essentially 'splitFunTys' on kinds splitKindFunTys :: Kind -> ([Kind],Kind) splitKindFunTys (FunTy a r) = case splitKindFunTys r of (as, k) -> (a:as, k)
187
splitKindFunTys :: Kind -> ([Kind],Kind) splitKindFunTys (FunTy a r) = case splitKindFunTys r of (as, k) -> (a:as, k)
147
splitKindFunTys (FunTy a r) = case splitKindFunTys r of (as, k) -> (a:as, k)
106
true
true
0
9
54
65
36
29
null
null
ribag/ganeti-experiments
src/Ganeti/Network.hs
gpl-2.0
readPoolE :: (MonadError e m, Error e) => PoolPart -> Network -> m BA.BitArray readPoolE part net = liftM apReservations $ orNewPool net ((view . poolLens) part net)
177
readPoolE :: (MonadError e m, Error e) => PoolPart -> Network -> m BA.BitArray readPoolE part net = liftM apReservations $ orNewPool net ((view . poolLens) part net)
177
readPoolE part net = liftM apReservations $ orNewPool net ((view . poolLens) part net)
88
false
true
0
10
39
73
36
37
null
null
nushio3/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
isDerivedCt :: Ct -> Bool isDerivedCt = isDerived . cc_ev
57
isDerivedCt :: Ct -> Bool isDerivedCt = isDerived . cc_ev
57
isDerivedCt = isDerived . cc_ev
31
false
true
1
7
9
27
11
16
null
null
tomahawkins/powerpc
Language/PowerPC/RTL.hs
bsd-3-clause
seqStmts (Seq a) (Seq b) = Seq $ a ++ b
39
seqStmts (Seq a) (Seq b) = Seq $ a ++ b
39
seqStmts (Seq a) (Seq b) = Seq $ a ++ b
39
false
false
0
7
10
31
15
16
null
null
ingemaradahl/bilder
src/Compiler/SimpleInliner.hs
lgpl-3.0
countStms ∷ Function → Int countStms = length . statements
58
countStms ∷ Function → Int countStms = length . statements
58
countStms = length . statements
31
false
true
0
5
9
19
10
9
null
null
nfjinjing/bamboo-plugin-photo
src/Bamboo/Plugin/Photo/Config.hs
bsd-3-clause
plugin_type_value = "photo"
27
plugin_type_value = "photo"
27
plugin_type_value = "photo"
27
false
false
0
4
2
6
3
3
null
null
xificurC/scheme-interpreter
Main.hs
bsd-3-clause
eval env (List (Atom func : args)) = mapM (eval env) args >>= liftThrows . apply func
89
eval env (List (Atom func : args)) = mapM (eval env) args >>= liftThrows . apply func
89
eval env (List (Atom func : args)) = mapM (eval env) args >>= liftThrows . apply func
89
false
false
2
9
20
54
24
30
null
null
meimisaki/FingerTree
test/Main.hs
mit
main = $forAllProperties quickCheckResult >>= \x -> when (not x) (error "failed")
85
main = $forAllProperties quickCheckResult >>= \x -> when (not x) (error "failed")
85
main = $forAllProperties quickCheckResult >>= \x -> when (not x) (error "failed")
85
false
false
2
7
15
43
19
24
null
null
schell/ghci-ng
ghc/Main.hs
bsd-3-clause
isDoMakeMode :: Mode -> Bool isDoMakeMode (Right (Right DoMake)) = True
71
isDoMakeMode :: Mode -> Bool isDoMakeMode (Right (Right DoMake)) = True
71
isDoMakeMode (Right (Right DoMake)) = True
42
false
true
0
9
10
30
15
15
null
null
hellertime/consul-haskell
src/Network/Consul.hs
bsd-3-clause
getSessionInfo :: MonadIO m => ConsulClient -> Text -> Maybe Datacenter -> m (Maybe [SessionInfo]) getSessionInfo _client@ConsulClient{..} = I.getSessionInfo ccManager ccHostname ccPort
185
getSessionInfo :: MonadIO m => ConsulClient -> Text -> Maybe Datacenter -> m (Maybe [SessionInfo]) getSessionInfo _client@ConsulClient{..} = I.getSessionInfo ccManager ccHostname ccPort
185
getSessionInfo _client@ConsulClient{..} = I.getSessionInfo ccManager ccHostname ccPort
86
false
true
0
12
21
70
33
37
null
null
bogwonch/SecPAL
tests/Tests/ArbitraryParser.hs
gpl-3.0
propParsableE :: E -> Bool propParsableE = propParsable pE
59
propParsableE :: E -> Bool propParsableE = propParsable pE
58
propParsableE = propParsable pE
31
false
true
0
5
9
18
9
9
null
null
lukaramu/yarn
src/Main.hs
mit
getDeeperError :: LookupError -> LookupError -> LookupError getDeeperError a@(OptionError _) _ = a
98
getDeeperError :: LookupError -> LookupError -> LookupError getDeeperError a@(OptionError _) _ = a
98
getDeeperError a@(OptionError _) _ = a
38
false
true
0
8
12
33
17
16
null
null
itkovian/number-six
src/NumberSix/Handlers/Wikipedia.hs
bsd-3-clause
handler :: UninitializedHandler handler = makeBangHandler "Wikipedia" ["!w", "!wik", "!wiki"] $ liftIO . wiki
109
handler :: UninitializedHandler handler = makeBangHandler "Wikipedia" ["!w", "!wik", "!wiki"] $ liftIO . wiki
109
handler = makeBangHandler "Wikipedia" ["!w", "!wik", "!wiki"] $ liftIO . wiki
77
false
true
0
8
13
33
18
15
null
null
barrucadu/spec
examples/ComplexStack.hs
mit
swapLS :: MonadConc m => LockStack m a -> m Bool swapLS (LockStack v) = modifyMVar v $ pure . go where go (a:b:xs) = (b:a:xs, True) go xs = (xs, False)
155
swapLS :: MonadConc m => LockStack m a -> m Bool swapLS (LockStack v) = modifyMVar v $ pure . go where go (a:b:xs) = (b:a:xs, True) go xs = (xs, False)
155
swapLS (LockStack v) = modifyMVar v $ pure . go where go (a:b:xs) = (b:a:xs, True) go xs = (xs, False)
106
false
true
0
10
35
104
51
53
null
null
alphaHeavy/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
findProgramLocation :: Verbosity -> FilePath -> IO (Maybe FilePath) findProgramLocation verbosity prog = do debug verbosity $ "searching for " ++ prog ++ " in path." res <- findExecutable prog case res of Nothing -> debug verbosity ("Cannot find " ++ prog ++ " on the path") Just path -> debug verbos...
571
findProgramLocation :: Verbosity -> FilePath -> IO (Maybe FilePath) findProgramLocation verbosity prog = do debug verbosity $ "searching for " ++ prog ++ " in path." res <- findExecutable prog case res of Nothing -> debug verbosity ("Cannot find " ++ prog ++ " on the path") Just path -> debug verbos...
571
findProgramLocation verbosity prog = do debug verbosity $ "searching for " ++ prog ++ " in path." res <- findExecutable prog case res of Nothing -> debug verbosity ("Cannot find " ++ prog ++ " on the path") Just path -> debug verbosity ("found " ++ prog ++ " at "++ path) return res -- | Look for...
503
false
true
0
14
128
129
62
67
null
null
notogawa/VideoCore4
src/VideoCore4/QPU/Assembler.hs
bsd-3-clause
waddr_add :: Register -> Inst a () waddr_add x = Inst $ modify $ \inst -> inst { I.waddr_add = x }
98
waddr_add :: Register -> Inst a () waddr_add x = Inst $ modify $ \inst -> inst { I.waddr_add = x }
98
waddr_add x = Inst $ modify $ \inst -> inst { I.waddr_add = x }
63
false
true
0
8
21
48
25
23
null
null
xu-hao/QueryArrow
QueryArrow-common/src/QueryArrow/Syntax/Term.hs
bsd-3-clause
notE :: Formula -> Formula notE = Aggregate Not
51
notE :: Formula -> Formula notE = Aggregate Not
51
notE = Aggregate Not
24
false
true
0
7
12
25
10
15
null
null
davidyu/Slowpoke
hs/src/Math/matrix.hs
mit
tr :: Num a => Matrix n n a -> a tr m | dimx m /= dimy m = error "matrix not square" | otherwise = sum $ map (\i -> m |-> (i,i)) [0..(dim m - 1)]
149
tr :: Num a => Matrix n n a -> a tr m | dimx m /= dimy m = error "matrix not square" | otherwise = sum $ map (\i -> m |-> (i,i)) [0..(dim m - 1)]
149
tr m | dimx m /= dimy m = error "matrix not square" | otherwise = sum $ map (\i -> m |-> (i,i)) [0..(dim m - 1)]
116
false
true
1
10
42
100
49
51
null
null
asivitz/Hickory
Hickory/Text/Font.hs
mit
stringVal :: Parser (Value a) stringVal = do val <- quotedString return $ StringVal (Text.unpack val)
117
stringVal :: Parser (Value a) stringVal = do val <- quotedString return $ StringVal (Text.unpack val)
117
stringVal = do val <- quotedString return $ StringVal (Text.unpack val)
87
false
true
0
11
31
45
21
24
null
null
sdiehl/ghc
compiler/types/TyCoPpr.hs
bsd-3-clause
-- | Print a user-level forall; see Note [When to print foralls] in this module. pprUserForAll :: [TyCoVarBinder] -> SDoc pprUserForAll = pprUserIfaceForAll . map toIfaceForAllBndr
180
pprUserForAll :: [TyCoVarBinder] -> SDoc pprUserForAll = pprUserIfaceForAll . map toIfaceForAllBndr
99
pprUserForAll = pprUserIfaceForAll . map toIfaceForAllBndr
58
true
true
0
6
25
26
14
12
null
null
Fuuzetsu/yi-emacs-colours
src/Yi/Style/EmacsColours.hs
gpl-2.0
-- | Names: @["burlywood2"]@ -- -- R238 G197 B145, 0xeec591 burlywood2 :: Color burlywood2 = RGB 238 197 145
108
burlywood2 :: Color burlywood2 = RGB 238 197 145
48
burlywood2 = RGB 238 197 145
28
true
true
0
6
18
27
13
14
null
null
bmmoore/logic
Logic/Orders.hs
bsd-3-clause
-- kinda like lexicographic by the key order. -- if multisets are unequal, find -- the highest-ordered element where -- they have a different number of occurances, -- and the multiset with more copies is bigger multiset :: Order a -> Order (Multiset a) multiset o m1 m2 = go (desc m1) (desc m2) where desc = sortBy (fl...
504
multiset :: Order a -> Order (Multiset a) multiset o m1 m2 = go (desc m1) (desc m2) where desc = sortBy (flip o `on` fst) go (_:_) [] = GT go [] [] = EQ go [] (_:_) = LT go ((a,na):as) ((b,nb):bs) = o a b <> compare na nb <> go as bs -- total order
293
multiset o m1 m2 = go (desc m1) (desc m2) where desc = sortBy (flip o `on` fst) go (_:_) [] = GT go [] [] = EQ go [] (_:_) = LT go ((a,na):as) ((b,nb):bs) = o a b <> compare na nb <> go as bs -- total order
251
true
true
4
10
139
190
100
90
null
null
pbogdan/ngx-cache-inspector
src/Inspector.hs
bsd-3-clause
scanFolder :: (MonadSafe m, StringConv a FilePath) => a -> Producer FilePath m () scanFolder p = PF.find (toS p) PF.regular
127
scanFolder :: (MonadSafe m, StringConv a FilePath) => a -> Producer FilePath m () scanFolder p = PF.find (toS p) PF.regular
127
scanFolder p = PF.find (toS p) PF.regular
41
false
true
0
8
24
62
30
32
null
null
Atidot/hs-mesos
src/System/Mesos/Internal.hs
mit
peekMaybeBS :: Ptr.Ptr (Ptr.Ptr CChar) -> Ptr.Ptr CInt -> Managed (Maybe ByteString) peekMaybeBS sp slp = do sl <- System.Mesos.Internal.peek slp spInner <- System.Mesos.Internal.peek sp if spInner == Ptr.nullPtr then return Nothing else liftIO (packCStringLen (spInner, fromIntegral sl)) >>= return . Just
320
peekMaybeBS :: Ptr.Ptr (Ptr.Ptr CChar) -> Ptr.Ptr CInt -> Managed (Maybe ByteString) peekMaybeBS sp slp = do sl <- System.Mesos.Internal.peek slp spInner <- System.Mesos.Internal.peek sp if spInner == Ptr.nullPtr then return Nothing else liftIO (packCStringLen (spInner, fromIntegral sl)) >>= return . Just
320
peekMaybeBS sp slp = do sl <- System.Mesos.Internal.peek slp spInner <- System.Mesos.Internal.peek sp if spInner == Ptr.nullPtr then return Nothing else liftIO (packCStringLen (spInner, fromIntegral sl)) >>= return . Just
235
false
true
0
14
55
125
61
64
null
null
jvanburen/slither
src/Printer.hs
bsd-3-clause
-- "\x2584\x2584" -- "\x2501" bigX = "\x2573 "
50
bigX = "\x2573 "
16
bigX = "\x2573 "
16
true
false
0
4
11
7
4
3
null
null
Arguggi/heed
heed-vty/src/Heed/Vty/MainWidget.hs
bsd-3-clause
appEvent s (BT.VtyEvent (V.EvKey (V.KChar 'e') [])) = do let conn = s ^. wsConn sel = BL.listSelectedElement (s ^. feeds) case sel of Nothing -> return () Just (_, e) -> fork_ $ WS.sendBinaryData conn (encode (GetSingleFeedInfo (e ^. feedListId))) M.continue $ s & status .~ "Getting ...
338
appEvent s (BT.VtyEvent (V.EvKey (V.KChar 'e') [])) = do let conn = s ^. wsConn sel = BL.listSelectedElement (s ^. feeds) case sel of Nothing -> return () Just (_, e) -> fork_ $ WS.sendBinaryData conn (encode (GetSingleFeedInfo (e ^. feedListId))) M.continue $ s & status .~ "Getting ...
338
appEvent s (BT.VtyEvent (V.EvKey (V.KChar 'e') [])) = do let conn = s ^. wsConn sel = BL.listSelectedElement (s ^. feeds) case sel of Nothing -> return () Just (_, e) -> fork_ $ WS.sendBinaryData conn (encode (GetSingleFeedInfo (e ^. feedListId))) M.continue $ s & status .~ "Getting ...
338
false
false
0
17
87
149
73
76
null
null
xrchz/ot
OpenTheory/Read.hs
gpl-3.0
-- |Generic article reader. -- Processes article commands and updates the state accordingly. -- -- Parameterised by actions for dealing with the axiom article command, exceptions raised during reading, and when end-of-file is reached. -- -- The axiom action is given the hypotheses and the conclusion of the desired axio...
4,467
readArticle :: Exception e => ([Term] -> Term -> [Object] -> RM ()) -- ^ axiom handler -> (e -> RM a) -- ^ exception handler -> RM a -- ^ EOF handler -> RM a readArticle axiom handleError handleEOF = loop where loop = do result <- getLine case result of Left _ -> handleEOF Right line -> ...
4,007
readArticle axiom handleError handleEOF = loop where loop = do result <- getLine case result of Left _ -> handleEOF Right line -> catchRM (rm >> loop) handleError where rm = case line of '"':s -> do st <- getStack putStack $ OName (read (init s)) : st ...
3,839
true
true
0
30
1,800
1,710
806
904
null
null
sdiehl/ghc
hadrian/src/Rules/Generate.hs
bsd-3-clause
generateRules :: Rules () generateRules = do root <- buildRootRules (root -/- "ghc-stage1") <~+ ghcWrapper Stage1 (root -/- "ghc-stage2") <~+ ghcWrapper Stage2 forM_ [Stage0 ..] $ \stage -> do let prefix = root -/- stageString stage -/- "lib" go gen file = generate file (semiEmptyT...
1,181
generateRules :: Rules () generateRules = do root <- buildRootRules (root -/- "ghc-stage1") <~+ ghcWrapper Stage1 (root -/- "ghc-stage2") <~+ ghcWrapper Stage2 forM_ [Stage0 ..] $ \stage -> do let prefix = root -/- stageString stage -/- "lib" go gen file = generate file (semiEmptyT...
1,181
generateRules = do root <- buildRootRules (root -/- "ghc-stage1") <~+ ghcWrapper Stage1 (root -/- "ghc-stage2") <~+ ghcWrapper Stage2 forM_ [Stage0 ..] $ \stage -> do let prefix = root -/- stageString stage -/- "lib" go gen file = generate file (semiEmptyTarget stage) gen (...
1,155
false
true
0
22
299
302
148
154
null
null
seereason/haskell-unixutils
System/Unix/SpecialDevice.hs
bsd-3-clause
ofNodeStatus :: FileStatus -> Maybe SpecialDevice ofNodeStatus status = if isBlockDevice status then (Just . BlockDevice . specialDeviceID $ status) else if isCharacterDevice status then (Just . CharacterDevice . specialDeviceID $ status) else Nothing
295
ofNodeStatus :: FileStatus -> Maybe SpecialDevice ofNodeStatus status = if isBlockDevice status then (Just . BlockDevice . specialDeviceID $ status) else if isCharacterDevice status then (Just . CharacterDevice . specialDeviceID $ status) else Nothing
295
ofNodeStatus status = if isBlockDevice status then (Just . BlockDevice . specialDeviceID $ status) else if isCharacterDevice status then (Just . CharacterDevice . specialDeviceID $ status) else Nothing
245
false
true
0
10
77
78
39
39
null
null
tjakway/ghcjvm
compiler/prelude/PrelNames.hs
bsd-3-clause
fromListNName = varQual gHC_EXTS (fsLit "fromListN") fromListNClassOpKey
74
fromListNName = varQual gHC_EXTS (fsLit "fromListN") fromListNClassOpKey
74
fromListNName = varQual gHC_EXTS (fsLit "fromListN") fromListNClassOpKey
74
false
false
0
7
8
19
9
10
null
null
WraithM/peertrader-backend
src/PeerTrader/Admin/Statistics.hs
bsd-3-clause
numStrategiesActive :: AppReader Int numStrategiesActive = runDb $ do p2pPicks <- countAll (undefined :: ActiveStrategy P2PPicksType) af <- countAll (undefined :: ActiveStrategy AutoFilter) return (af + p2pPicks)
224
numStrategiesActive :: AppReader Int numStrategiesActive = runDb $ do p2pPicks <- countAll (undefined :: ActiveStrategy P2PPicksType) af <- countAll (undefined :: ActiveStrategy AutoFilter) return (af + p2pPicks)
224
numStrategiesActive = runDb $ do p2pPicks <- countAll (undefined :: ActiveStrategy P2PPicksType) af <- countAll (undefined :: ActiveStrategy AutoFilter) return (af + p2pPicks)
187
false
true
0
11
38
69
33
36
null
null
jaapweel/piffle
src/Compiler.hs
gpl-2.0
logMessage :: Integer -> [Doc] -> Compiler () logMessage i ss = tell (LogEntry i `map` ss)
94
logMessage :: Integer -> [Doc] -> Compiler () logMessage i ss = tell (LogEntry i `map` ss)
94
logMessage i ss = tell (LogEntry i `map` ss)
48
false
true
0
8
20
47
24
23
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/splitAt_1.hs
mit
esEsOrdering :: Ordering -> Ordering -> MyBool esEsOrdering LT LT = MyTrue
78
esEsOrdering :: Ordering -> Ordering -> MyBool esEsOrdering LT LT = MyTrue
78
esEsOrdering LT LT = MyTrue
27
false
true
0
8
15
30
13
17
null
null
zaxtax/hakaru
haskell/Examples/SlamEmbed.hs
bsd-3-clause
vZipWith :: Base repr => (repr a -> repr b -> repr c) -> repr (Vector a) -> repr (Vector b) -> repr (Vector c) vZipWith = undefined
131
vZipWith :: Base repr => (repr a -> repr b -> repr c) -> repr (Vector a) -> repr (Vector b) -> repr (Vector c) vZipWith = undefined
131
vZipWith = undefined
20
false
true
0
11
27
77
36
41
null
null
afcowie/new-snap-server
src/Snap/Internal/Http/Server/Date.hs
bsd-3-clause
------------------------------------------------------------------------------ fetchTime :: IO (ByteString,ByteString,CTime) fetchTime = do !now <- epochTime !t1 <- formatHttpTime now !t2 <- formatLogTime now let !out = (t1, t2, now) return out ---------------------------------------------------...
347
fetchTime :: IO (ByteString,ByteString,CTime) fetchTime = do !now <- epochTime !t1 <- formatHttpTime now !t2 <- formatLogTime now let !out = (t1, t2, now) return out ------------------------------------------------------------------------------
268
fetchTime = do !now <- epochTime !t1 <- formatHttpTime now !t2 <- formatLogTime now let !out = (t1, t2, now) return out ------------------------------------------------------------------------------
222
true
true
0
11
51
87
39
48
null
null
adelbertc/nets-hs
src/Nets/Util/Queue.hs
bsd-3-clause
empty :: Queue a empty = Queue [] []
36
empty :: Queue a empty = Queue [] []
36
empty = Queue [] []
19
false
true
1
6
8
26
11
15
null
null
sdiehl/ghc
compiler/main/HscTypes.hs
bsd-3-clause
metaRequestT :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsType GhcPs) metaRequestT h = fmap unMetaResT . h (MetaT MetaResT)
131
metaRequestT :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsType GhcPs) metaRequestT h = fmap unMetaResT . h (MetaT MetaResT)
131
metaRequestT h = fmap unMetaResT . h (MetaT MetaResT)
53
false
true
0
10
22
60
27
33
null
null
raventid/coursera_learning
haskell/chapter11/worksheet.hs
mit
-- Tree for example tree = Node (Node Leaf 10 Leaf) 1 (Node Leaf 11 Leaf)
73
tree = Node (Node Leaf 10 Leaf) 1 (Node Leaf 11 Leaf)
53
tree = Node (Node Leaf 10 Leaf) 1 (Node Leaf 11 Leaf)
53
true
false
0
7
15
34
17
17
null
null
romanb/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types.hs
mpl-2.0
-- | A section of the request or response body that provides information about -- the file that is being transcoded. jInput :: Lens' Job' JobInput jInput = lens _jInput (\s a -> s { _jInput = a })
196
jInput :: Lens' Job' JobInput jInput = lens _jInput (\s a -> s { _jInput = a })
79
jInput = lens _jInput (\s a -> s { _jInput = a })
49
true
true
0
9
38
48
24
24
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
voicelessly = id
16
voicelessly = id
16
voicelessly = id
16
false
false
0
4
2
6
3
3
null
null
alexvong1995/pandoc
src/Text/Pandoc/Writers/ICML.hs
gpl-2.0
inlineToICML _ style LineBreak = charStyle style $ text lineSeparator
69
inlineToICML _ style LineBreak = charStyle style $ text lineSeparator
69
inlineToICML _ style LineBreak = charStyle style $ text lineSeparator
69
false
false
2
6
9
28
10
18
null
null
phischu/fragnix
src/Fragnix/ModuleDeclarations.hs
bsd-3-clause
declGenre (ForImp _ _ _ _ _ _) = ForeignImport
46
declGenre (ForImp _ _ _ _ _ _) = ForeignImport
46
declGenre (ForImp _ _ _ _ _ _) = ForeignImport
46
false
false
0
7
9
25
12
13
null
null
Oblosys/webviews
src/lib/Xprez.hs
mit
renderX (With f x) = let (hs, attrs) = renderX x in (hs, f attrs)
65
renderX (With f x) = let (hs, attrs) = renderX x in (hs, f attrs)
65
renderX (With f x) = let (hs, attrs) = renderX x in (hs, f attrs)
65
false
false
0
9
14
48
23
25
null
null
MichielDeCuyper/Algebraic-Effect-Handlers
src/sandbox.hs
mit
handleVoid :: Free Void a -> a handleVoid = fold undefined id
61
handleVoid :: Free Void a -> a handleVoid = fold undefined id
61
handleVoid = fold undefined id
30
false
true
0
7
11
32
13
19
null
null
keera-studios/hsQt
demos/dem_01.hs
bsd-2-clause
rds_ud = -2
11
rds_ud = -2
11
rds_ud = -2
11
false
false
0
5
2
8
4
4
null
null
keithodulaigh/Hets
Taxonomy/MMiSSOntologyGraph.hs
gpl-2.0
purgeGraph :: Int -> A.GraphInfo -> IO A.Result purgeGraph gid gv = do (gs, _) <- readIORef gv case lookup gid gs of Just g -> do A.writeOntoGraph gid empty gv A.writeNodeMap gid Map.empty gv foldM (myDeleteNode gid gv) (A.Result 0 Nothing) $ Map.toList $ A.nodes ...
426
purgeGraph :: Int -> A.GraphInfo -> IO A.Result purgeGraph gid gv = do (gs, _) <- readIORef gv case lookup gid gs of Just g -> do A.writeOntoGraph gid empty gv A.writeNodeMap gid Map.empty gv foldM (myDeleteNode gid gv) (A.Result 0 Nothing) $ Map.toList $ A.nodes ...
426
purgeGraph gid gv = do (gs, _) <- readIORef gv case lookup gid gs of Just g -> do A.writeOntoGraph gid empty gv A.writeNodeMap gid Map.empty gv foldM (myDeleteNode gid gv) (A.Result 0 Nothing) $ Map.toList $ A.nodes g Nothing -> return $ A.Result 0 $ Just $...
378
false
true
0
17
146
169
78
91
null
null