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
hacoo/haskell-jps
pathfinding/Grid.hs
mit
isBlocked :: Grid -> Int -> Bool isBlocked (Grid dims squares) i = (not (isInBounds dims i)) || ((squares ! i) == 0)
116
isBlocked :: Grid -> Int -> Bool isBlocked (Grid dims squares) i = (not (isInBounds dims i)) || ((squares ! i) == 0)
116
isBlocked (Grid dims squares) i = (not (isInBounds dims i)) || ((squares ! i) == 0)
83
false
true
0
9
22
64
33
31
null
null
gridaphobe/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
ctEvTerm ev = EvId (ctEvId ev)
30
ctEvTerm ev = EvId (ctEvId ev)
30
ctEvTerm ev = EvId (ctEvId ev)
30
false
false
1
7
5
22
8
14
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/Enums.hs
mit
js_IDBCursorDirectionPrev = "prev"
34
js_IDBCursorDirectionPrev = "prev"
34
js_IDBCursorDirectionPrev = "prev"
34
false
false
0
4
2
6
3
3
null
null
DATx02-16-14/Hastings
src/ChineseCheckers/ChineseCheckers.hs
bsd-3-clause
squareContent :: Table -> Coord -> Content squareContent [] _ = error "Table does not contain coordinate"
113
squareContent :: Table -> Coord -> Content squareContent [] _ = error "Table does not contain coordinate"
113
squareContent [] _ = error "Table does not contain coordinate"
70
false
true
0
6
24
29
14
15
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/ProjectConfig.hs
bsd-3-clause
readSourcePackage _verbosity _ = fail $ "TODO: add support for fetching and reading local tarballs, remote " ++ "tarballs, remote repos and passing named packages through"
183
readSourcePackage _verbosity _ = fail $ "TODO: add support for fetching and reading local tarballs, remote " ++ "tarballs, remote repos and passing named packages through"
183
readSourcePackage _verbosity _ = fail $ "TODO: add support for fetching and reading local tarballs, remote " ++ "tarballs, remote repos and passing named packages through"
183
false
false
4
5
37
24
9
15
null
null
meimisaki/FingerTree
Data/FingerTree/Lazy.hs
mit
splitTree :: Measured a v => (v -> Bool) -> v -> FingerTree v a -> Split (FingerTree v) a splitTree _ _ (Single x) = Split Empty x Empty
136
splitTree :: Measured a v => (v -> Bool) -> v -> FingerTree v a -> Split (FingerTree v) a splitTree _ _ (Single x) = Split Empty x Empty
136
splitTree _ _ (Single x) = Split Empty x Empty
46
false
true
0
11
29
75
36
39
null
null
ghcjs/ghcjs
src/Compiler/GhcjsProgram.hs
mit
generateLib :: GhcjsSettings -> Ghc () generateLib _settings = do dflags1 <- getSessionDynFlags liftIO $ do (dflags2, pkgs0) <- initPackages dflags1 let pkgs = mapMaybe (\p -> fmap (T.pack (getInstalledPackageName dflags2 p),) (getInstalledPackageVersion dflags2 p)) ...
872
generateLib :: GhcjsSettings -> Ghc () generateLib _settings = do dflags1 <- getSessionDynFlags liftIO $ do (dflags2, pkgs0) <- initPackages dflags1 let pkgs = mapMaybe (\p -> fmap (T.pack (getInstalledPackageName dflags2 p),) (getInstalledPackageVersion dflags2 p)) ...
872
generateLib _settings = do dflags1 <- getSessionDynFlags liftIO $ do (dflags2, pkgs0) <- initPackages dflags1 let pkgs = mapMaybe (\p -> fmap (T.pack (getInstalledPackageName dflags2 p),) (getInstalledPackageVersion dflags2 p)) pkgs0 base =...
833
false
true
0
21
230
302
147
155
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/minimum_6.hs
mit
min1 x y MyFalse = min0 x y otherwise
37
min1 x y MyFalse = min0 x y otherwise
37
min1 x y MyFalse = min0 x y otherwise
37
false
false
0
5
8
20
9
11
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F14.hs
bsd-3-clause
ptr_glGetnPixelMapfv :: FunPtr (GLenum -> GLsizei -> Ptr GLfloat -> IO ()) ptr_glGetnPixelMapfv = unsafePerformIO $ getCommand "glGetnPixelMapfv"
145
ptr_glGetnPixelMapfv :: FunPtr (GLenum -> GLsizei -> Ptr GLfloat -> IO ()) ptr_glGetnPixelMapfv = unsafePerformIO $ getCommand "glGetnPixelMapfv"
145
ptr_glGetnPixelMapfv = unsafePerformIO $ getCommand "glGetnPixelMapfv"
70
false
true
1
11
17
47
21
26
null
null
chrisdotcode/hackage-server
tests/HighLevelTest.hs
bsd-3-clause
testpackage :: (FilePath, String, FilePath, String, FilePath, String) testpackage = mkPackage "testpackage"
107
testpackage :: (FilePath, String, FilePath, String, FilePath, String) testpackage = mkPackage "testpackage"
107
testpackage = mkPackage "testpackage"
37
false
true
0
5
11
32
19
13
null
null
schernichkin/BSPM
graphomania/src/Graphomania/Shumov/Internal.hs
bsd-3-clause
--TODO: consider streaming instead of inplace conversion -- | Inplace edge encoding conversion -- This function will rewrite source buffer and return unused part. unsafeConverEdge :: forall from to . (EndiannessAware from, EndiannessAware to) => Proxy from -> Proxy to -> ByteString -> IO ByteString un...
494
unsafeConverEdge :: forall from to . (EndiannessAware from, EndiannessAware to) => Proxy from -> Proxy to -> ByteString -> IO ByteString unsafeConverEdge _ _ bs = do let edge = untag $ fst $ runGetStrict (get :: Get (Tagged from ShumovEdge)) bs unsafePutStrict (put (Tagged edge :: (Tagged to Shumov...
330
unsafeConverEdge _ _ bs = do let edge = untag $ fst $ runGetStrict (get :: Get (Tagged from ShumovEdge)) bs unsafePutStrict (put (Tagged edge :: (Tagged to ShumovEdge))) bs
176
true
true
0
15
96
133
67
66
null
null
LambdaHack/LambdaHack
definition-src/Game/LambdaHack/Definition/Defs.hs
bsd-3-clause
ppCStore :: CStore -> (Text, Text) ppCStore CGround = ("on", "the ground")
74
ppCStore :: CStore -> (Text, Text) ppCStore CGround = ("on", "the ground")
74
ppCStore CGround = ("on", "the ground")
39
false
true
0
8
11
36
18
18
null
null
kawamuray/ganeti
src/Ganeti/OpParams.hs
gpl-2.0
pWaitForSyncFalse :: Field pWaitForSyncFalse = withDoc "Whether to wait for the disk to synchronize (defaults to false)" $ defaultField [| False |] pWaitForSync
164
pWaitForSyncFalse :: Field pWaitForSyncFalse = withDoc "Whether to wait for the disk to synchronize (defaults to false)" $ defaultField [| False |] pWaitForSync
164
pWaitForSyncFalse = withDoc "Whether to wait for the disk to synchronize (defaults to false)" $ defaultField [| False |] pWaitForSync
137
false
true
0
6
26
26
14
12
null
null
unisonweb/platform
parser-typechecker/src/Unison/Runtime/Machine.hs
mit
resolve _ _ bstk (Stk i) = peekOff bstk i
41
resolve _ _ bstk (Stk i) = peekOff bstk i
41
resolve _ _ bstk (Stk i) = peekOff bstk i
41
false
false
1
7
9
26
11
15
null
null
Some-T/Portfolio
HASKELL/Labs/H6/H6.hsproj/H6.hs
unlicense
--f: ff = flip const 3 5
26
ff = flip const 3 5
19
ff = flip const 3 5
19
true
false
0
5
8
14
7
7
null
null
folivetti/BIGDATA
08 - Classificação/LogisticRegression.hs
mit
gradDesc :: [[Double]] -> [Double] -> Double -> Int -> [Double] gradDesc x y α it = gradDesc' x y w0 α it where w0 = take (length' $ head x) [0.01,0.01..]
160
gradDesc :: [[Double]] -> [Double] -> Double -> Int -> [Double] gradDesc x y α it = gradDesc' x y w0 α it where w0 = take (length' $ head x) [0.01,0.01..]
160
gradDesc x y α it = gradDesc' x y w0 α it where w0 = take (length' $ head x) [0.01,0.01..]
96
false
true
0
9
37
88
46
42
null
null
shlevy/ghc
includes/CodeGen.Platform.hs
bsd-3-clause
{- Note [esi/edi not allocatable] %esi is mapped to R1, so %esi would normally be allocatable while it is not being used for R1. However, %esi has no 8-bit version on x86, and the linear register allocator is not sophisticated enough to handle this irregularity (we need more RegClasses). The graph-colouring allocato...
643
freeReg r = freeRegBase r
33
freeReg r = freeRegBase r
33
true
false
0
5
119
14
7
7
null
null
MichaeGon/stone
src/Eval.hs
bsd-3-clause
getLocalEnv (VObject _ _ z) = z
31
getLocalEnv (VObject _ _ z) = z
31
getLocalEnv (VObject _ _ z) = z
31
false
false
0
7
6
19
9
10
null
null
smlsharp/smlsharp
benchmark/benchmarks_parallel/cilksort/cilksort_ghc_par.hs
mit
init_d :: Int -> IO (IOUArray Int Double) init_d size = newArray (0, size - 1) 1234.5678
93
init_d :: Int -> IO (IOUArray Int Double) init_d size = newArray (0, size - 1) 1234.5678
93
init_d size = newArray (0, size - 1) 1234.5678
51
false
true
0
8
21
44
22
22
null
null
facebookincubator/duckling
Duckling/Time/SV/Rules.hs
bsd-3-clause
ruleNextCycle :: Rule ruleNextCycle = Rule { name = "next <cycle>" , pattern = [ regex "nästa|kommande" , dimension TimeGrain ] , prod = \tokens -> case tokens of (_:Token TimeGrain grain:_) -> tt $ cycleNth grain 1 _ -> Nothing }
270
ruleNextCycle :: Rule ruleNextCycle = Rule { name = "next <cycle>" , pattern = [ regex "nästa|kommande" , dimension TimeGrain ] , prod = \tokens -> case tokens of (_:Token TimeGrain grain:_) -> tt $ cycleNth grain 1 _ -> Nothing }
270
ruleNextCycle = Rule { name = "next <cycle>" , pattern = [ regex "nästa|kommande" , dimension TimeGrain ] , prod = \tokens -> case tokens of (_:Token TimeGrain grain:_) -> tt $ cycleNth grain 1 _ -> Nothing }
248
false
true
0
15
81
93
49
44
null
null
centromere/blake2
benchmarks/bench.hs
unlicense
main :: IO () main = defaultMain [ bgroup "blake2s" [ bench "1 kb" $ nf (B2s.hash 32 "") kb , bench "1 mb" $ nf (B2s.hash 32 "") mb , bench "1 gb" $ nf (B2s.hash 32 "") gb ] , bgroup "blake2sp" [ bench "1 kb" $ nf (B2sp.hash 32 "") kb ...
874
main :: IO () main = defaultMain [ bgroup "blake2s" [ bench "1 kb" $ nf (B2s.hash 32 "") kb , bench "1 mb" $ nf (B2s.hash 32 "") mb , bench "1 gb" $ nf (B2s.hash 32 "") gb ] , bgroup "blake2sp" [ bench "1 kb" $ nf (B2sp.hash 32 "") kb ...
874
main = defaultMain [ bgroup "blake2s" [ bench "1 kb" $ nf (B2s.hash 32 "") kb , bench "1 mb" $ nf (B2s.hash 32 "") mb , bench "1 gb" $ nf (B2s.hash 32 "") gb ] , bgroup "blake2sp" [ bench "1 kb" $ nf (B2sp.hash 32 "") kb , bench "1...
860
false
true
0
12
411
351
169
182
null
null
fgaray/erd
src/ER.hs
unlicense
-- | Hard-coded default options for all entities. defaultEntityOpts :: Options defaultEntityOpts = M.fromList [ ("border", Border 0) , ("cellborder", CellBorder 1) , ("cellspacing", CellSpacing 0) , ("cellpadding", CellPadding 4) , ("font", FontFace "Helvetica") ]
276
defaultEntityOpts :: Options defaultEntityOpts = M.fromList [ ("border", Border 0) , ("cellborder", CellBorder 1) , ("cellspacing", CellSpacing 0) , ("cellpadding", CellPadding 4) , ("font", FontFace "Helvetica") ]
226
defaultEntityOpts = M.fromList [ ("border", Border 0) , ("cellborder", CellBorder 1) , ("cellspacing", CellSpacing 0) , ("cellpadding", CellPadding 4) , ("font", FontFace "Helvetica") ]
197
true
true
0
7
46
77
44
33
null
null
keithodulaigh/Hets
CommonLogic/ParseCLAsLibDefn.hs
gpl-2.0
getImports_text :: TEXT -> Set.Set NAME getImports_text txt = case txt of Text p _ -> Set.fromList $ map impName $ filter isImportation p Named_text _ t _ -> getImports_text t
179
getImports_text :: TEXT -> Set.Set NAME getImports_text txt = case txt of Text p _ -> Set.fromList $ map impName $ filter isImportation p Named_text _ t _ -> getImports_text t
179
getImports_text txt = case txt of Text p _ -> Set.fromList $ map impName $ filter isImportation p Named_text _ t _ -> getImports_text t
139
false
true
4
7
34
52
27
25
null
null
brunoczim/PulseLambda
PulseLambda/TokenStream.hs
gpl-3.0
isIdentifierToken :: TokenValue -> Bool isIdentifierToken (IdentifierToken _) = True
84
isIdentifierToken :: TokenValue -> Bool isIdentifierToken (IdentifierToken _) = True
84
isIdentifierToken (IdentifierToken _) = True
44
false
true
0
7
9
24
12
12
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_POINT_TOKEN :: GLenum gl_POINT_TOKEN = 0x0701
48
gl_POINT_TOKEN :: GLenum gl_POINT_TOKEN = 0x0701
48
gl_POINT_TOKEN = 0x0701
23
false
true
0
4
5
11
6
5
null
null
tjakway/ghcjvm
compiler/cmm/CLabel.hs
bsd-3-clause
hasCAF _ = False
43
hasCAF _ = False
43
hasCAF _ = False
43
false
false
0
5
30
9
4
5
null
null
nsyee00/tinyblog
src/TinyBlog/Entry.hs
bsd-3-clause
sortByName (x@(_, xpath):xs) = greater ++ x:lesser where lesser = sortByName [y | y@(_, ypath) <- xs, ypath < xpath] greater = sortByName [y | y@(_, ypath) <- xs, ypath >= xpath] -- | sort entries by mtime {-- sortByMtime :: [(FileStatus, FilePath)] -> [(FileStatus, F...
786
sortByName (x@(_, xpath):xs) = greater ++ x:lesser where lesser = sortByName [y | y@(_, ypath) <- xs, ypath < xpath] greater = sortByName [y | y@(_, ypath) <- xs, ypath >= xpath] -- | sort entries by mtime {-- sortByMtime :: [(FileStatus, FilePath)] -> [(FileStatus, F...
786
sortByName (x@(_, xpath):xs) = greater ++ x:lesser where lesser = sortByName [y | y@(_, ypath) <- xs, ypath < xpath] greater = sortByName [y | y@(_, ypath) <- xs, ypath >= xpath] -- | sort entries by mtime {-- sortByMtime :: [(FileStatus, FilePath)] -> [(FileStatus, F...
786
false
false
0
10
293
112
62
50
null
null
rueshyna/gogol
gogol-games/gen/Network/Google/Games/Types/Product.hs
mpl-2.0
-- | The ID of the event definition. peDefinitionId :: Lens' PlayerEvent (Maybe Text) peDefinitionId = lens _peDefinitionId (\ s a -> s{_peDefinitionId = a})
165
peDefinitionId :: Lens' PlayerEvent (Maybe Text) peDefinitionId = lens _peDefinitionId (\ s a -> s{_peDefinitionId = a})
128
peDefinitionId = lens _peDefinitionId (\ s a -> s{_peDefinitionId = a})
79
true
true
0
9
32
48
25
23
null
null
vikraman/ghc
compiler/basicTypes/VarSet.hs
bsd-3-clause
seqDVarSet :: DVarSet -> () seqDVarSet s = sizeDVarSet s `seq` ()
65
seqDVarSet :: DVarSet -> () seqDVarSet s = sizeDVarSet s `seq` ()
65
seqDVarSet s = sizeDVarSet s `seq` ()
37
false
true
0
6
11
31
16
15
null
null
koengit/induction-examples
Sort_QuickSort.hs
mit
prop_SortPermutes x (xs :: [OrdA]) = count x (qsort xs) == count x xs
71
prop_SortPermutes x (xs :: [OrdA]) = count x (qsort xs) == count x xs
71
prop_SortPermutes x (xs :: [OrdA]) = count x (qsort xs) == count x xs
71
false
false
1
7
15
43
19
24
null
null
gwright83/Wheeler
src/Math/Symbolic/Wheeler/Canonicalize.hs
bsd-3-clause
termPart x@(Sum _) = Product [x]
43
termPart x@(Sum _) = Product [x]
43
termPart x@(Sum _) = Product [x]
43
false
false
0
8
16
24
12
12
null
null
frantisekfarka/ghc-dsi
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
stateIncUsage :: CgState -> CgState -> CgState -- stateIncUsage@ e1 e2 incorporates in e1 -- the heap high water mark found in e2. stateIncUsage s1 s2@(MkCgState { cgs_hp_usg = hp_usg }) = s1 { cgs_hp_usg = cgs_hp_usg s1 `maxHpHw` virtHp hp_usg } `addCodeBlocksFrom` s2
284
stateIncUsage :: CgState -> CgState -> CgState stateIncUsage s1 s2@(MkCgState { cgs_hp_usg = hp_usg }) = s1 { cgs_hp_usg = cgs_hp_usg s1 `maxHpHw` virtHp hp_usg } `addCodeBlocksFrom` s2
200
stateIncUsage s1 s2@(MkCgState { cgs_hp_usg = hp_usg }) = s1 { cgs_hp_usg = cgs_hp_usg s1 `maxHpHw` virtHp hp_usg } `addCodeBlocksFrom` s2
153
true
true
0
10
58
70
39
31
null
null
leptonyu/mint
corn-node/src/Corn/Node.hs
bsd-3-clause
startApp :: IO () startApp = do let ip = "127.0.0.1" port = "10501" Right t <- createTransport ip port (\_ -> (ip, port)) defaultTCPParameters node <- newLocalNode t initRemoteTable runProcess node $ do -- get our own process id self <- getSelfPid send self ("hello" :: Text) hello <- exp...
381
startApp :: IO () startApp = do let ip = "127.0.0.1" port = "10501" Right t <- createTransport ip port (\_ -> (ip, port)) defaultTCPParameters node <- newLocalNode t initRemoteTable runProcess node $ do -- get our own process id self <- getSelfPid send self ("hello" :: Text) hello <- exp...
381
startApp = do let ip = "127.0.0.1" port = "10501" Right t <- createTransport ip port (\_ -> (ip, port)) defaultTCPParameters node <- newLocalNode t initRemoteTable runProcess node $ do -- get our own process id self <- getSelfPid send self ("hello" :: Text) hello <- expect :: Process Str...
363
false
true
0
11
97
138
65
73
null
null
buildsome/buildsome
src/Lib/FSHook/Protocol.hs
gpl-2.0
showFunc (SymLink target linkpath) = unwords ["symlink:", show target, show linkpath]
85
showFunc (SymLink target linkpath) = unwords ["symlink:", show target, show linkpath]
85
showFunc (SymLink target linkpath) = unwords ["symlink:", show target, show linkpath]
85
false
false
0
7
10
35
17
18
null
null
apyrgio/snf-ganeti
src/Ganeti/HTools/Cluster.hs
bsd-2-clause
updateEvacSolution :: (Node.List, Instance.List, EvacSolution) -> Idx -> Result (Node.List, Instance.List, [OpCodes.OpCode]) -> (Node.List, Instance.List, EvacSolution) updateEvacSolution (nl, il, es) idx (Bad msg) = (nl, il, es { esFailed = (idx, msg):esFailed...
325
updateEvacSolution :: (Node.List, Instance.List, EvacSolution) -> Idx -> Result (Node.List, Instance.List, [OpCodes.OpCode]) -> (Node.List, Instance.List, EvacSolution) updateEvacSolution (nl, il, es) idx (Bad msg) = (nl, il, es { esFailed = (idx, msg):esFailed...
325
updateEvacSolution (nl, il, es) idx (Bad msg) = (nl, il, es { esFailed = (idx, msg):esFailed es})
99
false
true
0
11
91
122
70
52
null
null
frenetic-lang/netcore-1.0
examples/ArpSpoof.hs
bsd-3-clause
-- Return a policy that queries all ARP request packets -- destined for serverIp and, upon receiving such a packet, -- injects an appropriate response. spoofSwitchArp :: Switch -> EthernetAddress -> IPAddress -> IO (Policy) spoofSwitchArp switchId serverMac serverIp = do (arpQueryChan, arpAct) <- getPkts packetOut...
1,283
spoofSwitchArp :: Switch -> EthernetAddress -> IPAddress -> IO (Policy) spoofSwitchArp switchId serverMac serverIp = do (arpQueryChan, arpAct) <- getPkts packetOutChan <- newChan let pol = isQuery <&&> NwDst (IPAddressPrefix serverIp 32) ==> arpAct <+> SendPackets packetOutChan let loop a = do arpQueryPkt...
1,130
spoofSwitchArp switchId serverMac serverIp = do (arpQueryChan, arpAct) <- getPkts packetOutChan <- newChan let pol = isQuery <&&> NwDst (IPAddressPrefix serverIp 32) ==> arpAct <+> SendPackets packetOutChan let loop a = do arpQueryPkt <- readChan arpQueryChan case generateReply arpQueryPkt of ...
1,058
true
true
1
17
363
291
138
153
null
null
Th30n/hasgel
hasgel-model/src/Hasgel/Mesh/OBJ.hs
mit
parseFaceVertex :: A.Parser FaceComponent parseFaceVertex = do v <- A.decimal vt <- parseOptionalVertex $ "/" *> A.decimal vn <- case vt of Nothing -> parseOptionalVertex $ "//" *> A.decimal _ -> parseOptionalVertex $ "/" *> A.decimal pure (v, vt, vn) where parseOptionalVertex p = A.option...
341
parseFaceVertex :: A.Parser FaceComponent parseFaceVertex = do v <- A.decimal vt <- parseOptionalVertex $ "/" *> A.decimal vn <- case vt of Nothing -> parseOptionalVertex $ "//" *> A.decimal _ -> parseOptionalVertex $ "/" *> A.decimal pure (v, vt, vn) where parseOptionalVertex p = A.option...
341
parseFaceVertex = do v <- A.decimal vt <- parseOptionalVertex $ "/" *> A.decimal vn <- case vt of Nothing -> parseOptionalVertex $ "//" *> A.decimal _ -> parseOptionalVertex $ "/" *> A.decimal pure (v, vt, vn) where parseOptionalVertex p = A.option Nothing $ Just <$> p
299
false
true
0
12
79
123
60
63
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
toName TT = "Trinidad and Tobago"
33
toName TT = "Trinidad and Tobago"
33
toName TT = "Trinidad and Tobago"
33
false
false
0
4
5
10
4
6
null
null
mfpi/spacepart
src/Data/SpacePart/QuadTree.hs
bsd-3-clause
parent_trees q = parent_trees' [q] where parent_trees' (q : qs) = let parents = imm_parents q in parents ++ parent_trees' (qs ++ parents) imm_parents q_child = map (quadtree_with_child_in_quad q_child) [PNQuad, PPQuad, NPQuad, NNQuad]
280
parent_trees q = parent_trees' [q] where parent_trees' (q : qs) = let parents = imm_parents q in parents ++ parent_trees' (qs ++ parents) imm_parents q_child = map (quadtree_with_child_in_quad q_child) [PNQuad, PPQuad, NPQuad, NNQuad]
280
parent_trees q = parent_trees' [q] where parent_trees' (q : qs) = let parents = imm_parents q in parents ++ parent_trees' (qs ++ parents) imm_parents q_child = map (quadtree_with_child_in_quad q_child) [PNQuad, PPQuad, NPQuad, NNQuad]
280
false
false
3
9
78
97
46
51
null
null
snoyberg/hl
src/HL/View/Template.hs
bsd-3-clause
-- | Breadcrumb. bread :: (Route App -> Text) -> [Route App] -> Html () bread url crumbs = ol_ [class_ "breadcrumb"] (forM_ crumbs (\route -> li_ (a_ [href_ (url route)] (toHtml (toHuman route)))))
258
bread :: (Route App -> Text) -> [Route App] -> Html () bread url crumbs = ol_ [class_ "breadcrumb"] (forM_ crumbs (\route -> li_ (a_ [href_ (url route)] (toHtml (toHuman route)))))
241
bread url crumbs = ol_ [class_ "breadcrumb"] (forM_ crumbs (\route -> li_ (a_ [href_ (url route)] (toHtml (toHuman route)))))
186
true
true
0
16
94
108
54
54
null
null
olsner/ghc
compiler/prelude/THNames.hs
bsd-3-clause
overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey
73
overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey
73
overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey
73
false
false
0
7
13
17
8
9
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Upgrade.hs
mit
whatResearches ScarabDamage = ProtossRoboticsSupportBay
55
whatResearches ScarabDamage = ProtossRoboticsSupportBay
55
whatResearches ScarabDamage = ProtossRoboticsSupportBay
55
false
false
0
5
3
9
4
5
null
null
erochest/cabal-brew
CabalBrew/Packages.hs
apache-2.0
makePackageSpec' :: PackageName -> Version -> T.Text makePackageSpec' n = makePackageSpec n . showVersion
105
makePackageSpec' :: PackageName -> Version -> T.Text makePackageSpec' n = makePackageSpec n . showVersion
105
makePackageSpec' n = makePackageSpec n . showVersion
52
false
true
0
7
13
31
15
16
null
null
DanBurton/MHask
MHask/Indexed/Monad.hs
bsd-3-clause
imapMonad :: (Monad m, Monad n, Monad (t j j n), IxMonad t) => (m ~> n) -> (t i j m ~> t i j n) imapMonad f = ibind (f ~>~ MHask.ireturn)
139
imapMonad :: (Monad m, Monad n, Monad (t j j n), IxMonad t) => (m ~> n) -> (t i j m ~> t i j n) imapMonad f = ibind (f ~>~ MHask.ireturn)
139
imapMonad f = ibind (f ~>~ MHask.ireturn)
41
false
true
0
11
35
101
49
52
null
null
phischu/fragnix
tests/packages/scotty/Data.Attoparsec.ByteString.Char8.hs
bsd-3-clause
-- | Parse and decode an unsigned hexadecimal number. The hex digits -- @\'a\'@ through @\'f\'@ may be upper or lower case. -- -- This parser does not accept a leading @\"0x\"@ string. hexadecimal :: (Integral a, Bits a) => Parser a hexadecimal = B8.foldl' step 0 `fmap` I.takeWhile1 isHexDigit where isHexDigit w...
665
hexadecimal :: (Integral a, Bits a) => Parser a hexadecimal = B8.foldl' step 0 `fmap` I.takeWhile1 isHexDigit where isHexDigit w = (w >= 48 && w <= 57) || (w >= 97 && w <= 102) || (w >= 65 && w <= 70) step a w | w >= 48 && w <= 57 = (a `shiftL` 4) .|. fromIntegral (w - 4...
479
hexadecimal = B8.foldl' step 0 `fmap` I.takeWhile1 isHexDigit where isHexDigit w = (w >= 48 && w <= 57) || (w >= 97 && w <= 102) || (w >= 65 && w <= 70) step a w | w >= 48 && w <= 57 = (a `shiftL` 4) .|. fromIntegral (w - 48) | w >= 97 = (a `shif...
431
true
true
2
10
219
241
125
116
null
null
meimisaki/Rin
src/Type/Types.hs
mit
extendKnEnv :: Name -> Kind -> TI a -> TI a extendKnEnv name kind ti = do env <- get put env { knEnv = M.insert name kind (knEnv env) } ti <* put env
155
extendKnEnv :: Name -> Kind -> TI a -> TI a extendKnEnv name kind ti = do env <- get put env { knEnv = M.insert name kind (knEnv env) } ti <* put env
155
extendKnEnv name kind ti = do env <- get put env { knEnv = M.insert name kind (knEnv env) } ti <* put env
111
false
true
0
12
40
82
38
44
null
null
seishun/aoc2016
day20.hs
mit
part1 :: String -> Int part1 = lowest 0 . sort . map parse . lines
66
part1 :: String -> Int part1 = lowest 0 . sort . map parse . lines
66
part1 = lowest 0 . sort . map parse . lines
43
false
true
0
8
15
33
16
17
null
null
brendanhay/gogol
gogol-customsearch/gen/Network/Google/Resource/Search/CSE/Siterestrict/List.hs
mpl-2.0
-- | The Programmable Search Engine ID to use for this request. cseslCx :: Lens' CSESiterestrictList (Maybe Text) cseslCx = lens _cseslCx (\ s a -> s{_cseslCx = a})
164
cseslCx :: Lens' CSESiterestrictList (Maybe Text) cseslCx = lens _cseslCx (\ s a -> s{_cseslCx = a})
100
cseslCx = lens _cseslCx (\ s a -> s{_cseslCx = a})
50
true
true
0
9
28
46
25
21
null
null
wavewave/hournal
xinput/Event.hs
bsd-2-clause
run exp = runCoroutineT exp
27
run exp = runCoroutineT exp
27
run exp = runCoroutineT exp
27
false
false
0
5
4
12
5
7
null
null
mino2357/Hello_Haskell
primeList/Main.hs
mit
rad' :: Integer -> [Integer] rad' n = [radWorker2 (primeFactorize (radWorker4 (primeFactorize n))), (radWorker2 (primeFactorize n))]
132
rad' :: Integer -> [Integer] rad' n = [radWorker2 (primeFactorize (radWorker4 (primeFactorize n))), (radWorker2 (primeFactorize n))]
132
rad' n = [radWorker2 (primeFactorize (radWorker4 (primeFactorize n))), (radWorker2 (primeFactorize n))]
103
false
true
0
12
15
60
31
29
null
null
romanb/amazonka
amazonka-cognito-sync/gen/Network/AWS/CognitoSync/GetIdentityPoolConfiguration.hs
mpl-2.0
-- | Options to apply to this identity pool for push synchronization. gipcrPushSync :: Lens' GetIdentityPoolConfigurationResponse (Maybe PushSync) gipcrPushSync = lens _gipcrPushSync (\s a -> s { _gipcrPushSync = a })
217
gipcrPushSync :: Lens' GetIdentityPoolConfigurationResponse (Maybe PushSync) gipcrPushSync = lens _gipcrPushSync (\s a -> s { _gipcrPushSync = a })
147
gipcrPushSync = lens _gipcrPushSync (\s a -> s { _gipcrPushSync = a })
70
true
true
0
9
30
46
25
21
null
null
bos/filemanip
System/FilePath/GlobPattern.hs
bsd-3-clause
matchTerms (MatchGroup g:ts) cs = msum (map matchGroup g) where matchGroup g = matchTerms (MatchLiteral g : ts) cs
118
matchTerms (MatchGroup g:ts) cs = msum (map matchGroup g) where matchGroup g = matchTerms (MatchLiteral g : ts) cs
118
matchTerms (MatchGroup g:ts) cs = msum (map matchGroup g) where matchGroup g = matchTerms (MatchLiteral g : ts) cs
118
false
false
2
8
22
63
27
36
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Core.hs
gpl-3.0
in97 :: Pattern Double in97 = cF 0 "97"
39
in97 :: Pattern Double in97 = cF 0 "97"
39
in97 = cF 0 "97"
16
false
true
0
6
8
26
10
16
null
null
judah/haskeline
System/Console/Haskeline.hs
bsd-3-clause
promptedInput :: MonadIO m => (TermOps -> Prefix -> InputT m a) -> (FileOps -> IO a) -> String -> InputT m a promptedInput doTerm doFile prompt = do -- If other parts of the program have written text, make sure that it -- appears before we interact with the user o...
1,789
promptedInput :: MonadIO m => (TermOps -> Prefix -> InputT m a) -> (FileOps -> IO a) -> String -> InputT m a promptedInput doTerm doFile prompt = do -- If other parts of the program have written text, make sure that it -- appears before we interact with the user o...
1,789
promptedInput doTerm doFile prompt = do -- If other parts of the program have written text, make sure that it -- appears before we interact with the user on the terminal. liftIO $ hFlush stdout rterm <- InputT ask case termOps rterm of Right fops -> liftIO $ do putStr...
1,632
false
true
0
18
546
221
103
118
null
null
siddhanathan/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (RecordCon con_id _ rbinds) = hang (ppr con_id) 2 (ppr rbinds)
73
ppr_expr (RecordCon con_id _ rbinds) = hang (ppr con_id) 2 (ppr rbinds)
73
ppr_expr (RecordCon con_id _ rbinds) = hang (ppr con_id) 2 (ppr rbinds)
73
false
false
0
7
13
38
18
20
null
null
vasily-kartashov/playground
euler/problem-045.hs
apache-2.0
hexagonal n = n * (2 * n - 1)
29
hexagonal n = n * (2 * n - 1)
29
hexagonal n = n * (2 * n - 1)
29
false
false
0
8
9
24
12
12
null
null
input-output-hk/pos-haskell-prototype
auxx/src/Command/TyProjection.hs
mit
tyAddrDistrPart :: TyProjection AddrDistrPart tyAddrDistrPart = TyProjection "AddrDistrPart" (preview _ValueAddrDistrPart)
122
tyAddrDistrPart :: TyProjection AddrDistrPart tyAddrDistrPart = TyProjection "AddrDistrPart" (preview _ValueAddrDistrPart)
122
tyAddrDistrPart = TyProjection "AddrDistrPart" (preview _ValueAddrDistrPart)
76
false
true
0
7
9
25
12
13
null
null
aburnett88/HSat
tests-src/TestPrint/Problem/BSP/Common.hs
mit
name :: String name = "Common"
30
name :: String name = "Common"
30
name = "Common"
15
false
true
0
6
5
18
7
11
null
null
Spheniscida/cHaTTP
persistence-layer/Chattp/Persistence/Auth.hs
mit
eitherConst :: c -> (b -> c) -> Either a b -> c eitherConst c = either (const c)
80
eitherConst :: c -> (b -> c) -> Either a b -> c eitherConst c = either (const c)
80
eitherConst c = either (const c)
32
false
true
0
8
18
47
23
24
null
null
zaxtax/hakaru
haskell/Language/Hakaru/CodeGen/Types.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- | buildType function do the work of describing how the Hakaru -- type will be stored in memory. Arrays needed their own -- declaration function for their arity buildType :: Sing (a :: Hakaru) -> [CTypeSpec] buildType SInt = [C...
324
buildType :: Sing (a :: Hakaru) -> [CTypeSpec] buildType SInt = [CInt]
79
buildType SInt = [CInt]
32
true
true
0
8
51
37
22
15
null
null
osa1/chsc
Core/Renaming.hs
bsd-3-clause
mkRename :: (forall a. (Renaming -> a -> a) -> Renaming -> ann a -> ann a) -> (IdSupply -> Renaming -> ann (TermF ann) -> ann (TermF ann), IdSupply -> Renaming -> [AltF ann] -> [AltF ann], IdSupply -> Renaming -> ann (ValueF ann) -> ann (ValueF ann), IdSupply -> Re...
1,393
mkRename :: (forall a. (Renaming -> a -> a) -> Renaming -> ann a -> ann a) -> (IdSupply -> Renaming -> ann (TermF ann) -> ann (TermF ann), IdSupply -> Renaming -> [AltF ann] -> [AltF ann], IdSupply -> Renaming -> ann (ValueF ann) -> ann (ValueF ann), IdSupply -> Re...
1,393
mkRename rec = (term, alternatives, value, value') where term ids rn = rec (term' ids) rn term' ids rn e = case e of Var x -> Var (rename rn x) Value v -> Value (value' ids rn v) App e1 x2 -> App (term ids rn e1) (rename rn x2) PrimOp pop es -> PrimOp pop (map (term ids rn) es) C...
1,031
false
true
6
18
419
675
334
341
null
null
tadeboro/Formal
src/Training/Formal.hs
gpl-3.0
-- | Get first coeficient in series head :: Formal a -> a head (x :+: _) = x
76
head :: Formal a -> a head (x :+: _) = x
40
head (x :+: _) = x
18
true
true
0
7
18
29
15
14
null
null
LambdaLuminaries/illum
Handler/Blog.hs
bsd-2-clause
getArticleR :: ArticleId -> Handler RepHtml getArticleR articleId = do article <- runDB $ get404 articleId defaultLayout $ do setTitle $ toHtml $ articleTitle article $(widgetFile "article")
214
getArticleR :: ArticleId -> Handler RepHtml getArticleR articleId = do article <- runDB $ get404 articleId defaultLayout $ do setTitle $ toHtml $ articleTitle article $(widgetFile "article")
214
getArticleR articleId = do article <- runDB $ get404 articleId defaultLayout $ do setTitle $ toHtml $ articleTitle article $(widgetFile "article")
170
false
true
0
12
50
66
29
37
null
null
wstrinz/hask_bsb
.stack-work/dist/x86_64-windows/Cabal-1.18.1.5/build/autogen/Paths_new_template.hs
bsd-3-clause
version :: Version version = Version {versionBranch = [0,1,0,0], versionTags = []}
82
version :: Version version = Version {versionBranch = [0,1,0,0], versionTags = []}
82
version = Version {versionBranch = [0,1,0,0], versionTags = []}
63
false
true
0
8
11
49
26
23
null
null
AlexanderPankiv/ghc
compiler/types/InstEnv.hs
bsd-3-clause
classInstances :: InstEnvs -> Class -> [ClsInst] classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods }) cls = get home_ie ++ get pkg_ie where get env = case lookupUFM env cls of Just (ClsIE insts) -> filter (instIsVisible vis_mods) insts Nothi...
636
classInstances :: InstEnvs -> Class -> [ClsInst] classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods }) cls = get home_ie ++ get pkg_ie where get env = case lookupUFM env cls of Just (ClsIE insts) -> filter (instIsVisible vis_mods) insts Nothi...
636
classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods }) cls = get home_ie ++ get pkg_ie where get env = case lookupUFM env cls of Just (ClsIE insts) -> filter (instIsVisible vis_mods) insts Nothing -> [] -- | Collects the names of c...
587
false
true
0
10
157
121
65
56
null
null
gianlucagiorgolo/lambek-monad
TP.hs
mit
replaceWithConstants :: BinTree DecoratedSequent -> (Map Int LambdaTerm) -> BinTree DecoratedSequent replaceWithConstants t m = fmap (\n -> replaceWithConstantsInNode n m) t
173
replaceWithConstants :: BinTree DecoratedSequent -> (Map Int LambdaTerm) -> BinTree DecoratedSequent replaceWithConstants t m = fmap (\n -> replaceWithConstantsInNode n m) t
173
replaceWithConstants t m = fmap (\n -> replaceWithConstantsInNode n m) t
72
false
true
0
8
21
56
27
29
null
null
walkie/CC-TaglessFinal
src/Language/TTF/Arithmetic.hs
bsd-3-clause
-- | Nested plain expressions. e4 = neg e1 `add` chcB (lit 5) (lit 6 `add` lit 7)
81
e4 = neg e1 `add` chcB (lit 5) (lit 6 `add` lit 7)
50
e4 = neg e1 `add` chcB (lit 5) (lit 6 `add` lit 7)
50
true
false
1
8
17
50
23
27
null
null
Potregon/while
src/Parser/While.hs
gpl-3.0
state states@(13:_) stack input = case headMay input of Just ( PosToken _ (Id _) ) -> shift 51 states stack input _ -> error $ "unexpected " ++ if null input then "end of file" else show (head input) ++ "\nexpecting id"
253
state states@(13:_) stack input = case headMay input of Just ( PosToken _ (Id _) ) -> shift 51 states stack input _ -> error $ "unexpected " ++ if null input then "end of file" else show (head input) ++ "\nexpecting id"
253
state states@(13:_) stack input = case headMay input of Just ( PosToken _ (Id _) ) -> shift 51 states stack input _ -> error $ "unexpected " ++ if null input then "end of file" else show (head input) ++ "\nexpecting id"
253
false
false
1
13
76
99
48
51
null
null
romanb/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/CreateMLModel.hs
mpl-2.0
-- | A user-supplied ID that uniquely identifies the 'MLModel'. cmlmMLModelId :: Lens' CreateMLModel Text cmlmMLModelId = lens _cmlmMLModelId (\s a -> s { _cmlmMLModelId = a })
176
cmlmMLModelId :: Lens' CreateMLModel Text cmlmMLModelId = lens _cmlmMLModelId (\s a -> s { _cmlmMLModelId = a })
112
cmlmMLModelId = lens _cmlmMLModelId (\s a -> s { _cmlmMLModelId = a })
70
true
true
1
9
27
43
22
21
null
null
vTurbine/ghc
compiler/cmm/CmmExpr.hs
bsd-3-clause
cmmExprType _ (CmmLoad _ rep) = rep
44
cmmExprType _ (CmmLoad _ rep) = rep
44
cmmExprType _ (CmmLoad _ rep) = rep
44
false
false
0
7
15
19
9
10
null
null
VictorDenisov/mongodb
test/Main.hs
apache-2.0
main :: IO () main = do mongodbHost <- getEnv mongodbHostEnvVariable `catchIOError` (\_ -> return "localhost") p <- connect $ host mongodbHost version <- access p slaveOk "admin" serverVersion putStrLn $ "Running tests with mongodb version: " ++ (unpack version) hspecWith defaultConfig Spec.spec
306
main :: IO () main = do mongodbHost <- getEnv mongodbHostEnvVariable `catchIOError` (\_ -> return "localhost") p <- connect $ host mongodbHost version <- access p slaveOk "admin" serverVersion putStrLn $ "Running tests with mongodb version: " ++ (unpack version) hspecWith defaultConfig Spec.spec
306
main = do mongodbHost <- getEnv mongodbHostEnvVariable `catchIOError` (\_ -> return "localhost") p <- connect $ host mongodbHost version <- access p slaveOk "admin" serverVersion putStrLn $ "Running tests with mongodb version: " ++ (unpack version) hspecWith defaultConfig Spec.spec
292
false
true
0
12
52
106
48
58
null
null
thoughtpolice/infinity
src/Infinity/Core.hs
bsd-3-clause
-- | Parts a server partserv :: Server -> Bot -> Bot partserv serv x@(Bot s) = if serv `M.notMember` s then x else (Bot (M.delete serv s))
148
partserv :: Server -> Bot -> Bot partserv serv x@(Bot s) = if serv `M.notMember` s then x else (Bot (M.delete serv s))
128
partserv serv x@(Bot s) = if serv `M.notMember` s then x else (Bot (M.delete serv s))
95
true
true
0
10
37
66
36
30
null
null
haslab/SecreC
src/Language/SecreC/Transformation/Dafny.hs
gpl-3.0
dafnyAs :: DDoc -> DDoc -> DDoc dafnyAs x pt = dparens x <<+>> dtext "as" <<+>> pt
82
dafnyAs :: DDoc -> DDoc -> DDoc dafnyAs x pt = dparens x <<+>> dtext "as" <<+>> pt
82
dafnyAs x pt = dparens x <<+>> dtext "as" <<+>> pt
50
false
true
0
7
17
38
18
20
null
null
kfiz/IHaskell
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
mit
inspectRequestParser :: LByteString -> Message inspectRequestParser = requestParser $ \obj -> do code <- obj .: "code" pos <- obj .: "cursor_pos" dlevel <- obj .: "detail_level" return $ InspectRequest noHeader code pos dlevel
234
inspectRequestParser :: LByteString -> Message inspectRequestParser = requestParser $ \obj -> do code <- obj .: "code" pos <- obj .: "cursor_pos" dlevel <- obj .: "detail_level" return $ InspectRequest noHeader code pos dlevel
234
inspectRequestParser = requestParser $ \obj -> do code <- obj .: "code" pos <- obj .: "cursor_pos" dlevel <- obj .: "detail_level" return $ InspectRequest noHeader code pos dlevel
187
false
true
0
10
41
73
35
38
null
null
urbanslug/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
sizeExpr :: DynFlags -> FastInt -- Bomb out if it gets bigger than this -> [Id] -- Arguments; we're interested in which of these -- get case'd -> CoreExpr -> ExprSize -- Note [Computing the size of an expression] sizeExpr dflags bOMB_O...
7,764
sizeExpr :: DynFlags -> FastInt -- Bomb out if it gets bigger than this -> [Id] -- Arguments; we're interested in which of these -- get case'd -> CoreExpr -> ExprSize sizeExpr dflags bOMB_OUT_SIZE top_args expr = size_up expr where ...
7,716
sizeExpr dflags bOMB_OUT_SIZE top_args expr = size_up expr where size_up (Cast e _) = size_up e size_up (Tick _ e) = size_up e size_up (Type _) = sizeZero -- Types cost nothing size_up (Coercion _) = sizeZero size_up (Lit lit) = sizeN (litSize lit) size_up (Var f) | isRealWorldI...
7,466
true
true
14
15
2,945
1,548
767
781
null
null
hvr/lens
lens-properties/src/Control/Lens/Properties.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- | A 'Traversal' is only legal if it is a valid 'Setter' (see 'isSetter' for -- what makes a 'Setter' valid), and the following laws hold: -- -- 1. @t pure ≡ pure@ -- -- 2. @fmap (t f) . t g ≡ getCompose . t (Compose . fmap f . g)@ isTra...
1,145
isTraversal :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Function a) => Simple Traversal s a -> Property isTraversal l = isSetter l .&. traverse_pureMaybe l .&. traverse_pureList l .&. do as <- arbitrary bs <- arbitrary t...
830
isTraversal l = isSetter l .&. traverse_pureMaybe l .&. traverse_pureList l .&. do as <- arbitrary bs <- arbitrary t <- arbitrary property $ traverse_compose l (\x -> as++[x]++bs) ...
694
true
true
0
14
339
180
97
83
null
null
gridaphobe/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
tryEtaReduce :: [Var] -> CoreExpr -> Maybe CoreExpr tryEtaReduce bndrs body = go (reverse bndrs) body (mkRepReflCo (exprType body)) where incoming_arity = count isId bndrs go :: [Var] -- Binders, innermost first, types [a3,a2,a1] -> CoreExpr -- Of type tr -> Coercion ...
4,506
tryEtaReduce :: [Var] -> CoreExpr -> Maybe CoreExpr tryEtaReduce bndrs body = go (reverse bndrs) body (mkRepReflCo (exprType body)) where incoming_arity = count isId bndrs go :: [Var] -- Binders, innermost first, types [a3,a2,a1] -> CoreExpr -- Of type tr -> Coercion ...
4,506
tryEtaReduce bndrs body = go (reverse bndrs) body (mkRepReflCo (exprType body)) where incoming_arity = count isId bndrs go :: [Var] -- Binders, innermost first, types [a3,a2,a1] -> CoreExpr -- Of type tr -> Coercion -- Of type tr ~ ts -> Maybe CoreExpr -- O...
4,454
false
true
5
12
1,478
909
438
471
null
null
fgaz/shine
shine-examples/simple-interaction/Main.hs
mit
handleInput (MouseBtn BtnLeft Up _) = const False
49
handleInput (MouseBtn BtnLeft Up _) = const False
49
handleInput (MouseBtn BtnLeft Up _) = const False
49
false
false
0
7
7
22
10
12
null
null
nushio3/ghc
ghc/Main.hs
bsd-3-clause
needsInputsMode _ = False
39
needsInputsMode _ = False
39
needsInputsMode _ = False
39
false
false
0
5
17
9
4
5
null
null
urbanslug/ghc
compiler/codeGen/StgCmmArgRep.hs
bsd-3-clause
slowCallPattern (V: _) = (fsLit "stg_ap_v", 1)
61
slowCallPattern (V: _) = (fsLit "stg_ap_v", 1)
61
slowCallPattern (V: _) = (fsLit "stg_ap_v", 1)
61
false
false
0
7
21
25
13
12
null
null
diagrams/diagrams-contrib
src/Diagrams/TwoD/Path/Turtle.hs
bsd-3-clause
-- | Get the current turtle angle, in degrees. heading :: (OrderedField n, Monad m) => TurtleT n m n heading = ST.gets (L.view deg . T.heading)
143
heading :: (OrderedField n, Monad m) => TurtleT n m n heading = ST.gets (L.view deg . T.heading)
96
heading = ST.gets (L.view deg . T.heading)
42
true
true
0
9
26
59
28
31
null
null
apyrgio/ganeti
src/Ganeti/Query/Instance.hs
bsd-2-clause
-- | Get secondary node groups getSecondaryNodeGroups :: ConfigData -> Instance -> ErrorResult [NodeGroup] getSecondaryNodeGroups cfg inst = do sNodes <- getSecondaryNodes cfg inst return . catMaybes $ map (getGroupOfNode cfg) sNodes -- | Get attributes of secondary node groups
283
getSecondaryNodeGroups :: ConfigData -> Instance -> ErrorResult [NodeGroup] getSecondaryNodeGroups cfg inst = do sNodes <- getSecondaryNodes cfg inst return . catMaybes $ map (getGroupOfNode cfg) sNodes -- | Get attributes of secondary node groups
252
getSecondaryNodeGroups cfg inst = do sNodes <- getSecondaryNodes cfg inst return . catMaybes $ map (getGroupOfNode cfg) sNodes -- | Get attributes of secondary node groups
176
true
true
0
10
44
66
32
34
null
null
qnikst/numeric-ode
src/Math/Integrators/ImplicitEuler.hs
bsd-3-clause
-- | Integrator of the form: -- -- \[ y_{n+1} = y_n + h * f(\frac{y_n+y_{n+1}}{2}). \] -- -- This is a symmetric method of order 1. implicitEuler :: (Metric f, Ord a, Floating a) => (f a -> f a) -> a -> f a -> f a implicitEuler f = \h y -> fixedPoint (\x -> y ^+^ (h *^ (f x))) (\x1 x2 -> breakNormIR (x1...
333
implicitEuler :: (Metric f, Ord a, Floating a) => (f a -> f a) -> a -> f a -> f a implicitEuler f = \h y -> fixedPoint (\x -> y ^+^ (h *^ (f x))) (\x1 x2 -> breakNormIR (x1^-^x2) eps) y
201
implicitEuler f = \h y -> fixedPoint (\x -> y ^+^ (h *^ (f x))) (\x1 x2 -> breakNormIR (x1^-^x2) eps) y
105
true
true
0
12
86
137
71
66
null
null
SaneApp/elastic-search-api
src/ElasticSearch/Query.hs
mit
match :: Query match = undefined
32
match :: Query match = undefined
32
match = undefined
17
false
true
0
4
5
11
6
5
null
null
tomjaguarpaw/postgresql-simple
test/Main.hs
bsd-3-clause
testCopyMalformedError :: TestEnv -> TestTree testCopyMalformedError TestEnv{..} = goldenTest "malformed input" $ handle (\(SomeException exc) -> return $ BL.pack $ show exc) $ do execute_ conn "CREATE TEMPORARY TABLE copy_malformed_input_error_test (x int PRIMARY KEY, y text)" copy_ conn "COPY ...
564
testCopyMalformedError :: TestEnv -> TestTree testCopyMalformedError TestEnv{..} = goldenTest "malformed input" $ handle (\(SomeException exc) -> return $ BL.pack $ show exc) $ do execute_ conn "CREATE TEMPORARY TABLE copy_malformed_input_error_test (x int PRIMARY KEY, y text)" copy_ conn "COPY ...
564
testCopyMalformedError TestEnv{..} = goldenTest "malformed input" $ handle (\(SomeException exc) -> return $ BL.pack $ show exc) $ do execute_ conn "CREATE TEMPORARY TABLE copy_malformed_input_error_test (x int PRIMARY KEY, y text)" copy_ conn "COPY copy_unique_constraint_error_test FROM STDIN (...
518
false
true
2
11
146
132
61
71
null
null
Shou/Brahmaputra
Server.hs
bsd-3-clause
etGamePlayer :: Text -> Game -> Maybe Player getGamePlayer k g = M.lookup k $ players g
88
getGamePlayer :: Text -> Game -> Maybe Player getGamePlayer k g = M.lookup k $ players g
88
getGamePlayer k g = M.lookup k $ players g
42
false
true
0
7
17
39
18
21
null
null
rahulmutt/ghcvm
compiler/Eta/TypeCheck/TcTypeNats.hs
bsd-3-clause
axAdd0R = mkAxiom1 "Add0R" $ \t -> (t .+. num 0) === t
61
axAdd0R = mkAxiom1 "Add0R" $ \t -> (t .+. num 0) === t
61
axAdd0R = mkAxiom1 "Add0R" $ \t -> (t .+. num 0) === t
61
false
false
1
10
19
36
16
20
null
null
brendanhay/gogol
gogol-cloudfunctions/gen/Network/Google/CloudFunctions/Types/Product.hs
mpl-2.0
-- | Output only. The version identifier of the Cloud Function. Each -- deployment attempt results in a new version of a function being created. cfVersionId :: Lens' CloudFunction (Maybe Int64) cfVersionId = lens _cfVersionId (\ s a -> s{_cfVersionId = a}) . mapping _Coerce
282
cfVersionId :: Lens' CloudFunction (Maybe Int64) cfVersionId = lens _cfVersionId (\ s a -> s{_cfVersionId = a}) . mapping _Coerce
137
cfVersionId = lens _cfVersionId (\ s a -> s{_cfVersionId = a}) . mapping _Coerce
88
true
true
0
10
52
56
29
27
null
null
fehu/itesm-ga
src/Parcial2/App.hs
mit
optSelIntactFrac :: Optional1 Float optSelIntactFrac = optional "" ["frac-intact"] ["Fraction of population left intact."] []
187
optSelIntactFrac :: Optional1 Float optSelIntactFrac = optional "" ["frac-intact"] ["Fraction of population left intact."] []
187
optSelIntactFrac = optional "" ["frac-intact"] ["Fraction of population left intact."] []
151
false
true
0
6
76
31
16
15
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
hvsParameters :: FrozenSet String hvsParameters = ConstantUtils.mkSet $ Map.keys hvsParameterTypes
98
hvsParameters :: FrozenSet String hvsParameters = ConstantUtils.mkSet $ Map.keys hvsParameterTypes
98
hvsParameters = ConstantUtils.mkSet $ Map.keys hvsParameterTypes
64
false
true
1
7
9
28
12
16
null
null
mightymoose/liquidhaskell
benchmarks/bytestring-0.9.2.1/Data/ByteString.T.hs
bsd-3-clause
-- | 'foldr1\'' is a variant of 'foldr1', but is strict in the -- accumulator. {-@ foldr1' :: (Word8 -> Word8 -> Word8) -> ByteStringNE -> Word8 @-} foldr1' :: (Word8 -> Word8 -> Word8) -> ByteString -> Word8 foldr1' f ps | null ps = errorEmptyList "foldr1" | otherwise = foldr' f (last ps) (init ps)
320
foldr1' :: (Word8 -> Word8 -> Word8) -> ByteString -> Word8 foldr1' f ps | null ps = errorEmptyList "foldr1" | otherwise = foldr' f (last ps) (init ps)
171
foldr1' f ps | null ps = errorEmptyList "foldr1" | otherwise = foldr' f (last ps) (init ps)
111
true
true
0
8
76
78
38
40
null
null
HairyDude/heal
EveApi/Types.hs
bsd-2-clause
medSlot MedSlot4 = Just 4
25
medSlot MedSlot4 = Just 4
25
medSlot MedSlot4 = Just 4
25
false
false
1
5
4
16
5
11
null
null
thoughtpolice/binary-serialise-cbor
tests/ReferenceTests.hs
bsd-3-clause
termToJson :: CBOR.Term -> Aeson.Value termToJson (TUInt n) = Aeson.Number (fromIntegral (fromUInt n))
107
termToJson :: CBOR.Term -> Aeson.Value termToJson (TUInt n) = Aeson.Number (fromIntegral (fromUInt n))
107
termToJson (TUInt n) = Aeson.Number (fromIntegral (fromUInt n))
68
false
true
0
9
17
45
22
23
null
null
uuhan/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
defined (PPostulate _ _ _ _ _ _ n t) = []
54
defined (PPostulate _ _ _ _ _ _ n t) = []
54
defined (PPostulate _ _ _ _ _ _ n t) = []
54
false
false
0
7
24
31
15
16
null
null
pparkkin/eta
compiler/ETA/Rename/RnTypes.hs
bsd-3-clause
extractRdrKindSigVars (Just k) = nub (fst (extract_lkind k ([],[])))
68
extractRdrKindSigVars (Just k) = nub (fst (extract_lkind k ([],[])))
68
extractRdrKindSigVars (Just k) = nub (fst (extract_lkind k ([],[])))
68
false
false
0
11
8
43
21
22
null
null
rsasse/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/Heuristics.hs
gpl-3.0
goalRankingIdentifiers :: M.Map Char GoalRanking goalRankingIdentifiers = M.fromList [ ('s', SmartRanking False) , ('S', SmartRanking True) , ('o', OracleRanking "./oracle") , ('O', OracleSmartRanking "./oracle") ...
685
goalRankingIdentifiers :: M.Map Char GoalRanking goalRankingIdentifiers = M.fromList [ ('s', SmartRanking False) , ('S', SmartRanking True) , ('o', OracleRanking "./oracle") , ('O', OracleSmartRanking "./oracle") ...
685
goalRankingIdentifiers = M.fromList [ ('s', SmartRanking False) , ('S', SmartRanking True) , ('o', OracleRanking "./oracle") , ('O', OracleSmartRanking "./oracle") , ('p', SapicRanking) ...
636
false
true
0
8
335
140
83
57
null
null
fhaust/aer-utils
src/Data/SimpleMat.hs
mit
writeCSVImage :: (Show a, KnownNat w, KnownNat h) => FilePath -> Mat w h a -> IO () writeCSVImage fp m = writeFile fp $ unlines $ map (intercalate "," . map show . toList) $ rows m
182
writeCSVImage :: (Show a, KnownNat w, KnownNat h) => FilePath -> Mat w h a -> IO () writeCSVImage fp m = writeFile fp $ unlines $ map (intercalate "," . map show . toList) $ rows m
182
writeCSVImage fp m = writeFile fp $ unlines $ map (intercalate "," . map show . toList) $ rows m
96
false
true
0
11
39
95
45
50
null
null
ml9951/ghc
compiler/llvmGen/Llvm/PpLlvm.hs
bsd-3-clause
-- | Exclamation point. exclamation :: SDoc exclamation = char '!'
66
exclamation :: SDoc exclamation = char '!'
42
exclamation = char '!'
22
true
true
0
5
10
15
8
7
null
null
robdockins/edison
edison-core/src/Data/Edison/Assoc/TernaryTrie.hs
mit
nullFM (FM Nothing fmb) = nullFMB fmb
37
nullFM (FM Nothing fmb) = nullFMB fmb
37
nullFM (FM Nothing fmb) = nullFMB fmb
37
false
false
0
6
6
21
9
12
null
null
luigy/stack
src/Stack/Build/Source.hs
bsd-3-clause
checkDuplicateNames :: MonadThrow m => [(PackageName, (LocalPackageView, gpd))] -> m () checkDuplicateNames locals = case filter hasMultiples $ Map.toList $ Map.fromListWith (++) $ map toPair locals of [] -> return () x -> throwM $ DuplicateLocalPackageNames x where toPair (pn, (lpv, _)) = (pn...
398
checkDuplicateNames :: MonadThrow m => [(PackageName, (LocalPackageView, gpd))] -> m () checkDuplicateNames locals = case filter hasMultiples $ Map.toList $ Map.fromListWith (++) $ map toPair locals of [] -> return () x -> throwM $ DuplicateLocalPackageNames x where toPair (pn, (lpv, _)) = (pn...
398
checkDuplicateNames locals = case filter hasMultiples $ Map.toList $ Map.fromListWith (++) $ map toPair locals of [] -> return () x -> throwM $ DuplicateLocalPackageNames x where toPair (pn, (lpv, _)) = (pn, [lpvRoot lpv]) hasMultiples (_, _:_:_) = True hasMultiples _ = False
310
false
true
0
9
88
176
89
87
null
null