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
frantisekfarka/ghc-dsi
compiler/codeGen/StgCmmUtils.hs
bsd-3-clause
------------------------------------------------------------------------- -- mkSwitch ------------------------------------------------------------------------- emitSwitch :: CmmExpr -- Tag to switch on -> [(ConTagZ, CmmAGraph)] -- Tagged branches -> Maybe CmmAGraph -- ...
792
emitSwitch :: CmmExpr -- Tag to switch on -> [(ConTagZ, CmmAGraph)] -- Tagged branches -> Maybe CmmAGraph -- Default branch (if any) -> ConTagZ -> ConTagZ -- Min and Max possible values; behaviour -- outside this range is un...
625
emitSwitch tag_expr branches mb_deflt lo_tag hi_tag = do { dflags <- getDynFlags ; mkCmmSwitch (via_C dflags) tag_expr branches mb_deflt lo_tag hi_tag } where via_C dflags | HscC <- hscTarget dflags = True | otherwise = False
274
true
true
0
12
244
137
69
68
null
null
foreverbell/fm-client
exe/Test.hs
bsd-3-clause
test :: IO () test = void $ do session <- initSession True player <- initPlayer [username, password] <- take 2 . lines <$> liftIO (readFile "passport") fm <- runSession session $ do login username (encryptPassword password) fetchFM mapM print fm lyrics <- runSession session $ fetchLyrics (fm !! 0) ...
333
test :: IO () test = void $ do session <- initSession True player <- initPlayer [username, password] <- take 2 . lines <$> liftIO (readFile "passport") fm <- runSession session $ do login username (encryptPassword password) fetchFM mapM print fm lyrics <- runSession session $ fetchLyrics (fm !! 0) ...
333
test = void $ do session <- initSession True player <- initPlayer [username, password] <- take 2 . lines <$> liftIO (readFile "passport") fm <- runSession session $ do login username (encryptPassword password) fetchFM mapM print fm lyrics <- runSession session $ fetchLyrics (fm !! 0) print lyrics
319
false
true
0
14
73
139
62
77
null
null
ademinn/JavaWithClasses
src/Checker.hs
bsd-3-clause
checkExpression (Expr (QN qn) line) = checkQualifiedName qn
59
checkExpression (Expr (QN qn) line) = checkQualifiedName qn
59
checkExpression (Expr (QN qn) line) = checkQualifiedName qn
59
false
false
0
9
7
26
12
14
null
null
keithodulaigh/Hets
EVT/ParseEVT.hs
gpl-2.0
evtBasicSpec :: PrefixMap -> AParser st MACHINE evtBasicSpec _ = do spaces -- pos1 <- getPos es <- many parseEVTEvents -- pos2 <- getPos return (MACHINE es)
250
evtBasicSpec :: PrefixMap -> AParser st MACHINE evtBasicSpec _ = do spaces -- pos1 <- getPos es <- many parseEVTEvents -- pos2 <- getPos return (MACHINE es)
250
evtBasicSpec _ = do spaces -- pos1 <- getPos es <- many parseEVTEvents -- pos2 <- getPos return (MACHINE es)
202
false
true
0
9
120
50
23
27
null
null
adinapoli/Shelly.hs
src/Shelly.hs
bsd-3-clause
lineSeqToText :: Seq Text -> Text -- extra append puts a newline at the end lineSeqToText = T.intercalate "\n" . toList . flip (|>) ""
134
lineSeqToText :: Seq Text -> Text lineSeqToText = T.intercalate "\n" . toList . flip (|>) ""
92
lineSeqToText = T.intercalate "\n" . toList . flip (|>) ""
58
true
true
0
8
24
39
20
19
null
null
UBMLtonGroup/timberc
src/Desugar2.hs
bsd-3-clause
dsDefault (Default t a b) = Default t a b
47
dsDefault (Default t a b) = Default t a b
47
dsDefault (Default t a b) = Default t a b
47
false
false
0
7
15
26
12
14
null
null
urbanslug/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
{- ************************************************************************ * * * initialisation * * ********************************************************************...
973
hpcInitCode :: Module -> HpcInfo -> SDoc hpcInitCode _ (NoHpcInfo {}) = Outputable.empty
88
hpcInitCode _ (NoHpcInfo {}) = Outputable.empty
47
true
true
0
7
241
34
18
16
null
null
tomahawkins/trs
Language/TRS/FeedbackArcSet.hs
bsd-3-clause
-- | Optimizes the vertice order by minimizing the -- number of soft edges removed to form an acyclic graph. optimize :: (Show a, Ord a) => Set.Set a -> Set.Set (Edge a) -> IO (Either (Set.Set a) ([a],String)) optimize vertices edges' = do putStr "Attempting to satisfy hard constraints..." hFlush stdout if not ...
1,964
optimize :: (Show a, Ord a) => Set.Set a -> Set.Set (Edge a) -> IO (Either (Set.Set a) ([a],String)) optimize vertices edges' = do putStr "Attempting to satisfy hard constraints..." hFlush stdout if not $ Set.null remaining then do putStrLn "failed" return $ Left remaining else do putStr...
1,853
optimize vertices edges' = do putStr "Attempting to satisfy hard constraints..." hFlush stdout if not $ Set.null remaining then do putStrLn "failed" return $ Left remaining else do putStrLn "success" finalOrder <- annealing hardEdges softEdges initOrder return $ Right (finalO...
1,752
true
true
0
13
412
747
377
370
null
null
coghex/abridgefaraway
src/ABFA/Shell.hs
bsd-3-clause
-- executes a string in the lua state execShell :: Lua.State -> String -> IO (String) execShell ls str = do Lua.runWith ls $ Lua.openlibs error <- Lua.runWith ls $ Lua.loadstring $ BL.pack str res <- Lua.runWith ls $ Lua.pcall 0 1 Nothing ret <- Lua.runWith ls $ Lua.tostring' $ Lua.nthFromBottom (-1) Lua.runW...
431
execShell :: Lua.State -> String -> IO (String) execShell ls str = do Lua.runWith ls $ Lua.openlibs error <- Lua.runWith ls $ Lua.loadstring $ BL.pack str res <- Lua.runWith ls $ Lua.pcall 0 1 Nothing ret <- Lua.runWith ls $ Lua.tostring' $ Lua.nthFromBottom (-1) Lua.runWith ls $ Lua.pop $ Lua.nthFromBottom (...
393
execShell ls str = do Lua.runWith ls $ Lua.openlibs error <- Lua.runWith ls $ Lua.loadstring $ BL.pack str res <- Lua.runWith ls $ Lua.pcall 0 1 Nothing ret <- Lua.runWith ls $ Lua.tostring' $ Lua.nthFromBottom (-1) Lua.runWith ls $ Lua.pop $ Lua.nthFromBottom (-1) return $ (show error) ++ ": " ++ (BL.unpac...
345
true
true
0
11
86
189
89
100
null
null
zachsully/hakaru
haskell/Tests/Disintegrate.hs
bsd-3-clause
testDisintegrate1a, testDisintegrate1b, testDisintegrate1c :: [Cond 'HReal HUnit] testDisintegrate1a = disintegrate norm1a
126
testDisintegrate1a, testDisintegrate1b, testDisintegrate1c :: [Cond 'HReal HUnit] testDisintegrate1a = disintegrate norm1a
126
testDisintegrate1a = disintegrate norm1a
40
false
true
3
7
14
35
16
19
null
null
dysinger/amazonka
amazonka-s3/gen/Network/AWS/S3/Types.hs
mpl-2.0
-- | Screen name of the grantee. gDisplayName :: Lens' Grantee (Maybe Text) gDisplayName = lens _gDisplayName (\s a -> s { _gDisplayName = a })
143
gDisplayName :: Lens' Grantee (Maybe Text) gDisplayName = lens _gDisplayName (\s a -> s { _gDisplayName = a })
110
gDisplayName = lens _gDisplayName (\s a -> s { _gDisplayName = a })
67
true
true
1
9
25
51
25
26
null
null
cullina/Extractor
src/Delannoy.hs
bsd-3-clause
pointToPath = unfoldr pTP . unradius where pTP (0, []) = Nothing pTP (0, x:xs) = if x >= 0 then Just (Vertical, (x, xs)) else Just (Diagonal, (-x - 1, xs)) pTP (x, xs) = Just (Horizontal, (x - 1, xs)) unradius (xs, bound) = (bound - sum (map ...
332
pointToPath = unfoldr pTP . unradius where pTP (0, []) = Nothing pTP (0, x:xs) = if x >= 0 then Just (Vertical, (x, xs)) else Just (Diagonal, (-x - 1, xs)) pTP (x, xs) = Just (Horizontal, (x - 1, xs)) unradius (xs, bound) = (bound - sum (map ...
332
pointToPath = unfoldr pTP . unradius where pTP (0, []) = Nothing pTP (0, x:xs) = if x >= 0 then Just (Vertical, (x, xs)) else Just (Diagonal, (-x - 1, xs)) pTP (x, xs) = Just (Horizontal, (x - 1, xs)) unradius (xs, bound) = (bound - sum (map ...
332
false
false
3
12
130
165
92
73
null
null
jbracker/supermonad-plugin
examples/monad/hmtc/monad-param/TypeChecker.hs
bsd-3-clause
sinks_nonreftype (Src t) e = sinks_nonreftype t (deref e)
62
sinks_nonreftype (Src t) e = sinks_nonreftype t (deref e)
62
sinks_nonreftype (Src t) e = sinks_nonreftype t (deref e)
62
false
false
0
7
13
28
13
15
null
null
google/codeworld
codeworld-api/src/CodeWorld/DrawState.hs
apache-2.0
mapDSColor :: (Maybe Color -> Maybe Color) -> DrawState -> DrawState mapDSColor f (DrawState at mc) = DrawState at (f mc)
121
mapDSColor :: (Maybe Color -> Maybe Color) -> DrawState -> DrawState mapDSColor f (DrawState at mc) = DrawState at (f mc)
121
mapDSColor f (DrawState at mc) = DrawState at (f mc)
52
false
true
0
8
20
61
28
33
null
null
sseefried/shady-graphics
src/Shady/ParamSurf.hs
agpl-3.0
sinU = sin . (* pi)
19
sinU = sin . (* pi)
19
sinU = sin . (* pi)
19
false
false
0
6
5
14
8
6
null
null
dmp1ce/Haskell-Programming-Exercises
Chapter 8/WordNumber.hs
unlicense
digitToWord 9 = "nine"
22
digitToWord 9 = "nine"
22
digitToWord 9 = "nine"
22
false
false
0
5
3
9
4
5
null
null
vincenthz/cryptonite
tests/Utils.hs
bsd-3-clause
chunksL :: ChunkingLen -> L.ByteString -> L.ByteString chunksL (ChunkingLen originalChunks) = L.fromChunks . loop originalChunks . L.toChunks where loop _ [] = [] loop l (b:bs) | B.null b = loop l bs | otherwise = case l of (x:xs) -> let (b1, ...
420
chunksL :: ChunkingLen -> L.ByteString -> L.ByteString chunksL (ChunkingLen originalChunks) = L.fromChunks . loop originalChunks . L.toChunks where loop _ [] = [] loop l (b:bs) | B.null b = loop l bs | otherwise = case l of (x:xs) -> let (b1, ...
420
chunksL (ChunkingLen originalChunks) = L.fromChunks . loop originalChunks . L.toChunks where loop _ [] = [] loop l (b:bs) | B.null b = loop l bs | otherwise = case l of (x:xs) -> let (b1, b2) = B.splitAt x b in b1 : loop xs (b2:bs) ...
365
false
true
4
14
159
179
89
90
null
null
olorin/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types/Product.hs
mpl-2.0
-- | This value is currently \"read replication.\" disiStatusType :: Lens' DBInstanceStatusInfo (Maybe Text) disiStatusType = lens _disiStatusType (\ s a -> s{_disiStatusType = a})
180
disiStatusType :: Lens' DBInstanceStatusInfo (Maybe Text) disiStatusType = lens _disiStatusType (\ s a -> s{_disiStatusType = a})
129
disiStatusType = lens _disiStatusType (\ s a -> s{_disiStatusType = a})
71
true
true
0
9
24
46
25
21
null
null
qpliu/esolang
01_/hs/compiler/Parser3.hs
gpl-3.0
parseParams :: GenParser Param1 () ([Param],[String]) parseParams = do (params,names) <- parseParamList ([],[]) return (reverse params,reverse names)
157
parseParams :: GenParser Param1 () ([Param],[String]) parseParams = do (params,names) <- parseParamList ([],[]) return (reverse params,reverse names)
157
parseParams = do (params,names) <- parseParamList ([],[]) return (reverse params,reverse names)
103
false
true
0
10
24
76
40
36
null
null
svaiter/fay-canvas
src/HtmlCanvas.hs
bsd-3-clause
closePath :: Context -> Fay () closePath = ffi "%1['closePath']()"
66
closePath :: Context -> Fay () closePath = ffi "%1['closePath']()"
66
closePath = ffi "%1['closePath']()"
35
false
true
0
7
9
23
11
12
null
null
MichaelBurge/ToxicSludgeDB
Tests/Database/Toxic/Query/Interpreter.hs
mit
test_case_when_when :: Assertion test_case_when_when = let condition1 = (ELiteral $ LBool False, ELiteral $ LBool True) condition2 =(ELiteral $ LBool True, ELiteral $ LBool False) otherwise = Just $ ELiteral $ LBool True expression = ECase (V.fromList [condition1,condition2]) otherwise statem...
654
test_case_when_when :: Assertion test_case_when_when = let condition1 = (ELiteral $ LBool False, ELiteral $ LBool True) condition2 =(ELiteral $ LBool True, ELiteral $ LBool False) otherwise = Just $ ELiteral $ LBool True expression = ECase (V.fromList [condition1,condition2]) otherwise statem...
654
test_case_when_when = let condition1 = (ELiteral $ LBool False, ELiteral $ LBool True) condition2 =(ELiteral $ LBool True, ELiteral $ LBool False) otherwise = Just $ ELiteral $ LBool True expression = ECase (V.fromList [condition1,condition2]) otherwise statement = singleton_query expression...
621
false
true
0
12
148
171
87
84
null
null
cdepillabout/subhask
src/SubHask/Algebra/Parallel.hs
bsd-3-clause
law_Partitionable_monoid :: (ClassicalLogic t, Eq_ t, Partitionable t) => Int -> t -> Bool law_Partitionable_monoid n t | n > 0 = sum (partition n t) == t | otherwise = True
181
law_Partitionable_monoid :: (ClassicalLogic t, Eq_ t, Partitionable t) => Int -> t -> Bool law_Partitionable_monoid n t | n > 0 = sum (partition n t) == t | otherwise = True
181
law_Partitionable_monoid n t | n > 0 = sum (partition n t) == t | otherwise = True
90
false
true
0
8
39
86
40
46
null
null
vTurbine/ghc
compiler/utils/FastString.hs
bsd-3-clause
copyNewFastString :: Ptr Word8 -> Int -> Int -> IO FastString copyNewFastString ptr len uid = do fp <- copyBytesToForeignPtr ptr len ref <- newIORef Nothing n_chars <- countUTF8Chars ptr len return (FastString uid n_chars (BS.fromForeignPtr fp 0 len) ref)
263
copyNewFastString :: Ptr Word8 -> Int -> Int -> IO FastString copyNewFastString ptr len uid = do fp <- copyBytesToForeignPtr ptr len ref <- newIORef Nothing n_chars <- countUTF8Chars ptr len return (FastString uid n_chars (BS.fromForeignPtr fp 0 len) ref)
263
copyNewFastString ptr len uid = do fp <- copyBytesToForeignPtr ptr len ref <- newIORef Nothing n_chars <- countUTF8Chars ptr len return (FastString uid n_chars (BS.fromForeignPtr fp 0 len) ref)
201
false
true
0
12
47
100
45
55
null
null
triplepointfive/hogldev
tutorial22/Tutorial22.hs
mit
windowWidth = 1024
18
windowWidth = 1024
18
windowWidth = 1024
18
false
false
1
5
2
10
3
7
null
null
nastya13/fold-foldr
dist/build/autogen/Paths_fold_foldr.hs
gpl-3.0
getLibexecDir = catchIO (getEnv "fold_foldr_libexecdir") (\_ -> return libexecdir)
82
getLibexecDir = catchIO (getEnv "fold_foldr_libexecdir") (\_ -> return libexecdir)
82
getLibexecDir = catchIO (getEnv "fold_foldr_libexecdir") (\_ -> return libexecdir)
82
false
false
0
8
8
28
14
14
null
null
ambiata/mafia
test/Test/IO/Mafia/Chaos.hs
bsd-3-clause
submoduleNames :: Set SubmoduleName submoduleNames = Set.fromList (T.replace " " "-" <$> muppets)
97
submoduleNames :: Set SubmoduleName submoduleNames = Set.fromList (T.replace " " "-" <$> muppets)
97
submoduleNames = Set.fromList (T.replace " " "-" <$> muppets)
61
false
true
0
9
12
33
16
17
null
null
text-utf8/text
Data/Text/Internal/Fusion/Size.hs
bsd-2-clause
-- | Maximum of two size hints. larger :: Size -> Size -> Size larger a@(Between ma mb) b@(Between na nb) | ma >= nb = a | na >= mb = b | otherwise = Between (ma `max` na) (mb `max` nb)
199
larger :: Size -> Size -> Size larger a@(Between ma mb) b@(Between na nb) | ma >= nb = a | na >= mb = b | otherwise = Between (ma `max` na) (mb `max` nb)
167
larger a@(Between ma mb) b@(Between na nb) | ma >= nb = a | na >= mb = b | otherwise = Between (ma `max` na) (mb `max` nb)
136
true
true
0
8
56
102
53
49
null
null
bgold-cosmos/Tidal
test/Sound/Tidal/ScalesTest.hs
gpl-3.0
run :: Microspec () run = describe "Sound.Tidal.Scales" $ do describe "scale" $ do describe "5 note scales" $ do let twoOctavesOf5NoteScale = "0 1 2 3 4 5 6 7 8 9" it "can transform notes correctly over 2 octaves - minPent" $ do compareP (Arc 0 1) ...
20,723
run :: Microspec () run = describe "Sound.Tidal.Scales" $ do describe "scale" $ do describe "5 note scales" $ do let twoOctavesOf5NoteScale = "0 1 2 3 4 5 6 7 8 9" it "can transform notes correctly over 2 octaves - minPent" $ do compareP (Arc 0 1) ...
20,723
run = describe "Sound.Tidal.Scales" $ do describe "scale" $ do describe "5 note scales" $ do let twoOctavesOf5NoteScale = "0 1 2 3 4 5 6 7 8 9" it "can transform notes correctly over 2 octaves - minPent" $ do compareP (Arc 0 1) (Sound.Tidal.Scale...
20,703
false
true
0
20
7,490
3,718
1,819
1,899
null
null
kim/amazonka
amazonka-iam/gen/Network/AWS/IAM/DeletePolicyVersion.hs
mpl-2.0
-- | 'DeletePolicyVersionResponse' constructor. deletePolicyVersionResponse :: DeletePolicyVersionResponse deletePolicyVersionResponse = DeletePolicyVersionResponse
164
deletePolicyVersionResponse :: DeletePolicyVersionResponse deletePolicyVersionResponse = DeletePolicyVersionResponse
116
deletePolicyVersionResponse = DeletePolicyVersionResponse
57
true
true
0
4
9
12
7
5
null
null
seagreen/hjsonschema
src/JSONSchema/Validator/Draft4/String.hs
mit
maxLengthVal :: MaxLength -> Text -> Maybe MaxLengthInvalid maxLengthVal a@(MaxLength n) x | T.length x > n = Just (MaxLengthInvalid a x) | otherwise = Nothing
172
maxLengthVal :: MaxLength -> Text -> Maybe MaxLengthInvalid maxLengthVal a@(MaxLength n) x | T.length x > n = Just (MaxLengthInvalid a x) | otherwise = Nothing
172
maxLengthVal a@(MaxLength n) x | T.length x > n = Just (MaxLengthInvalid a x) | otherwise = Nothing
112
false
true
1
10
38
70
33
37
null
null
tjakway/ghcjvm
compiler/typecheck/FunDeps.hs
bsd-3-clause
-- Improve a class constraint from instance declarations -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pprEquation :: FunDepEqn a -> SDoc pprEquation (FDEqn { fd_qtvs = qtvs, fd_eqs = pairs }) = vcat [text "forall" <+> braces (pprWithCommas ppr qtvs), nest 2 (vcat [ ppr t1 <+> text "~" <+> ppr ...
370
pprEquation :: FunDepEqn a -> SDoc pprEquation (FDEqn { fd_qtvs = qtvs, fd_eqs = pairs }) = vcat [text "forall" <+> braces (pprWithCommas ppr qtvs), nest 2 (vcat [ ppr t1 <+> text "~" <+> ppr t2 | Pair t1 t2 <- pairs])]
254
pprEquation (FDEqn { fd_qtvs = qtvs, fd_eqs = pairs }) = vcat [text "forall" <+> braces (pprWithCommas ppr qtvs), nest 2 (vcat [ ppr t1 <+> text "~" <+> ppr t2 | Pair t1 t2 <- pairs])]
219
true
true
0
13
88
112
56
56
null
null
piccolo-lang/piccolo
src/Core/Parser.hs
gpl-3.0
branchOutput :: Parser Branch branchOutput = do pos <- getPosition g <- brackets expr c <- identifier reservedOp "!" e <- expr reservedOp "," p <- process pos' <- getPosition return $ BOutput g c e (-1) p (mkLoc pos pos')
239
branchOutput :: Parser Branch branchOutput = do pos <- getPosition g <- brackets expr c <- identifier reservedOp "!" e <- expr reservedOp "," p <- process pos' <- getPosition return $ BOutput g c e (-1) p (mkLoc pos pos')
239
branchOutput = do pos <- getPosition g <- brackets expr c <- identifier reservedOp "!" e <- expr reservedOp "," p <- process pos' <- getPosition return $ BOutput g c e (-1) p (mkLoc pos pos')
209
false
true
0
10
58
104
46
58
null
null
bkoropoff/Idris-dev
src/Idris/Error.hs
bsd-3-clause
getErrSpan :: Err -> FC getErrSpan (At fc _) = fc
49
getErrSpan :: Err -> FC getErrSpan (At fc _) = fc
49
getErrSpan (At fc _) = fc
25
false
true
0
7
10
26
13
13
null
null
andreasbock/hql
src/Utils/Calendar.hs
gpl-2.0
getYearOffsets :: Date -> [Date] -> [Years] getYearOffsets now dates = map (getYearOffset now) dates
100
getYearOffsets :: Date -> [Date] -> [Years] getYearOffsets now dates = map (getYearOffset now) dates
100
getYearOffsets now dates = map (getYearOffset now) dates
56
false
true
0
7
14
41
21
20
null
null
mainland/nikola
examples/common/GUI.hs
bsd-3-clause
openWindowGLUT :: Display -> IO () openWindowGLUT disp = do open disp GLUT.perWindowKeyRepeat $= GLUT.PerWindowKeyRepeatOff where open :: Display -> IO () open (InWindow windowName (sizeX, sizeY) (posX, posY)) = do GLUT.initialWindowSize $= GL.Size (fromIntegral sizeX) ...
914
openWindowGLUT :: Display -> IO () openWindowGLUT disp = do open disp GLUT.perWindowKeyRepeat $= GLUT.PerWindowKeyRepeatOff where open :: Display -> IO () open (InWindow windowName (sizeX, sizeY) (posX, posY)) = do GLUT.initialWindowSize $= GL.Size (fromIntegral sizeX) ...
914
openWindowGLUT disp = do open disp GLUT.perWindowKeyRepeat $= GLUT.PerWindowKeyRepeatOff where open :: Display -> IO () open (InWindow windowName (sizeX, sizeY) (posX, posY)) = do GLUT.initialWindowSize $= GL.Size (fromIntegral sizeX) (fromIntegral s...
879
false
true
0
10
310
254
122
132
null
null
vikraman/ghc-mod
Language/Haskell/GhcMod/GHCApi.hs
bsd-3-clause
initializeFlags :: GhcMonad m => Options -> m () initializeFlags opt = do dflags0 <- getSessionDynFlags dflags1 <- modifyFlagsWithOpts dflags0 $ ghcOpts opt void $ setSessionDynFlags dflags1 ---------------------------------------------------------------- -- FIXME removing Options
295
initializeFlags :: GhcMonad m => Options -> m () initializeFlags opt = do dflags0 <- getSessionDynFlags dflags1 <- modifyFlagsWithOpts dflags0 $ ghcOpts opt void $ setSessionDynFlags dflags1 ---------------------------------------------------------------- -- FIXME removing Options
295
initializeFlags opt = do dflags0 <- getSessionDynFlags dflags1 <- modifyFlagsWithOpts dflags0 $ ghcOpts opt void $ setSessionDynFlags dflags1 ---------------------------------------------------------------- -- FIXME removing Options
246
false
true
0
9
45
66
30
36
null
null
mhwombat/creatur-image-wains
src/ALife/Creatur/Wain/Image/Pattern.hs
bsd-3-clause
zipWithCopyRight _ _ [] = []
28
zipWithCopyRight _ _ [] = []
28
zipWithCopyRight _ _ [] = []
28
false
false
2
6
5
20
7
13
null
null
uriba/dwarf
src/Data/Dwarf.hs
bsd-3-clause
dw_at 0x2c = DW_AT_start_scope
30
dw_at 0x2c = DW_AT_start_scope
30
dw_at 0x2c = DW_AT_start_scope
30
false
false
0
5
3
9
4
5
null
null
maximkulkin/aeson
Data/Aeson/TH.hs
bsd-3-clause
encodeArgs :: Options -> Bool -> Con -> Q Match -- Nullary constructors. Generates code that explicitly matches against the -- constructor even though it doesn't contain data. This is useful to prevent -- type errors. encodeArgs opts multiCons (NormalC conName []) = match (conP conName []) (normalB (enco...
388
encodeArgs :: Options -> Bool -> Con -> Q Match encodeArgs opts multiCons (NormalC conName []) = match (conP conName []) (normalB (encodeSum opts multiCons conName [e|toJSON ([] :: [()])|])) []
218
encodeArgs opts multiCons (NormalC conName []) = match (conP conName []) (normalB (encodeSum opts multiCons conName [e|toJSON ([] :: [()])|])) []
170
true
true
0
12
81
94
47
47
null
null
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Examples/Queens/Advanced.hs
bsd-2-clause
nqueensBreak180 :: MonadPlus m ⇒ Updater α β {-^ how to add new partial coordinates to the current solution -} → (α → m β) {-^ function that finalizes the partial solution -} → (α → NQueensBreak180State → m β) {-^ function to break the 180-degree rotational symmetry for the next inner layer -} → (α ...
17,033
nqueensBreak180 :: MonadPlus m ⇒ Updater α β {-^ how to add new partial coordinates to the current solution -} → (α → m β) {-^ function that finalizes the partial solution -} → (α → NQueensBreak180State → m β) {-^ function to break the 180-degree rotational symmetry for the next inner layer -} → (α ...
17,009
nqueensBreak180 !updater !finalizeValue !break180 !search !value !(NQueensBreak180State number_of_queens_remaining window_start window_size occupied_rows occupied_columns occupied_negative_diagonals occupied_positive_diagonals occupied_right_positive_diagonals...
16,519
true
true
28
22
5,182
3,245
1,754
1,491
null
null
lukexi/ghc-7.8-arm64
compiler/codeGen/StgCmmProf.hs
bsd-3-clause
ldvWord :: DynFlags -> CmmExpr -> CmmExpr -- Takes the address of a closure, and returns -- the address of the LDV word in the closure ldvWord dflags closure_ptr = cmmOffsetB dflags closure_ptr (oFFSET_StgHeader_ldvw dflags)
228
ldvWord :: DynFlags -> CmmExpr -> CmmExpr ldvWord dflags closure_ptr = cmmOffsetB dflags closure_ptr (oFFSET_StgHeader_ldvw dflags)
135
ldvWord dflags closure_ptr = cmmOffsetB dflags closure_ptr (oFFSET_StgHeader_ldvw dflags)
93
true
true
0
7
38
39
20
19
null
null
eigengrau/panopticus
src/Main.hs
gpl-3.0
panopticus ∷ Bot panopticus = do (channels, channelsPart) ← initChannelsPart channels let parts = [pingPart, channelsPart, greetPart] simpleBot' channelLogger logger limits host port nick commandPrefix user parts where channelLogger = Nothing comm...
882
panopticus ∷ Bot panopticus = do (channels, channelsPart) ← initChannelsPart channels let parts = [pingPart, channelsPart, greetPart] simpleBot' channelLogger logger limits host port nick commandPrefix user parts where channelLogger = Nothing comm...
882
panopticus = do (channels, channelsPart) ← initChannelsPart channels let parts = [pingPart, channelsPart, greetPart] simpleBot' channelLogger logger limits host port nick commandPrefix user parts where channelLogger = Nothing commandPrefix = "!" ...
865
false
true
0
10
440
154
86
68
null
null
lefant/kurt
test/Test-Data.Goban.STVector.hs
gpl-3.0
-- instance Arbitrary VertexState where -- arbitrary = choose (chr 0, chr 255) -- coarbitrary c = variant (ord c `rem` 4) main :: IO () main = do defaultMain tests
179
main :: IO () main = do defaultMain tests
43
main = do defaultMain tests
29
true
true
0
8
46
31
14
17
null
null
alexander-at-github/eta
compiler/ETA/SimplCore/CoreMonad.hs
bsd-3-clause
tickString (KnownBranch _) = "KnownBranch"
55
tickString (KnownBranch _) = "KnownBranch"
55
tickString (KnownBranch _) = "KnownBranch"
55
false
false
0
6
17
16
7
9
null
null
ezyang/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
pprAsmCLbl :: Platform -> CLabel -> SDoc pprAsmCLbl platform (ForeignLabel fs (Just sz) _ _) | platformOS platform == OSMinGW32 -- In asm mode, we need to put the suffix on a stdcall ForeignLabel. -- (The C compiler does this itself). = ftext fs <> char '@' <> int sz
280
pprAsmCLbl :: Platform -> CLabel -> SDoc pprAsmCLbl platform (ForeignLabel fs (Just sz) _ _) | platformOS platform == OSMinGW32 -- In asm mode, we need to put the suffix on a stdcall ForeignLabel. -- (The C compiler does this itself). = ftext fs <> char '@' <> int sz
280
pprAsmCLbl platform (ForeignLabel fs (Just sz) _ _) | platformOS platform == OSMinGW32 -- In asm mode, we need to put the suffix on a stdcall ForeignLabel. -- (The C compiler does this itself). = ftext fs <> char '@' <> int sz
239
false
true
4
12
62
81
36
45
null
null
unisonweb/platform
parser-typechecker/src/Unison/PrintError.hs
mit
_printArrowsAtPos :: String -> Int -> Int -> String _printArrowsAtPos s line column = let lineCaret s i = s ++ if i == line then "\n" ++ columnCaret else "" columnCaret = replicate (column - 1) '-' ++ "^" source = unlines (uncurry lineCaret <$> lines s `zip` [1 ..]) in source
298
_printArrowsAtPos :: String -> Int -> Int -> String _printArrowsAtPos s line column = let lineCaret s i = s ++ if i == line then "\n" ++ columnCaret else "" columnCaret = replicate (column - 1) '-' ++ "^" source = unlines (uncurry lineCaret <$> lines s `zip` [1 ..]) in source
298
_printArrowsAtPos s line column = let lineCaret s i = s ++ if i == line then "\n" ++ columnCaret else "" columnCaret = replicate (column - 1) '-' ++ "^" source = unlines (uncurry lineCaret <$> lines s `zip` [1 ..]) in source
246
false
true
0
13
74
118
61
57
null
null
NatureShade/SymbolicHaskell
src/Math/Symbolic/Simplify.hs
mit
collectSLike x = x
18
collectSLike x = x
18
collectSLike x = x
18
false
false
1
5
3
13
4
9
null
null
sdiehl/ghc
compiler/main/Packages.hs
bsd-3-clause
upd_wired_in :: WiredPackagesMap -> DefUnitId -> DefUnitId upd_wired_in wiredInMap key | Just key' <- Map.lookup key wiredInMap = key' | otherwise = key
160
upd_wired_in :: WiredPackagesMap -> DefUnitId -> DefUnitId upd_wired_in wiredInMap key | Just key' <- Map.lookup key wiredInMap = key' | otherwise = key
160
upd_wired_in wiredInMap key | Just key' <- Map.lookup key wiredInMap = key' | otherwise = key
101
false
true
1
10
30
52
24
28
null
null
nagyf/wyas
src/Evaluator.hs
mit
strBoolBinop :: (String -> String -> Bool) -> [LispVal] -> ThrowsError LispVal strBoolBinop = boolBinop unpackStr
114
strBoolBinop :: (String -> String -> Bool) -> [LispVal] -> ThrowsError LispVal strBoolBinop = boolBinop unpackStr
114
strBoolBinop = boolBinop unpackStr
35
false
true
0
9
16
45
21
24
null
null
edwardwas/adventOfCode
src/Day11.hs
mit
increment :: String -> String increment = helper where helper (x:xs) | x == 'z' = 'a' : helper xs | otherwise = succ x : xs helper [] = []
176
increment :: String -> String increment = helper where helper (x:xs) | x == 'z' = 'a' : helper xs | otherwise = succ x : xs helper [] = []
176
increment = helper where helper (x:xs) | x == 'z' = 'a' : helper xs | otherwise = succ x : xs helper [] = []
146
false
true
1
8
68
78
37
41
null
null
scravy/multimap
src/Data/BagMultiMap.hs
mit
elems :: BagMultiMap k a -> [[a]] -- ^ /O(n)./ Return all elements of the multimap in the -- ascending order of their keys. -- -- A list of lists is returned since a key can have -- multiple values. Use 'concat' to flatten. elems (BagMultiMap (_, _, map)) = Map.elems map
271
elems :: BagMultiMap k a -> [[a]] elems (BagMultiMap (_, _, map)) = Map.elems map
81
elems (BagMultiMap (_, _, map)) = Map.elems map
47
true
true
0
7
51
58
32
26
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F02.hs
bsd-3-clause
ptr_glBindVideoCaptureStreamTextureNV :: FunPtr (GLuint -> GLuint -> GLenum -> GLenum -> GLuint -> IO ()) ptr_glBindVideoCaptureStreamTextureNV = unsafePerformIO $ getCommand "glBindVideoCaptureStreamTextureNV"
210
ptr_glBindVideoCaptureStreamTextureNV :: FunPtr (GLuint -> GLuint -> GLenum -> GLenum -> GLuint -> IO ()) ptr_glBindVideoCaptureStreamTextureNV = unsafePerformIO $ getCommand "glBindVideoCaptureStreamTextureNV"
210
ptr_glBindVideoCaptureStreamTextureNV = unsafePerformIO $ getCommand "glBindVideoCaptureStreamTextureNV"
104
false
true
0
13
20
49
24
25
null
null
agentm/project-m36
src/lib/ProjectM36/Client.hs
unlicense
disconnectedTransactionIsDirty sessionId conn@(RemoteConnection _) = remoteCall conn (RetrieveSessionIsDirty sessionId)
119
disconnectedTransactionIsDirty sessionId conn@(RemoteConnection _) = remoteCall conn (RetrieveSessionIsDirty sessionId)
119
disconnectedTransactionIsDirty sessionId conn@(RemoteConnection _) = remoteCall conn (RetrieveSessionIsDirty sessionId)
119
false
false
0
8
8
31
15
16
null
null
onponomarev/ganeti
src/Ganeti/Query/Instance.hs
bsd-2-clause
-- | Map each name to a function that extracts that value from the RPC result. instanceLiveFieldExtract :: FieldName -> InstanceInfo -> Instance -> J.JSValue instanceLiveFieldExtract "oper_ram" info _ = J.showJSON $ instInfoMemory info
237
instanceLiveFieldExtract :: FieldName -> InstanceInfo -> Instance -> J.JSValue instanceLiveFieldExtract "oper_ram" info _ = J.showJSON $ instInfoMemory info
158
instanceLiveFieldExtract "oper_ram" info _ = J.showJSON $ instInfoMemory info
79
true
true
0
8
35
42
21
21
null
null
batterseapower/graph-wrapper
Data/Graph/Wrapper/Internal.hs
bsd-3-clause
gVertexVertex :: Graph i v -> G.Vertex -> v gVertexVertex g gv = gVertexVertexArray g ! gv
90
gVertexVertex :: Graph i v -> G.Vertex -> v gVertexVertex g gv = gVertexVertexArray g ! gv
90
gVertexVertex g gv = gVertexVertexArray g ! gv
46
false
true
0
7
16
38
18
20
null
null
liyang/thyme
tests/sanity.hs
bsd-3-clause
------------------------------------------------------------------------ prop_ShowRead :: (Eq a, Show a, Read a) => a -> Bool prop_ShowRead a = (a, "") `elem` reads (show a)
174
prop_ShowRead :: (Eq a, Show a, Read a) => a -> Bool prop_ShowRead a = (a, "") `elem` reads (show a)
100
prop_ShowRead a = (a, "") `elem` reads (show a)
47
true
true
0
8
22
61
33
28
null
null
xenog/haskoin
src/Network/Haskoin/Network/Message.hs
unlicense
msgType (MGetData _) = "getdata"
36
msgType (MGetData _) = "getdata"
36
msgType (MGetData _) = "getdata"
36
false
false
0
6
8
16
7
9
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
-- | Optional. Job is a Presto job. jPrestoJob :: Lens' Job (Maybe PrestoJob) jPrestoJob = lens _jPrestoJob (\ s a -> s{_jPrestoJob = a})
139
jPrestoJob :: Lens' Job (Maybe PrestoJob) jPrestoJob = lens _jPrestoJob (\ s a -> s{_jPrestoJob = a})
103
jPrestoJob = lens _jPrestoJob (\ s a -> s{_jPrestoJob = a})
61
true
true
0
9
26
48
25
23
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/THNames.hs
bsd-3-clause
pragSpecDIdKey = mkPreludeMiscIdUnique 331
61
pragSpecDIdKey = mkPreludeMiscIdUnique 331
61
pragSpecDIdKey = mkPreludeMiscIdUnique 331
61
false
false
0
5
22
9
4
5
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/Pretty.hs
bsd-3-clause
layLeft _ _ = panic "layLeft: Unhandled case"
62
layLeft _ _ = panic "layLeft: Unhandled case"
62
layLeft _ _ = panic "layLeft: Unhandled case"
62
false
false
0
5
24
14
6
8
null
null
olsner/ghc
testsuite/tests/indexed-types/should_compile/T11361.hs
bsd-3-clause
inc _proxy Nothing (_, y) = Just y
35
inc _proxy Nothing (_, y) = Just y
35
inc _proxy Nothing (_, y) = Just y
35
false
false
0
5
8
25
11
14
null
null
nomeata/sat-britney
Data/DenseIntSet.hs
gpl-2.0
showsTreeHang :: Bool -> [String] -> IntSet -> ShowS showsTreeHang wide bars t = case t of Bin p m l r -> showsBars bars . showString (showBin p m) . showString "\n" . showWide wide bars . showsTreeHang wide (withBar bars) l . showWide wide bars . s...
578
showsTreeHang :: Bool -> [String] -> IntSet -> ShowS showsTreeHang wide bars t = case t of Bin p m l r -> showsBars bars . showString (showBin p m) . showString "\n" . showWide wide bars . showsTreeHang wide (withBar bars) l . showWide wide bars . s...
578
showsTreeHang wide bars t = case t of Bin p m l r -> showsBars bars . showString (showBin p m) . showString "\n" . showWide wide bars . showsTreeHang wide (withBar bars) l . showWide wide bars . showsTreeHang wide (withEmpty bars) r Tip kx bm ...
525
false
true
0
16
225
199
90
109
null
null
mulderr/haskell-wamp
wamp-router/Network/Wamp/Broker.hs
mit
lookupSubscription :: SubscriptionStore -> SubId -> IO (Maybe Subscription) lookupSubscription (SubscriptionStore m) subId = do store <- readMVar m return $ getOne $ store @= subId -- | Lookup a 'Subscription' by 'Network.Wamp.Types.TopicUri'
248
lookupSubscription :: SubscriptionStore -> SubId -> IO (Maybe Subscription) lookupSubscription (SubscriptionStore m) subId = do store <- readMVar m return $ getOne $ store @= subId -- | Lookup a 'Subscription' by 'Network.Wamp.Types.TopicUri'
248
lookupSubscription (SubscriptionStore m) subId = do store <- readMVar m return $ getOne $ store @= subId -- | Lookup a 'Subscription' by 'Network.Wamp.Types.TopicUri'
172
false
true
0
10
38
70
32
38
null
null
acowley/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
isPragLSig :: LSig name -> Bool -- Identifies pragmas isPragLSig (L _ (SpecSig {})) = True
92
isPragLSig :: LSig name -> Bool isPragLSig (L _ (SpecSig {})) = True
70
isPragLSig (L _ (SpecSig {})) = True
38
true
true
0
9
17
37
19
18
null
null
juliagoda/givenfind
src/GivenFind/Geography.hs
bsd-3-clause
-- takes only numeric values from found degrees reduceDegChar :: Maybe [String] -> Maybe [String] reduceDegChar list = list >>= \b -> return $ map (filter(\x -> (isDigit x) || (isPunctuation x))) b
197
reduceDegChar :: Maybe [String] -> Maybe [String] reduceDegChar list = list >>= \b -> return $ map (filter(\x -> (isDigit x) || (isPunctuation x))) b
149
reduceDegChar list = list >>= \b -> return $ map (filter(\x -> (isDigit x) || (isPunctuation x))) b
99
true
true
0
15
32
79
41
38
null
null
cauterize-tools/caut-erl-ref
app/Cauterize/ErlangRef/Options.hs
bsd-3-clause
optParser :: Parser ErlangOpts optParser = ErlangOpts <$> strOption ( long "spec" <> short 's' <> metavar "FILE_PATH" <> help "Input Cauterize specification file." ) <*> strOption ( long "output" <> short 'o' <> metavar "DIRECTORY_PATH" <> help "Output Cauterize directory." )
314
optParser :: Parser ErlangOpts optParser = ErlangOpts <$> strOption ( long "spec" <> short 's' <> metavar "FILE_PATH" <> help "Input Cauterize specification file." ) <*> strOption ( long "output" <> short 'o' <> metavar "DIRECTORY_PATH" <> help "Output Cauterize directory." )
314
optParser = ErlangOpts <$> strOption ( long "spec" <> short 's' <> metavar "FILE_PATH" <> help "Input Cauterize specification file." ) <*> strOption ( long "output" <> short 'o' <> metavar "DIRECTORY_PATH" <> help "Output Cauterize directory." )
283
false
true
5
10
79
92
40
52
null
null
andorp/bead
src/Bead/Controller/Pages.hs
bsd-3-clause
isNewGroupAssessment (ViewModify (NewGroupAssessment _ _)) = True
65
isNewGroupAssessment (ViewModify (NewGroupAssessment _ _)) = True
65
isNewGroupAssessment (ViewModify (NewGroupAssessment _ _)) = True
65
false
false
0
9
6
23
11
12
null
null
Chouffe/skelme
src/Data.hs
bsd-3-clause
defineVar :: Env -> String -> LispVal -> IOThrowsError LispVal defineVar envRef var val = do alreadyBound <- liftIO $ isBound envRef var if alreadyBound then setVar envRef var val else do valRef <- liftIO $ newIORef val liftIO $ modifyIORef envRef ((var, valRef):) return $ val
297
defineVar :: Env -> String -> LispVal -> IOThrowsError LispVal defineVar envRef var val = do alreadyBound <- liftIO $ isBound envRef var if alreadyBound then setVar envRef var val else do valRef <- liftIO $ newIORef val liftIO $ modifyIORef envRef ((var, valRef):) return $ val
297
defineVar envRef var val = do alreadyBound <- liftIO $ isBound envRef var if alreadyBound then setVar envRef var val else do valRef <- liftIO $ newIORef val liftIO $ modifyIORef envRef ((var, valRef):) return $ val
234
false
true
0
13
66
110
53
57
null
null
pseudonom/persistent
persistent-template/Database/Persist/TH/Internal.hs
mit
mkUniqueKeys def = do c <- clause return $ FunD 'persistUniqueKeys [c] where clause = do xs <- forM (entityFields def) $ \fd -> do let x = fieldHaskell fd x' <- newName $ '_' : unpack (unHaskellName x) return (x, x') let pcs = map (go xs) $ entityUniques...
838
mkUniqueKeys def = do c <- clause return $ FunD 'persistUniqueKeys [c] where clause = do xs <- forM (entityFields def) $ \fd -> do let x = fieldHaskell fd x' <- newName $ '_' : unpack (unHaskellName x) return (x, x') let pcs = map (go xs) $ entityUniques...
838
mkUniqueKeys def = do c <- clause return $ FunD 'persistUniqueKeys [c] where clause = do xs <- forM (entityFields def) $ \fd -> do let x = fieldHaskell fd x' <- newName $ '_' : unpack (unHaskellName x) return (x, x') let pcs = map (go xs) $ entityUniques...
838
false
false
0
16
286
358
175
183
null
null
jecisc/TP_PF_L3
PF-TP4/.dist-buildwrapper/dist/build/autogen/Paths_PF_TP4.hs
mit
getLibexecDir = catchIO (getEnv "PF_TP4_libexecdir") (\_ -> return libexecdir)
78
getLibexecDir = catchIO (getEnv "PF_TP4_libexecdir") (\_ -> return libexecdir)
78
getLibexecDir = catchIO (getEnv "PF_TP4_libexecdir") (\_ -> return libexecdir)
78
false
false
1
8
8
31
14
17
null
null
aelve/json-x
tests/UnitTests.hs
bsd-3-clause
roundTripCamel :: String -> Assertion roundTripCamel name = assertEqual "" name (camelFrom '_' $ camelTo '_' name)
114
roundTripCamel :: String -> Assertion roundTripCamel name = assertEqual "" name (camelFrom '_' $ camelTo '_' name)
114
roundTripCamel name = assertEqual "" name (camelFrom '_' $ camelTo '_' name)
76
false
true
0
8
16
40
19
21
null
null
nomeata/L-seed
src/Lseed/Constants.hs
bsd-3-clause
-- | Minimum radial angular distance between two branches minAngle :: Double minAngle = pi/20
93
minAngle :: Double minAngle = pi/20
35
minAngle = pi/20
16
true
true
0
5
14
16
9
7
null
null
AndrewRademacher/wai
warp/Network/Wai/Handler/Warp/HTTP2/Receiver.hs
mit
checkPriority :: Priority -> StreamId -> IO () checkPriority p me | dep == me = E.throwIO $ StreamError ProtocolError me | otherwise = return () where dep = streamDependency p
185
checkPriority :: Priority -> StreamId -> IO () checkPriority p me | dep == me = E.throwIO $ StreamError ProtocolError me | otherwise = return () where dep = streamDependency p
185
checkPriority p me | dep == me = E.throwIO $ StreamError ProtocolError me | otherwise = return () where dep = streamDependency p
138
false
true
1
8
40
73
34
39
null
null
wilbowma/accelerate
Data/Array/Accelerate/CUDA/CodeGen.hs
bsd-3-clause
codeGenPrim (PrimMax ty) [a,b] = codeGenMax ty a b
62
codeGenPrim (PrimMax ty) [a,b] = codeGenMax ty a b
62
codeGenPrim (PrimMax ty) [a,b] = codeGenMax ty a b
62
false
false
0
7
20
30
15
15
null
null
andorp/bead
src/Bead/Persistence/SQL/Registration.hs
bsd-3-clause
loadUserReg :: Domain.UserRegKey -> Persist Domain.UserRegistration loadUserReg key = do value <- get (toEntityKey key) return $ maybe (persistError "loadUserReg" $ "no registration key was found:" ++ show key) toDomainValue value #ifdef TEST
271
loadUserReg :: Domain.UserRegKey -> Persist Domain.UserRegistration loadUserReg key = do value <- get (toEntityKey key) return $ maybe (persistError "loadUserReg" $ "no registration key was found:" ++ show key) toDomainValue value #ifdef TEST
271
loadUserReg key = do value <- get (toEntityKey key) return $ maybe (persistError "loadUserReg" $ "no registration key was found:" ++ show key) toDomainValue value #ifdef TEST
203
false
true
0
12
61
73
34
39
null
null
lpeterse/koka
src/Type/TypeVar.hs
apache-2.0
tvsInsertAll :: [TypeVar] -> Tvs -> Tvs tvsInsertAll vars (Tvs set) = Tvs (foldr S.insert set vars)
101
tvsInsertAll :: [TypeVar] -> Tvs -> Tvs tvsInsertAll vars (Tvs set) = Tvs (foldr S.insert set vars)
101
tvsInsertAll vars (Tvs set) = Tvs (foldr S.insert set vars)
61
false
true
0
8
18
48
24
24
null
null
thoughtpolice/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
checkTestSuite :: PackageDescription -> TestSuite -> [PackageCheck] checkTestSuite pkg test = catMaybes [ case testInterface test of TestSuiteUnsupported tt@(TestTypeUnknown _ _) -> Just $ PackageBuildWarning $ quote (display tt) ++ " is not a known type of test suite. " ++ "...
2,327
checkTestSuite :: PackageDescription -> TestSuite -> [PackageCheck] checkTestSuite pkg test = catMaybes [ case testInterface test of TestSuiteUnsupported tt@(TestTypeUnknown _ _) -> Just $ PackageBuildWarning $ quote (display tt) ++ " is not a known type of test suite. " ++ "...
2,327
checkTestSuite pkg test = catMaybes [ case testInterface test of TestSuiteUnsupported tt@(TestTypeUnknown _ _) -> Just $ PackageBuildWarning $ quote (display tt) ++ " is not a known type of test suite. " ++ "The known test suite types are: " ++ commaSep (map display...
2,259
false
true
5
16
751
441
217
224
null
null
ktvoelker/hjc
Util.hs
gpl-3.0
compileName :: (GetName a) => a -> Expr compileName bndr = let (maybeModName, varName) = hsName bndr in case maybeModName of Nothing -> Use varName Just modName -> Index (Index (ENative "M") (Literal $ LitStr modName)) $ Literal $ LitStr varName
269
compileName :: (GetName a) => a -> Expr compileName bndr = let (maybeModName, varName) = hsName bndr in case maybeModName of Nothing -> Use varName Just modName -> Index (Index (ENative "M") (Literal $ LitStr modName)) $ Literal $ LitStr varName
269
compileName bndr = let (maybeModName, varName) = hsName bndr in case maybeModName of Nothing -> Use varName Just modName -> Index (Index (ENative "M") (Literal $ LitStr modName)) $ Literal $ LitStr varName
229
false
true
0
17
64
113
53
60
null
null
joshuaclayton/unused
src/Unused/ResultsClassifier/Types.hs
mit
displayFailure :: T.Text -> Y.Parser a displayFailure t = fail $ "Parse error: '" ++ T.unpack t ++ "' is not a valid key in a singleOnly matcher"
145
displayFailure :: T.Text -> Y.Parser a displayFailure t = fail $ "Parse error: '" ++ T.unpack t ++ "' is not a valid key in a singleOnly matcher"
145
displayFailure t = fail $ "Parse error: '" ++ T.unpack t ++ "' is not a valid key in a singleOnly matcher"
106
false
true
0
8
27
42
20
22
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeKeyPairs.hs
mpl-2.0
-- | 'DescribeKeyPairs' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dkp1DryRun' @::@ 'Maybe' 'Bool' -- -- * 'dkp1Filters' @::@ ['Filter'] -- -- * 'dkp1KeyNames' @::@ ['Text'] -- describeKeyPairs :: DescribeKeyPairs describeKeyPairs = DescribeKeyPairs { _dkp1DryRun = Nothing...
384
describeKeyPairs :: DescribeKeyPairs describeKeyPairs = DescribeKeyPairs { _dkp1DryRun = Nothing , _dkp1KeyNames = mempty , _dkp1Filters = mempty }
166
describeKeyPairs = DescribeKeyPairs { _dkp1DryRun = Nothing , _dkp1KeyNames = mempty , _dkp1Filters = mempty }
129
true
true
0
7
70
45
30
15
null
null
holdenlee/notebook
src/Utilities.hs
mit
-- * Maps and Lists isInitialSegment :: Eq a => [a] -> [a] -> Bool isInitialSegment = isJust `c2` stripPrefix
110
isInitialSegment :: Eq a => [a] -> [a] -> Bool isInitialSegment = isJust `c2` stripPrefix
89
isInitialSegment = isJust `c2` stripPrefix
42
true
true
0
8
20
39
22
17
null
null
yupferris/write-you-a-haskell
chapter8/protohaskell/Pretty.hs
mit
------------------------------------------------------------------------------- -- Kinds ------------------------------------------------------------------------------- isKArrow :: Kind -> Bool isKArrow KArr{} = True
217
isKArrow :: Kind -> Bool isKArrow KArr{} = True
47
isKArrow KArr{} = True
22
true
true
0
6
13
25
14
11
null
null
fmapfmapfmap/amazonka
gen/src/Gen/AST/Subst.hs
mpl-2.0
verify :: (MonadState (Env a) m, MonadError e m) => Id -> Format (Id -> LText.Text) (Id -> e) -> m () verify n msg = do p <- uses memo (Map.member n) when p . throwError $ format (msg % " for " % iprimary) n
244
verify :: (MonadState (Env a) m, MonadError e m) => Id -> Format (Id -> LText.Text) (Id -> e) -> m () verify n msg = do p <- uses memo (Map.member n) when p . throwError $ format (msg % " for " % iprimary) n
244
verify n msg = do p <- uses memo (Map.member n) when p . throwError $ format (msg % " for " % iprimary) n
121
false
true
0
12
83
130
62
68
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Protocol.hs
bsd-3-clause
packageCommand (WriteRemoteRefBE (RemoteRefB i) e) = addWriteRefCommand EXPR_BOOL i e
85
packageCommand (WriteRemoteRefBE (RemoteRefB i) e) = addWriteRefCommand EXPR_BOOL i e
85
packageCommand (WriteRemoteRefBE (RemoteRefB i) e) = addWriteRefCommand EXPR_BOOL i e
85
false
false
0
9
9
30
14
16
null
null
erlandsona/caldwell-api
library/Config.hs
mit
runDb :: (MonadReader Settings m, MonadIO m) => SqlPersistT IO b -> m b runDb query = do pool <- asks getPool liftIO $ runSqlPool query pool -- | Looks up a setting in the environment, with a provided default, and -- 'read's that information into the inferred type.
274
runDb :: (MonadReader Settings m, MonadIO m) => SqlPersistT IO b -> m b runDb query = do pool <- asks getPool liftIO $ runSqlPool query pool -- | Looks up a setting in the environment, with a provided default, and -- 'read's that information into the inferred type.
274
runDb query = do pool <- asks getPool liftIO $ runSqlPool query pool -- | Looks up a setting in the environment, with a provided default, and -- 'read's that information into the inferred type.
202
false
true
0
8
57
67
32
35
null
null
lynnard/cocos2d-hs
src/Graphics/UI/Cocos2d/Director.hs
bsd-3-clause
gLView_getFrameZoomFactor :: (GLViewValue arg'1) => arg'1 -> HoppyP.IO HoppyP.Float gLView_getFrameZoomFactor arg'1 = withGLViewPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap HoppyP.realToFrac (gLView_getFrameZoomFactor' arg'1')
256
gLView_getFrameZoomFactor :: (GLViewValue arg'1) => arg'1 -> HoppyP.IO HoppyP.Float gLView_getFrameZoomFactor arg'1 = withGLViewPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap HoppyP.realToFrac (gLView_getFrameZoomFactor' arg'1')
256
gLView_getFrameZoomFactor arg'1 = withGLViewPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap HoppyP.realToFrac (gLView_getFrameZoomFactor' arg'1')
172
false
true
0
8
29
73
35
38
null
null
beni55/egison
hs-src/Language/Egison/Primitives.hs
mit
readChar :: PrimitiveFunc readChar = noArg $ return $ makeIO $ liftIO $ liftM Char getChar
90
readChar :: PrimitiveFunc readChar = noArg $ return $ makeIO $ liftIO $ liftM Char getChar
90
readChar = noArg $ return $ makeIO $ liftIO $ liftM Char getChar
64
false
true
0
8
15
32
16
16
null
null
kawu/concraft
src/NLP/Concraft/DAG/DisambSeg.hs
bsd-2-clause
probsCRF :: (X.Word w, Ord t) => CRF.ProbType -> Disamb t -> X.Sent w t -> CRF.SentL Ob P.Atom probsCRF probTyp dmb = CRF.probs probTyp (crf dmb) . schematize schema . X.mapSent (split (tiers dmb) . simplify dmb) where schema = fromConf (schemaConf dmb) -------------------------- -- Disambigu...
555
probsCRF :: (X.Word w, Ord t) => CRF.ProbType -> Disamb t -> X.Sent w t -> CRF.SentL Ob P.Atom probsCRF probTyp dmb = CRF.probs probTyp (crf dmb) . schematize schema . X.mapSent (split (tiers dmb) . simplify dmb) where schema = fromConf (schemaConf dmb) -------------------------- -- Disambigu...
555
probsCRF probTyp dmb = CRF.probs probTyp (crf dmb) . schematize schema . X.mapSent (split (tiers dmb) . simplify dmb) where schema = fromConf (schemaConf dmb) -------------------------- -- Disambiguation -------------------------- -- -- | Perform disambiguation. -- disamb :: (X.Word w, Ord t) => Disamb ...
447
false
true
3
11
117
147
70
77
null
null
d0kt0r0/estuary
client/src/Estuary/Widgets/View.hs
gpl-3.0
viewWidget _ (Example n t) = do b <- clickableDiv "example code-font" $ text t bTime <- performEvent $ fmap (liftIO . const getCurrentTime) b hint $ fmap (\et -> ZoneHint 1 (TextProgram (Live (n,t,et) L3))) bTime return never
233
viewWidget _ (Example n t) = do b <- clickableDiv "example code-font" $ text t bTime <- performEvent $ fmap (liftIO . const getCurrentTime) b hint $ fmap (\et -> ZoneHint 1 (TextProgram (Live (n,t,et) L3))) bTime return never
233
viewWidget _ (Example n t) = do b <- clickableDiv "example code-font" $ text t bTime <- performEvent $ fmap (liftIO . const getCurrentTime) b hint $ fmap (\et -> ZoneHint 1 (TextProgram (Live (n,t,et) L3))) bTime return never
233
false
false
1
17
46
119
55
64
null
null
acowley/ghc
compiler/main/HscTypes.hs
bsd-3-clause
hscSourceString' :: DynFlags -> ModuleName -> HscSource -> String hscSourceString' _ _ HsSrcFile = ""
103
hscSourceString' :: DynFlags -> ModuleName -> HscSource -> String hscSourceString' _ _ HsSrcFile = ""
103
hscSourceString' _ _ HsSrcFile = ""
37
false
true
0
9
16
36
16
20
null
null
sol/pandoc
src/Text/Pandoc/CharacterReferences.hs
gpl-2.0
-- | Parse character entity. characterReference :: GenParser Char st Char characterReference = try $ do char '&' character <- numRef <|> entity char ';' return character
179
characterReference :: GenParser Char st Char characterReference = try $ do char '&' character <- numRef <|> entity char ';' return character
150
characterReference = try $ do char '&' character <- numRef <|> entity char ';' return character
105
true
true
0
9
36
52
23
29
null
null
Concomitant/LambdaHack
Game/LambdaHack/Server/ProtocolServer.hs
bsd-3-clause
-- | Update connections to the new definition of factions. -- Connect to clients in old or newly spawned threads -- that read and write directly to the channels. updateConn :: (MonadAtomic m, MonadServerReadRequest m) => (FactionId -> ChanServer ResponseUI RequestUI -> IO ()) ...
1,922
updateConn :: (MonadAtomic m, MonadServerReadRequest m) => (FactionId -> ChanServer ResponseUI RequestUI -> IO ()) -> (FactionId -> ChanServer ResponseAI RequestAI -> IO ()) -> m () updateConn executorUI executorAI = do -- Pr...
1,760
updateConn executorUI executorAI = do -- Prepare connections based on factions. oldD <- getDict let mkChanServer :: IO (ChanServer resp req) mkChanServer = do responseS <- STM.newTQueueIO requestS <- STM.newTQueueIO return $! ChanServer{..} addConn :: FactionId -> Faction -> IO...
1,485
true
true
0
18
559
453
216
237
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\xF901' = "\x66F4"
33
decomposeChar '\xF901' = "\x66F4"
33
decomposeChar '\xF901' = "\x66F4"
33
false
false
1
5
3
13
4
9
null
null
leshchevds/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
beMaxmem :: String beMaxmem = "maxmem"
38
beMaxmem :: String beMaxmem = "maxmem"
38
beMaxmem = "maxmem"
19
false
true
0
4
5
11
6
5
null
null
isovector/haystack
src/Utils.hs
bsd-3-clause
unwrapPair :: Monad m => (a, m b) -> m (a, b) unwrapPair (a, mb) = do b <- mb return (a, b)
115
unwrapPair :: Monad m => (a, m b) -> m (a, b) unwrapPair (a, mb) = do b <- mb return (a, b)
115
unwrapPair (a, mb) = do b <- mb return (a, b)
69
false
true
0
8
46
72
36
36
null
null
BartAdv/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectErr x = raw_apply (Var (sNS (sUN "Msg") ["Errors", "Reflection", "Language"])) [RConstant . Str $ "Default reflection: " ++ show x]
138
reflectErr x = raw_apply (Var (sNS (sUN "Msg") ["Errors", "Reflection", "Language"])) [RConstant . Str $ "Default reflection: " ++ show x]
138
reflectErr x = raw_apply (Var (sNS (sUN "Msg") ["Errors", "Reflection", "Language"])) [RConstant . Str $ "Default reflection: " ++ show x]
138
false
false
0
11
20
61
31
30
null
null
Bodigrim/katas
src/haskell/B-Writing-applicative-parsers-from-scratch.hs
bsd-2-clause
-- | Given a parser with a function value and another parser, parse the function -- first and then the value, return a parser which applies the function to the -- value. (<@>) :: Parser (a -> b) -> Parser a -> Parser b pf <@> px = P $ \xs -> concatMap (\(ys, f) -> unP (pmap f px) ys) (unP pf xs)
296
(<@>) :: Parser (a -> b) -> Parser a -> Parser b pf <@> px = P $ \xs -> concatMap (\(ys, f) -> unP (pmap f px) ys) (unP pf xs)
126
pf <@> px = P $ \xs -> concatMap (\(ys, f) -> unP (pmap f px) ys) (unP pf xs)
77
true
true
2
10
63
100
51
49
null
null
kalhauge/vagnplayer
src/Data/Control.hs
mit
control (Control Prev) = MPD.previous
37
control (Control Prev) = MPD.previous
37
control (Control Prev) = MPD.previous
37
false
false
0
6
4
18
8
10
null
null
khalilfazal/sscript
test/Data/Char/SScriptSpec.hs
bsd-3-clause
spec :: Spec spec = do context "Data.Char.SScript.subscript" $ do it "should work for a single char" $ subscript '0' `shouldBe` '₀' it "should work for all single digit decimals" $ convertDecimals subscript `shouldBe` "₀₁₂₃₄₅₆₇₈₉" it "should work for +-=() symbols" $ ...
2,026
spec :: Spec spec = do context "Data.Char.SScript.subscript" $ do it "should work for a single char" $ subscript '0' `shouldBe` '₀' it "should work for all single digit decimals" $ convertDecimals subscript `shouldBe` "₀₁₂₃₄₅₆₇₈₉" it "should work for +-=() symbols" $ ...
2,026
spec = do context "Data.Char.SScript.subscript" $ do it "should work for a single char" $ subscript '0' `shouldBe` '₀' it "should work for all single digit decimals" $ convertDecimals subscript `shouldBe` "₀₁₂₃₄₅₆₇₈₉" it "should work for +-=() symbols" $ m...
2,013
false
true
0
13
600
300
139
161
null
null
nevrenato/Hets_Fork
Lottery/Test.hs
gpl-2.0
{- delSemis entfernt alle Semikolons aus einem String -} delSemis [] = []
79
delSemis [] = []
22
delSemis [] = []
22
true
false
0
6
18
14
7
7
null
null