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
shepheb/go10c
Compiler.hs
bsd-3-clause
assignable :: Type -> Type -> Compiler Bool assignable from to | from == to = return True -- identical types, case 1. | otherwise = do uFrom <- underlyingType from uTo <- underlyingType to case (uFrom == uTo, from, to) of (True, TypeName _, TypeName _) -> return False -- a...
944
assignable :: Type -> Type -> Compiler Bool assignable from to | from == to = return True -- identical types, case 1. | otherwise = do uFrom <- underlyingType from uTo <- underlyingType to case (uFrom == uTo, from, to) of (True, TypeName _, TypeName _) -> return False -- a...
944
assignable from to | from == to = return True -- identical types, case 1. | otherwise = do uFrom <- underlyingType from uTo <- underlyingType to case (uFrom == uTo, from, to) of (True, TypeName _, TypeName _) -> return False -- at least one must be non-named (T...
900
false
true
1
15
323
278
140
138
null
null
spechub/Hets
Proofs/EdgeUtils.hs
gpl-2.0
{- | returns all paths of globalDef edges or globalThm edges between the given source and target node -} getAllGlobPathsBetween :: DGraph -> Node -> Node -> [[LEdge DGLinkLab]] getAllGlobPathsBetween dgraph = getAllPathsOfTypeBetween dgraph isGlobalEdge
256
getAllGlobPathsBetween :: DGraph -> Node -> Node -> [[LEdge DGLinkLab]] getAllGlobPathsBetween dgraph = getAllPathsOfTypeBetween dgraph isGlobalEdge
148
getAllGlobPathsBetween dgraph = getAllPathsOfTypeBetween dgraph isGlobalEdge
76
true
true
0
10
37
41
21
20
null
null
bitemyapp/github
samples/Users/Followers/ListFollowers.hs
bsd-3-clause
formatUser = Github.githubOwnerLogin
36
formatUser = Github.githubOwnerLogin
36
formatUser = Github.githubOwnerLogin
36
false
false
1
6
2
12
4
8
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Config.hs
bsd-2-clause
-- | TeX Only - Numbered sections? numberedSections :: Bool numberedSections = True
83
numberedSections :: Bool numberedSections = True
48
numberedSections = True
23
true
true
0
4
12
12
7
5
null
null
phadej/generics-sop
src/Generics/SOP/NP.hs
bsd-3-clause
liftA_POP = hliftA
18
liftA_POP = hliftA
18
liftA_POP = hliftA
18
false
false
0
4
2
6
3
3
null
null
elliottt/dang
src/Dang/Utils/PP.hs
bsd-3-clause
sgrFor AnnLiteral = [Ansi.SetColor Ansi.Foreground Ansi.Vivid Ansi.Magenta]
75
sgrFor AnnLiteral = [Ansi.SetColor Ansi.Foreground Ansi.Vivid Ansi.Magenta]
75
sgrFor AnnLiteral = [Ansi.SetColor Ansi.Foreground Ansi.Vivid Ansi.Magenta]
75
false
false
1
7
6
30
13
17
null
null
alexander-at-github/eta
compiler/ETA/DeSugar/DsArrows.hs
bsd-3-clause
collectStmtBinders (TransStmt { trS_stmts = stmts }) = collectLStmtsBinders stmts
81
collectStmtBinders (TransStmt { trS_stmts = stmts }) = collectLStmtsBinders stmts
81
collectStmtBinders (TransStmt { trS_stmts = stmts }) = collectLStmtsBinders stmts
81
false
false
0
8
9
25
12
13
null
null
AleXoundOS/mpv-cut
src/MPV_Cut.hs
gpl-3.0
findFileByPatternInDir :: BSL.ByteString -> BSL.ByteString -> IO BSL.ByteString findFileByPatternInDir pattern dir = do dirList <- getDirectoryContents (BSL.unpack dir) let nonNumberCondition :: String -> Bool nonNumberCondition with = notElem (BSL.unpack $ (extFromFilena...
807
findFileByPatternInDir :: BSL.ByteString -> BSL.ByteString -> IO BSL.ByteString findFileByPatternInDir pattern dir = do dirList <- getDirectoryContents (BSL.unpack dir) let nonNumberCondition :: String -> Bool nonNumberCondition with = notElem (BSL.unpack $ (extFromFilena...
807
findFileByPatternInDir pattern dir = do dirList <- getDirectoryContents (BSL.unpack dir) let nonNumberCondition :: String -> Bool nonNumberCondition with = notElem (BSL.unpack $ (extFromFilename . nameFromFilename) (BSL.pack with)) [BSL.unpack $ show2d...
727
false
true
0
17
242
247
120
127
null
null
hanshoglund/sox2
src/Sound/Sox2.hs
bsd-3-clause
-- upsample [factor] upsample :: Audio -> Sox Audio upsample = error "No upsample"
82
upsample :: Audio -> Sox Audio upsample = error "No upsample"
61
upsample = error "No upsample"
30
true
true
0
6
13
22
11
11
null
null
abakst/liquidhaskell
src/Language/Haskell/Liquid/Misc.hs
bsd-3-clause
mapN 0 f (x:xs) = f x : xs
26
mapN 0 f (x:xs) = f x : xs
26
mapN 0 f (x:xs) = f x : xs
26
false
false
0
7
8
27
13
14
null
null
jyp/inox
C/Deep.hs
gpl-3.0
-- | Structure fields cStruct :: [(String,Type)] -> C cStruct fields = mconcat [cDecl (f,t) <> ";\n" | (f,t) <- fields]
119
cStruct :: [(String,Type)] -> C cStruct fields = mconcat [cDecl (f,t) <> ";\n" | (f,t) <- fields]
97
cStruct fields = mconcat [cDecl (f,t) <> ";\n" | (f,t) <- fields]
65
true
true
0
9
20
61
34
27
null
null
ezyang/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
mangleIndexTree :: DynFlags -> CmmExpr -> CmmExpr mangleIndexTree dflags (CmmRegOff reg off) = CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)] where width = typeWidth (cmmRegType dflags reg)
226
mangleIndexTree :: DynFlags -> CmmExpr -> CmmExpr mangleIndexTree dflags (CmmRegOff reg off) = CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)] where width = typeWidth (cmmRegType dflags reg)
226
mangleIndexTree dflags (CmmRegOff reg off) = CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)] where width = typeWidth (cmmRegType dflags reg)
176
false
true
1
11
33
96
44
52
null
null
sdiehl/ghc
testsuite/tests/perf/should_run/T8763.hs
bsd-3-clause
nop :: Monad m => a -> m () nop _ = return ()
45
nop :: Monad m => a -> m () nop _ = return ()
45
nop _ = return ()
17
false
true
0
8
13
35
16
19
null
null
huggablemonad/smooch
app/migrations/Rivet.hs
gpl-3.0
main :: IO () main = do e <- doesFileExist ".env" when e $ Configuration.Dotenv.loadFile False ".env" args <- getArgs let (env, mode) = case args of [env', "up"] -> (env', Rivet.MigrateUp) [env', "down"] -> (env', Rivet.MigrateDown) ...
912
main :: IO () main = do e <- doesFileExist ".env" when e $ Configuration.Dotenv.loadFile False ".env" args <- getArgs let (env, mode) = case args of [env', "up"] -> (env', Rivet.MigrateUp) [env', "down"] -> (env', Rivet.MigrateDown) ...
912
main = do e <- doesFileExist ".env" when e $ Configuration.Dotenv.loadFile False ".env" args <- getArgs let (env, mode) = case args of [env', "up"] -> (env', Rivet.MigrateUp) [env', "down"] -> (env', Rivet.MigrateDown) [env'...
898
false
true
0
14
287
275
133
142
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GL/PeekPoke.hs
bsd-3-clause
poke1 :: Storable a => Ptr a -> a -> IO () poke1 ptr x = pokeElemOff ptr 0 x
79
poke1 :: Storable a => Ptr a -> a -> IO () poke1 ptr x = pokeElemOff ptr 0 x
79
poke1 ptr x = pokeElemOff ptr 0 x
36
false
true
0
9
22
46
21
25
null
null
randen/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
initPackageDBIfNeeded :: Verbosity -> ConfigFlags -> Compiler -> ProgramConfiguration -> IO () initPackageDBIfNeeded verbosity configFlags comp conf = do SpecificPackageDB dbPath <- getSandboxPackageDB configFlags packageDBExists <- doesDirectoryExist dbPath unles...
553
initPackageDBIfNeeded :: Verbosity -> ConfigFlags -> Compiler -> ProgramConfiguration -> IO () initPackageDBIfNeeded verbosity configFlags comp conf = do SpecificPackageDB dbPath <- getSandboxPackageDB configFlags packageDBExists <- doesDirectoryExist dbPath unles...
553
initPackageDBIfNeeded verbosity configFlags comp conf = do SpecificPackageDB dbPath <- getSandboxPackageDB configFlags packageDBExists <- doesDirectoryExist dbPath unless packageDBExists $ Register.initPackageDB verbosity comp conf dbPath when packageDBExists $ debug verbosity $ "The package database al...
408
false
true
0
10
126
107
48
59
null
null
amremam2004/vxmlizer
VXMLTree.hs
bsd-3-clause
-- Converting a menu to a XMLTree convertMenu2Tree :: Element -> VXMLTree convertMenu2Tree elem = Menu (Prompt (ActPrompt (convertPrompts2Str $ findChildren (mkQName "prompt") elem))) (Options (convertChoices2Options $ findChildren (mkQName "choice") elem))
287
convertMenu2Tree :: Element -> VXMLTree convertMenu2Tree elem = Menu (Prompt (ActPrompt (convertPrompts2Str $ findChildren (mkQName "prompt") elem))) (Options (convertChoices2Options $ findChildren (mkQName "choice") elem))
253
convertMenu2Tree elem = Menu (Prompt (ActPrompt (convertPrompts2Str $ findChildren (mkQName "prompt") elem))) (Options (convertChoices2Options $ findChildren (mkQName "choice") elem))
213
true
true
0
14
60
81
40
41
null
null
urbanslug/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
ppr_dec _ (StandaloneDerivD cxt ty) = hsep [ text "deriving instance", pprCxt cxt, ppr ty ]
93
ppr_dec _ (StandaloneDerivD cxt ty) = hsep [ text "deriving instance", pprCxt cxt, ppr ty ]
93
ppr_dec _ (StandaloneDerivD cxt ty) = hsep [ text "deriving instance", pprCxt cxt, ppr ty ]
93
false
false
0
7
17
40
19
21
null
null
trxeste/wrk
haskell/myBlog/Application.hs
bsd-3-clause
shutdownApp :: App -> IO () shutdownApp _ = return ()
53
shutdownApp :: App -> IO () shutdownApp _ = return ()
53
shutdownApp _ = return ()
25
false
true
0
7
10
28
13
15
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F25.hs
bsd-3-clause
ptr_glTexCoord2fVertex3fvSUN :: FunPtr (Ptr GLfloat -> Ptr GLfloat -> IO ()) ptr_glTexCoord2fVertex3fvSUN = unsafePerformIO $ getCommand "glTexCoord2fVertex3fvSUN"
163
ptr_glTexCoord2fVertex3fvSUN :: FunPtr (Ptr GLfloat -> Ptr GLfloat -> IO ()) ptr_glTexCoord2fVertex3fvSUN = unsafePerformIO $ getCommand "glTexCoord2fVertex3fvSUN"
163
ptr_glTexCoord2fVertex3fvSUN = unsafePerformIO $ getCommand "glTexCoord2fVertex3fvSUN"
86
false
true
0
10
16
43
20
23
null
null
keveri/hib
src/Hib/Plugins/Piato.hs
bsd-3-clause
feed :: String feed = "http://www.sonaatti.fi/rssfeed/"
55
feed :: String feed = "http://www.sonaatti.fi/rssfeed/"
55
feed = "http://www.sonaatti.fi/rssfeed/"
40
false
true
0
4
5
11
6
5
null
null
dec9ue/jhc_copygc
src/Ho/Library.hs
gpl-2.0
condenseWhitespace xs = reverse $ dropWhile isSpace (reverse (dropWhile isSpace (cw xs))) where cw (x:y:zs) | isSpace x && isSpace y = cw (' ':zs) cw (x:xs) = x:cw xs cw [] = []
190
condenseWhitespace xs = reverse $ dropWhile isSpace (reverse (dropWhile isSpace (cw xs))) where cw (x:y:zs) | isSpace x && isSpace y = cw (' ':zs) cw (x:xs) = x:cw xs cw [] = []
190
condenseWhitespace xs = reverse $ dropWhile isSpace (reverse (dropWhile isSpace (cw xs))) where cw (x:y:zs) | isSpace x && isSpace y = cw (' ':zs) cw (x:xs) = x:cw xs cw [] = []
190
false
false
0
12
46
118
57
61
null
null
kajigor/uKanren_transformations
test/resources/Program/L.hs
bsd-3-clause
-- De Bruijn encoding for L lang -- data L = Iconst_ Int -- | Bconst_ Bool -- | Var_ Int -- | Plus_ L L -- | Mult_ L L -- | Equal_ L L -- | Less_ L L -- | If_ L L L -- | Let_ L L just x = C "some" [x]
258
just x = C "some" [x]
21
just x = C "some" [x]
21
true
false
0
6
115
27
18
9
null
null
benkolera/phb
hs/Site/TimeLog.hs
mit
possibleOwnerSplices :: Splices (PhbRuntimeSplice (Entity Person) -> PhbSplice) possibleOwnerSplices = mapV (C.pureSplice . C.textSplice) $ do "userId" ## (^.eKey.to keyToText) "userName" ## (^.eVal.personName)
218
possibleOwnerSplices :: Splices (PhbRuntimeSplice (Entity Person) -> PhbSplice) possibleOwnerSplices = mapV (C.pureSplice . C.textSplice) $ do "userId" ## (^.eKey.to keyToText) "userName" ## (^.eVal.personName)
218
possibleOwnerSplices = mapV (C.pureSplice . C.textSplice) $ do "userId" ## (^.eKey.to keyToText) "userName" ## (^.eVal.personName)
138
false
true
0
11
30
77
39
38
null
null
thko/morph
Main.hs
mit
main :: IO () main = do wLen : wFreq : filenames <- getArgs wordlist <- words <$> readInput filenames mapM_ print $ morph (read wLen) (read wFreq) wordlist
161
main :: IO () main = do wLen : wFreq : filenames <- getArgs wordlist <- words <$> readInput filenames mapM_ print $ morph (read wLen) (read wFreq) wordlist
161
main = do wLen : wFreq : filenames <- getArgs wordlist <- words <$> readInput filenames mapM_ print $ morph (read wLen) (read wFreq) wordlist
147
false
true
0
10
34
74
34
40
null
null
gcampax/ghc
compiler/types/TyCon.hs
bsd-3-clause
primRepSizeW _ PtrRep = 1
40
primRepSizeW _ PtrRep = 1
40
primRepSizeW _ PtrRep = 1
40
false
false
0
5
19
11
5
6
null
null
loadimpact/http2-test
hs-src/Rede/HarFiles/ServedEntry.hs
bsd-3-clause
harHeadersToUVL :: [Har_Header] -> UnpackedNameValueList harHeadersToUVL h = UnpackedNameValueList $ map (\ har_header -> ( lowercaseText (har_header ^. headerName ), (har_header ^. headerValue) ) ) h
211
harHeadersToUVL :: [Har_Header] -> UnpackedNameValueList harHeadersToUVL h = UnpackedNameValueList $ map (\ har_header -> ( lowercaseText (har_header ^. headerName ), (har_header ^. headerValue) ) ) h
211
harHeadersToUVL h = UnpackedNameValueList $ map (\ har_header -> ( lowercaseText (har_header ^. headerName ), (har_header ^. headerValue) ) ) h
154
false
true
0
10
36
68
34
34
null
null
allanderek/ipclib
Language/Ptrees/Print.hs
gpl-2.0
pprintAssign :: Doc -> Doc -> Doc pprintAssign a b = Pretty.hsep [ a, Pretty.text "=", b ]
93
pprintAssign :: Doc -> Doc -> Doc pprintAssign a b = Pretty.hsep [ a, Pretty.text "=", b ]
93
pprintAssign a b = Pretty.hsep [ a, Pretty.text "=", b ]
59
false
true
0
8
20
48
23
25
null
null
karamellpelle/MEnv
source/OpenGL/IOS/Values.hs
bsd-2-clause
gl_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum gl_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
81
gl_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum gl_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
81
gl_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
40
false
true
0
4
6
11
6
5
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
lcmIntegerName = varQual gHC_INTEGER_TYPE (fsLit "lcmInteger") lcmIntegerIdKey
92
lcmIntegerName = varQual gHC_INTEGER_TYPE (fsLit "lcmInteger") lcmIntegerIdKey
92
lcmIntegerName = varQual gHC_INTEGER_TYPE (fsLit "lcmInteger") lcmIntegerIdKey
92
false
false
0
7
20
19
9
10
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_72 x = happyTcHack x happyFail
37
action_72 x = happyTcHack x happyFail
37
action_72 x = happyTcHack x happyFail
37
false
false
0
5
5
14
6
8
null
null
nh2/shake
Development/Ninja/Parse.hs
bsd-3-clause
splitColon :: Str -> (Str, Str) splitColon = splitUnescaped ':'
64
splitColon :: Str -> (Str, Str) splitColon = splitUnescaped ':'
63
splitColon = splitUnescaped ':'
31
false
true
0
8
10
30
14
16
null
null
sanjoy/DietLISP
src/Builtins.hs
gpl-2.0
liftUnary predicate (BottomD string) = BottomD string
53
liftUnary predicate (BottomD string) = BottomD string
53
liftUnary predicate (BottomD string) = BottomD string
53
false
false
0
7
6
20
9
11
null
null
benekastah/ebitor
src/Ebitor/Language.hs
bsd-3-clause
bracketed :: Parser a -> Parser a bracketed = between (char '<') (char '>')
75
bracketed :: Parser a -> Parser a bracketed = between (char '<') (char '>')
75
bracketed = between (char '<') (char '>')
41
false
true
0
7
13
38
18
20
null
null
olsner/ghc
compiler/prelude/PrimOp.hs
bsd-3-clause
primOpSig :: PrimOp -> ([TyVar], [Type], Type, Arity, StrictSig) primOpSig op = (tyvars, arg_tys, res_ty, arity, primOpStrictness op arity) where arity = length arg_tys (tyvars, arg_tys, res_ty) = case (primOpInfo op) of Monadic _occ ty -> ([], [ty], ty ) ...
546
primOpSig :: PrimOp -> ([TyVar], [Type], Type, Arity, StrictSig) primOpSig op = (tyvars, arg_tys, res_ty, arity, primOpStrictness op arity) where arity = length arg_tys (tyvars, arg_tys, res_ty) = case (primOpInfo op) of Monadic _occ ty -> ([], [ty], ty ) ...
546
primOpSig op = (tyvars, arg_tys, res_ty, arity, primOpStrictness op arity) where arity = length arg_tys (tyvars, arg_tys, res_ty) = case (primOpInfo op) of Monadic _occ ty -> ([], [ty], ty ) Dyadic _occ ty -> ([], [ty,ty], ty ...
481
false
true
1
9
207
209
114
95
null
null
ezyang/ghc
compiler/cmm/CmmCallConv.hs
bsd-3-clause
realDoubleRegs dflags = map DoubleReg $ regList (mAX_Real_Double_REG dflags)
79
realDoubleRegs dflags = map DoubleReg $ regList (mAX_Real_Double_REG dflags)
79
realDoubleRegs dflags = map DoubleReg $ regList (mAX_Real_Double_REG dflags)
79
false
false
0
8
11
25
11
14
null
null
alephcloud/hs-aws-general
src/Aws/SignatureV4.hs
mit
signingKeyPrefix :: IsString a => a signingKeyPrefix = "AWS4"
61
signingKeyPrefix :: IsString a => a signingKeyPrefix = "AWS4"
61
signingKeyPrefix = "AWS4"
25
false
true
0
6
8
18
9
9
null
null
acowley/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
narrow8WordLit (MachWord w) = MachWord (toInteger (fromInteger w :: Word8))
77
narrow8WordLit (MachWord w) = MachWord (toInteger (fromInteger w :: Word8))
77
narrow8WordLit (MachWord w) = MachWord (toInteger (fromInteger w :: Word8))
77
false
false
0
9
11
34
16
18
null
null
abhinav-mehta/CipherSolver
src/PlayFair.hs
bsd-3-clause
bigram :: Key -> Int -> Char -> Char -> String bigram k dir c1 c2 | y1 == y2 = get (x1 + dir, y1) : [get (x2 + dir, y2)] | x1 == x2 = get (x1, y1 + dir) : [get (x2, y2 + dir)] | otherwise = get (x2, y1) : [get (x1, y2)] where (x1, y1) = head . M.keys $ M.filter (== c1) k (x2, y2) = hea...
398
bigram :: Key -> Int -> Char -> Char -> String bigram k dir c1 c2 | y1 == y2 = get (x1 + dir, y1) : [get (x2 + dir, y2)] | x1 == x2 = get (x1, y1 + dir) : [get (x2, y2 + dir)] | otherwise = get (x2, y1) : [get (x1, y2)] where (x1, y1) = head . M.keys $ M.filter (== c1) k (x2, y2) = hea...
398
bigram k dir c1 c2 | y1 == y2 = get (x1 + dir, y1) : [get (x2 + dir, y2)] | x1 == x2 = get (x1, y1 + dir) : [get (x2, y2 + dir)] | otherwise = get (x2, y1) : [get (x1, y2)] where (x1, y1) = head . M.keys $ M.filter (== c1) k (x2, y2) = head . M.keys $ M.filter (== c2) k get (...
351
false
true
0
10
135
263
138
125
null
null
imeckler/proof
Utils.hs
mit
strip :: String -> String strip = stripRight . stripLeft
56
strip :: String -> String strip = stripRight . stripLeft
56
strip = stripRight . stripLeft
30
false
true
0
7
9
26
11
15
null
null
ihc/futhark
src/Futhark/Pass/ExtractKernels/ISRWIM.hs
isc
-- | Interchange Reduce With Inner Map. Tries to turn a @reduce(map)@ into a -- @map(reduce) irwim :: (MonadBinder m, Lore m ~ SOACS, LocalScope SOACS m) => Pattern -> SubExp -> Commutativity -> Lambda -> [(SubExp, VName)] -> Maybe (m ()) irwim res_pat w comm red_fun red_input | Just ...
2,009
irwim :: (MonadBinder m, Lore m ~ SOACS, LocalScope SOACS m) => Pattern -> SubExp -> Commutativity -> Lambda -> [(SubExp, VName)] -> Maybe (m ()) irwim res_pat w comm red_fun red_input | Just (map_pat, map_cs, map_w, map_fun) <- rwimPossible red_fun = Just $ do let (accs, arrs) ...
1,916
irwim res_pat w comm red_fun red_input | Just (map_pat, map_cs, map_w, map_fun) <- rwimPossible red_fun = Just $ do let (accs, arrs) = unzip red_input arrs' <- transposedArrays arrs -- FIXME? Can we reasonably assume that the accumulator is a -- replicate? We also assume that it is non-empty...
1,737
true
true
1
24
595
576
271
305
null
null
athanclark/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
eqCon = sUN "Refl"
18
eqCon = sUN "Refl"
18
eqCon = sUN "Refl"
18
false
false
1
5
3
13
4
9
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
betweenMany leftP rightP p = do z <- grabUpto leftP case z of Just _ -> liftM2 (:) (between leftP rightP p) (betweenMany leftP rightP p) Nothing -> return []
185
betweenMany leftP rightP p = do z <- grabUpto leftP case z of Just _ -> liftM2 (:) (between leftP rightP p) (betweenMany leftP rightP p) Nothing -> return []
185
betweenMany leftP rightP p = do z <- grabUpto leftP case z of Just _ -> liftM2 (:) (between leftP rightP p) (betweenMany leftP rightP p) Nothing -> return []
185
false
false
0
12
57
79
37
42
null
null
kosmoskatten/synthetic-web
test/TestSuite.hs
mit
main :: IO () main = defaultMain testSuite
42
main :: IO () main = defaultMain testSuite
42
main = defaultMain testSuite
28
false
true
0
6
7
19
9
10
null
null
mzini/hosa
src/HoSA/Data/Program/Expression.hs
mit
mapExpressionM f g (Pair _ t1 t2) = pair <$> mapExpressionM f g t1 <*> mapExpressionM f g t2
98
mapExpressionM f g (Pair _ t1 t2) = pair <$> mapExpressionM f g t1 <*> mapExpressionM f g t2
98
mapExpressionM f g (Pair _ t1 t2) = pair <$> mapExpressionM f g t1 <*> mapExpressionM f g t2
98
false
false
0
7
24
45
21
24
null
null
paulrzcz/takusen-oracle
Database/Oracle/OCIFunctions.hs
bsd-3-clause
cTimeToBuffer :: BufferPtr -> UTCTime -> IO () utcTimeToBuffer buf utc = do let (LocalTime ltday time) = utcToLocalTime (hoursToTimeZone 0) utc let (TimeOfDay hour minute second) = time let (year, month, day) = toGregorian ltday setBufferByte buf 0 (makeCentByte (fromIntegral year)) setBufferByte buf 1 ...
580
utcTimeToBuffer :: BufferPtr -> UTCTime -> IO () utcTimeToBuffer buf utc = do let (LocalTime ltday time) = utcToLocalTime (hoursToTimeZone 0) utc let (TimeOfDay hour minute second) = time let (year, month, day) = toGregorian ltday setBufferByte buf 0 (makeCentByte (fromIntegral year)) setBufferByte buf 1...
579
utcTimeToBuffer buf utc = do let (LocalTime ltday time) = utcToLocalTime (hoursToTimeZone 0) utc let (TimeOfDay hour minute second) = time let (year, month, day) = toGregorian ltday setBufferByte buf 0 (makeCentByte (fromIntegral year)) setBufferByte buf 1 (makeYearByte (fromIntegral year)) setBufferB...
530
false
true
0
12
105
249
115
134
null
null
trskop/command-wrapper
command-wrapper/src/CommandWrapper/Toolset/InternalSubcommand/Config/Dhall.hs
bsd-3-clause
diff :: AppNames -> Config -> Diff -> IO () diff appNames config Diff{..} = handleExceptions appNames config do Dhall.Diff.Diff{doc} <- Dhall.Diff.diffNormalized <$> Dhall.inputExpr expr1 <*> Dhall.inputExpr expr2 withOutputHandle InputStdin output (renderDoc config) doc -- }}} Diff ----------...
458
diff :: AppNames -> Config -> Diff -> IO () diff appNames config Diff{..} = handleExceptions appNames config do Dhall.Diff.Diff{doc} <- Dhall.Diff.diffNormalized <$> Dhall.inputExpr expr1 <*> Dhall.inputExpr expr2 withOutputHandle InputStdin output (renderDoc config) doc -- }}} Diff ----------...
458
diff appNames config Diff{..} = handleExceptions appNames config do Dhall.Diff.Diff{doc} <- Dhall.Diff.diffNormalized <$> Dhall.inputExpr expr1 <*> Dhall.inputExpr expr2 withOutputHandle InputStdin output (renderDoc config) doc -- }}} Diff ------------------------------------------------------...
414
false
true
0
12
68
105
51
54
null
null
snowleopard/shaking-up-ghc
src/Packages.hs
bsd-3-clause
xhtml = lib "xhtml"
34
xhtml = lib "xhtml"
34
xhtml = lib "xhtml"
34
false
false
1
5
18
12
4
8
null
null
urbanslug/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
reinitializeGlobals :: CoreM () reinitializeGlobals = do linker_globals <- read cr_globals hsc_env <- getHscEnv let dflags = hsc_dflags hsc_env liftIO $ restoreLinkerGlobals linker_globals liftIO $ setUnsafeGlobalDynFlags dflags {- *******************************************************************...
915
reinitializeGlobals :: CoreM () reinitializeGlobals = do linker_globals <- read cr_globals hsc_env <- getHscEnv let dflags = hsc_dflags hsc_env liftIO $ restoreLinkerGlobals linker_globals liftIO $ setUnsafeGlobalDynFlags dflags {- *******************************************************************...
915
reinitializeGlobals = do linker_globals <- read cr_globals hsc_env <- getHscEnv let dflags = hsc_dflags hsc_env liftIO $ restoreLinkerGlobals linker_globals liftIO $ setUnsafeGlobalDynFlags dflags {- ************************************************************************ * ...
883
false
true
1
11
272
78
37
41
null
null
gcampax/ghc
compiler/main/Packages.hs
bsd-3-clause
-- internal helper add_package :: PackageConfigMap -> Map InstalledPackageId PackageKey -> [PackageKey] -> (PackageKey,Maybe PackageKey) -> MaybeErr MsgDoc [PackageKey] add_package pkg_db ipid_map ps (p, mb_parent) | p `elem` ps = return ps -- Check if we've already...
960
add_package :: PackageConfigMap -> Map InstalledPackageId PackageKey -> [PackageKey] -> (PackageKey,Maybe PackageKey) -> MaybeErr MsgDoc [PackageKey] add_package pkg_db ipid_map ps (p, mb_parent) | p `elem` ps = return ps -- Check if we've already added this package...
941
add_package pkg_db ipid_map ps (p, mb_parent) | p `elem` ps = return ps -- Check if we've already added this package | otherwise = case lookupPackage' pkg_db p of Nothing -> Failed (missingPackageMsg p <> missingDependencyMsg mb_parent) Just pkg -> do ...
743
true
true
1
15
346
240
116
124
null
null
DanielSchuessler/hstri
HomogenousTuples.hs
gpl-3.0
fromList4 :: [t2] -> (t2, t2, t2, t2) fromList4 = $(tupleFromList 4)
69
fromList4 :: [t2] -> (t2, t2, t2, t2) fromList4 = $(tupleFromList 4)
69
fromList4 = $(tupleFromList 4)
30
false
true
0
7
12
37
21
16
null
null
brendanhay/gogol
gogol-games/gen/Network/Google/Resource/Games/Players/Get.hs
mpl-2.0
-- | A player ID. A value of \`me\` may be used in place of the authenticated -- player\'s ID. pgPlayerId :: Lens' PlayersGet Text pgPlayerId = lens _pgPlayerId (\ s a -> s{_pgPlayerId = a})
192
pgPlayerId :: Lens' PlayersGet Text pgPlayerId = lens _pgPlayerId (\ s a -> s{_pgPlayerId = a})
97
pgPlayerId = lens _pgPlayerId (\ s a -> s{_pgPlayerId = a})
61
true
true
0
9
37
43
23
20
null
null
mcapodici/haskelllearn
ConcurrencyExamples/app/Main.hs
mit
main :: IO () main = exampleMain
32
main :: IO () main = exampleMain
32
main = exampleMain
18
false
true
0
6
6
16
8
8
null
null
robeverest/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalPrim (PrimQuot ty) = evalQuot ty
47
evalPrim (PrimQuot ty) = evalQuot ty
47
evalPrim (PrimQuot ty) = evalQuot ty
47
false
false
0
7
16
18
8
10
null
null
carlohamalainen/imagetrove-uploader
src/Network/ImageTrove/MainDicom.hs
bsd-2-clause
uploadDicomAction opts origDir = do liftIO $ print "uploadDicomAction: entering." {- debug <- mytardisDebug <$> ask cwd <- liftIO getCurrentDirectory let slashToUnderscore = map (\c -> if c == '/' then '_' else c) let fp = cwd </> (slashToUnderscore $ "state_" ++ optConfigFile opts) liftIO $ ...
13,110
uploadDicomAction opts origDir = do liftIO $ print "uploadDicomAction: entering." {- debug <- mytardisDebug <$> ask cwd <- liftIO getCurrentDirectory let slashToUnderscore = map (\c -> if c == '/' then '_' else c) let fp = cwd </> (slashToUnderscore $ "state_" ++ optConfigFile opts) liftIO $ ...
13,110
uploadDicomAction opts origDir = do liftIO $ print "uploadDicomAction: entering." {- debug <- mytardisDebug <$> ask cwd <- liftIO getCurrentDirectory let slashToUnderscore = map (\c -> if c == '/' then '_' else c) let fp = cwd </> (slashToUnderscore $ "state_" ++ optConfigFile opts) liftIO $ ...
13,110
false
false
0
8
5,724
23
11
12
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
uIntDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UInt")
61
uIntDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UInt")
61
uIntDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "UInt")
61
false
false
1
7
8
20
8
12
null
null
verement/etamoo
src/MOO/Parser.hs
bsd-3-clause
lexer = T.makeTokenParser mooDef
32
lexer = T.makeTokenParser mooDef
32
lexer = T.makeTokenParser mooDef
32
false
false
0
6
3
11
5
6
null
null
cernat-catalin/haskellGame
src/GLogger/Client.hs
bsd-3-clause
logFileName :: String logFileName = "client.log"
48
logFileName :: String logFileName = "client.log"
48
logFileName = "client.log"
26
false
true
0
6
5
18
7
11
null
null
nomeata/list-fusion-lab
ListImpls/BaseFrom76.hs
bsd-3-clause
scanr1 :: (a -> a -> a) -> [a] -> [a] scanr1 _ [] = []
84
scanr1 :: (a -> a -> a) -> [a] -> [a] scanr1 _ [] = []
84
scanr1 _ [] = []
29
false
true
0
9
45
47
24
23
null
null
MarcusVoelker/Recolang
CodeModel/Function.hs
mit
showStatement _ (IntLiteral l) = show l
39
showStatement _ (IntLiteral l) = show l
39
showStatement _ (IntLiteral l) = show l
39
false
false
1
6
6
22
9
13
null
null
seL4/capDL-tool
CapDL/PrintXml.hs
bsd-2-clause
showObjectName IOPT {} = "IOPT"
31
showObjectName IOPT {} = "IOPT"
31
showObjectName IOPT {} = "IOPT"
31
false
false
0
6
4
13
6
7
null
null
bennofs/cabal2nix
src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hs
bsd-3-clause
sourceFromHackage :: Hash -> String -> IO DerivationSource sourceFromHackage optHash pkgId = do cacheFile <- hashCachePath pkgId cachedHash <- case optHash of Certain h -> return . Certain $ h Guess h -> return . Guess $ h _ -> fmap (maybe UnknownHash Certain) . readFileMay $ cacheFi...
1,817
sourceFromHackage :: Hash -> String -> IO DerivationSource sourceFromHackage optHash pkgId = do cacheFile <- hashCachePath pkgId cachedHash <- case optHash of Certain h -> return . Certain $ h Guess h -> return . Guess $ h _ -> fmap (maybe UnknownHash Certain) . readFileMay $ cacheFi...
1,817
sourceFromHackage optHash pkgId = do cacheFile <- hashCachePath pkgId cachedHash <- case optHash of Certain h -> return . Certain $ h Guess h -> return . Guess $ h _ -> fmap (maybe UnknownHash Certain) . readFileMay $ cacheFile let url = "mirror://hackage/" ++ pkgId ++ ".tar.gz" ...
1,758
false
true
0
19
525
344
165
179
null
null
mrakgr/futhark
src/Futhark/TypeCheck.hs
bsd-3-clause
checkCmpOp :: Checkable lore => CmpOp -> SubExp -> SubExp -> TypeM lore () checkCmpOp (CmpEq t) x y = do require [Prim t] x require [Prim t] y matchSubExpTypes x y
194
checkCmpOp :: Checkable lore => CmpOp -> SubExp -> SubExp -> TypeM lore () checkCmpOp (CmpEq t) x y = do require [Prim t] x require [Prim t] y matchSubExpTypes x y
194
checkCmpOp (CmpEq t) x y = do require [Prim t] x require [Prim t] y matchSubExpTypes x y
94
false
true
0
10
62
86
39
47
null
null
alistra/data-structure-inferrer
C/Analyzer.hs
mit
analyzeCExtDecl :: CExtDecl -> TermAnalyzer (Either Output (DSFun CTypeSpec)) --TODO add global variables here analyzeCExtDecl (CDeclExt decl) = Left `fmap` analyzeCDecl decl
183
analyzeCExtDecl :: CExtDecl -> TermAnalyzer (Either Output (DSFun CTypeSpec)) analyzeCExtDecl (CDeclExt decl) = Left `fmap` analyzeCDecl decl
150
analyzeCExtDecl (CDeclExt decl) = Left `fmap` analyzeCDecl decl
72
true
true
0
10
30
51
26
25
null
null
glutamate/probably-base
Math/Probably/RandIO.hs
bsd-3-clause
update :: IORef a -> (a->Prob a) -> RIO () update rf sm = do x <- io $ readIORef rf newx <- sample $ sm x io $ writeIORef rf newx
135
update :: IORef a -> (a->Prob a) -> RIO () update rf sm = do x <- io $ readIORef rf newx <- sample $ sm x io $ writeIORef rf newx
135
update rf sm = do x <- io $ readIORef rf newx <- sample $ sm x io $ writeIORef rf newx
92
false
true
0
10
37
87
38
49
null
null
rrnewton/accelerate
Data/Array/Accelerate/Smart.hs
bsd-3-clause
-- Smart constructor and destructors for scalar tuples -- tup2 :: (Elt a, Elt b) => (Exp a, Exp b) -> Exp (a, b) tup2 (a, b) = Exp $ Tuple (NilTup `SnocTup` a `SnocTup` b)
171
tup2 :: (Elt a, Elt b) => (Exp a, Exp b) -> Exp (a, b) tup2 (a, b) = Exp $ Tuple (NilTup `SnocTup` a `SnocTup` b)
113
tup2 (a, b) = Exp $ Tuple (NilTup `SnocTup` a `SnocTup` b)
58
true
true
0
9
35
84
47
37
null
null
ajscholl/primitive-simd
Generator.hs
bsd-3-clause
genPatSynonym :: Bool -> Int -> String genPatSynonym patSigs n = unlines ["-- | Convenient way to match against and construct " ++ show n ++ "-ary vectors." ,patSigPrefix ++ "pattern Vec" ++ show n ++ " :: (ElemTuple v ~ " ++ tuplT ++ ", SIMDVector v)" ,patSigPrefix ++ " => " ++ targs ++ " v" ,"patte...
848
genPatSynonym :: Bool -> Int -> String genPatSynonym patSigs n = unlines ["-- | Convenient way to match against and construct " ++ show n ++ "-ary vectors." ,patSigPrefix ++ "pattern Vec" ++ show n ++ " :: (ElemTuple v ~ " ++ tuplT ++ ", SIMDVector v)" ,patSigPrefix ++ " => " ++ targs ++ " v" ,"patte...
848
genPatSynonym patSigs n = unlines ["-- | Convenient way to match against and construct " ++ show n ++ "-ary vectors." ,patSigPrefix ++ "pattern Vec" ++ show n ++ " :: (ElemTuple v ~ " ++ tuplT ++ ", SIMDVector v)" ,patSigPrefix ++ " => " ++ targs ++ " v" ,"pattern Vec" ++ show n ++ " " ++ args ++ " <...
809
false
true
0
12
253
236
124
112
null
null
tr00per/roguelike0
app/Game/Keymap.hs
bsd-2-clause
kmap _ = Meta NoAction
59
kmap _ = Meta NoAction
59
kmap _ = Meta NoAction
59
false
false
0
5
41
13
5
8
null
null
tjakway/ghcjvm
compiler/nativeGen/SPARC/Ppr.hs
bsd-3-clause
pprInstr (UMUL b reg1 ri reg2) = pprRegRIReg (sLit "umul") b reg1 ri reg2
74
pprInstr (UMUL b reg1 ri reg2) = pprRegRIReg (sLit "umul") b reg1 ri reg2
74
pprInstr (UMUL b reg1 ri reg2) = pprRegRIReg (sLit "umul") b reg1 ri reg2
74
false
false
0
7
14
38
18
20
null
null
wolftune/hoogle
src/General/Web.hs
bsd-3-clause
readInput :: String -> Input readInput (breakOn "?" -> (a,b)) = Input (dropWhile null $ splitOn "/" a) $ map (second (unEscapeString . drop1) . breakOn "=") $ splitOn "&" $ drop1 b
184
readInput :: String -> Input readInput (breakOn "?" -> (a,b)) = Input (dropWhile null $ splitOn "/" a) $ map (second (unEscapeString . drop1) . breakOn "=") $ splitOn "&" $ drop1 b
184
readInput (breakOn "?" -> (a,b)) = Input (dropWhile null $ splitOn "/" a) $ map (second (unEscapeString . drop1) . breakOn "=") $ splitOn "&" $ drop1 b
155
false
true
0
11
36
98
46
52
null
null
acamino/state-codes
src/Data/StateCodes/ISO31662US.hs
mit
toName DC = "District of Columbia"
34
toName DC = "District of Columbia"
34
toName DC = "District of Columbia"
34
false
false
0
5
5
9
4
5
null
null
jacekszymanski/wxHaskell
wx/src/Graphics/UI/WX/Controls.hs
lgpl-2.1
-- | Create an image list containing the images in the supplied file name list -- that will be scaled towards the desired size. imageListFromFiles :: Size -> [FilePath] -> IO (ImageList ()) imageListFromFiles size files = do images <- imageListCreate size True (length files) imageListAddIconsFromFiles images s...
739
imageListFromFiles :: Size -> [FilePath] -> IO (ImageList ()) imageListFromFiles size files = do images <- imageListCreate size True (length files) imageListAddIconsFromFiles images size files return images {-------------------------------------------------------------------------------- MediaCtrl --...
611
imageListFromFiles size files = do images <- imageListCreate size True (length files) imageListAddIconsFromFiles images size files return images {-------------------------------------------------------------------------------- MediaCtrl ----------------------------------------------------------------...
549
true
true
0
10
100
80
40
40
null
null
kiloecho7/squid
parse_data_clean.hs
bsd-3-clause
encodeCat :: String -> [Int] encodeCat "Left" = [1, 0, 0]
59
encodeCat :: String -> [Int] encodeCat "Left" = [1, 0, 0]
59
encodeCat "Left" = [1, 0, 0]
30
false
true
0
6
12
30
17
13
null
null
agocorona/MFlow
src/MFlow/Forms.hs
bsd-3-clause
-- | Flatten a binary tree of tuples of Maybe results produced by the \<+> operator -- into a single tuple with the same elements in the same order. -- This is useful for easing matching. For example: -- -- @ res \<- ask $ wlink1 \<+> wlink2 wform \<+> wlink3 \<+> wlink4@ -- -- @res@ has type: -- -- @Maybe (Maybe (May...
549
flatten :: Flatten (Maybe tree) list => tree -> list flatten res= doflat $ Just res
83
flatten res= doflat $ Just res
30
true
true
0
8
107
53
32
21
null
null
ghcjs/ghcjs
src/Compiler/GhcjsHooks.hs
mit
runGhcjsPhase _ _ (RealPhase ph) input _dflags | Just next <- lookup ph skipPhases = do output <- phaseOutputFilename next liftIO $ (createDirectoryIfMissing True (takeDirectory output) >> copyFile input output) `catchIOError` \_ -> return () return (RealPhase next, output) ...
583
runGhcjsPhase _ _ (RealPhase ph) input _dflags | Just next <- lookup ph skipPhases = do output <- phaseOutputFilename next liftIO $ (createDirectoryIfMissing True (takeDirectory output) >> copyFile input output) `catchIOError` \_ -> return () return (RealPhase next, output) ...
583
runGhcjsPhase _ _ (RealPhase ph) input _dflags | Just next <- lookup ph skipPhases = do output <- phaseOutputFilename next liftIO $ (createDirectoryIfMissing True (takeDirectory output) >> copyFile input output) `catchIOError` \_ -> return () return (RealPhase next, output) ...
583
false
false
0
14
222
190
98
92
null
null
mgsloan/language-typescript
src/Language/TypeScript/Pretty.hs
mit
objectType :: TypeBody -> Doc objectType = braces . typeBody
60
objectType :: TypeBody -> Doc objectType = braces . typeBody
60
objectType = braces . typeBody
30
false
true
0
5
9
19
10
9
null
null
christiaanb/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
tyconsIn :: Ty -> [TyCon] tyconsIn (TyF t1 t2) = tyconsIn t1 `union` tyconsIn t2
83
tyconsIn :: Ty -> [TyCon] tyconsIn (TyF t1 t2) = tyconsIn t1 `union` tyconsIn t2
83
tyconsIn (TyF t1 t2) = tyconsIn t1 `union` tyconsIn t2
57
false
true
0
7
17
41
21
20
null
null
mumuki/mulang
spec/ExpectationsAnalyzerSpec.hs
gpl-3.0
run language content expectations = analyse (expectationsAnalysis (CodeSample language content) expectations)
109
run language content expectations = analyse (expectationsAnalysis (CodeSample language content) expectations)
109
run language content expectations = analyse (expectationsAnalysis (CodeSample language content) expectations)
109
false
false
0
9
10
32
15
17
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/general/wiki-haskell-org-99-questions/X99Questions.hs
unlicense
pack (h:t) = pack' [[h]] t where pack' acc [] = myReverse acc -- TODO: do version with reverse pack' acc@(cx@(c:_):t) (x:xs) = if c == x then pack' ((x:cx):t) xs else pack' ([x]:acc) xs
269
pack (h:t) = pack' [[h]] t where pack' acc [] = myReverse acc -- TODO: do version with reverse pack' acc@(cx@(c:_):t) (x:xs) = if c == x then pack' ((x:cx):t) xs else pack' ([x]:acc) xs
269
pack (h:t) = pack' [[h]] t where pack' acc [] = myReverse acc -- TODO: do version with reverse pack' acc@(cx@(c:_):t) (x:xs) = if c == x then pack' ((x:cx):t) xs else pack' ([x]:acc) xs
269
false
false
0
11
118
130
69
61
null
null
phischu/fragnix
tests/packages/scotty/System.FilePath.Posix.hs
bsd-3-clause
hasLeadingPathSeparator :: FilePath -> Bool hasLeadingPathSeparator "" = False
78
hasLeadingPathSeparator :: FilePath -> Bool hasLeadingPathSeparator "" = False
78
hasLeadingPathSeparator "" = False
34
false
true
0
5
8
18
9
9
null
null
erikd/wai
warp/Network/Wai/Handler/Warp/HTTP2/File.hs
mit
ifUnmodifiedSince :: ValueTable -> Maybe HTTPDate ifUnmodifiedSince reqtbl = getHeaderValue tokenIfUnmodifiedSince reqtbl >>= parseHTTPDate
139
ifUnmodifiedSince :: ValueTable -> Maybe HTTPDate ifUnmodifiedSince reqtbl = getHeaderValue tokenIfUnmodifiedSince reqtbl >>= parseHTTPDate
139
ifUnmodifiedSince reqtbl = getHeaderValue tokenIfUnmodifiedSince reqtbl >>= parseHTTPDate
89
false
true
0
6
13
30
14
16
null
null
amirci/aoc2016-hs
src/Day7.hs
bsd-3-clause
fromRight (Right s) = s
23
fromRight (Right s) = s
23
fromRight (Right s) = s
23
false
false
0
6
4
16
7
9
null
null
infotroph/pandoc
src/Text/Pandoc/Readers/Org/Blocks.hs
gpl-2.0
bulletListStart' (Just n) = do count (n-1) spaceChar oneOf (bullets $ n == 1) many1 spaceChar return n -- Unindented lists are legal, but they can't use '*' bullets. -- We return n to maintain compatibility with the generic li...
327
bulletListStart' (Just n) = do count (n-1) spaceChar oneOf (bullets $ n == 1) many1 spaceChar return n -- Unindented lists are legal, but they can't use '*' bullets. -- We return n to maintain compatibility with the generic li...
327
bulletListStart' (Just n) = do count (n-1) spaceChar oneOf (bullets $ n == 1) many1 spaceChar return n -- Unindented lists are legal, but they can't use '*' bullets. -- We return n to maintain compatibility with the generic li...
327
false
false
0
10
133
61
28
33
null
null
hydrogen-tools/hydrogen-parsing
src/Hydrogen/Parsing.hs
mit
(>+>) :: Parser a b -> Parser b c -> Parser a c p1 >+> p2 = join <$> fmap p2 <$> p1
83
(>+>) :: Parser a b -> Parser b c -> Parser a c p1 >+> p2 = join <$> fmap p2 <$> p1
83
p1 >+> p2 = join <$> fmap p2 <$> p1
35
false
true
2
9
22
58
26
32
null
null
xunilrj/sandbox
sources/haskell/papers/4247eaf5-fcf0-483d-adc0-38c29c2cad00.hs
apache-2.0
-- same thing with the default haskell operator i5 = 1 & f
62
i5 = 1 & f
10
i5 = 1 & f
10
true
false
1
5
16
14
6
8
null
null
bjornars/HaskellGame
src/Types.hs
bsd-3-clause
hurtActor :: (ActorData, Integer) -> ActorP () hurtActor = singleton . HurtActor
80
hurtActor :: (ActorData, Integer) -> ActorP () hurtActor = singleton . HurtActor
80
hurtActor = singleton . HurtActor
33
false
true
0
7
11
30
16
14
null
null
seliopou/webbits
src/BrownPLT/JavaScript/Environment.hs
bsd-3-clause
forInit :: ForInit SourcePos -> Partial forInit fi = case fi of NoInit -> empty VarInit ds -> unions $ map varDecl ds ExprInit e -> expr e
145
forInit :: ForInit SourcePos -> Partial forInit fi = case fi of NoInit -> empty VarInit ds -> unions $ map varDecl ds ExprInit e -> expr e
145
forInit fi = case fi of NoInit -> empty VarInit ds -> unions $ map varDecl ds ExprInit e -> expr e
105
false
true
4
6
34
49
24
25
null
null
mzini/hosa
src/HoSA/SizeType/Infer.hs
mit
soSubType (SzArr n p) = SzArr <$> soSuperType n <*> soSubType p
68
soSubType (SzArr n p) = SzArr <$> soSuperType n <*> soSubType p
68
soSubType (SzArr n p) = SzArr <$> soSuperType n <*> soSubType p
68
false
false
0
7
16
31
14
17
null
null
eklinkhammer/robot-vision
src/main.hs
mit
toIndexList :: (Ord a, Unbox a, Num a) => Image a -> [(a,Int)] toIndexList img = Prelude.zip (toList img) [1..]
111
toIndexList :: (Ord a, Unbox a, Num a) => Image a -> [(a,Int)] toIndexList img = Prelude.zip (toList img) [1..]
111
toIndexList img = Prelude.zip (toList img) [1..]
48
false
true
0
10
19
72
36
36
null
null
ku-fpg/kansas-amber
tests/TransTests/TransFuncTestE.hs
bsd-3-clause
transTestProg3E :: Arduino (Expr ()) transTestProg3E = do setPinModeE 13 OUTPUT setPinModeE 2 INPUT setPinModeE 3 INPUT loopE $ do a <- myRead3E 2 b <- myRead3E 3 myWriteE 13 (a ||* b) delayMillisE 1000
250
transTestProg3E :: Arduino (Expr ()) transTestProg3E = do setPinModeE 13 OUTPUT setPinModeE 2 INPUT setPinModeE 3 INPUT loopE $ do a <- myRead3E 2 b <- myRead3E 3 myWriteE 13 (a ||* b) delayMillisE 1000
250
transTestProg3E = do setPinModeE 13 OUTPUT setPinModeE 2 INPUT setPinModeE 3 INPUT loopE $ do a <- myRead3E 2 b <- myRead3E 3 myWriteE 13 (a ||* b) delayMillisE 1000
213
false
true
0
12
82
94
40
54
null
null
lorenzojlamas/ejercicios
6.hs
gpl-3.0
enIngles 6 = "six"
18
enIngles 6 = "six"
18
enIngles 6 = "six"
18
false
false
1
5
3
13
4
9
null
null
mariefarrell/Hets
Haskell/test/HOL/Map2.hs
gpl-2.0
map2 :: (a -> b) -> [a] -> [b] map2 f l = case l of [] -> [] x : xs -> f x : map2 f xs
114
map2 :: (a -> b) -> [a] -> [b] map2 f l = case l of [] -> [] x : xs -> f x : map2 f xs
114
map2 f l = case l of [] -> [] x : xs -> f x : map2 f xs
83
false
true
0
9
56
77
38
39
null
null
solorab/proof-haskell
Control/Proof/Linear.hs
mit
consumeImplyHypothesis :: (Member Prove r, Member Choose r) => Eff r (Name, (PropS, PropS)) consumeImplyHypothesis = do (n, p) <- consumeHypothesis case p of a `Imply` b -> return (n, (a, b)) _ -> mzero'
227
consumeImplyHypothesis :: (Member Prove r, Member Choose r) => Eff r (Name, (PropS, PropS)) consumeImplyHypothesis = do (n, p) <- consumeHypothesis case p of a `Imply` b -> return (n, (a, b)) _ -> mzero'
227
consumeImplyHypothesis = do (n, p) <- consumeHypothesis case p of a `Imply` b -> return (n, (a, b)) _ -> mzero'
135
false
true
0
12
58
100
55
45
null
null
UCSD-PL/RefScript
src/Language/Rsc/Visitor.hs
bsd-3-clause
f <$$> x = T.traverse f x
25
f <$$> x = T.traverse f x
25
f <$$> x = T.traverse f x
25
false
false
2
6
6
18
8
10
null
null
mauriciofierrom/cis194-homework
homework05/src/Calc.hs
mit
withVars :: [(String, Integer)] -> (M.Map String Integer -> Maybe Integer) -> Maybe Integer withVars vs exp = exp $ M.fromList vs
147
withVars :: [(String, Integer)] -> (M.Map String Integer -> Maybe Integer) -> Maybe Integer withVars vs exp = exp $ M.fromList vs
147
withVars vs exp = exp $ M.fromList vs
37
false
true
0
10
39
62
31
31
null
null
mightymoose/wolunch.com
server/dist/build/autogen/Paths_wolunch.hs
bsd-3-clause
getLibexecDir = catchIO (getEnv "wolunch_libexecdir") (\_ -> return libexecdir)
79
getLibexecDir = catchIO (getEnv "wolunch_libexecdir") (\_ -> return libexecdir)
79
getLibexecDir = catchIO (getEnv "wolunch_libexecdir") (\_ -> return libexecdir)
79
false
false
0
8
8
28
14
14
null
null
binesiyu/ifl
src/Core/Parser.hs
mit
pNum :: Parser Int pNum [] = Left $ ParseError 1 "empty input" "an integer"
86
pNum :: Parser Int pNum [] = Left $ ParseError 1 "empty input" "an integer"
86
pNum [] = Left $ ParseError 1 "empty input" "an integer"
67
false
true
0
6
25
30
14
16
null
null
haroldl/clip
Optimize.hs
apache-2.0
unpackReturn (CondBlock condCases) = [CondBlock $ map handleCondCase condCases] where handleCondCase (test, block) = (test, returnElimForBlock block)
151
unpackReturn (CondBlock condCases) = [CondBlock $ map handleCondCase condCases] where handleCondCase (test, block) = (test, returnElimForBlock block)
151
unpackReturn (CondBlock condCases) = [CondBlock $ map handleCondCase condCases] where handleCondCase (test, block) = (test, returnElimForBlock block)
151
false
false
0
7
18
52
27
25
null
null
JustusAdam/schedule-planner
src/SchedulePlanner/App.hs
lgpl-3.0
{-| Evaluates the transformed json, compiles (useful) error messages, runs the algorithm and returns a writer of any output created. -} reportAndExecute :: MonadWriter Text m => Text -> Bool -> DataFile -> m Text () reportAndExecute outputFormat debugMode (DataFile rules lessons) | isNothing calculated = tell "Ca...
1,302
reportAndExecute :: MonadWriter Text m => Text -> Bool -> DataFile -> m Text () reportAndExecute outputFormat debugMode (DataFile rules lessons) | isNothing calculated = tell "Calculation failed, no valid schedule possible" | outputFormat' == "print" = do tell "\n" _ <- mapM (printDebug debugMode) rul...
1,162
reportAndExecute outputFormat debugMode (DataFile rules lessons) | isNothing calculated = tell "Calculation failed, no valid schedule possible" | outputFormat' == "print" = do tell "\n" _ <- mapM (printDebug debugMode) rules tell "\n" tell "\n" _ <- mapM (printDebug debugMode) weigh...
1,082
true
true
3
13
305
357
167
190
null
null
izgzhen/hadrian
src/Hadrian/Utilities.hs
mit
-- | Extract a value from a singleton list, or terminate with an error message -- if the list does not contain exactly one value. fromSingleton :: String -> [a] -> a fromSingleton _ [res] = res
195
fromSingleton :: String -> [a] -> a fromSingleton _ [res] = res
65
fromSingleton _ [res] = res
29
true
true
0
7
38
32
18
14
null
null