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
ben-schulz/Idris-dev
src/Idris/Core/Unify.hs
bsd-3-clause
unrecoverable :: Fails -> Bool unrecoverable = any bad where bad (_,_,_,_, err, _, _) = unrec err unrec (CantUnify r _ _ _ _ _) = not r unrec (At _ e) = unrec e unrec (Elaborating _ _ _ e) = unrec e unrec (ElaboratingArg _ _ _ e) = unrec e unrec _ = False
298
unrecoverable :: Fails -> Bool unrecoverable = any bad where bad (_,_,_,_, err, _, _) = unrec err unrec (CantUnify r _ _ _ _ _) = not r unrec (At _ e) = unrec e unrec (Elaborating _ _ _ e) = unrec e unrec (ElaboratingArg _ _ _ e) = unrec e unrec _ = False
298
unrecoverable = any bad where bad (_,_,_,_, err, _, _) = unrec err unrec (CantUnify r _ _ _ _ _) = not r unrec (At _ e) = unrec e unrec (Elaborating _ _ _ e) = unrec e unrec (ElaboratingArg _ _ _ e) = unrec e unrec _ = False
267
false
true
0
7
100
166
78
88
null
null
maple-shaft/HaskellTetris
src/Board.hs
mit
renderBoard :: Board -> Picture renderBoard b = pictures $ renderBlockFunc <$> allRenders where allRenders = (L.concat $ L.map ($ b) [getAllBoardBlocks, getAllSettledBlocks, getAllHintBlocks, minoBlocks.activeMino]) renderBlockFunc = renderBlock startXOffset startYOffset
281
renderBoard :: Board -> Picture renderBoard b = pictures $ renderBlockFunc <$> allRenders where allRenders = (L.concat $ L.map ($ b) [getAllBoardBlocks, getAllSettledBlocks, getAllHintBlocks, minoBlocks.activeMino]) renderBlockFunc = renderBlock startXOffset startYOffset
281
renderBoard b = pictures $ renderBlockFunc <$> allRenders where allRenders = (L.concat $ L.map ($ b) [getAllBoardBlocks, getAllSettledBlocks, getAllHintBlocks, minoBlocks.activeMino]) renderBlockFunc = renderBlock startXOffset startYOffset
249
false
true
1
10
39
79
42
37
null
null
bezirg/hlogo
bench/hlogo/GameOfLife.hs
bsd-3-clause
args = ["--max-pxcor=50" ,"--max-pycor=50" ,"--min-pxcor=-50" ,"--min-pycor=-50" ,"--horizontal-wrap=True" ,"--vertical-wrap=True" ]
174
args = ["--max-pxcor=50" ,"--max-pycor=50" ,"--min-pxcor=-50" ,"--min-pycor=-50" ,"--horizontal-wrap=True" ,"--vertical-wrap=True" ]
174
args = ["--max-pxcor=50" ,"--max-pycor=50" ,"--min-pxcor=-50" ,"--min-pycor=-50" ,"--horizontal-wrap=True" ,"--vertical-wrap=True" ]
174
false
false
0
5
50
24
15
9
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP02FunSetsWorksheet.hs
unlicense
(+:) :: Rational' -> Rational' -> Rational' (+:) = add
55
(+:) :: Rational' -> Rational' -> Rational' (+:) = add
55
(+:) = add
11
false
true
0
6
10
23
14
9
null
null
nikki-and-the-robots/nikki
src/test/Data/Indexable/Tests.hs
lgpl-3.0
listEquality :: [Double] -> Bool listEquality x = x == toList (fromList x)
74
listEquality :: [Double] -> Bool listEquality x = x == toList (fromList x)
74
listEquality x = x == toList (fromList x)
41
false
true
0
8
12
34
17
17
null
null
JanGe/xdcc
src/DCC.hs
mit
acceptResumeHandler :: DccSend -> IRC.UnicodeEvent -> DccIO s () acceptResumeHandler offer IRC.Event { _source = IRC.User user , _message = IRC.Privmsg _ (Left msg) } = do env <- getEnv when (user == remoteNick env) $ case fromCtcp msg of Right accept | accept `matchesSend` offer -> download (ResumeFrom (acceptedPosition accept)) offer _ -> return ()
439
acceptResumeHandler :: DccSend -> IRC.UnicodeEvent -> DccIO s () acceptResumeHandler offer IRC.Event { _source = IRC.User user , _message = IRC.Privmsg _ (Left msg) } = do env <- getEnv when (user == remoteNick env) $ case fromCtcp msg of Right accept | accept `matchesSend` offer -> download (ResumeFrom (acceptedPosition accept)) offer _ -> return ()
439
acceptResumeHandler offer IRC.Event { _source = IRC.User user , _message = IRC.Privmsg _ (Left msg) } = do env <- getEnv when (user == remoteNick env) $ case fromCtcp msg of Right accept | accept `matchesSend` offer -> download (ResumeFrom (acceptedPosition accept)) offer _ -> return ()
374
false
true
6
17
142
156
73
83
null
null
Oblosys/webviews
src/lib/WebViewPrim.hs
mit
-- TODO save automatically, or maybe require explicit save? (after several view updates) -- for now, just after every viewEdit -- Specify script lines to be executed after the view update. evalJSEdit :: [String] -> EditM db () evalJSEdit scriptLines = do { modify $ \(es@EditState{ getEStateScriptLines = allScr }) -> es{ getEStateScriptLines = allScr ++ scriptLines } }
378
evalJSEdit :: [String] -> EditM db () evalJSEdit scriptLines = do { modify $ \(es@EditState{ getEStateScriptLines = allScr }) -> es{ getEStateScriptLines = allScr ++ scriptLines } }
188
evalJSEdit scriptLines = do { modify $ \(es@EditState{ getEStateScriptLines = allScr }) -> es{ getEStateScriptLines = allScr ++ scriptLines } }
150
true
true
0
13
66
72
41
31
null
null
mgsloan/toy-diagrams
src/Graphics/UI/Toy/Draggable.hs
bsd-3-clause
startDrag :: AdditiveGroup (V a) => V a -> Draggable a -> Draggable a startDrag p = dragState .~ Just (p, p)
108
startDrag :: AdditiveGroup (V a) => V a -> Draggable a -> Draggable a startDrag p = dragState .~ Just (p, p)
108
startDrag p = dragState .~ Just (p, p)
38
false
true
0
8
21
57
27
30
null
null
spechub/Hets
CSL/Keywords.hs
gpl-2.0
evenS :: String evenS = "even"
30
evenS :: String evenS = "even"
30
evenS = "even"
14
false
true
0
6
5
18
7
11
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
fromListNClassOpKey = mkPreludeMiscIdUnique 500
47
fromListNClassOpKey = mkPreludeMiscIdUnique 500
47
fromListNClassOpKey = mkPreludeMiscIdUnique 500
47
false
false
0
5
3
9
4
5
null
null
reinerp/vector-derive
Data/Vector/Unboxed/Derive.hs
bsd-3-clause
reprDerive nm unboxInternals = do (ty,tyVars,cxt,_) <- getTypeAndVars nm reprDerive' ty tyVars cxt unboxInternals
121
reprDerive nm unboxInternals = do (ty,tyVars,cxt,_) <- getTypeAndVars nm reprDerive' ty tyVars cxt unboxInternals
121
reprDerive nm unboxInternals = do (ty,tyVars,cxt,_) <- getTypeAndVars nm reprDerive' ty tyVars cxt unboxInternals
121
false
false
0
8
21
45
22
23
null
null
toddmohney/flipper
examples/enable-feature-for-a-specific-user/Main.hs
bsd-3-clause
loadFeatures :: IO Features loadFeatures = -- build flipper feature type pure . Features $ Map.fromList [ (featureName disabledFeature, disabledFeature) , (featureName enabledFeature, enabledFeature) ] where disabledFeature :: Feature disabledFeature = mkFeature "SOME_FEATURE" enabledFeature :: Feature enabledFeature = (mkFeature "SOME_GLOBALLY_ENABLED_FEATURE") { isEnabled = True }
454
loadFeatures :: IO Features loadFeatures = -- build flipper feature type pure . Features $ Map.fromList [ (featureName disabledFeature, disabledFeature) , (featureName enabledFeature, enabledFeature) ] where disabledFeature :: Feature disabledFeature = mkFeature "SOME_FEATURE" enabledFeature :: Feature enabledFeature = (mkFeature "SOME_GLOBALLY_ENABLED_FEATURE") { isEnabled = True }
454
loadFeatures = -- build flipper feature type pure . Features $ Map.fromList [ (featureName disabledFeature, disabledFeature) , (featureName enabledFeature, enabledFeature) ] where disabledFeature :: Feature disabledFeature = mkFeature "SOME_FEATURE" enabledFeature :: Feature enabledFeature = (mkFeature "SOME_GLOBALLY_ENABLED_FEATURE") { isEnabled = True }
426
false
true
5
9
113
97
50
47
null
null
mcschroeder/ghc
compiler/prelude/PrelRules.hs
bsd-3-clause
binaryLit :: (DynFlags -> Literal -> Literal -> Maybe CoreExpr) -> RuleM CoreExpr binaryLit op = do dflags <- getDynFlags [Lit l1, Lit l2] <- getArgs liftMaybe $ op dflags (convFloating dflags l1) (convFloating dflags l2)
227
binaryLit :: (DynFlags -> Literal -> Literal -> Maybe CoreExpr) -> RuleM CoreExpr binaryLit op = do dflags <- getDynFlags [Lit l1, Lit l2] <- getArgs liftMaybe $ op dflags (convFloating dflags l1) (convFloating dflags l2)
227
binaryLit op = do dflags <- getDynFlags [Lit l1, Lit l2] <- getArgs liftMaybe $ op dflags (convFloating dflags l1) (convFloating dflags l2)
145
false
true
0
10
41
95
45
50
null
null
WraithM/haskell-opaleye
src/Opaleye/Manipulation.hs
bsd-3-clause
arrangeUpdateReturning :: U.Unpackspec columnsReturned ignored -> T.Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> Sql.Returning HSql.SqlUpdate arrangeUpdateReturning unpackspec t updatef cond returningf = Sql.Returning update returningSEs where update = arrangeUpdate t updatef cond TI.View columnsR = TI.tableColumnsView (TI.tableColumns t) returningPEs = U.collectPEs unpackspec (returningf columnsR) returningSEs = Sql.ensureColumnsGen id (map Sql.sqlExpr returningPEs)
689
arrangeUpdateReturning :: U.Unpackspec columnsReturned ignored -> T.Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> Sql.Returning HSql.SqlUpdate arrangeUpdateReturning unpackspec t updatef cond returningf = Sql.Returning update returningSEs where update = arrangeUpdate t updatef cond TI.View columnsR = TI.tableColumnsView (TI.tableColumns t) returningPEs = U.collectPEs unpackspec (returningf columnsR) returningSEs = Sql.ensureColumnsGen id (map Sql.sqlExpr returningPEs)
689
arrangeUpdateReturning unpackspec t updatef cond returningf = Sql.Returning update returningSEs where update = arrangeUpdate t updatef cond TI.View columnsR = TI.tableColumnsView (TI.tableColumns t) returningPEs = U.collectPEs unpackspec (returningf columnsR) returningSEs = Sql.ensureColumnsGen id (map Sql.sqlExpr returningPEs)
359
false
true
3
12
205
185
85
100
null
null
hrsrashid/nummet
lib/Parser.hs
bsd-3-clause
parseSubExpression :: Parser (Maybe Function) parseSubExpression = optional (char '(' *> parseExpression <* char ')')
117
parseSubExpression :: Parser (Maybe Function) parseSubExpression = optional (char '(' *> parseExpression <* char ')')
117
parseSubExpression = optional (char '(' *> parseExpression <* char ')')
71
false
true
2
9
14
47
19
28
null
null
tanishiking/hscc
src/ProgGenerator.hs
mit
convExpr (Divide _ e1 e2) = concat [convExpr e1, " / ", convExpr e2]
73
convExpr (Divide _ e1 e2) = concat [convExpr e1, " / ", convExpr e2]
73
convExpr (Divide _ e1 e2) = concat [convExpr e1, " / ", convExpr e2]
73
false
false
0
7
18
38
18
20
null
null
tibbe/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprSectionHeader :: Section -> SDoc pprSectionHeader seg = sdocWithPlatform $ \platform -> case platformOS platform of OSDarwin | target32Bit platform -> case seg of Text -> ptext (sLit ".text\n\t.align 2") Data -> ptext (sLit ".data\n\t.align 2") ReadOnlyData -> ptext (sLit ".const\n.align 2") RelocatableReadOnlyData -> ptext (sLit ".const_data\n.align 2") UninitialisedData -> ptext (sLit ".data\n\t.align 2") ReadOnlyData16 -> ptext (sLit ".const\n.align 4") OtherSection _ -> panic "X86.Ppr.pprSectionHeader: unknown section" | otherwise -> case seg of Text -> ptext (sLit ".text\n.align 3") Data -> ptext (sLit ".data\n.align 3") ReadOnlyData -> ptext (sLit ".const\n.align 3") RelocatableReadOnlyData -> ptext (sLit ".const_data\n.align 3") UninitialisedData -> ptext (sLit ".data\n\t.align 3") ReadOnlyData16 -> ptext (sLit ".const\n.align 4") OtherSection _ -> panic "PprMach.pprSectionHeader: unknown section" _ | target32Bit platform -> case seg of Text -> ptext (sLit ".text\n\t.align 4,0x90") Data -> ptext (sLit ".data\n\t.align 4") ReadOnlyData -> ptext (sLit ".section .rodata\n\t.align 4") RelocatableReadOnlyData -> ptext (sLit ".section .data\n\t.align 4") UninitialisedData -> ptext (sLit ".section .bss\n\t.align 4") ReadOnlyData16 -> ptext (sLit ".section .rodata\n\t.align 16") OtherSection _ -> panic "X86.Ppr.pprSectionHeader: unknown section" | otherwise -> case seg of Text -> ptext (sLit ".text\n\t.align 8") Data -> ptext (sLit ".data\n\t.align 8") ReadOnlyData -> ptext (sLit ".section .rodata\n\t.align 8") RelocatableReadOnlyData -> ptext (sLit ".section .data\n\t.align 8") UninitialisedData -> ptext (sLit ".section .bss\n\t.align 8") ReadOnlyData16 -> ptext (sLit ".section .rodata.cst16\n\t.align 16") OtherSection _ -> panic "PprMach.pprSectionHeader: unknown section"
2,460
pprSectionHeader :: Section -> SDoc pprSectionHeader seg = sdocWithPlatform $ \platform -> case platformOS platform of OSDarwin | target32Bit platform -> case seg of Text -> ptext (sLit ".text\n\t.align 2") Data -> ptext (sLit ".data\n\t.align 2") ReadOnlyData -> ptext (sLit ".const\n.align 2") RelocatableReadOnlyData -> ptext (sLit ".const_data\n.align 2") UninitialisedData -> ptext (sLit ".data\n\t.align 2") ReadOnlyData16 -> ptext (sLit ".const\n.align 4") OtherSection _ -> panic "X86.Ppr.pprSectionHeader: unknown section" | otherwise -> case seg of Text -> ptext (sLit ".text\n.align 3") Data -> ptext (sLit ".data\n.align 3") ReadOnlyData -> ptext (sLit ".const\n.align 3") RelocatableReadOnlyData -> ptext (sLit ".const_data\n.align 3") UninitialisedData -> ptext (sLit ".data\n\t.align 3") ReadOnlyData16 -> ptext (sLit ".const\n.align 4") OtherSection _ -> panic "PprMach.pprSectionHeader: unknown section" _ | target32Bit platform -> case seg of Text -> ptext (sLit ".text\n\t.align 4,0x90") Data -> ptext (sLit ".data\n\t.align 4") ReadOnlyData -> ptext (sLit ".section .rodata\n\t.align 4") RelocatableReadOnlyData -> ptext (sLit ".section .data\n\t.align 4") UninitialisedData -> ptext (sLit ".section .bss\n\t.align 4") ReadOnlyData16 -> ptext (sLit ".section .rodata\n\t.align 16") OtherSection _ -> panic "X86.Ppr.pprSectionHeader: unknown section" | otherwise -> case seg of Text -> ptext (sLit ".text\n\t.align 8") Data -> ptext (sLit ".data\n\t.align 8") ReadOnlyData -> ptext (sLit ".section .rodata\n\t.align 8") RelocatableReadOnlyData -> ptext (sLit ".section .data\n\t.align 8") UninitialisedData -> ptext (sLit ".section .bss\n\t.align 8") ReadOnlyData16 -> ptext (sLit ".section .rodata.cst16\n\t.align 16") OtherSection _ -> panic "PprMach.pprSectionHeader: unknown section"
2,460
pprSectionHeader seg = sdocWithPlatform $ \platform -> case platformOS platform of OSDarwin | target32Bit platform -> case seg of Text -> ptext (sLit ".text\n\t.align 2") Data -> ptext (sLit ".data\n\t.align 2") ReadOnlyData -> ptext (sLit ".const\n.align 2") RelocatableReadOnlyData -> ptext (sLit ".const_data\n.align 2") UninitialisedData -> ptext (sLit ".data\n\t.align 2") ReadOnlyData16 -> ptext (sLit ".const\n.align 4") OtherSection _ -> panic "X86.Ppr.pprSectionHeader: unknown section" | otherwise -> case seg of Text -> ptext (sLit ".text\n.align 3") Data -> ptext (sLit ".data\n.align 3") ReadOnlyData -> ptext (sLit ".const\n.align 3") RelocatableReadOnlyData -> ptext (sLit ".const_data\n.align 3") UninitialisedData -> ptext (sLit ".data\n\t.align 3") ReadOnlyData16 -> ptext (sLit ".const\n.align 4") OtherSection _ -> panic "PprMach.pprSectionHeader: unknown section" _ | target32Bit platform -> case seg of Text -> ptext (sLit ".text\n\t.align 4,0x90") Data -> ptext (sLit ".data\n\t.align 4") ReadOnlyData -> ptext (sLit ".section .rodata\n\t.align 4") RelocatableReadOnlyData -> ptext (sLit ".section .data\n\t.align 4") UninitialisedData -> ptext (sLit ".section .bss\n\t.align 4") ReadOnlyData16 -> ptext (sLit ".section .rodata\n\t.align 16") OtherSection _ -> panic "X86.Ppr.pprSectionHeader: unknown section" | otherwise -> case seg of Text -> ptext (sLit ".text\n\t.align 8") Data -> ptext (sLit ".data\n\t.align 8") ReadOnlyData -> ptext (sLit ".section .rodata\n\t.align 8") RelocatableReadOnlyData -> ptext (sLit ".section .data\n\t.align 8") UninitialisedData -> ptext (sLit ".section .bss\n\t.align 8") ReadOnlyData16 -> ptext (sLit ".section .rodata.cst16\n\t.align 16") OtherSection _ -> panic "PprMach.pprSectionHeader: unknown section"
2,424
false
true
0
16
877
506
233
273
null
null
kylcarte/threepenny-extra
src/Graphics/UI/Threepenny/Extra.hs
bsd-3-clause
(.=) :: ReadWriteAttr x i o -> i -> UI x -> UI x (.=) = set
59
(.=) :: ReadWriteAttr x i o -> i -> UI x -> UI x (.=) = set
59
(.=) = set
10
false
true
0
9
16
46
22
24
null
null
fryguybob/LaTeXGrapher
src/Main.hs
bsd-3-clause
essContext :: GrapherOpts -> Context -> IO () stressContext o c = case es of Just es -> stressContext' c es Nothing -> putStrLn "Eval error in context." where fs = plotFunctions c ns = map name fs es = sequence . map (lookupF c) $ ns
260
stressContext :: GrapherOpts -> Context -> IO () stressContext o c = case es of Just es -> stressContext' c es Nothing -> putStrLn "Eval error in context." where fs = plotFunctions c ns = map name fs es = sequence . map (lookupF c) $ ns
260
stressContext o c = case es of Just es -> stressContext' c es Nothing -> putStrLn "Eval error in context." where fs = plotFunctions c ns = map name fs es = sequence . map (lookupF c) $ ns
211
false
true
2
9
73
96
47
49
null
null
DanielG/cabal-helper
src/CabalHelper/Compiletime/Sandbox.hs
apache-2.0
-- | Extract the sandbox package db directory from the cabal.sandbox.config -- file. Exception is thrown if the sandbox config file is broken. extractSandboxDbDir :: String -> Maybe FilePath extractSandboxDbDir conf = extractValue <$> parse conf where key = "package-db:" keyLen = length key parse = listToMaybe . filter (key `isPrefixOf`) . lines extractValue = CabalHelper.Compiletime.Sandbox.dropWhileEnd isSpace . dropWhile isSpace . drop keyLen -- dropWhileEnd is not provided prior to base 4.5.0.0.
524
extractSandboxDbDir :: String -> Maybe FilePath extractSandboxDbDir conf = extractValue <$> parse conf where key = "package-db:" keyLen = length key parse = listToMaybe . filter (key `isPrefixOf`) . lines extractValue = CabalHelper.Compiletime.Sandbox.dropWhileEnd isSpace . dropWhile isSpace . drop keyLen -- dropWhileEnd is not provided prior to base 4.5.0.0.
381
extractSandboxDbDir conf = extractValue <$> parse conf where key = "package-db:" keyLen = length key parse = listToMaybe . filter (key `isPrefixOf`) . lines extractValue = CabalHelper.Compiletime.Sandbox.dropWhileEnd isSpace . dropWhile isSpace . drop keyLen -- dropWhileEnd is not provided prior to base 4.5.0.0.
333
true
true
4
8
91
110
51
59
null
null
cutsea110/tsr-test
Main.hs
bsd-3-clause
defaultOptions :: Options defaultOptions = Options { optVerbose = False , optShowVersion = False , optReorder = False , optPort = [] , optCode = "" }
161
defaultOptions :: Options defaultOptions = Options { optVerbose = False , optShowVersion = False , optReorder = False , optPort = [] , optCode = "" }
161
defaultOptions = Options { optVerbose = False , optShowVersion = False , optReorder = False , optPort = [] , optCode = "" }
135
false
true
0
8
38
49
29
20
null
null
lukexi/cabal
cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs
bsd-3-clause
sandboxPackageDBPath :: FilePath -> Compiler -> Platform -> String sandboxPackageDBPath sandboxDir compiler platform = sandboxDir </> (Text.display platform ++ "-" ++ showCompilerIdWithAbi compiler ++ "-packages.conf.d")
259
sandboxPackageDBPath :: FilePath -> Compiler -> Platform -> String sandboxPackageDBPath sandboxDir compiler platform = sandboxDir </> (Text.display platform ++ "-" ++ showCompilerIdWithAbi compiler ++ "-packages.conf.d")
259
sandboxPackageDBPath sandboxDir compiler platform = sandboxDir </> (Text.display platform ++ "-" ++ showCompilerIdWithAbi compiler ++ "-packages.conf.d")
192
false
true
0
11
63
57
28
29
null
null
uuhan/Idris-dev
src/Idris/IdeMode.hs
bsd-3-clause
sexpToCommand (SexpList [SymbolAtom "add-missing", IntegerAtom line, StringAtom name]) = Just (AddMissing (fromInteger line) name)
135
sexpToCommand (SexpList [SymbolAtom "add-missing", IntegerAtom line, StringAtom name]) = Just (AddMissing (fromInteger line) name)
135
sexpToCommand (SexpList [SymbolAtom "add-missing", IntegerAtom line, StringAtom name]) = Just (AddMissing (fromInteger line) name)
135
false
false
0
9
18
50
24
26
null
null
gbaz/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
isInSearchPath :: FilePath -> IO Bool isInSearchPath path = fmap (elem path) getSearchPath
90
isInSearchPath :: FilePath -> IO Bool isInSearchPath path = fmap (elem path) getSearchPath
90
isInSearchPath path = fmap (elem path) getSearchPath
52
false
true
0
7
12
32
15
17
null
null
grtlr/wyas
src/Wyas/Evaluator.hs
bsd-3-clause
eval env (Atom id) = getVar env id
34
eval env (Atom id) = getVar env id
34
eval env (Atom id) = getVar env id
34
false
false
0
6
7
24
10
14
null
null
ak1211/tractor
test/MatsuiCoJp/BrokerSpec.hs
agpl-3.0
noticeOfBrokerageAnnouncement :: Conf.InfoBroker -> Conf.Info -> IO () noticeOfBrokerageAnnouncement (Conf.MatsuiCoJp matsui) conf = C.runConduit $ B.noticeOfBrokerageAnnouncement matsui connInfo ua C..| sinkText conf where connInfo = Conf.connInfoDB $ Conf.mariaDB conf ua = Conf.userAgent conf -- -- ここからHspecテスト --
334
noticeOfBrokerageAnnouncement :: Conf.InfoBroker -> Conf.Info -> IO () noticeOfBrokerageAnnouncement (Conf.MatsuiCoJp matsui) conf = C.runConduit $ B.noticeOfBrokerageAnnouncement matsui connInfo ua C..| sinkText conf where connInfo = Conf.connInfoDB $ Conf.mariaDB conf ua = Conf.userAgent conf -- -- ここからHspecテスト --
334
noticeOfBrokerageAnnouncement (Conf.MatsuiCoJp matsui) conf = C.runConduit $ B.noticeOfBrokerageAnnouncement matsui connInfo ua C..| sinkText conf where connInfo = Conf.connInfoDB $ Conf.mariaDB conf ua = Conf.userAgent conf -- -- ここからHspecテスト --
263
false
true
1
8
53
100
48
52
null
null
fmapfmapfmap/amazonka
amazonka-efs/gen/Network/AWS/EFS/DeleteMountTarget.hs
mpl-2.0
-- | Creates a value of 'DeleteMountTarget' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dmtMountTargetId' deleteMountTarget :: Text -- ^ 'dmtMountTargetId' -> DeleteMountTarget deleteMountTarget pMountTargetId_ = DeleteMountTarget' { _dmtMountTargetId = pMountTargetId_ }
381
deleteMountTarget :: Text -- ^ 'dmtMountTargetId' -> DeleteMountTarget deleteMountTarget pMountTargetId_ = DeleteMountTarget' { _dmtMountTargetId = pMountTargetId_ }
185
deleteMountTarget pMountTargetId_ = DeleteMountTarget' { _dmtMountTargetId = pMountTargetId_ }
106
true
true
0
6
70
32
20
12
null
null
davidspies/regret-solver
select-game/src/Game/Select/Helpers.hs
gpl-3.0
noop :: SGM g () noop = do Select.updateState (\(Infos m) -> Some $ Infos $ fmap (\v -> v{options=DVec.empty}) m) void select
129
noop :: SGM g () noop = do Select.updateState (\(Infos m) -> Some $ Infos $ fmap (\v -> v{options=DVec.empty}) m) void select
129
noop = do Select.updateState (\(Infos m) -> Some $ Infos $ fmap (\v -> v{options=DVec.empty}) m) void select
112
false
true
0
16
26
77
39
38
null
null
sashabu/libcspm
src/CSPM/Evaluator/ValueSet.hs
bsd-3-clause
compareValueSets (ExplicitSet vs) (AllSequences vss) = if and (map (flip member (AllSequences vss)) (S.toList vs)) then Just LT -- Otherwise, there is some item in vs that is not in vss. However, unless -- vss is empty there must be some value in the second set that is not in -- the first, since (AllSequences vss) is infinite and, if the above -- finishes, we know the first set is finite. Hence, they would be -- incomparable. else Nothing
470
compareValueSets (ExplicitSet vs) (AllSequences vss) = if and (map (flip member (AllSequences vss)) (S.toList vs)) then Just LT -- Otherwise, there is some item in vs that is not in vss. However, unless -- vss is empty there must be some value in the second set that is not in -- the first, since (AllSequences vss) is infinite and, if the above -- finishes, we know the first set is finite. Hence, they would be -- incomparable. else Nothing
470
compareValueSets (ExplicitSet vs) (AllSequences vss) = if and (map (flip member (AllSequences vss)) (S.toList vs)) then Just LT -- Otherwise, there is some item in vs that is not in vss. However, unless -- vss is empty there must be some value in the second set that is not in -- the first, since (AllSequences vss) is infinite and, if the above -- finishes, we know the first set is finite. Hence, they would be -- incomparable. else Nothing
470
false
false
0
12
106
72
38
34
null
null
travitch/llvm-analysis
src/LLVM/Analysis/PointsTo/Andersen.hs
bsd-3-clause
traceConstraints a (msg, cs) = trace (msg ++ "\n" ++ (unlines $ map ((" "++) . show) cs)) a
91
traceConstraints a (msg, cs) = trace (msg ++ "\n" ++ (unlines $ map ((" "++) . show) cs)) a
91
traceConstraints a (msg, cs) = trace (msg ++ "\n" ++ (unlines $ map ((" "++) . show) cs)) a
91
false
false
0
13
18
56
30
26
null
null
anttisalonen/lvm
src/stau/TypeCheck.hs
gpl-3.0
expTypeComp :: Exp -> Exp -> StateT FunCheckState TypeCheckMonad Type expTypeComp e1 e2 = do et1 <- expType e1 et2 <- expType e2 checkType et1 IntType checkType et2 IntType return BoolType
198
expTypeComp :: Exp -> Exp -> StateT FunCheckState TypeCheckMonad Type expTypeComp e1 e2 = do et1 <- expType e1 et2 <- expType e2 checkType et1 IntType checkType et2 IntType return BoolType
198
expTypeComp e1 e2 = do et1 <- expType e1 et2 <- expType e2 checkType et1 IntType checkType et2 IntType return BoolType
128
false
true
0
8
40
73
31
42
null
null
iqsf/HFitUI
src/WebUI/Themes/UIThemeUtils.hs
bsd-3-clause
thC_0 :: (CUITheme t) => t -> ThParam -> String thC_0 t p = rndTh t p
70
thC_0 :: (CUITheme t) => t -> ThParam -> String thC_0 t p = rndTh t p
69
thC_0 t p = rndTh t p
21
false
true
0
7
17
42
20
22
null
null
lukexi/bullet-mini
src/Physics/Bullet/PointToPointConstraint.hs
bsd-3-clause
addWorldPointToPointConstraint :: (Real a, MonadIO m) => DynamicsWorld -> RigidBody -> V3 a -> m PointToPointConstraint addWorldPointToPointConstraint (DynamicsWorld dynamicsWorld) (toCollisionObjectPointer->rigidBodyA) (fmap realToFrac -> V3 aX aY aZ) = PointToPointConstraint <$> liftIO [C.block| void * { btDiscreteDynamicsWorld *dynamicsWorld = (btDiscreteDynamicsWorld *)$(void *dynamicsWorld); btRigidBody *rigidBodyA = (btRigidBody *)$(void *rigidBodyA); btVector3 pivotInA = btVector3($(float aX), $(float aY), $(float aZ)); btPoint2PointConstraint *point2Point = new btPoint2PointConstraint( *rigidBodyA, pivotInA ); dynamicsWorld->addConstraint(point2Point); return point2Point; }|]
857
addWorldPointToPointConstraint :: (Real a, MonadIO m) => DynamicsWorld -> RigidBody -> V3 a -> m PointToPointConstraint addWorldPointToPointConstraint (DynamicsWorld dynamicsWorld) (toCollisionObjectPointer->rigidBodyA) (fmap realToFrac -> V3 aX aY aZ) = PointToPointConstraint <$> liftIO [C.block| void * { btDiscreteDynamicsWorld *dynamicsWorld = (btDiscreteDynamicsWorld *)$(void *dynamicsWorld); btRigidBody *rigidBodyA = (btRigidBody *)$(void *rigidBodyA); btVector3 pivotInA = btVector3($(float aX), $(float aY), $(float aZ)); btPoint2PointConstraint *point2Point = new btPoint2PointConstraint( *rigidBodyA, pivotInA ); dynamicsWorld->addConstraint(point2Point); return point2Point; }|]
857
addWorldPointToPointConstraint (DynamicsWorld dynamicsWorld) (toCollisionObjectPointer->rigidBodyA) (fmap realToFrac -> V3 aX aY aZ) = PointToPointConstraint <$> liftIO [C.block| void * { btDiscreteDynamicsWorld *dynamicsWorld = (btDiscreteDynamicsWorld *)$(void *dynamicsWorld); btRigidBody *rigidBodyA = (btRigidBody *)$(void *rigidBodyA); btVector3 pivotInA = btVector3($(float aX), $(float aY), $(float aZ)); btPoint2PointConstraint *point2Point = new btPoint2PointConstraint( *rigidBodyA, pivotInA ); dynamicsWorld->addConstraint(point2Point); return point2Point; }|]
643
false
true
0
9
232
94
48
46
null
null
DanielSchuessler/th-build
Language/Haskell/TH/Build/Wrappers.hs
bsd-3-clause
-- | Argument-converting wrapper for 'litE'. litE' :: (Convertible lit Lit) => lit -> ExpQ litE' = preconvert1 litE
115
litE' :: (Convertible lit Lit) => lit -> ExpQ litE' = preconvert1 litE
70
litE' = preconvert1 litE
24
true
true
0
6
18
30
16
14
null
null
siddhanathan/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name mkWiredInTyConName built_in modu fs unique tycon = mkWiredInName modu (mkTcOccFS fs) unique (ATyCon tycon) -- Relevant TyCon built_in
265
mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name mkWiredInTyConName built_in modu fs unique tycon = mkWiredInName modu (mkTcOccFS fs) unique (ATyCon tycon) -- Relevant TyCon built_in
265
mkWiredInTyConName built_in modu fs unique tycon = mkWiredInName modu (mkTcOccFS fs) unique (ATyCon tycon) -- Relevant TyCon built_in
178
false
true
0
9
75
66
33
33
null
null
olsner/ghc
compiler/cmm/PprC.hs
bsd-3-clause
isStrangeTypeGlobal CurrentTSO = True
46
isStrangeTypeGlobal CurrentTSO = True
46
isStrangeTypeGlobal CurrentTSO = True
46
false
false
0
5
12
9
4
5
null
null
urbanslug/ghc
testsuite/tests/typecheck/should_compile/T10283.hs
bsd-3-clause
runIdComp :: Functor p => Comp p Identity a -> p a runIdComp (Comp p) = runIdentity <$> p
89
runIdComp :: Functor p => Comp p Identity a -> p a runIdComp (Comp p) = runIdentity <$> p
89
runIdComp (Comp p) = runIdentity <$> p
38
false
true
0
7
18
45
21
24
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Compiler.hs
bsd-3-clause
compileExpr (RemBindFloat b) = compileBind b
44
compileExpr (RemBindFloat b) = compileBind b
44
compileExpr (RemBindFloat b) = compileBind b
44
false
false
0
7
5
18
8
10
null
null
tomahawkins/trs
attic/PIC/Configuration.hs
bsd-3-clause
-- | Defines a PIC 'Configuration', given data width, data memory depth, and instruction memory depth. configuration :: Int -> Int -> Int -> Configuration configuration dW dMD iMD = if dW `mod` 2 == 1 then error $ "Invalid PIC data width: Data width (" ++ show dW ++ ") must be even." else if dMD > power 2 (dataWidth config - 1) || dMD <= 0 then error $ "Invalid PIC data memory depth. Requires: 2 ^ (dataWidth - 1) >= dataMemoryDepth(" ++ show dMD ++ ") > 0." else if iMD <= 0 then error $ "Invalid PIC instruction memory depth. Requires: instrMemoryDepth(" ++ show iMD ++ ") > 0." else config where config = Configuration dW dMD iMD -- | Data width of a PIC 'Configuration'
719
configuration :: Int -> Int -> Int -> Configuration configuration dW dMD iMD = if dW `mod` 2 == 1 then error $ "Invalid PIC data width: Data width (" ++ show dW ++ ") must be even." else if dMD > power 2 (dataWidth config - 1) || dMD <= 0 then error $ "Invalid PIC data memory depth. Requires: 2 ^ (dataWidth - 1) >= dataMemoryDepth(" ++ show dMD ++ ") > 0." else if iMD <= 0 then error $ "Invalid PIC instruction memory depth. Requires: instrMemoryDepth(" ++ show iMD ++ ") > 0." else config where config = Configuration dW dMD iMD -- | Data width of a PIC 'Configuration'
616
configuration dW dMD iMD = if dW `mod` 2 == 1 then error $ "Invalid PIC data width: Data width (" ++ show dW ++ ") must be even." else if dMD > power 2 (dataWidth config - 1) || dMD <= 0 then error $ "Invalid PIC data memory depth. Requires: 2 ^ (dataWidth - 1) >= dataMemoryDepth(" ++ show dMD ++ ") > 0." else if iMD <= 0 then error $ "Invalid PIC instruction memory depth. Requires: instrMemoryDepth(" ++ show iMD ++ ") > 0." else config where config = Configuration dW dMD iMD -- | Data width of a PIC 'Configuration'
564
true
true
0
13
172
157
81
76
null
null
iambernie/tryhaskell
somefunctions.hs
mit
concat'' :: [[a]] -> [a] concat'' [] = []
41
concat'' :: [[a]] -> [a] concat'' [] = []
41
concat'' [] = []
16
false
true
0
7
8
31
17
14
null
null
omefire/lens
src/Control/Lens/Plated.hs
bsd-3-clause
-- | Rewrite by applying a monadic rule everywhere you recursing with a user-specified 'Traversal'. -- Ensures that the rule cannot be applied anywhere in the result. rewriteMOf :: Monad m => LensLike' (WrappedMonad m) a a -> (a -> m (Maybe a)) -> a -> m a rewriteMOf l f = go where go = transformMOf l (\x -> f x >>= maybe (return x) go)
341
rewriteMOf :: Monad m => LensLike' (WrappedMonad m) a a -> (a -> m (Maybe a)) -> a -> m a rewriteMOf l f = go where go = transformMOf l (\x -> f x >>= maybe (return x) go)
174
rewriteMOf l f = go where go = transformMOf l (\x -> f x >>= maybe (return x) go)
84
true
true
0
12
69
106
53
53
null
null
brendanhay/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ContactInformation' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ciEmail' -- -- * 'ciName' contactInformation :: ContactInformation contactInformation = ContactInformation' {_ciEmail = Nothing, _ciName = Nothing}
330
contactInformation :: ContactInformation contactInformation = ContactInformation' {_ciEmail = Nothing, _ciName = Nothing}
125
contactInformation = ContactInformation' {_ciEmail = Nothing, _ciName = Nothing}
80
true
true
0
7
53
39
23
16
null
null
ciderpunx/exercismo
src/CustomSet.hs
gpl-3.0
isSubsetOf _ Empty = False
26
isSubsetOf _ Empty = False
26
isSubsetOf _ Empty = False
26
false
false
1
5
4
13
5
8
null
null
lukexi/ghc-7.8-arm64
compiler/main/DynFlags.hs
bsd-3-clause
wayUnsetGeneralFlags _ WayEventLog = []
39
wayUnsetGeneralFlags _ WayEventLog = []
39
wayUnsetGeneralFlags _ WayEventLog = []
39
false
false
0
5
4
13
6
7
null
null
rvion/stack
src/Stack/Ghci.hs
bsd-3-clause
makeGhciPkgInfo :: (MonadReader r m, HasEnvConfig r, MonadLogger m, MonadIO m, MonadCatch m) => BuildOpts -> SourceMap -> InstalledMap -> [PackageName] -> PackageName -> Path Abs File -> SimpleTarget -> m GhciPkgInfo makeGhciPkgInfo bopts sourceMap installedMap locals name cabalfp target = do econfig <- asks getEnvConfig bconfig <- asks getBuildConfig let config = PackageConfig { packageConfigEnableTests = True , packageConfigEnableBenchmarks = True , packageConfigFlags = localFlags (boptsFlags bopts) bconfig name , packageConfigCompilerVersion = envConfigCompilerVersion econfig , packageConfigPlatform = configPlatform (getConfig bconfig) } (warnings,pkg) <- readPackage config cabalfp mapM_ (printCabalFileWarning cabalfp) warnings (mods,files,opts) <- getPackageOpts (packageOpts pkg) sourceMap installedMap locals cabalfp let filteredOpts = filterWanted opts filterWanted = M.filterWithKey (\k _ -> k `S.member` allWanted) allWanted = wantedPackageComponents bopts target pkg setMapMaybe f = S.fromList . mapMaybe f . S.toList return GhciPkgInfo { ghciPkgName = packageName pkg , ghciPkgOpts = M.toList filteredOpts , ghciPkgDir = parent cabalfp , ghciPkgModules = mconcat (M.elems (filterWanted mods)) , ghciPkgModFiles = mconcat (M.elems (filterWanted (M.map (setMapMaybe dotCabalModulePath) files))) , ghciPkgMainIs = M.map (setMapMaybe dotCabalMainPath) files , ghciPkgCFiles = mconcat (M.elems (filterWanted (M.map (setMapMaybe dotCabalCFilePath) files))) , ghciPkgPackage = pkg } -- NOTE: this should make the same choices as the components code in -- 'loadLocalPackage'. Unfortunately for now we reiterate this logic -- (differently).
1,909
makeGhciPkgInfo :: (MonadReader r m, HasEnvConfig r, MonadLogger m, MonadIO m, MonadCatch m) => BuildOpts -> SourceMap -> InstalledMap -> [PackageName] -> PackageName -> Path Abs File -> SimpleTarget -> m GhciPkgInfo makeGhciPkgInfo bopts sourceMap installedMap locals name cabalfp target = do econfig <- asks getEnvConfig bconfig <- asks getBuildConfig let config = PackageConfig { packageConfigEnableTests = True , packageConfigEnableBenchmarks = True , packageConfigFlags = localFlags (boptsFlags bopts) bconfig name , packageConfigCompilerVersion = envConfigCompilerVersion econfig , packageConfigPlatform = configPlatform (getConfig bconfig) } (warnings,pkg) <- readPackage config cabalfp mapM_ (printCabalFileWarning cabalfp) warnings (mods,files,opts) <- getPackageOpts (packageOpts pkg) sourceMap installedMap locals cabalfp let filteredOpts = filterWanted opts filterWanted = M.filterWithKey (\k _ -> k `S.member` allWanted) allWanted = wantedPackageComponents bopts target pkg setMapMaybe f = S.fromList . mapMaybe f . S.toList return GhciPkgInfo { ghciPkgName = packageName pkg , ghciPkgOpts = M.toList filteredOpts , ghciPkgDir = parent cabalfp , ghciPkgModules = mconcat (M.elems (filterWanted mods)) , ghciPkgModFiles = mconcat (M.elems (filterWanted (M.map (setMapMaybe dotCabalModulePath) files))) , ghciPkgMainIs = M.map (setMapMaybe dotCabalMainPath) files , ghciPkgCFiles = mconcat (M.elems (filterWanted (M.map (setMapMaybe dotCabalCFilePath) files))) , ghciPkgPackage = pkg } -- NOTE: this should make the same choices as the components code in -- 'loadLocalPackage'. Unfortunately for now we reiterate this logic -- (differently).
1,909
makeGhciPkgInfo bopts sourceMap installedMap locals name cabalfp target = do econfig <- asks getEnvConfig bconfig <- asks getBuildConfig let config = PackageConfig { packageConfigEnableTests = True , packageConfigEnableBenchmarks = True , packageConfigFlags = localFlags (boptsFlags bopts) bconfig name , packageConfigCompilerVersion = envConfigCompilerVersion econfig , packageConfigPlatform = configPlatform (getConfig bconfig) } (warnings,pkg) <- readPackage config cabalfp mapM_ (printCabalFileWarning cabalfp) warnings (mods,files,opts) <- getPackageOpts (packageOpts pkg) sourceMap installedMap locals cabalfp let filteredOpts = filterWanted opts filterWanted = M.filterWithKey (\k _ -> k `S.member` allWanted) allWanted = wantedPackageComponents bopts target pkg setMapMaybe f = S.fromList . mapMaybe f . S.toList return GhciPkgInfo { ghciPkgName = packageName pkg , ghciPkgOpts = M.toList filteredOpts , ghciPkgDir = parent cabalfp , ghciPkgModules = mconcat (M.elems (filterWanted mods)) , ghciPkgModFiles = mconcat (M.elems (filterWanted (M.map (setMapMaybe dotCabalModulePath) files))) , ghciPkgMainIs = M.map (setMapMaybe dotCabalMainPath) files , ghciPkgCFiles = mconcat (M.elems (filterWanted (M.map (setMapMaybe dotCabalCFilePath) files))) , ghciPkgPackage = pkg } -- NOTE: this should make the same choices as the components code in -- 'loadLocalPackage'. Unfortunately for now we reiterate this logic -- (differently).
1,656
false
true
0
19
465
497
253
244
null
null
kmels/hledger
hledger-lib/Hledger/Utils.hs
gpl-3.0
root = rootLabel
16
root = rootLabel
16
root = rootLabel
16
false
false
1
5
2
10
3
7
null
null
karianna/jdk8_tl
jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs
gpl-2.0
ffitype _ Nuchar = UINT8
25
ffitype _ Nuchar = UINT8
25
ffitype _ Nuchar = UINT8
25
false
false
1
5
5
13
5
8
null
null
gbataille/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
circ 'O' = "Ô"
14
circ 'O' = "Ô"
14
circ 'O' = "Ô"
14
false
false
1
5
3
13
4
9
null
null
Teaspot-Studio/bmstu-radio-problem-haste
Radio/Task.hs
bsd-3-clause
initialInput :: Input initialInput = Input { inputFieldSize = (20, 20), inputTowers = [], inputRadius = 3, inputFitness = "function(coverage, usedCount, towerUsedGetter, totalCount, towerTotalGetter, fieldWidth, fieldHeight, fieldGetter)\n{\n return coverage*(1 - usedCount / totalCount);\n}", inputGeneticOptions = initialOptions, inputRandomField = (10, 2, 3) }
392
initialInput :: Input initialInput = Input { inputFieldSize = (20, 20), inputTowers = [], inputRadius = 3, inputFitness = "function(coverage, usedCount, towerUsedGetter, totalCount, towerTotalGetter, fieldWidth, fieldHeight, fieldGetter)\n{\n return coverage*(1 - usedCount / totalCount);\n}", inputGeneticOptions = initialOptions, inputRandomField = (10, 2, 3) }
392
initialInput = Input { inputFieldSize = (20, 20), inputTowers = [], inputRadius = 3, inputFitness = "function(coverage, usedCount, towerUsedGetter, totalCount, towerTotalGetter, fieldWidth, fieldHeight, fieldGetter)\n{\n return coverage*(1 - usedCount / totalCount);\n}", inputGeneticOptions = initialOptions, inputRandomField = (10, 2, 3) }
370
false
true
0
7
70
66
42
24
null
null
gmaslov/rigbo3
src/Physics/Object.hs
lgpl-3.0
-- | @addForceAt r f@ increments a 'Body''s force and torque accumulators to have a force @f@ applied at the point @r@ in global coordinates. addForceAt :: Vec3 Double -> Vec3 Double -> Body -> Body addForceAt r f b = b { bForce = bForce b + f, bAngularForce = bAngularForce b + crossp (r - bPosition b) f }
319
addForceAt :: Vec3 Double -> Vec3 Double -> Body -> Body addForceAt r f b = b { bForce = bForce b + f, bAngularForce = bAngularForce b + crossp (r - bPosition b) f }
177
addForceAt r f b = b { bForce = bForce b + f, bAngularForce = bAngularForce b + crossp (r - bPosition b) f }
120
true
true
0
12
72
86
41
45
null
null
rfranek/duckling
Duckling/Rules/DA.hs
bsd-3-clause
rules (This Quantity) = []
26
rules (This Quantity) = []
26
rules (This Quantity) = []
26
false
false
0
7
4
17
8
9
null
null
vTurbine/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
tyCoFVsOfCt (CNonCanonical { cc_ev = ev }) = tyCoFVsOfType (ctEvPred ev)
72
tyCoFVsOfCt (CNonCanonical { cc_ev = ev }) = tyCoFVsOfType (ctEvPred ev)
72
tyCoFVsOfCt (CNonCanonical { cc_ev = ev }) = tyCoFVsOfType (ctEvPred ev)
72
false
false
0
8
10
31
15
16
null
null
erantapaa/henigma
src/Enigma/Base.hs
bsd-3-clause
identityPerm = makePerm letters
31
identityPerm = makePerm letters
31
identityPerm = makePerm letters
31
false
false
0
5
3
9
4
5
null
null
HJvT/com
System/Win32/Com/Exception.hs
bsd-3-clause
-- | @check2HR hr@ triggers a COM exception if the HRESULT -- @hr@ represent an error condition. The current /last error/ -- value embedded in the exception gives more information about -- cause. check2HR :: HRESULT -> IO () check2HR hr | succeeded hr = return () | otherwise = do dw <- getLastError coFailHR (word32ToInt32 dw) -- | @checkBool mbZero@ raises a COM exception if @mbZero@ is equal -- to...zero. The /last error/ is embedded inside the exception.
496
check2HR :: HRESULT -> IO () check2HR hr | succeeded hr = return () | otherwise = do dw <- getLastError coFailHR (word32ToInt32 dw) -- | @checkBool mbZero@ raises a COM exception if @mbZero@ is equal -- to...zero. The /last error/ is embedded inside the exception.
300
check2HR hr | succeeded hr = return () | otherwise = do dw <- getLastError coFailHR (word32ToInt32 dw) -- | @checkBool mbZero@ raises a COM exception if @mbZero@ is equal -- to...zero. The /last error/ is embedded inside the exception.
271
true
true
0
11
114
78
36
42
null
null
rodrigo-machado/verigraph
src/library/Logic/Model.hs
gpl-3.0
-- | Tests if the first given state is reachable from the second by a single transition follows :: KripkeStructure a -> Int -> Int -> Bool follows ts s1 s2 = s1 `elem` nextStates ts s2
186
follows :: KripkeStructure a -> Int -> Int -> Bool follows ts s1 s2 = s1 `elem` nextStates ts s2
98
follows ts s1 s2 = s1 `elem` nextStates ts s2
47
true
true
0
7
38
48
24
24
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
confdReqs :: FrozenSet Int confdReqs = ConstantUtils.mkSet . map Types.confdRequestTypeToRaw $ [minBound..] \\ [ReqNodeInstances]
135
confdReqs :: FrozenSet Int confdReqs = ConstantUtils.mkSet . map Types.confdRequestTypeToRaw $ [minBound..] \\ [ReqNodeInstances]
135
confdReqs = ConstantUtils.mkSet . map Types.confdRequestTypeToRaw $ [minBound..] \\ [ReqNodeInstances]
108
false
true
0
9
19
39
20
19
null
null
jaalonso/I1M-Cod-Temas
src/Tema_4.hs
gpl-2.0
-- --------------------------------------------------------------------- -- Definiciones con ecuaciones con guardas -- -- --------------------------------------------------------------------- -- (abs' x) es el valor absoluto de x. Por ejemplo, -- abs' (-5) == 5 abs' :: Int -> Int abs' n | n >= 0 = n | otherwise = -n
360
abs' :: Int -> Int abs' n | n >= 0 = n | otherwise = -n
65
abs' n | n >= 0 = n | otherwise = -n
46
true
true
1
8
86
47
24
23
null
null
katydid/haslapse
src/Data/Katydid/Parser/Protobuf/Protobuf.hs
bsd-3-clause
debug s a = Debug.trace (s ++ " <" ++ show a ++ ">") a
54
debug s a = Debug.trace (s ++ " <" ++ show a ++ ">") a
54
debug s a = Debug.trace (s ++ " <" ++ show a ++ ">") a
54
false
false
0
9
14
36
17
19
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QSizePolicy.hs
bsd-2-clause
eMinimumExpanding :: Policy eMinimumExpanding = iePolicy $ 3
62
eMinimumExpanding :: Policy eMinimumExpanding = iePolicy $ 3
62
eMinimumExpanding = iePolicy $ 3
34
false
true
2
6
9
23
9
14
null
null
rueshyna/gogol
gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Snapshots/TestIAMPermissions.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). pstipUploadType :: Lens' ProjectsSnapshotsTestIAMPermissions (Maybe Text) pstipUploadType = lens _pstipUploadType (\ s a -> s{_pstipUploadType = a})
227
pstipUploadType :: Lens' ProjectsSnapshotsTestIAMPermissions (Maybe Text) pstipUploadType = lens _pstipUploadType (\ s a -> s{_pstipUploadType = a})
156
pstipUploadType = lens _pstipUploadType (\ s a -> s{_pstipUploadType = a})
82
true
true
1
9
34
52
25
27
null
null
johan--/twitter-conduit
Web/Twitter/Conduit/Api.hs
bsd-2-clause
-- | Returns query data asks user objects. -- -- You can perform request by using 'call': -- -- @ -- res <- 'call' twInfo mgr '$' 'usersLookup' ('ScreenNameListParam' [\"thimura\", \"twitterapi\"]) -- @ -- -- >>> usersLookup (ScreenNameListParam ["thimura", "twitterapi"]) -- APIRequestGet "https://api.twitter.com/1.1/users/lookup.json" [("screen_name","thimura,twitterapi")] usersLookup :: UserListParam -> APIRequest UsersLookup [User] usersLookup q = APIRequestGet (endpoint ++ "users/lookup.json") (mkUserListParam q)
522
usersLookup :: UserListParam -> APIRequest UsersLookup [User] usersLookup q = APIRequestGet (endpoint ++ "users/lookup.json") (mkUserListParam q)
145
usersLookup q = APIRequestGet (endpoint ++ "users/lookup.json") (mkUserListParam q)
83
true
true
0
7
59
54
32
22
null
null
zepto-lang/zepto
src/Zepto/Types/Export.hs
gpl-2.0
takeWhileBVec = B.takeWhile
27
takeWhileBVec = B.takeWhile
27
takeWhileBVec = B.takeWhile
27
false
false
0
5
2
8
4
4
null
null
tcoenraad/functioneel-programmeren
practica/serie6/graphs.hs
mit
colorAllNodesAndEdges :: ColorG -> Graph -> ([GraphOutput], Graph) colorAllNodesAndEdges c g = (graphToOutput g'', g'') where (graphOutPut, g') = colorAllNodes c g (graphOutput, g'') = colorAllEdges c g' -- | Kleurt alle subgrafen willekeurig
255
colorAllNodesAndEdges :: ColorG -> Graph -> ([GraphOutput], Graph) colorAllNodesAndEdges c g = (graphToOutput g'', g'') where (graphOutPut, g') = colorAllNodes c g (graphOutput, g'') = colorAllEdges c g' -- | Kleurt alle subgrafen willekeurig
255
colorAllNodesAndEdges c g = (graphToOutput g'', g'') where (graphOutPut, g') = colorAllNodes c g (graphOutput, g'') = colorAllEdges c g' -- | Kleurt alle subgrafen willekeurig
188
false
true
0
8
46
80
43
37
null
null
DavidAlphaFox/ghc
libraries/bytestring/Data/ByteString/Lazy.hs
bsd-3-clause
head (Chunk c _) = S.unsafeHead c
33
head (Chunk c _) = S.unsafeHead c
33
head (Chunk c _) = S.unsafeHead c
33
false
false
0
7
6
22
10
12
null
null
thielema/gitit
Network/Gitit/Page.hs
gpl-2.0
adjustPage ("format", val) page' = page' { pageFormat = pt, pageLHS = lhs } where (pt, lhs) = parsePageType val
115
adjustPage ("format", val) page' = page' { pageFormat = pt, pageLHS = lhs } where (pt, lhs) = parsePageType val
115
adjustPage ("format", val) page' = page' { pageFormat = pt, pageLHS = lhs } where (pt, lhs) = parsePageType val
115
false
false
1
7
23
52
27
25
null
null
Ericson2314/clash-prelude
src/CLaSH/Signal/Internal.hs
bsd-2-clause
-- | The above type is a generalisation for: -- -- @ -- __shiftR1__ :: 'Bits' a => 'CLaSH.Signal.Signal' a -> 'CLaSH.Signal.Signal' 'Int' -> 'CLaSH.Signal.Signal' 'a' -- @ -- -- It is a version of 'shiftR' that has a 'CLaSH.Signal.Signal' of 'Int' as indexing argument shiftR1 :: (Bits a, Applicative f) => f a -> f Int -> f a shiftR1 = liftA2 shiftR
350
shiftR1 :: (Bits a, Applicative f) => f a -> f Int -> f a shiftR1 = liftA2 shiftR
81
shiftR1 = liftA2 shiftR
23
true
true
0
9
63
58
30
28
null
null
phischu/fragnix
benchmarks/containers/Data.Map.Base.hs
bsd-3-clause
splitRoot :: Map k b -> [Map k b] splitRoot orig = case orig of Tip -> [] Bin _ k v l r -> [l, singleton k v, r]
133
splitRoot :: Map k b -> [Map k b] splitRoot orig = case orig of Tip -> [] Bin _ k v l r -> [l, singleton k v, r]
133
splitRoot orig = case orig of Tip -> [] Bin _ k v l r -> [l, singleton k v, r]
99
false
true
0
9
50
79
38
41
null
null
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/ServiceNetworking/Types/Product.hs
mpl-2.0
-- | Fully-qualified URL of the gateway that should handle matching packets -- that this route applies to. For example: -- \`projects\/123456\/global\/gateways\/default-internet-gateway\` rNextHopGateway :: Lens' Route (Maybe Text) rNextHopGateway = lens _rNextHopGateway (\ s a -> s{_rNextHopGateway = a})
314
rNextHopGateway :: Lens' Route (Maybe Text) rNextHopGateway = lens _rNextHopGateway (\ s a -> s{_rNextHopGateway = a})
126
rNextHopGateway = lens _rNextHopGateway (\ s a -> s{_rNextHopGateway = a})
82
true
true
0
9
46
50
27
23
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/DsArrows.hs
bsd-3-clause
dsCmdStmt ids local_vars out_ids (LetStmt binds) env_ids = do -- build a new environment using the let bindings core_binds <- dsLocalBinds binds (mkBigCoreVarTup out_ids) -- match the old environment against the input core_map <- matchEnv env_ids core_binds return (do_arr ids (mkBigCoreVarTupTy env_ids) (mkBigCoreVarTupTy out_ids) core_map, exprFreeIds core_binds `intersectVarSet` local_vars) -- D; ys |-a do { ss; returnA -< ((xs1), (ys2)) } : ... -- D; xs' |-a do { ss' } : t -- ------------------------------------ -- D; xs |-a do { rec ss; ss' } : t -- -- xs1 = xs' /\ defs(ss) -- xs2 = xs' - defs(ss) -- ys1 = ys - defs(ss) -- ys2 = ys /\ defs(ss) -- -- ---> arr (\(xs) -> ((ys1),(xs2))) >>> -- first (loop (arr (\((ys1),~(ys2)) -> (ys)) >>> ss)) >>> -- arr (\((xs1),(xs2)) -> (xs')) >>> ss'
1,045
dsCmdStmt ids local_vars out_ids (LetStmt binds) env_ids = do -- build a new environment using the let bindings core_binds <- dsLocalBinds binds (mkBigCoreVarTup out_ids) -- match the old environment against the input core_map <- matchEnv env_ids core_binds return (do_arr ids (mkBigCoreVarTupTy env_ids) (mkBigCoreVarTupTy out_ids) core_map, exprFreeIds core_binds `intersectVarSet` local_vars) -- D; ys |-a do { ss; returnA -< ((xs1), (ys2)) } : ... -- D; xs' |-a do { ss' } : t -- ------------------------------------ -- D; xs |-a do { rec ss; ss' } : t -- -- xs1 = xs' /\ defs(ss) -- xs2 = xs' - defs(ss) -- ys1 = ys - defs(ss) -- ys2 = ys /\ defs(ss) -- -- ---> arr (\(xs) -> ((ys1),(xs2))) >>> -- first (loop (arr (\((ys1),~(ys2)) -> (ys)) >>> ss)) >>> -- arr (\((xs1),(xs2)) -> (xs')) >>> ss'
1,045
dsCmdStmt ids local_vars out_ids (LetStmt binds) env_ids = do -- build a new environment using the let bindings core_binds <- dsLocalBinds binds (mkBigCoreVarTup out_ids) -- match the old environment against the input core_map <- matchEnv env_ids core_binds return (do_arr ids (mkBigCoreVarTupTy env_ids) (mkBigCoreVarTupTy out_ids) core_map, exprFreeIds core_binds `intersectVarSet` local_vars) -- D; ys |-a do { ss; returnA -< ((xs1), (ys2)) } : ... -- D; xs' |-a do { ss' } : t -- ------------------------------------ -- D; xs |-a do { rec ss; ss' } : t -- -- xs1 = xs' /\ defs(ss) -- xs2 = xs' - defs(ss) -- ys1 = ys - defs(ss) -- ys2 = ys /\ defs(ss) -- -- ---> arr (\(xs) -> ((ys1),(xs2))) >>> -- first (loop (arr (\((ys1),~(ys2)) -> (ys)) >>> ss)) >>> -- arr (\((xs1),(xs2)) -> (xs')) >>> ss'
1,045
false
false
0
11
382
110
60
50
null
null
wayofthepie/sip
test/Proc.hs
mit
------------------------------------------------------------------------------- -- Tests for /proc/[pid]/maps parser. ------------------------------------------------------------------------------- testMapsp :: IO () testMapsp = let verify = verifyListData testMapsp' in parserTest mapsp "test/data/proc_pid_maps" verify expectedMapspData "Parsing test/data/proc_pid_maps failed!" where testMapsp' a e = do assertEqual "Memory address incorrect" (_address a) (_address e) assertEqual "Permissions incorrect" (_perms a) (_perms e) assertEqual "Offset incorrect" (_offset a) (_offset e) assertEqual "Device incorrect" (_dev a) (_dev e) assertEqual "Inode incorrect" (_inode a) (_inode e) assertEqual "Pathname incorrect" (_pathname a) (_pathname e)
900
testMapsp :: IO () testMapsp = let verify = verifyListData testMapsp' in parserTest mapsp "test/data/proc_pid_maps" verify expectedMapspData "Parsing test/data/proc_pid_maps failed!" where testMapsp' a e = do assertEqual "Memory address incorrect" (_address a) (_address e) assertEqual "Permissions incorrect" (_perms a) (_perms e) assertEqual "Offset incorrect" (_offset a) (_offset e) assertEqual "Device incorrect" (_dev a) (_dev e) assertEqual "Inode incorrect" (_inode a) (_inode e) assertEqual "Pathname incorrect" (_pathname a) (_pathname e)
702
testMapsp = let verify = verifyListData testMapsp' in parserTest mapsp "test/data/proc_pid_maps" verify expectedMapspData "Parsing test/data/proc_pid_maps failed!" where testMapsp' a e = do assertEqual "Memory address incorrect" (_address a) (_address e) assertEqual "Permissions incorrect" (_perms a) (_perms e) assertEqual "Offset incorrect" (_offset a) (_offset e) assertEqual "Device incorrect" (_dev a) (_dev e) assertEqual "Inode incorrect" (_inode a) (_inode e) assertEqual "Pathname incorrect" (_pathname a) (_pathname e)
683
true
true
0
9
229
189
88
101
null
null
bendiksolheim/roy
src/Math.hs
bsd-3-clause
dist :: Vec3D -> Vec3D -> Scalar dist u v = len $ u - v
55
dist :: Vec3D -> Vec3D -> Scalar dist u v = len $ u - v
55
dist u v = len $ u - v
22
false
true
0
6
15
32
16
16
null
null
msakai/ptq
src/Parser.hs
lgpl-2.1
fvs (F4 x y) = IS.union (fvs x) (fvs y)
42
fvs (F4 x y) = IS.union (fvs x) (fvs y)
42
fvs (F4 x y) = IS.union (fvs x) (fvs y)
42
false
false
0
7
12
37
17
20
null
null
kmilner/tamarin-prover
src/Web/Theory.hs
gpl-3.0
------------------------------------------------------------------------------ -- Pretty printing ------------------------------------------------------------------------------ -- | Reference a dot graph for the given path. refDotPath :: HtmlDocument d => RenderUrl -> TheoryIdx -> TheoryPath -> d refDotPath renderUrl tidx path = closedTag "img" [("class", "graph"), ("src", imgPath)] where imgPath = T.unpack $ renderUrl (TheoryGraphR tidx path) -- | Reference a dot graph for the given diff path.
503
refDotPath :: HtmlDocument d => RenderUrl -> TheoryIdx -> TheoryPath -> d refDotPath renderUrl tidx path = closedTag "img" [("class", "graph"), ("src", imgPath)] where imgPath = T.unpack $ renderUrl (TheoryGraphR tidx path) -- | Reference a dot graph for the given diff path.
278
refDotPath renderUrl tidx path = closedTag "img" [("class", "graph"), ("src", imgPath)] where imgPath = T.unpack $ renderUrl (TheoryGraphR tidx path) -- | Reference a dot graph for the given diff path.
204
true
true
1
8
61
98
50
48
null
null
berewt/J2S
src/J2S/AI/Types.hs
mit
-- | Create a 'PlayForest' after `d` moves, starting from the given game state fromGame :: ListableActions b => Natural -> b -> PlayForest b fromGame depth = fmap (fmap $ unfoldMoves depth) . listActions
230
fromGame :: ListableActions b => Natural -> b -> PlayForest b fromGame depth = fmap (fmap $ unfoldMoves depth) . listActions
151
fromGame depth = fmap (fmap $ unfoldMoves depth) . listActions
62
true
true
0
9
61
50
24
26
null
null
lukexi/infinitybox
src/Render.hs
bsd-3-clause
getLocalHandPositions :: MonadReader World m => m [V3 GLfloat] getLocalHandPositions = viewListOf ( wldPlayer . plrHandPoses . traverse . to (shiftBy handLightOffset) . posPosition )
255
getLocalHandPositions :: MonadReader World m => m [V3 GLfloat] getLocalHandPositions = viewListOf ( wldPlayer . plrHandPoses . traverse . to (shiftBy handLightOffset) . posPosition )
255
getLocalHandPositions = viewListOf ( wldPlayer . plrHandPoses . traverse . to (shiftBy handLightOffset) . posPosition )
192
false
true
0
11
97
60
29
31
null
null
ml9951/ghc
compiler/nativeGen/AsmCodeGen.hs
bsd-3-clause
cmmNativeGens :: (Outputable statics, Outputable instr, Instruction instr) => DynFlags -> Module -> ModLocation -> NcgImpl statics instr jumpDest -> BufHandle -> LabelMap DebugBlock -> UniqSupply -> [RawCmmDecl] -> NativeGenAcc statics instr -> Int -> IO (NativeGenAcc statics instr, UniqSupply) cmmNativeGens _ _ _ _ _ _ us [] ngs !_ = return (ngs, us)
502
cmmNativeGens :: (Outputable statics, Outputable instr, Instruction instr) => DynFlags -> Module -> ModLocation -> NcgImpl statics instr jumpDest -> BufHandle -> LabelMap DebugBlock -> UniqSupply -> [RawCmmDecl] -> NativeGenAcc statics instr -> Int -> IO (NativeGenAcc statics instr, UniqSupply) cmmNativeGens _ _ _ _ _ _ us [] ngs !_ = return (ngs, us)
501
cmmNativeGens _ _ _ _ _ _ us [] ngs !_ = return (ngs, us)
65
false
true
0
18
203
137
68
69
null
null
mhuesch/scheme_compiler
src/L5ToL4/Compile.hs
bsd-3-clause
compileE (L5.Begin e1 e2) = do [e1_c,e2_c] <- compileEs [e1,e2] return $ L4.Begin e1_c e2_c
99
compileE (L5.Begin e1 e2) = do [e1_c,e2_c] <- compileEs [e1,e2] return $ L4.Begin e1_c e2_c
99
compileE (L5.Begin e1 e2) = do [e1_c,e2_c] <- compileEs [e1,e2] return $ L4.Begin e1_c e2_c
99
false
false
0
9
22
55
27
28
null
null
marcellussiegburg/autotool
collection/src/Polynomial/Euclid.hs
gpl-2.0
make_fixed_upoly :: Make make_fixed_upoly = direct (Euclid_Sudoku (undefined:: U.Poly Rational)) ( [ ] :: [ Step ( (U.P ( Patch (Ratio Integer)) ( Patch Integer))) ] )
208
make_fixed_upoly :: Make make_fixed_upoly = direct (Euclid_Sudoku (undefined:: U.Poly Rational)) ( [ ] :: [ Step ( (U.P ( Patch (Ratio Integer)) ( Patch Integer))) ] )
208
make_fixed_upoly = direct (Euclid_Sudoku (undefined:: U.Poly Rational)) ( [ ] :: [ Step ( (U.P ( Patch (Ratio Integer)) ( Patch Integer))) ] )
183
false
true
0
15
67
78
41
37
null
null
akindle/hdlint
Parse/Basics.hs
mit
concEq = symbol "<="
24
concEq = symbol "<="
24
concEq = symbol "<="
24
false
false
1
5
7
13
4
9
null
null
forste/haReFork
tools/base/tests/tiTest0.hs
bsd-3-clause
--liftM :: Monad m => (a->b) -> m a -> m b liftM f m = do x<-m; return (f x)
76
liftM f m = do x<-m; return (f x)
33
liftM f m = do x<-m; return (f x)
33
true
false
0
9
20
32
15
17
null
null
jonsterling/hs-abt
src/Abt/Tutorial.hs
mit
pi :: Tm0 Lang -> Tm Lang ('S 'Z) -> Tm0 Lang pi a xb = PI $$ a :& xb :& RNil
77
pi :: Tm0 Lang -> Tm Lang ('S 'Z) -> Tm0 Lang pi a xb = PI $$ a :& xb :& RNil
77
pi a xb = PI $$ a :& xb :& RNil
31
false
true
0
10
22
57
27
30
null
null
Gurrt/software-testing
week-3/Lab3.hs
mit
testParser :: IO() testParser = testForms 50 (\ f -> let [g] = parse (show f) in f == g)
89
testParser :: IO() testParser = testForms 50 (\ f -> let [g] = parse (show f) in f == g)
89
testParser = testForms 50 (\ f -> let [g] = parse (show f) in f == g)
70
false
true
0
14
20
63
29
34
null
null
JoeyEremondi/haskelm-old
src/Language/Elm/TH.hs
bsd-3-clause
{- | Default options for translation: Generates `toJson` and `fromJson` functions, has no open or qualified imports, and has module name `Main`. -} defaultOptions = Options True [] [] "Main"
191
defaultOptions = Options True [] [] "Main"
42
defaultOptions = Options True [] [] "Main"
42
true
false
0
6
30
20
10
10
null
null
capital-match/hdo
src/Network/DO/Droplets/Net.hs
mit
doAction :: (ComonadEnv ToolConfiguration w, Monad m) => w a -> Id -> Action -> (RESTT m (Result (ActionResult DropletActionType)), w a) doAction w dropletId action = maybe (return $ error "no authentication token defined", w) (\ t -> let r = postJSONWith (authorisation t) (toURI $ dropletsEndpoint </> show dropletId </> "actions") (toJSON action) >>= return . fromResponse "action" in (r, w)) (authToken (ask w))
559
doAction :: (ComonadEnv ToolConfiguration w, Monad m) => w a -> Id -> Action -> (RESTT m (Result (ActionResult DropletActionType)), w a) doAction w dropletId action = maybe (return $ error "no authentication token defined", w) (\ t -> let r = postJSONWith (authorisation t) (toURI $ dropletsEndpoint </> show dropletId </> "actions") (toJSON action) >>= return . fromResponse "action" in (r, w)) (authToken (ask w))
559
doAction w dropletId action = maybe (return $ error "no authentication token defined", w) (\ t -> let r = postJSONWith (authorisation t) (toURI $ dropletsEndpoint </> show dropletId </> "actions") (toJSON action) >>= return . fromResponse "action" in (r, w)) (authToken (ask w))
422
false
true
0
18
209
181
91
90
null
null
erantapaa/test-spelling
src/Spell/ByteString.hs
bsd-3-clause
-- | Correct a word. 'isMember' and 'frequency' are functions to -- determine if a word is in the dictionary and to lookup its -- frequency, respectively. correct :: Dict -> ByteString -> ByteString correct (isMember,frequency) w0 = let ed0 = [ w0 ] ed1 = edits w0 ed2 = [ e2 | e1 <- ed1, e2 <- edits e1 ] kn0 = filter isMember ed0 kn1 = filter isMember ed1 kn2 = filter isMember ed2 candidates = kn0 `orElse` (kn1 `orElse` (kn2 `orElse` [w0])) in maximumBy (comparing frequency) candidates
537
correct :: Dict -> ByteString -> ByteString correct (isMember,frequency) w0 = let ed0 = [ w0 ] ed1 = edits w0 ed2 = [ e2 | e1 <- ed1, e2 <- edits e1 ] kn0 = filter isMember ed0 kn1 = filter isMember ed1 kn2 = filter isMember ed2 candidates = kn0 `orElse` (kn1 `orElse` (kn2 `orElse` [w0])) in maximumBy (comparing frequency) candidates
378
correct (isMember,frequency) w0 = let ed0 = [ w0 ] ed1 = edits w0 ed2 = [ e2 | e1 <- ed1, e2 <- edits e1 ] kn0 = filter isMember ed0 kn1 = filter isMember ed1 kn2 = filter isMember ed2 candidates = kn0 `orElse` (kn1 `orElse` (kn2 `orElse` [w0])) in maximumBy (comparing frequency) candidates
334
true
true
0
14
136
155
85
70
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs
mpl-2.0
-- | The Android ID of the device. This field will always be present. ndeDeviceId :: Lens' NewDeviceEvent (Maybe Text) ndeDeviceId = lens _ndeDeviceId (\ s a -> s{_ndeDeviceId = a})
183
ndeDeviceId :: Lens' NewDeviceEvent (Maybe Text) ndeDeviceId = lens _ndeDeviceId (\ s a -> s{_ndeDeviceId = a})
113
ndeDeviceId = lens _ndeDeviceId (\ s a -> s{_ndeDeviceId = a})
64
true
true
0
9
32
48
25
23
null
null
apyrgio/ganeti
src/Ganeti/Query/Node.hs
bsd-2-clause
nodeLiveFieldExtract "cnos" res = jsonHead (rpcResNodeInfoHvInfo res) hvInfoCpuDom0
85
nodeLiveFieldExtract "cnos" res = jsonHead (rpcResNodeInfoHvInfo res) hvInfoCpuDom0
85
nodeLiveFieldExtract "cnos" res = jsonHead (rpcResNodeInfoHvInfo res) hvInfoCpuDom0
85
false
false
0
7
9
22
10
12
null
null
andyarvanitis/Idris-dev
src/IRTS/Lang.hs
bsd-3-clause
usedIn env (LLam ns e) = usedIn (env \\ ns) e
45
usedIn env (LLam ns e) = usedIn (env \\ ns) e
45
usedIn env (LLam ns e) = usedIn (env \\ ns) e
45
false
false
0
7
10
31
15
16
null
null
aisamanra/matterhorn
src/Themes.hs
bsd-3-clause
clientMessageAttr :: AttrName clientMessageAttr = "clientMessage"
65
clientMessageAttr :: AttrName clientMessageAttr = "clientMessage"
65
clientMessageAttr = "clientMessage"
35
false
true
0
4
5
11
6
5
null
null
Michaelt293/TheWeather
src/Model.hs
bsd-3-clause
tropicCapricorn :: Lat tropicCapricorn = Lat (-23.4372)
55
tropicCapricorn :: Lat tropicCapricorn = Lat (-23.4372)
55
tropicCapricorn = Lat (-23.4372)
32
false
true
0
7
6
19
10
9
null
null
themoritz/cabal
cabal-install/Distribution/Solver/Modular/Builder.hs
bsd-3-clause
scopedExtendOpen :: QPN -> I -> FlaggedDeps PN -> FlagInfo -> BuildState -> BuildState scopedExtendOpen qpn i fdeps fdefs s = extendOpen qpn gs s where -- Qualify all package names qfdeps = qualifyDeps (qualifyOptions s) qpn fdeps -- Introduce all package flags qfdefs = L.map (\ (fn, b) -> Flagged (FN (PI qpn i) fn) b [] []) $ M.toList fdefs -- Combine new package and flag goals gs = L.map PotentialGoal (qfdefs ++ qfdeps) -- NOTE: -- -- In the expression @qfdefs ++ qfdeps@ above, flags occur potentially -- multiple times, both via the flag declaration and via dependencies. -- | Datatype that encodes what to build next
692
scopedExtendOpen :: QPN -> I -> FlaggedDeps PN -> FlagInfo -> BuildState -> BuildState scopedExtendOpen qpn i fdeps fdefs s = extendOpen qpn gs s where -- Qualify all package names qfdeps = qualifyDeps (qualifyOptions s) qpn fdeps -- Introduce all package flags qfdefs = L.map (\ (fn, b) -> Flagged (FN (PI qpn i) fn) b [] []) $ M.toList fdefs -- Combine new package and flag goals gs = L.map PotentialGoal (qfdefs ++ qfdeps) -- NOTE: -- -- In the expression @qfdefs ++ qfdeps@ above, flags occur potentially -- multiple times, both via the flag declaration and via dependencies. -- | Datatype that encodes what to build next
692
scopedExtendOpen qpn i fdeps fdefs s = extendOpen qpn gs s where -- Qualify all package names qfdeps = qualifyDeps (qualifyOptions s) qpn fdeps -- Introduce all package flags qfdefs = L.map (\ (fn, b) -> Flagged (FN (PI qpn i) fn) b [] []) $ M.toList fdefs -- Combine new package and flag goals gs = L.map PotentialGoal (qfdefs ++ qfdeps) -- NOTE: -- -- In the expression @qfdefs ++ qfdeps@ above, flags occur potentially -- multiple times, both via the flag declaration and via dependencies. -- | Datatype that encodes what to build next
585
false
true
3
13
176
175
86
89
null
null
benekastah/ebitor
src/Ebitor/Rope.hs
bsd-3-clause
unpackText :: Rope -> Text unpackText = T.concat . map fromChunk . toList . fromRope where fromChunk (Chunk _ t) = t
122
unpackText :: Rope -> Text unpackText = T.concat . map fromChunk . toList . fromRope where fromChunk (Chunk _ t) = t
122
unpackText = T.concat . map fromChunk . toList . fromRope where fromChunk (Chunk _ t) = t
95
false
true
0
8
27
50
25
25
null
null
gyfarkas/hedis
src/Database/Redis/Protocol.hs
bsd-3-clause
renderArg :: ByteString -> ByteString renderArg arg = B.concat ["$", argLen arg, crlf, arg, crlf] where argLen = showBS . B.length
137
renderArg :: ByteString -> ByteString renderArg arg = B.concat ["$", argLen arg, crlf, arg, crlf] where argLen = showBS . B.length
137
renderArg arg = B.concat ["$", argLen arg, crlf, arg, crlf] where argLen = showBS . B.length
99
false
true
0
7
27
55
29
26
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Component/Table/TdComb.hs
bsd-3-clause
-- | A lens. tdfCombFun ∷ Lens' (TdFuns t m a r) (CommonADEfuns t m a ActElem r → Dynamic t (Maybe [ActiveState t ActElem r]) → ActiveState t ActElem r → Dynamic t a → Event t (CompEvent t ActElem r) → CompState t ActElem r → m (CompEvent t ActElem r)) tdfCombFun f (TdFuns f1 f2 f3 f4 f5) = fmap (\g → TdFuns f1 g f3 f4 f5) (f f2)
341
tdfCombFun ∷ Lens' (TdFuns t m a r) (CommonADEfuns t m a ActElem r → Dynamic t (Maybe [ActiveState t ActElem r]) → ActiveState t ActElem r → Dynamic t a → Event t (CompEvent t ActElem r) → CompState t ActElem r → m (CompEvent t ActElem r)) tdfCombFun f (TdFuns f1 f2 f3 f4 f5) = fmap (\g → TdFuns f1 g f3 f4 f5) (f f2)
328
tdfCombFun f (TdFuns f1 f2 f3 f4 f5) = fmap (\g → TdFuns f1 g f3 f4 f5) (f f2)
78
true
true
4
9
82
181
89
92
null
null
comonoidial/ALFIN
Alfin/Optimize.hs
mit
preOptimSequence ns _ s rs ((Send t n) : ys) = preOptimSequence ns [] s ((Send t n ) : rs) ys
110
preOptimSequence ns _ s rs ((Send t n) : ys) = preOptimSequence ns [] s ((Send t n ) : rs) ys
110
preOptimSequence ns _ s rs ((Send t n) : ys) = preOptimSequence ns [] s ((Send t n ) : rs) ys
110
false
false
0
9
38
60
30
30
null
null
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Parallel/Adapter/Threads.hs
bsd-2-clause
changeNumberOfWorkersToMatchCapabilities :: ThreadsControllerMonad exploration_mode () changeNumberOfWorkersToMatchCapabilities = liftIO getNumCapabilities >>= flip setNumberOfWorkersAsync (return ()) . fromIntegral
219
changeNumberOfWorkersToMatchCapabilities :: ThreadsControllerMonad exploration_mode () changeNumberOfWorkersToMatchCapabilities = liftIO getNumCapabilities >>= flip setNumberOfWorkersAsync (return ()) . fromIntegral
219
changeNumberOfWorkersToMatchCapabilities = liftIO getNumCapabilities >>= flip setNumberOfWorkersAsync (return ()) . fromIntegral
132
false
true
0
10
19
42
20
22
null
null
siddhanathan/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
mkNPlusKPat id lit = NPlusKPat id lit noSyntaxExpr noSyntaxExpr
63
mkNPlusKPat id lit = NPlusKPat id lit noSyntaxExpr noSyntaxExpr
63
mkNPlusKPat id lit = NPlusKPat id lit noSyntaxExpr noSyntaxExpr
63
false
false
0
5
8
20
9
11
null
null
wavewave/lhc-analysis-collection
exe/2013-06-27-XQLD-2sq-oo.hs
gpl-3.0
sdownR = [2000001,-2000001]
27
sdownR = [2000001,-2000001]
27
sdownR = [2000001,-2000001]
27
false
false
1
6
2
17
8
9
null
null
facebookincubator/duckling
Duckling/AmountOfMoney/NL/Corpus.hs
bsd-3-clause
corpus :: Corpus corpus = (testContext {locale = makeLocale NL Nothing}, testOptions, allExamples)
98
corpus :: Corpus corpus = (testContext {locale = makeLocale NL Nothing}, testOptions, allExamples)
98
corpus = (testContext {locale = makeLocale NL Nothing}, testOptions, allExamples)
81
false
true
0
8
12
33
19
14
null
null
brendanhay/gogol
gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types/Product.hs
mpl-2.0
-- | Selects the methods to which this rule applies. Refer to selector for -- syntax details. arSelector :: Lens' AuthenticationRule (Maybe Text) arSelector = lens _arSelector (\ s a -> s{_arSelector = a})
207
arSelector :: Lens' AuthenticationRule (Maybe Text) arSelector = lens _arSelector (\ s a -> s{_arSelector = a})
113
arSelector = lens _arSelector (\ s a -> s{_arSelector = a})
61
true
true
0
9
35
49
26
23
null
null