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
da-x/lamdu
Lamdu/GUI/ExpressionGui/Parens.hs
gpl-3.0
highlightExpression :: Config -> Widget.Widget a -> Widget.Widget a highlightExpression config = Widget.backgroundColor (Config.layerParensHighlightBG (Config.layers config)) WidgetIds.parenHighlightId $ Config.parenHighlightColor config
249
highlightExpression :: Config -> Widget.Widget a -> Widget.Widget a highlightExpression config = Widget.backgroundColor (Config.layerParensHighlightBG (Config.layers config)) WidgetIds.parenHighlightId $ Config.parenHighlightColor config
249
highlightExpression config = Widget.backgroundColor (Config.layerParensHighlightBG (Config.layers config)) WidgetIds.parenHighlightId $ Config.parenHighlightColor config
181
false
true
0
10
31
67
31
36
null
null
pyrtsa/yampa-demos-template
src/Main.hs
bsd-3-clause
-- create a new SF render :: SF Ball Object render = scene_ . (:[]) ^<< arr renderBall -- Here is your wooden rectangular ball, son. Go play with your buddies. where renderBall (Ball pos _) = circle_ 100 ! pos_ pos ! colour_ red -- | Returns False when there is a si...
410
render :: SF Ball Object render = scene_ . (:[]) ^<< arr renderBall -- Here is your wooden rectangular ball, son. Go play with your buddies. where renderBall (Ball pos _) = circle_ 100 ! pos_ pos ! colour_ red -- | Returns False when there is a signal to exit -- Yo...
390
render = scene_ . (:[]) ^<< arr renderBall -- Here is your wooden rectangular ball, son. Go play with your buddies. where renderBall (Ball pos _) = circle_ 100 ! pos_ pos ! colour_ red -- | Returns False when there is a signal to exit -- You might also want to hand...
365
true
true
7
6
125
84
38
46
null
null
portnov/yaml-rpc
Network/YAML/TH/Client.hs
bsd-3-clause
convertType (API.TList t) = AppT ListT `fmap` convertType t
59
convertType (API.TList t) = AppT ListT `fmap` convertType t
59
convertType (API.TList t) = AppT ListT `fmap` convertType t
59
false
false
0
8
8
29
14
15
null
null
byteally/webapi
webapi/src/WebApi/Router.hs
bsd-3-clause
emptyParsedRoutes :: ParsedRoute '(CUSTOM "", '[]) emptyParsedRoutes = Nil Proxy
80
emptyParsedRoutes :: ParsedRoute '(CUSTOM "", '[]) emptyParsedRoutes = Nil Proxy
80
emptyParsedRoutes = Nil Proxy
29
false
true
0
9
9
32
16
16
null
null
andreagenso/java2scala
src/J2s/Parser.hs
apache-2.0
ev = pElementValue <* pSpecialSimbol ")"
41
ev = pElementValue <* pSpecialSimbol ")"
41
ev = pElementValue <* pSpecialSimbol ")"
41
false
false
3
5
6
18
7
11
null
null
Ertruby/PPFinalProject
src/TreeWalker.hs
gpl-2.0
-- | The 'walkTree' function generates a list of SPRIL instructions -- | It takes two arguments: the AST tree and a list of tuples (var/task name,address) walkTree:: [AST] -> [(String, Address)] -> [Instruction] walkTree [] _ = []
230
walkTree:: [AST] -> [(String, Address)] -> [Instruction] walkTree [] _ = []
75
walkTree [] _ = []
18
true
true
0
8
38
45
26
19
null
null
tanakh/pandoc-html5slide
Monitor.hs
bsd-3-clause
try_ :: IO a -> IO () try_ m = do ret <- try m case ret of Left (SomeException e) -> do print e hFlush stdout Right _ -> return ()
160
try_ :: IO a -> IO () try_ m = do ret <- try m case ret of Left (SomeException e) -> do print e hFlush stdout Right _ -> return ()
160
try_ m = do ret <- try m case ret of Left (SomeException e) -> do print e hFlush stdout Right _ -> return ()
138
false
true
0
12
61
84
36
48
null
null
niteria/haddock
haddock-api/src/Haddock/Backends/HaddockDB.hs
bsd-2-clause
{- import HaddockTypes import HaddockUtil import HsSyn2 import Text.PrettyPrint -} ----------------------------------------------------------------------------- -- Printing the results in DocBook format ppDocBook :: a ppDocBook = error "not working"
252
ppDocBook :: a ppDocBook = error "not working"
46
ppDocBook = error "not working"
31
true
true
0
6
28
23
11
12
null
null
svenkeidel/gnome-citadel
ui/Main.hs
gpl-3.0
drawLevel :: Level -> Image drawLevel = vert_cat . map (string def_attr) . lines . show
87
drawLevel :: Level -> Image drawLevel = vert_cat . map (string def_attr) . lines . show
87
drawLevel = vert_cat . map (string def_attr) . lines . show
59
false
true
0
10
15
36
18
18
null
null
markus-git/co-feldspar
src/Feldspar/Software/Compile.hs
bsd-3-clause
translate :: Software a -> ProgC a translate = translate' env0
62
translate :: Software a -> ProgC a translate = translate' env0
62
translate = translate' env0
27
false
true
0
7
10
30
12
18
null
null
ygale/yesod
yesod-core/Yesod/Core/Content.hs
mit
typePlain :: ContentType typePlain = "text/plain; charset=utf-8"
64
typePlain :: ContentType typePlain = "text/plain; charset=utf-8"
64
typePlain = "text/plain; charset=utf-8"
39
false
true
0
6
6
18
7
11
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
paragraph :: LP Blocks paragraph = do x <- trimInlines . mconcat <$> many1 inline if x == mempty then return mempty else return $ para x
150
paragraph :: LP Blocks paragraph = do x <- trimInlines . mconcat <$> many1 inline if x == mempty then return mempty else return $ para x
150
paragraph = do x <- trimInlines . mconcat <$> many1 inline if x == mempty then return mempty else return $ para x
127
false
true
0
9
40
57
27
30
null
null
joelburget/graphreduction
src/Machine/Internal/Step.hs
bsd-3-clause
primStep state Add = primArith state (+)
40
primStep state Add = primArith state (+)
40
primStep state Add = primArith state (+)
40
false
false
0
5
6
18
9
9
null
null
oldmanmike/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
toIfaceUnivCoProv :: UnivCoProvenance -> IfaceUnivCoProv toIfaceUnivCoProv UnsafeCoerceProv = IfaceUnsafeCoerceProv
118
toIfaceUnivCoProv :: UnivCoProvenance -> IfaceUnivCoProv toIfaceUnivCoProv UnsafeCoerceProv = IfaceUnsafeCoerceProv
118
toIfaceUnivCoProv UnsafeCoerceProv = IfaceUnsafeCoerceProv
61
false
true
0
5
11
18
9
9
null
null
dagit/helisp
src/CodeGen.hs
bsd-3-clause
extendVars :: [(String, RegValue)] -> CodeGen Env a -> CodeGen Env a extendVars e = local $ \env -> env { vars = (M.fromList e) `M.union` (vars env) }
155
extendVars :: [(String, RegValue)] -> CodeGen Env a -> CodeGen Env a extendVars e = local $ \env -> env { vars = (M.fromList e) `M.union` (vars env) }
155
extendVars e = local $ \env -> env { vars = (M.fromList e) `M.union` (vars env) }
86
false
true
0
12
33
80
43
37
null
null
christiaanb/cabal
cabal-install/Main.hs
bsd-3-clause
testAction :: (TestFlags, BuildFlags, BuildExFlags) -> [String] -> GlobalFlags -> IO () testAction (testFlags, buildFlags, buildExFlags) extraArgs globalFlags = do let verbosity = fromFlagOrDefault normal (testVerbosity testFlags) distPref = fromFlagOrDefault (useDistPref defaultSetupSc...
2,147
testAction :: (TestFlags, BuildFlags, BuildExFlags) -> [String] -> GlobalFlags -> IO () testAction (testFlags, buildFlags, buildExFlags) extraArgs globalFlags = do let verbosity = fromFlagOrDefault normal (testVerbosity testFlags) distPref = fromFlagOrDefault (useDistPref defaultSetupSc...
2,147
testAction (testFlags, buildFlags, buildExFlags) extraArgs globalFlags = do let verbosity = fromFlagOrDefault normal (testVerbosity testFlags) distPref = fromFlagOrDefault (useDistPref defaultSetupScriptOptions) (testDistPref testFlags) setupOptions = defaultSetupScript...
2,045
false
true
0
16
615
449
223
226
null
null
david-caro/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkUnused27= verifyTree checkUnusedAssignments "var=3; [ var -eq 3 ]"
76
prop_checkUnused27= verifyTree checkUnusedAssignments "var=3; [ var -eq 3 ]"
76
prop_checkUnused27= verifyTree checkUnusedAssignments "var=3; [ var -eq 3 ]"
76
false
false
0
5
8
11
5
6
null
null
jbddc/vf-verifier
src/VCGenerator.hs
gpl-3.0
replaceQ idents s expr (Boolean b) = Boolean b
46
replaceQ idents s expr (Boolean b) = Boolean b
46
replaceQ idents s expr (Boolean b) = Boolean b
46
false
false
0
7
8
24
11
13
null
null
rueshyna/gogol
gogol-books/gen/Network/Google/Books/Types/Product.hs
mpl-2.0
dddwisiSynonyms :: Lens' DictlayerDataDictWordsItemSensesItem [DictlayerDataDictWordsItemSensesItemSynonymsItem] dddwisiSynonyms = lens _dddwisiSynonyms (\ s a -> s{_dddwisiSynonyms = a}) . _Default . _Coerce
228
dddwisiSynonyms :: Lens' DictlayerDataDictWordsItemSensesItem [DictlayerDataDictWordsItemSensesItemSynonymsItem] dddwisiSynonyms = lens _dddwisiSynonyms (\ s a -> s{_dddwisiSynonyms = a}) . _Default . _Coerce
228
dddwisiSynonyms = lens _dddwisiSynonyms (\ s a -> s{_dddwisiSynonyms = a}) . _Default . _Coerce
115
false
true
3
8
39
57
27
30
null
null
beni55/fay
src/Fay/Compiler/Optimizer.hs
bsd-3-clause
inlineMonad :: [JsStmt] -> [JsStmt] inlineMonad = map go where go stmt = case stmt of JsVar name exp -> JsVar name (inline exp) JsIf exp stmts stmts' -> JsIf (inline exp) (map go stmts) (map go stmts') JsEarlyReturn exp -> JsEarlyReturn (inline exp) JsThrow exp -> JsThrow ...
2,460
inlineMonad :: [JsStmt] -> [JsStmt] inlineMonad = map go where go stmt = case stmt of JsVar name exp -> JsVar name (inline exp) JsIf exp stmts stmts' -> JsIf (inline exp) (map go stmts) (map go stmts') JsEarlyReturn exp -> JsEarlyReturn (inline exp) JsThrow exp -> JsThrow ...
2,460
inlineMonad = map go where go stmt = case stmt of JsVar name exp -> JsVar name (inline exp) JsIf exp stmts stmts' -> JsIf (inline exp) (map go stmts) (map go stmts') JsEarlyReturn exp -> JsEarlyReturn (inline exp) JsThrow exp -> JsThrow (inline exp) JsWhile exp stmts ...
2,424
false
true
2
13
839
890
409
481
null
null
dmcclean/HPi
System/RaspberryPi/GPIO.hs
bsd-3-clause
getHwPin Pin16 = 23
19
getHwPin Pin16 = 23
19
getHwPin Pin16 = 23
19
false
false
0
5
3
9
4
5
null
null
quchen/prettyprinter
prettyprinter-compat-ansi-wl-pprint/src/Text/PrettyPrint/ANSI/Leijen.hs
bsd-2-clause
parens = New.parens
19
parens = New.parens
19
parens = New.parens
19
false
false
1
6
2
12
4
8
null
null
rubik/stack
src/Stack/Build/Execute.hs
bsd-3-clause
singleTest :: M env m => (m () -> IO ()) -> TestOpts -> [Text] -> ActionContext -> ExecuteEnv -> Task -> InstalledMap -> m () singleTest runInBase topts testsToRun ac ee task installedMap = do -- FIXME: Since this doesn't use ca...
6,539
singleTest :: M env m => (m () -> IO ()) -> TestOpts -> [Text] -> ActionContext -> ExecuteEnv -> Task -> InstalledMap -> m () singleTest runInBase topts testsToRun ac ee task installedMap = do -- FIXME: Since this doesn't use ca...
6,539
singleTest runInBase topts testsToRun ac ee task installedMap = do -- FIXME: Since this doesn't use cabal, we should be able to avoid using a -- fullblown 'withSingleContext'. (allDepsMap, _cache) <- getConfigCache ee task installedMap True False withSingleContext runInBase ac ee task (Just allDepsMap) ...
6,325
false
true
0
31
3,272
1,314
625
689
null
null
andyarvanitis/Idris-dev
src/Idris/ProofSearch.hs
bsd-3-clause
cantSolveGoal :: ElabD a cantSolveGoal = do g <- goal env <- get_env lift $ tfail $ CantSolveGoal g (map (\(n,b) -> (n, binderTy b)) env)
198
cantSolveGoal :: ElabD a cantSolveGoal = do g <- goal env <- get_env lift $ tfail $ CantSolveGoal g (map (\(n,b) -> (n, binderTy b)) env)
198
cantSolveGoal = do g <- goal env <- get_env lift $ tfail $ CantSolveGoal g (map (\(n,b) -> (n, binderTy b)) env)
173
false
true
0
14
86
75
38
37
null
null
schell/blocks
src/Main.hs
bsd-3-clause
main :: IO () main = do args <- getArgs case getOpt Permute mainOptions args of ( opts, _, []) -> runApp "Tetris" $ makeApp {_userData = newGame {_options = gatherOptions opts}} ( _, _, msgs) -> error $ concat msgs ++ usageInfo header mainOptions
275
main :: IO () main = do args <- getArgs case getOpt Permute mainOptions args of ( opts, _, []) -> runApp "Tetris" $ makeApp {_userData = newGame {_options = gatherOptions opts}} ( _, _, msgs) -> error $ concat msgs ++ usageInfo header mainOptions
275
main = do args <- getArgs case getOpt Permute mainOptions args of ( opts, _, []) -> runApp "Tetris" $ makeApp {_userData = newGame {_options = gatherOptions opts}} ( _, _, msgs) -> error $ concat msgs ++ usageInfo header mainOptions
261
false
true
0
15
73
111
57
54
null
null
eric-ch/idl
rpcgen/Backend/C.hs
gpl-2.0
gtypeFromDBusType (D.DBusArray t) | fixedType t = "GArray*" | otherwise = "GPtrArray*"
124
gtypeFromDBusType (D.DBusArray t) | fixedType t = "GArray*" | otherwise = "GPtrArray*"
124
gtypeFromDBusType (D.DBusArray t) | fixedType t = "GArray*" | otherwise = "GPtrArray*"
124
false
false
0
8
49
35
15
20
null
null
ptrckbrwn/rope
test/Data/RopeSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "concat'" $ do it "wraps two ropes by a single Node" $ do let r1 = Leaf "hello " let r2 = Leaf "world" concat' r1 r2 `shouldBe` Node 11 r1 r2 describe "delete" $ do it "deletes range for Leaf" $ do let leaf = Leaf "hello" delete leaf 1 4 `should...
3,913
spec :: Spec spec = do describe "concat'" $ do it "wraps two ropes by a single Node" $ do let r1 = Leaf "hello " let r2 = Leaf "world" concat' r1 r2 `shouldBe` Node 11 r1 r2 describe "delete" $ do it "deletes range for Leaf" $ do let leaf = Leaf "hello" delete leaf 1 4 `should...
3,913
spec = do describe "concat'" $ do it "wraps two ropes by a single Node" $ do let r1 = Leaf "hello " let r2 = Leaf "world" concat' r1 r2 `shouldBe` Node 11 r1 r2 describe "delete" $ do it "deletes range for Leaf" $ do let leaf = Leaf "hello" delete leaf 1 4 `shouldBe` Node 2 (L...
3,900
false
true
0
18
1,082
1,442
669
773
null
null
ambiata/mismi
mismi-s3/test/Test/IO/Mismi/S3/Commands.hs
bsd-3-clause
prop_list_recursively = testAWS $ do a <- newAddress writeOrFail a "" r' <- listRecursively (a { key = dirname $ key a }) pure $ a `elem` r'
148
prop_list_recursively = testAWS $ do a <- newAddress writeOrFail a "" r' <- listRecursively (a { key = dirname $ key a }) pure $ a `elem` r'
148
prop_list_recursively = testAWS $ do a <- newAddress writeOrFail a "" r' <- listRecursively (a { key = dirname $ key a }) pure $ a `elem` r'
148
false
false
0
14
35
66
32
34
null
null
DataStewardshipPortal/ds-wizard
DSServer/app/API/Question/GetQuestion/Url.hs
apache-2.0
url :: String url = "/api/getQuestion"
38
url :: String url = "/api/getQuestion"
38
url = "/api/getQuestion"
24
false
true
0
6
5
18
7
11
null
null
rodrigogribeiro/mptc
src/Language/Haskell/Exts/Annotated/Simplify.hs
bsd-3-clause
sLiteral :: Literal l -> S.Literal sLiteral lit = case lit of Char _ c _ -> S.Char c String _ s _ -> S.String s Int _ i _ -> S.Int i Frac _ r _ -> S.Frac r PrimInt _ i _ -> S.PrimInt i PrimWord _ i _ -> S.PrimWord i PrimFloat _ r _ -> S.PrimFloat r PrimDouble...
420
sLiteral :: Literal l -> S.Literal sLiteral lit = case lit of Char _ c _ -> S.Char c String _ s _ -> S.String s Int _ i _ -> S.Int i Frac _ r _ -> S.Frac r PrimInt _ i _ -> S.PrimInt i PrimWord _ i _ -> S.PrimWord i PrimFloat _ r _ -> S.PrimFloat r PrimDouble...
420
sLiteral lit = case lit of Char _ c _ -> S.Char c String _ s _ -> S.String s Int _ i _ -> S.Int i Frac _ r _ -> S.Frac r PrimInt _ i _ -> S.PrimInt i PrimWord _ i _ -> S.PrimWord i PrimFloat _ r _ -> S.PrimFloat r PrimDouble _ r _ -> S.PrimDouble r PrimCh...
385
false
true
11
6
152
188
93
95
null
null
smobs/HackJack
Cards/BlackjackGameState.hs
mit
draw :: GameState () draw = do (h, d:ds) <- get liftIO $ print $ "Drawn the " ++ show d put ( d:h,ds)
113
draw :: GameState () draw = do (h, d:ds) <- get liftIO $ print $ "Drawn the " ++ show d put ( d:h,ds)
113
draw = do (h, d:ds) <- get liftIO $ print $ "Drawn the " ++ show d put ( d:h,ds)
92
false
true
0
9
35
67
33
34
null
null
jstolarek/dep-typed-wbl-heaps-hs
src/TwoPassMerge/PriorityProof.hs
bsd-3-clause
toZero (Node p rnk _ l r) = Node p rnk GeZ l r
46
toZero (Node p rnk _ l r) = Node p rnk GeZ l r
46
toZero (Node p rnk _ l r) = Node p rnk GeZ l r
46
false
false
0
6
13
35
16
19
null
null
phischu/fragnix
tests/packages/scotty/Blaze.ByteString.Builder.ByteString.hs
bsd-3-clause
-- | Construct a 'B.Builder' that uses the thresholding strategy of 'fromByteStringWith' -- for each chunk of the lazy 'L.ByteString'. -- fromLazyByteStringWith :: Int -> L.ByteString -> B.Builder fromLazyByteStringWith = B.lazyByteStringThreshold
247
fromLazyByteStringWith :: Int -> L.ByteString -> B.Builder fromLazyByteStringWith = B.lazyByteStringThreshold
109
fromLazyByteStringWith = B.lazyByteStringThreshold
50
true
true
0
7
30
28
16
12
null
null
ekmett/ghc
compiler/typecheck/TcTypeNats.hs
bsd-3-clause
-- | Compute the exact logarithm of a natural number. -- The logarithm base is the second argument. logExact :: Integer -> Integer -> Maybe Integer logExact x y = do (z,True) <- genLog x y return z -- | Divide two natural numbers.
250
logExact :: Integer -> Integer -> Maybe Integer logExact x y = do (z,True) <- genLog x y return z -- | Divide two natural numbers.
150
logExact x y = do (z,True) <- genLog x y return z -- | Divide two natural numbers.
102
true
true
0
9
63
59
28
31
null
null
stgm/prac-testing
week4/TAMO.hs
mit
test6a = logEquiv2 (\ p q -> p && q) (\ p q -> q && p)
54
test6a = logEquiv2 (\ p q -> p && q) (\ p q -> q && p)
54
test6a = logEquiv2 (\ p q -> p && q) (\ p q -> q && p)
54
false
false
1
8
16
43
21
22
null
null
tsujigiri/btree-hs
src/BTree.hs
mit
fromList :: (Ord a) => [a] -> BTree a fromList = foldl (flip insert) empty
74
fromList :: (Ord a) => [a] -> BTree a fromList = foldl (flip insert) empty
74
fromList = foldl (flip insert) empty
36
false
true
0
7
14
41
21
20
null
null
haskell/haddock
haddock-test/src/Test/Haddock/Process.hs
bsd-2-clause
-- | Wait for a process to finish running. If it ends up failing, print out the -- error message. waitForSuccess :: String -> Handle -> ProcessHandle -> IO Bool waitForSuccess msg out handle = do succeeded <- fmap (== ExitSuccess) $ waitForProcess handle unless succeeded $ hPutStrLn out msg pure succeeded
318
waitForSuccess :: String -> Handle -> ProcessHandle -> IO Bool waitForSuccess msg out handle = do succeeded <- fmap (== ExitSuccess) $ waitForProcess handle unless succeeded $ hPutStrLn out msg pure succeeded
220
waitForSuccess msg out handle = do succeeded <- fmap (== ExitSuccess) $ waitForProcess handle unless succeeded $ hPutStrLn out msg pure succeeded
157
true
true
0
10
63
77
36
41
null
null
jystic/tonic
src/JVM/Codegen.hs
apache-2.0
bMethod :: Method -> CP Builder bMethod Method{..} = do name <- bUtf8Ref mName typ <- bUtf8Ref (unType mType) attrs <- bAttributes [("Code", bCode <$> mCode)] return $ bMethodAccess mAccess <> name <> typ <> attrs --------------------------------------------------------...
336
bMethod :: Method -> CP Builder bMethod Method{..} = do name <- bUtf8Ref mName typ <- bUtf8Ref (unType mType) attrs <- bAttributes [("Code", bCode <$> mCode)] return $ bMethodAccess mAccess <> name <> typ <> attrs --------------------------------------------------------...
336
bMethod Method{..} = do name <- bUtf8Ref mName typ <- bUtf8Ref (unType mType) attrs <- bAttributes [("Code", bCode <$> mCode)] return $ bMethodAccess mAccess <> name <> typ <> attrs ------------------------------------------------------------------------
304
false
true
13
8
86
90
48
42
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Transforms/Rec.hs
bsd-3-clause
mapExpr f (Let bs e) = Let (mapBnd f bs) (mapExpr f e)
67
mapExpr f (Let bs e) = Let (mapBnd f bs) (mapExpr f e)
67
mapExpr f (Let bs e) = Let (mapBnd f bs) (mapExpr f e)
67
false
false
0
7
25
40
19
21
null
null
christiaanb/ghc-typelits-extra
src/GHC/TypeLits/Extra/Solver.hs
bsd-2-clause
lookupExtraDefs :: TcPluginM ExtraDefs lookupExtraDefs = do md <- lookupModule myModule myPackage #if MIN_VERSION_ghc(9,2,0) md2 <- lookupModule ordModule basePackage #endif ExtraDefs <$> look md "Max" <*> look md "Min" #if MIN_VERSION_ghc(8,4,0) <*> pure (typeNatTyCons !! 5) ...
998
lookupExtraDefs :: TcPluginM ExtraDefs lookupExtraDefs = do md <- lookupModule myModule myPackage #if MIN_VERSION_ghc(9,2,0) md2 <- lookupModule ordModule basePackage #endif ExtraDefs <$> look md "Max" <*> look md "Min" #if MIN_VERSION_ghc(8,4,0) <*> pure (typeNatTyCons !! 5) ...
998
lookupExtraDefs = do md <- lookupModule myModule myPackage #if MIN_VERSION_ghc(9,2,0) md2 <- lookupModule ordModule basePackage #endif ExtraDefs <$> look md "Max" <*> look md "Min" #if MIN_VERSION_ghc(8,4,0) <*> pure (typeNatTyCons !! 5) <*> pure (typeNatTyCons !! 6...
959
false
true
5
17
319
226
103
123
null
null
notae/haskell-exercise
lens/DSL.hs
bsd-3-clause
{-| >>> runDSL (0,0,0) dsl3 [True,False] -} dsl3 :: DSL (Int, Int, Int) Bool dsl3 = do _1 $= 2 _2 $= 3 _3 $@ [4, 5] addPred pred1 _1 _2 addPred pred1 _2 _3 eval
172
dsl3 :: DSL (Int, Int, Int) Bool dsl3 = do _1 $= 2 _2 $= 3 _3 $@ [4, 5] addPred pred1 _1 _2 addPred pred1 _2 _3 eval
128
dsl3 = do _1 $= 2 _2 $= 3 _3 $@ [4, 5] addPred pred1 _1 _2 addPred pred1 _2 _3 eval
95
true
true
0
8
47
82
38
44
null
null
garetxe/cabal
Cabal/Distribution/Simple/Haddock.hs
bsd-3-clause
getExeSourceFiles :: LocalBuildInfo -> Executable -> IO [(ModuleName.ModuleName, FilePath)] getExeSourceFiles lbi exe = do moduleFiles <- getSourceFiles searchpaths modules srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe) return ((ModuleName.main, srcMainP...
493
getExeSourceFiles :: LocalBuildInfo -> Executable -> IO [(ModuleName.ModuleName, FilePath)] getExeSourceFiles lbi exe = do moduleFiles <- getSourceFiles searchpaths modules srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe) return ((ModuleName.main, srcMainP...
493
getExeSourceFiles lbi exe = do moduleFiles <- getSourceFiles searchpaths modules srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe) return ((ModuleName.main, srcMainPath) : moduleFiles) where bi = buildInfo exe modules = otherModules bi searchpaths = autogenModulesDir lbi ...
359
false
true
0
11
131
138
67
71
null
null
aelve/json-x
lib/Json/Internal/Encode/Text.hs
bsd-3-clause
encodeToTextWith :: EncodingOptions -> Json -> TL.Text encodeToTextWith opts = toLazyText . encodeToTextBuilderWith opts
120
encodeToTextWith :: EncodingOptions -> Json -> TL.Text encodeToTextWith opts = toLazyText . encodeToTextBuilderWith opts
120
encodeToTextWith opts = toLazyText . encodeToTextBuilderWith opts
65
false
true
0
7
13
31
15
16
null
null
tphyahoo/haskoin-wallet
Network/Haskoin/Wallet/KeyRing.hs
unlicense
generateAddrs :: (MonadIO m, MonadThrow m, MonadBase IO m, MonadResource m) => Entity KeyRingAccount -> AddressType -> KeyIndex -> SqlPersistT m Int generateAddrs accE@(Entity _ _) addrType genIndex = do cnt <- addressCount accE addrType let toGen = (fromI...
633
generateAddrs :: (MonadIO m, MonadThrow m, MonadBase IO m, MonadResource m) => Entity KeyRingAccount -> AddressType -> KeyIndex -> SqlPersistT m Int generateAddrs accE@(Entity _ _) addrType genIndex = do cnt <- addressCount accE addrType let toGen = (fromI...
633
generateAddrs accE@(Entity _ _) addrType genIndex = do cnt <- addressCount accE addrType let toGen = (fromIntegral genIndex) - (fromIntegral cnt) + 1 if toGen > 0 then do _ <- createAddrs accE addrType $ fromIntegral toGen return toGen else return 0 -- | Use an addre...
428
false
true
0
13
196
164
79
85
null
null
yliu120/K3
src/Language/K3/Analysis/Provenance/Inference.hs
apache-2.0
markGlobalProv d = return d
27
markGlobalProv d = return d
27
markGlobalProv d = return d
27
false
false
0
5
4
12
5
7
null
null
denisenkom/hsmssql
Database/Mssql/Tds.hs
mit
preloginEncryption = 1 :: Word8
31
preloginEncryption = 1 :: Word8
31
preloginEncryption = 1 :: Word8
31
false
false
0
4
4
9
5
4
null
null
christiaanb/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
aRROW = mkBaseModule (fsLit "Control.Arrow")
54
aRROW = mkBaseModule (fsLit "Control.Arrow")
54
aRROW = mkBaseModule (fsLit "Control.Arrow")
54
false
false
0
7
14
15
7
8
null
null
ghcjs/ghcjs
src/Gen2/Shim.hs
mit
version :: Stream s m Char => ParsecT s u m Version version = Version <$> integer `sepBy1` char '.'
99
version :: Stream s m Char => ParsecT s u m Version version = Version <$> integer `sepBy1` char '.'
99
version = Version <$> integer `sepBy1` char '.'
47
false
true
0
6
19
44
22
22
null
null
CGenie/platform
shared/src/Unison/ABT.hs
mit
-- | For each element of the input path, the set of variables in scope boundAlong :: Ord v => [Focus1 f (Term f v ())] -> Term f v () -> Maybe [Set v] boundAlong path t = go Set.empty path t where go _ [] _ = Just [] go env path@(hd:tl) t = case out t of Var _ -> Nothing Cycle t -> go env path t Abs v t...
453
boundAlong :: Ord v => [Focus1 f (Term f v ())] -> Term f v () -> Maybe [Set v] boundAlong path t = go Set.empty path t where go _ [] _ = Just [] go env path@(hd:tl) t = case out t of Var _ -> Nothing Cycle t -> go env path t Abs v t -> let !env' = Set.insert v env in go env' path t Tm ft -> do ...
382
boundAlong path t = go Set.empty path t where go _ [] _ = Just [] go env path@(hd:tl) t = case out t of Var _ -> Nothing Cycle t -> go env path t Abs v t -> let !env' = Set.insert v env in go env' path t Tm ft -> do (t,_) <- hd ft tl <- go env tl t pure (env : tl)
302
true
true
0
13
141
243
114
129
null
null
capitanbatata/sandbox
free-monads/src/TestDSLGADTs.hs
gpl-3.0
entityTypeToIOEntity :: EntityType e -> IO e entityTypeToIOEntity SiteTy= return Site
85
entityTypeToIOEntity :: EntityType e -> IO e entityTypeToIOEntity SiteTy= return Site
85
entityTypeToIOEntity SiteTy= return Site
40
false
true
0
6
10
27
12
15
null
null
danoctavian/c10k-bench
bencher/src/Lib.hs
mit
runBench :: IO () runBench = do args <- getArgs let clientCount = read $ args !! 0 let testTime = read $ args !! 1 -- in seconds putStrLn $ "testing for " ++ show clientCount ++ " clients for " ++ show testTime ++ " seconds." reqCounts <- runConns clientCount testTime putStrLn $ "the server completed " +...
342
runBench :: IO () runBench = do args <- getArgs let clientCount = read $ args !! 0 let testTime = read $ args !! 1 -- in seconds putStrLn $ "testing for " ++ show clientCount ++ " clients for " ++ show testTime ++ " seconds." reqCounts <- runConns clientCount testTime putStrLn $ "the server completed " +...
342
runBench = do args <- getArgs let clientCount = read $ args !! 0 let testTime = read $ args !! 1 -- in seconds putStrLn $ "testing for " ++ show clientCount ++ " clients for " ++ show testTime ++ " seconds." reqCounts <- runConns clientCount testTime putStrLn $ "the server completed " ++ show (sum reqCou...
324
false
true
0
11
77
119
55
64
null
null
brendanhay/gogol
gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types/Product.hs
mpl-2.0
-- | Creates a value of 'AuthProvider' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'apJWKsURI' -- -- * 'apAudiences' -- -- * 'apJwtLocations' -- -- * 'apId' -- -- * 'apAuthorizationURL' -- -- * 'apIssuer' authProvider :: AuthPr...
535
authProvider :: AuthProvider authProvider = AuthProvider' { _apJWKsURI = Nothing , _apAudiences = Nothing , _apJwtLocations = Nothing , _apId = Nothing , _apAuthorizationURL = Nothing , _apIssuer = Nothing }
241
authProvider = AuthProvider' { _apJWKsURI = Nothing , _apAudiences = Nothing , _apJwtLocations = Nothing , _apId = Nothing , _apAuthorizationURL = Nothing , _apIssuer = Nothing }
208
true
true
0
6
118
64
46
18
null
null
da-x/lamdu
Lamdu/Sugar/OrderTags.hs
gpl-3.0
orderBinder :: Monad m => Order m (Sugar.Binder name m a) orderBinder b = b & Sugar.bParams . Sugar._FieldParams %%~ orderParams
140
orderBinder :: Monad m => Order m (Sugar.Binder name m a) orderBinder b = b & Sugar.bParams . Sugar._FieldParams %%~ orderParams
140
orderBinder b = b & Sugar.bParams . Sugar._FieldParams %%~ orderParams
78
false
true
2
9
32
56
26
30
null
null
myuon/haste-jQuery
Haste/JQuery.hs
mit
getInnerWidth :: JQuery -> IO Int getInnerWidth (JQuery q) = chain "innerWidth" q
81
getInnerWidth :: JQuery -> IO Int getInnerWidth (JQuery q) = chain "innerWidth" q
81
getInnerWidth (JQuery q) = chain "innerWidth" q
47
false
true
0
7
12
32
15
17
null
null
jamesyang124/haskell-playground
src/Chp83.hs
bsd-3-clause
res3 = a .++ b
14
res3 = a .++ b
14
res3 = a .++ b
14
false
false
0
5
4
10
5
5
null
null
runjak/projectEuler
src/Problem35.hs
mit
solution = Set.size cPrimeSet
29
solution = Set.size cPrimeSet
29
solution = Set.size cPrimeSet
29
false
false
0
6
3
11
5
6
null
null
brendanhay/gogol
gogol-container/gen/Network/Google/Container/Types/Product.hs
mpl-2.0
-- | Whether the Kubernetes Dashboard is enabled for this cluster. kdDisabled :: Lens' KubernetesDashboard (Maybe Bool) kdDisabled = lens _kdDisabled (\ s a -> s{_kdDisabled = a})
181
kdDisabled :: Lens' KubernetesDashboard (Maybe Bool) kdDisabled = lens _kdDisabled (\ s a -> s{_kdDisabled = a})
114
kdDisabled = lens _kdDisabled (\ s a -> s{_kdDisabled = a})
61
true
true
1
9
29
52
25
27
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Idris.hs
gpl-2.0
parseSourceLine :: String -> State SyntaxState SourceLine parseSourceLine = mkParseSourceLine (parseExpression Nothing)
119
parseSourceLine :: String -> State SyntaxState SourceLine parseSourceLine = mkParseSourceLine (parseExpression Nothing)
119
parseSourceLine = mkParseSourceLine (parseExpression Nothing)
61
false
true
0
7
11
34
15
19
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SSP/GenDefs.hs
bsd-2-clause
bsShrFEqGD = gd bsShrFEq (getUnit mobShrI) (Just bShFEqDeriv) [makeCite chen2005] "bsShrFEq" [bShFEqDesc]
141
bsShrFEqGD = gd bsShrFEq (getUnit mobShrI) (Just bShFEqDeriv) [makeCite chen2005] "bsShrFEq" [bShFEqDesc]
141
bsShrFEqGD = gd bsShrFEq (getUnit mobShrI) (Just bShFEqDeriv) [makeCite chen2005] "bsShrFEq" [bShFEqDesc]
141
false
false
0
7
47
42
20
22
null
null
keithodulaigh/Hets
OWL2/Keywords.hs
gpl-2.0
functionalS :: String functionalS = "Functional"
48
functionalS :: String functionalS = "Functional"
48
functionalS = "Functional"
26
false
true
0
4
5
11
6
5
null
null
JustinUnger/haskell-book
ch12/ch12.hs
mit
lefts' :: [Either a b] -> [a] lefts' [] = []
44
lefts' :: [Either a b] -> [a] lefts' [] = []
44
lefts' [] = []
14
false
true
0
7
10
33
17
16
null
null
f-me/carma-http
src/Carma/HTTP.hs
bsd-3-clause
getAllKeyedJsonValues :: FieldValue -> FieldValue -> [FieldValue] getAllKeyedJsonValues field key = mapMaybe (M.lookup "value") $ filter (\o -> fromMaybe "" (M.lookup "key" o) == key) (fromMaybe [] $ decode' $ BSL.fromStrict field :: JsonDictObjects)
300
getAllKeyedJsonValues :: FieldValue -> FieldValue -> [FieldValue] getAllKeyedJsonValues field key = mapMaybe (M.lookup "value") $ filter (\o -> fromMaybe "" (M.lookup "key" o) == key) (fromMaybe [] $ decode' $ BSL.fromStrict field :: JsonDictObjects)
300
getAllKeyedJsonValues field key = mapMaybe (M.lookup "value") $ filter (\o -> fromMaybe "" (M.lookup "key" o) == key) (fromMaybe [] $ decode' $ BSL.fromStrict field :: JsonDictObjects)
190
false
true
0
13
83
99
49
50
null
null
ku00/aoj-haskell
src/ITP1_4_B.hs
bsd-3-clause
toFixedE9 :: Double -> Fixed E9 toFixedE9 r = realToFrac r :: Fixed E9
70
toFixedE9 :: Double -> Fixed E9 toFixedE9 r = realToFrac r :: Fixed E9
70
toFixedE9 r = realToFrac r :: Fixed E9
38
false
true
0
6
13
30
14
16
null
null
google-research/dex-lang
src/lib/Parser.hs
bsd-3-clause
passName :: Parser PassName passName = choice [thisNameString s $> x | (s, x) <- passNames]
91
passName :: Parser PassName passName = choice [thisNameString s $> x | (s, x) <- passNames]
91
passName = choice [thisNameString s $> x | (s, x) <- passNames]
63
false
true
0
9
15
47
22
25
null
null
c089/haskell-craft3e
Chapter4Exercises.hs
mit
------------------------------------------------------------------------------- -- Exercise 4.21 ------------------------------------------------------------------------------- f :: Integer -> Integer f 0 = 0
209
f :: Integer -> Integer f 0 = 0
31
f 0 = 0
7
true
true
0
7
14
27
13
14
null
null
avh4/elm-compiler
src/Parse/Helpers.hs
bsd-3-clause
lowVar :: IParser String lowVar = makeVar (lower <?> "lower case variable")
77
lowVar :: IParser String lowVar = makeVar (lower <?> "lower case variable")
77
lowVar = makeVar (lower <?> "lower case variable")
52
false
true
0
7
13
30
13
17
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES :: GLenum gl_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES = 0x9124
94
gl_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES :: GLenum gl_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES = 0x9124
94
gl_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES = 0x9124
46
false
true
0
4
5
11
6
5
null
null
jchmrt/btjchm
Parsers.hs
mit
addAfkUserWithMessage :: User -> UserMessage -> IRCParser () addAfkUserWithMessage usr msg = do old <- getOnlineUsers putOnlineUsers $ M.insert usr (Just msg) old
166
addAfkUserWithMessage :: User -> UserMessage -> IRCParser () addAfkUserWithMessage usr msg = do old <- getOnlineUsers putOnlineUsers $ M.insert usr (Just msg) old
166
addAfkUserWithMessage usr msg = do old <- getOnlineUsers putOnlineUsers $ M.insert usr (Just msg) old
105
false
true
0
10
26
58
27
31
null
null
svenkeidel/gnome-citadel
src/TestTiles.hs
gpl-3.0
miner :: Identifier Actor -> Actor miner i = Actor i 'm' [] (Set.fromList [Mine])
81
miner :: Identifier Actor -> Actor miner i = Actor i 'm' [] (Set.fromList [Mine])
81
miner i = Actor i 'm' [] (Set.fromList [Mine])
46
false
true
0
8
14
49
22
27
null
null
uriba/dwarf
src/Data/Dwarf.hs
bsd-3-clause
dw_at 0x5e = DW_AT_decimal_sign
31
dw_at 0x5e = DW_AT_decimal_sign
31
dw_at 0x5e = DW_AT_decimal_sign
31
false
false
0
5
3
9
4
5
null
null
keithodulaigh/Hets
CASL/OMDocImport.hs
gpl-2.0
omdocToSen :: Env -> TCElement -> String -> Result (Maybe (Named (FORMULA f))) omdocToSen e (TCSymbol _ t sr _) n = case nameDecode n of Just _ -> return Nothing -- don't translate encoded names here Nothing -> let ns = makeNamed n $ omdocToFormula e t res b ...
484
omdocToSen :: Env -> TCElement -> String -> Result (Maybe (Named (FORMULA f))) omdocToSen e (TCSymbol _ t sr _) n = case nameDecode n of Just _ -> return Nothing -- don't translate encoded names here Nothing -> let ns = makeNamed n $ omdocToFormula e t res b ...
484
omdocToSen e (TCSymbol _ t sr _) n = case nameDecode n of Just _ -> return Nothing -- don't translate encoded names here Nothing -> let ns = makeNamed n $ omdocToFormula e t res b = return $ Just $ ns { isAxiom = b } in case sr of Axiom -> res T...
394
false
true
3
14
192
164
80
84
null
null
ocramz/petsc-hs
src/Numerical/PETSc/Internal/PutGet/EPS.hs
gpl-3.0
-- | set # of eigenvalues to compute and subspace dimension epsSetDimensions :: EPS -> Int -> -- # eigenvalues Int -> -- subspace dimensionality Int -> -- maximum projected dimensionality IO () epsSetDimensions e nev ncv mpd = chk0 $ epsSetDimensions' e nev ncv mpd
280
epsSetDimensions :: EPS -> Int -> -- # eigenvalues Int -> -- subspace dimensionality Int -> -- maximum projected dimensionality IO () epsSetDimensions e nev ncv mpd = chk0 $ epsSetDimensions' e nev ncv mpd
219
epsSetDimensions e nev ncv mpd = chk0 $ epsSetDimensions' e nev ncv mpd
72
true
true
0
11
60
62
31
31
null
null
andreagenso/java2scala
src/J2s/Ast/Syntax.hs
apache-2.0
-- Expression sem_PrimaryNNA_UnNotPlusCastExpression = UnNotPlusCastExpression
79
sem_PrimaryNNA_UnNotPlusCastExpression = UnNotPlusCastExpression
64
sem_PrimaryNNA_UnNotPlusCastExpression = UnNotPlusCastExpression
64
true
false
0
4
5
7
4
3
null
null
rueshyna/gogol
gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/ListByUser.hs
mpl-2.0
-- | Blog statuses to include in the result (default: Live blogs only). Note -- that ADMIN access is required to view deleted blogs. blbuStatus :: Lens' BlogsListByUser [BlogsListByUserStatus] blbuStatus = lens _blbuStatus (\ s a -> s{_blbuStatus = a}) . _Coerce
270
blbuStatus :: Lens' BlogsListByUser [BlogsListByUserStatus] blbuStatus = lens _blbuStatus (\ s a -> s{_blbuStatus = a}) . _Coerce
137
blbuStatus = lens _blbuStatus (\ s a -> s{_blbuStatus = a}) . _Coerce
77
true
true
1
10
49
53
27
26
null
null
pseudonom/persistent
persistent/Database/Persist/Sql/Class.hs
mit
to7 :: ((a,b),(c,d),(e,f),g) -> (a,b,c,d,e,f,g) to7 ((a,b),(c,d),(e,f),g) = (a,b,c,d,e,f,g)
91
to7 :: ((a,b),(c,d),(e,f),g) -> (a,b,c,d,e,f,g) to7 ((a,b),(c,d),(e,f),g) = (a,b,c,d,e,f,g)
91
to7 ((a,b),(c,d),(e,f),g) = (a,b,c,d,e,f,g)
43
false
true
0
7
8
124
78
46
null
null
thdtjsdn/language-javascript
src/Language/JavaScript/Parser/SrcLocation.hs
bsd-3-clause
incTab NoLocation = NoLocation
30
incTab NoLocation = NoLocation
30
incTab NoLocation = NoLocation
30
false
false
0
5
3
9
4
5
null
null
AndrewRademacher/hs-ebay-trading
src/Ebay/Types/Details.hs
mit
xpWarrantyDurationOption :: PU Text WarrantyDurationOption xpWarrantyDurationOption = PU { unpickleTree = return . WarrantyDurationOption , pickleTree = unWarrantyDurationOption }
241
xpWarrantyDurationOption :: PU Text WarrantyDurationOption xpWarrantyDurationOption = PU { unpickleTree = return . WarrantyDurationOption , pickleTree = unWarrantyDurationOption }
241
xpWarrantyDurationOption = PU { unpickleTree = return . WarrantyDurationOption , pickleTree = unWarrantyDurationOption }
182
false
true
1
8
80
38
19
19
null
null
hy-zhang/parser
experimental/Lib.hs
bsd-3-clause
trans :: TList' fs -> TList fs trans TNil' = TNil
49
trans :: TList' fs -> TList fs trans TNil' = TNil
49
trans TNil' = TNil
18
false
true
0
7
10
29
12
17
null
null
mikeplus64/Level-0
src/Graphics/UI/SDL/Extra/Keys.hs
gpl-3.0
keyToChar SDLK_t = Just 't'
27
keyToChar SDLK_t = Just 't'
27
keyToChar SDLK_t = Just 't'
27
false
false
0
5
4
12
5
7
null
null
IreneKnapp/Joy
Joy/EnumSet.hs
mit
findLastStartingBefore :: (Ord content, Bounded content, Enum content) => [(content, content)] -> (content, content) -> Bool -> (Maybe Int, Bool) findLastStartingBefore ranges newRange joinAdjacent = let maybeIndex = case ranges of [] -> Nothing ...
1,070
findLastStartingBefore :: (Ord content, Bounded content, Enum content) => [(content, content)] -> (content, content) -> Bool -> (Maybe Int, Bool) findLastStartingBefore ranges newRange joinAdjacent = let maybeIndex = case ranges of [] -> Nothing ...
1,070
findLastStartingBefore ranges newRange joinAdjacent = let maybeIndex = case ranges of [] -> Nothing (firstRange:_) | fst newRange < fst firstRange -> Nothing _ -> foldl (\lastResult (range, i) -> if f...
904
false
true
0
18
555
271
140
131
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/general/haskellforall/src/X_2012_01_03_ADTs.hs
unlicense
{- PRODUCT TYPES a * b = (a, b) associative: ((a, b) , c) ~ (a, (b , c)) (a * b) * c = a * (b * c) -} forward3 :: ((a, b), c) -> (a, (b, c)) forward3 ((a, b), c) = (a, (b, c))
186
forward3 :: ((a, b), c) -> (a, (b, c)) forward3 ((a, b), c) = (a, (b, c))
77
forward3 ((a, b), c) = (a, (b, c))
38
true
true
0
7
58
67
42
25
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxCAL_HITTEST_DAY :: Int wxCAL_HITTEST_DAY = 2
46
wxCAL_HITTEST_DAY :: Int wxCAL_HITTEST_DAY = 2
46
wxCAL_HITTEST_DAY = 2
21
false
true
0
6
5
18
7
11
null
null
brendanhay/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Locations/Clusters/GetJWKs.hs
mpl-2.0
-- | V1 error format. plcgjXgafv :: Lens' ProjectsLocationsClustersGetJWKs (Maybe Xgafv) plcgjXgafv = lens _plcgjXgafv (\ s a -> s{_plcgjXgafv = a})
150
plcgjXgafv :: Lens' ProjectsLocationsClustersGetJWKs (Maybe Xgafv) plcgjXgafv = lens _plcgjXgafv (\ s a -> s{_plcgjXgafv = a})
128
plcgjXgafv = lens _plcgjXgafv (\ s a -> s{_plcgjXgafv = a})
61
true
true
1
9
23
52
25
27
null
null
dzotokan/instahuskee
src/Web/Router.hs
mit
igAuthFailTemplate :: Widget igAuthFailTemplate = do setTitle "Auth Failure..." toWidget[whamlet|Authentication failed. Check logs for details.!|]
150
igAuthFailTemplate :: Widget igAuthFailTemplate = do setTitle "Auth Failure..." toWidget[whamlet|Authentication failed. Check logs for details.!|]
150
igAuthFailTemplate = do setTitle "Auth Failure..." toWidget[whamlet|Authentication failed. Check logs for details.!|]
121
false
true
0
7
18
27
14
13
null
null
ananthakumaran/webify
src/TTF.hs
mit
glyphId CmapFormat6{c6GlyphIds = glyphIds, c6FirstCode = firstCode, c6EntryCount = entryCount } n | n >= start && n < end = fromIntegral $ glyphIds !! (n - start) | otherwise = 0 where start = fromIntegral firstCode ...
359
glyphId CmapFormat6{c6GlyphIds = glyphIds, c6FirstCode = firstCode, c6EntryCount = entryCount } n | n >= start && n < end = fromIntegral $ glyphIds !! (n - start) | otherwise = 0 where start = fromIntegral firstCode ...
359
glyphId CmapFormat6{c6GlyphIds = glyphIds, c6FirstCode = firstCode, c6EntryCount = entryCount } n | n >= start && n < end = fromIntegral $ glyphIds !! (n - start) | otherwise = 0 where start = fromIntegral firstCode ...
359
false
false
1
10
148
98
49
49
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/Constants.hs
bsd-2-clause
exitNodesetupError :: Int exitNodesetupError = 12
49
exitNodesetupError :: Int exitNodesetupError = 12
49
exitNodesetupError = 12
23
false
true
0
4
5
11
6
5
null
null
timmytofu/graphql-haskell
Data/GraphQL/Parser.hs
bsd-3-clause
selection :: Parser Selection selection = SelectionField <$> field -- Inline first to catch `on` case <|> SelectionInlineFragment <$> inlineFragment <|> SelectionFragmentSpread <$> fragmentSpread <?> "selection error!"
254
selection :: Parser Selection selection = SelectionField <$> field -- Inline first to catch `on` case <|> SelectionInlineFragment <$> inlineFragment <|> SelectionFragmentSpread <$> fragmentSpread <?> "selection error!"
254
selection = SelectionField <$> field -- Inline first to catch `on` case <|> SelectionInlineFragment <$> inlineFragment <|> SelectionFragmentSpread <$> fragmentSpread <?> "selection error!"
224
false
true
8
6
62
52
25
27
null
null
urbanslug/ghc
compiler/simplCore/FloatIn.hs
bsd-3-clause
sepBindsByDropPoint _ _is_case drop_pts [] = [] : [[] | _ <- drop_pts]
72
sepBindsByDropPoint _ _is_case drop_pts [] = [] : [[] | _ <- drop_pts]
72
sepBindsByDropPoint _ _is_case drop_pts [] = [] : [[] | _ <- drop_pts]
72
false
false
3
8
14
40
18
22
null
null
sdiehl/ghc
compiler/GHC/HsToCore/PmCheck/Types.hs
bsd-3-clause
lookupSDIE :: SharedDIdEnv a -> Id -> Maybe a lookupSDIE sdie x = snd (lookupReprAndEntrySDIE sdie x)
101
lookupSDIE :: SharedDIdEnv a -> Id -> Maybe a lookupSDIE sdie x = snd (lookupReprAndEntrySDIE sdie x)
101
lookupSDIE sdie x = snd (lookupReprAndEntrySDIE sdie x)
55
false
true
0
8
16
46
20
26
null
null
AndrewRademacher/hs-ebay-trading
src/Ebay/Types.hs
mit
xpErrorParameterType :: PU [Node] ErrorParameterType xpErrorParameterType = xpWrap (\(pid, val) -> ErrorParameterType val pid) (\(ErrorParameterType val pid) -> (pid, val)) $ xpElem "{urn:ebay:apis:eBLBaseComponents}ErrorParameters" (xpAttr "{urn:ebay:apis:eBLBaseComponents}ParamID" xpId...
383
xpErrorParameterType :: PU [Node] ErrorParameterType xpErrorParameterType = xpWrap (\(pid, val) -> ErrorParameterType val pid) (\(ErrorParameterType val pid) -> (pid, val)) $ xpElem "{urn:ebay:apis:eBLBaseComponents}ErrorParameters" (xpAttr "{urn:ebay:apis:eBLBaseComponents}ParamID" xpId...
383
xpErrorParameterType = xpWrap (\(pid, val) -> ErrorParameterType val pid) (\(ErrorParameterType val pid) -> (pid, val)) $ xpElem "{urn:ebay:apis:eBLBaseComponents}ErrorParameters" (xpAttr "{urn:ebay:apis:eBLBaseComponents}ParamID" xpId) (xpElemText "{urn:ebay:apis:eBLBaseComponen...
330
false
true
0
10
67
90
48
42
null
null
kvanberendonck/pipes-server-template
src/Main.hs
mit
mevents :: Monad m => Pipe e e' m r -> Pipe (Signal p e c) (Signal p e' c) m r mevents h = await' >~ for h (yield . SigEvent) where await' = await >>= \x -> case x of SigPacket p -> yield (SigPacket p) >> await' SigEvent e -> return e SigCommand c -> yield (SigCommand c) >> await' -- | M...
392
mevents :: Monad m => Pipe e e' m r -> Pipe (Signal p e c) (Signal p e' c) m r mevents h = await' >~ for h (yield . SigEvent) where await' = await >>= \x -> case x of SigPacket p -> yield (SigPacket p) >> await' SigEvent e -> return e SigCommand c -> yield (SigCommand c) >> await' -- | M...
392
mevents h = await' >~ for h (yield . SigEvent) where await' = await >>= \x -> case x of SigPacket p -> yield (SigPacket p) >> await' SigEvent e -> return e SigCommand c -> yield (SigCommand c) >> await' -- | Map a function over every 'SigCommand' of a 'Signal' flowing downstream.
313
false
true
0
13
108
157
75
82
null
null
switchface/helm
src/Helm/Graphics2D.hs
mit
-- | Create a generic n-sided polygon (e.g. octagon, pentagon, etc) with -- a side count and radius. ngon :: Int -> Double -> Shape ngon n r = polygon $ path $ map point series where point i = V2 (r * cos (t * i)) (r * sin (t * i)) series = [0 .. fromIntegral (n - 1)] m = fromIntegral n t = 2 * pi / m...
445
ngon :: Int -> Double -> Shape ngon n r = polygon $ path $ map point series where point i = V2 (r * cos (t * i)) (r * sin (t * i)) series = [0 .. fromIntegral (n - 1)] m = fromIntegral n t = 2 * pi / m -- | Create the default line style. By default, the line is black with a width of 1, -- flat caps a...
344
ngon n r = polygon $ path $ map point series where point i = V2 (r * cos (t * i)) (r * sin (t * i)) series = [0 .. fromIntegral (n - 1)] m = fromIntegral n t = 2 * pi / m -- | Create the default line style. By default, the line is black with a width of 1, -- flat caps and regular sharp joints.
313
true
true
10
10
115
150
71
79
null
null
fmapfmapfmap/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/Types/Product.hs
mpl-2.0
-- | Creates a value of 'DataSource' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dsStatus' -- -- * 'dsNumberOfFiles' -- -- * 'dsLastUpdatedAt' -- -- * 'dsCreatedAt' -- -- * 'dsDataSourceId' -- -- * 'dsRDSMetadata' -- -- * 'dsDataS...
1,074
dataSource :: DataSource dataSource = DataSource' { _dsStatus = Nothing , _dsNumberOfFiles = Nothing , _dsLastUpdatedAt = Nothing , _dsCreatedAt = Nothing , _dsDataSourceId = Nothing , _dsRDSMetadata = Nothing , _dsDataSizeInBytes = Nothing , _dsCreatedByIAMUser = Nothing , _...
540
dataSource = DataSource' { _dsStatus = Nothing , _dsNumberOfFiles = Nothing , _dsLastUpdatedAt = Nothing , _dsCreatedAt = Nothing , _dsDataSourceId = Nothing , _dsRDSMetadata = Nothing , _dsDataSizeInBytes = Nothing , _dsCreatedByIAMUser = Nothing , _dsName = Nothing , _dsDat...
511
true
true
0
7
228
146
102
44
null
null
nikita-volkov/remotion
library/Remotion/Server.hs
mit
-- | -- Run the server, while blocking the calling thread. runAndWait :: (Serializable IO i, Serializable IO o) => Settings i o s -> IO (Either Failure ()) runAndWait settings = run settings $ wait
197
runAndWait :: (Serializable IO i, Serializable IO o) => Settings i o s -> IO (Either Failure ()) runAndWait settings = run settings $ wait
138
runAndWait settings = run settings $ wait
41
true
true
0
10
35
66
33
33
null
null
facebook/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/MyService.hs
apache-2.0
-- | Deserialize a 'Query_result' in pure code decode_Query_result :: (Thrift.Protocol p, Thrift.Transport t) => p t -> BS.ByteString -> Query_result decode_Query_result iprot bs = to_Query_result $ Thrift.deserializeVal iprot (Types.T_STRUCT typemap_Query_result) bs
267
decode_Query_result :: (Thrift.Protocol p, Thrift.Transport t) => p t -> BS.ByteString -> Query_result decode_Query_result iprot bs = to_Query_result $ Thrift.deserializeVal iprot (Types.T_STRUCT typemap_Query_result) bs
220
decode_Query_result iprot bs = to_Query_result $ Thrift.deserializeVal iprot (Types.T_STRUCT typemap_Query_result) bs
117
true
true
0
9
31
74
36
38
null
null
sakhnik/FreeCell
History.hs
bsd-3-clause
-- Accept new present value. Adjust history. record :: ([a], a, [a]) -> a -> ([a], a, [a]) record (past, prev, _) cur = ([prev] ++ past, cur, [])
145
record :: ([a], a, [a]) -> a -> ([a], a, [a]) record (past, prev, _) cur = ([prev] ++ past, cur, [])
100
record (past, prev, _) cur = ([prev] ++ past, cur, [])
54
true
true
0
10
28
88
51
37
null
null
Michaelt293/Lipid-Haskell
src/Lipid/Parsers/Blocks.hs
gpl-3.0
doubleBondWithGeometryP :: Parser a -> Parser (DoubleBond a) doubleBondWithGeometryP p = do pos <- p geo <- optional geometryP return $ DoubleBond pos geo -- doubleBondP :: Parser a -> Parser (DoubleBond a) -- doubleBondP p = (`DoubleBond` Nothing) <$> p
261
doubleBondWithGeometryP :: Parser a -> Parser (DoubleBond a) doubleBondWithGeometryP p = do pos <- p geo <- optional geometryP return $ DoubleBond pos geo -- doubleBondP :: Parser a -> Parser (DoubleBond a) -- doubleBondP p = (`DoubleBond` Nothing) <$> p
261
doubleBondWithGeometryP p = do pos <- p geo <- optional geometryP return $ DoubleBond pos geo -- doubleBondP :: Parser a -> Parser (DoubleBond a) -- doubleBondP p = (`DoubleBond` Nothing) <$> p
200
false
true
0
8
47
61
28
33
null
null
nikki-and-the-robots/nikki
src/Base/Constants.hs
lgpl-3.0
-- there are multiple substeps (steps in chipmunk) per superstep. subStepQuantum :: Seconds = 0.002
99
subStepQuantum :: Seconds = 0.002
33
subStepQuantum :: Seconds = 0.002
33
true
false
1
5
14
14
6
8
null
null
shangaslammi/haskeroids
Haskeroids/Controls.hs
mit
shoot = Char ' '
20
shoot = Char ' '
20
shoot = Char ' '
20
false
false
1
5
8
12
4
8
null
null
zerobuzz/reasonable-lens
src/Control/Lens/Setter.hs
mit
(/~) :: Fractional a => Setter s t a a -> a -> s -> t s /~ x = over s (/ x)
75
(/~) :: Fractional a => Setter s t a a -> a -> s -> t s /~ x = over s (/ x)
75
s /~ x = over s (/ x)
21
false
true
0
11
23
62
29
33
null
null