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
cchens/courseography
hs/WebParsing/ParsingHelp.hs
gpl-3.0
parseRecommendedPrep :: CoursePart -> CoursePart parseRecommendedPrep (tags, course) = let (_, rest) = tagBreak ["Distribution","Breadth"] tags in (rest, course)
165
parseRecommendedPrep :: CoursePart -> CoursePart parseRecommendedPrep (tags, course) = let (_, rest) = tagBreak ["Distribution","Breadth"] tags in (rest, course)
165
parseRecommendedPrep (tags, course) = let (_, rest) = tagBreak ["Distribution","Breadth"] tags in (rest, course)
116
false
true
0
10
22
65
33
32
null
null
roberth/uu-helium
test/parser/EmptyWhere.hs
gpl-3.0
g = 10 where
16
g = 10 where
16
g = 10 where
16
false
false
1
5
7
13
4
9
null
null
rifung/nand2tetris
projects/compiler/src/Assembler/Instruction.hs
gpl-3.0
value :: String -> Either String Value value s = let areDigits = maybeError (all isDigit s) $ "Invalid value: " ++ s canFit = maybeError (length s < length maxInt || ((length s == length maxInt) && (s < maxInt))) $ "Value too large: " ++ s tests...
450
value :: String -> Either String Value value s = let areDigits = maybeError (all isDigit s) $ "Invalid value: " ++ s canFit = maybeError (length s < length maxInt || ((length s == length maxInt) && (s < maxInt))) $ "Value too large: " ++ s tests...
450
value s = let areDigits = maybeError (all isDigit s) $ "Invalid value: " ++ s canFit = maybeError (length s < length maxInt || ((length s == length maxInt) && (s < maxInt))) $ "Value too large: " ++ s tests = [areDigits, canFit] in if all is...
411
false
true
0
18
157
165
81
84
null
null
ian-ross/c2hs-macos-test
c2hs-0.26.1/src/C2HS/C/Builtin.hs
mit
-- | predefined type names -- builtinTypeNames :: [(Ident, CObj)] builtinTypeNames = [(va_list_ide, BuiltinCO $ Just ptrVoidDecl)] where va_list_ide :: Ident va_list_ide = builtinIdent "__builtin_va_list" ptrVoidDecl :: CDecl ptrVoidDecl = CDecl [ CStorageSpec (CTyp...
821
builtinTypeNames :: [(Ident, CObj)] builtinTypeNames = [(va_list_ide, BuiltinCO $ Just ptrVoidDecl)] where va_list_ide :: Ident va_list_ide = builtinIdent "__builtin_va_list" ptrVoidDecl :: CDecl ptrVoidDecl = CDecl [ CStorageSpec (CTypedef builtin) ...
791
builtinTypeNames = [(va_list_ide, BuiltinCO $ Just ptrVoidDecl)] where va_list_ide :: Ident va_list_ide = builtinIdent "__builtin_va_list" ptrVoidDecl :: CDecl ptrVoidDecl = CDecl [ CStorageSpec (CTypedef builtin) , CTypeSpec (CVoidType builtin) ...
755
true
true
0
14
404
152
83
69
null
null
GaloisInc/halvm-ghc
libraries/ghci/GHCi/Run.hs
bsd-3-clause
mkCostCentres mod ccs = do c_module <- newCString mod mapM (mk_one c_module) ccs where mk_one c_module (decl_path,srcspan) = do c_name <- newCString decl_path c_srcspan <- newCString srcspan toRemotePtr <$> c_mkCostCentre c_name c_module c_srcspan
266
mkCostCentres mod ccs = do c_module <- newCString mod mapM (mk_one c_module) ccs where mk_one c_module (decl_path,srcspan) = do c_name <- newCString decl_path c_srcspan <- newCString srcspan toRemotePtr <$> c_mkCostCentre c_name c_module c_srcspan
266
mkCostCentres mod ccs = do c_module <- newCString mod mapM (mk_one c_module) ccs where mk_one c_module (decl_path,srcspan) = do c_name <- newCString decl_path c_srcspan <- newCString srcspan toRemotePtr <$> c_mkCostCentre c_name c_module c_srcspan
266
false
false
0
9
51
91
39
52
null
null
rcook/mlutil
ch04-naive-bayes/src/Main.hs
mit
main :: IO () main = do runDogDemos runEmailDemos runRSSDemos
73
main :: IO () main = do runDogDemos runEmailDemos runRSSDemos
73
main = do runDogDemos runEmailDemos runRSSDemos
59
false
true
0
6
21
25
11
14
null
null
Frefreak/solitaire-solver
app/Main.hs
bsd-3-clause
main' :: IO () main' = do {- threadDelay 1000000 -} (b' :: Either SomeException Board) <- try getBoard case b' of Left err -> do putStrLn "wait 1 more rounds" getBoard' 1 >>= perform Right b -> perform b startNewGame
272
main' :: IO () main' = do {- threadDelay 1000000 -} (b' :: Either SomeException Board) <- try getBoard case b' of Left err -> do putStrLn "wait 1 more rounds" getBoard' 1 >>= perform Right b -> perform b startNewGame
272
main' = do {- threadDelay 1000000 -} (b' :: Either SomeException Board) <- try getBoard case b' of Left err -> do putStrLn "wait 1 more rounds" getBoard' 1 >>= perform Right b -> perform b startNewGame
257
false
true
0
13
96
86
38
48
null
null
mihaimaruseac/blog-demos
insects/insects.hs
mit
runs = 40
9
runs = 40
9
runs = 40
9
false
false
1
5
2
10
3
7
null
null
laser/cis-194-winter-2016
src/Homework/Week05/StackVM.hs
mit
execute _ (And:_) = errUnderflow "And"
64
execute _ (And:_) = errUnderflow "And"
64
execute _ (And:_) = errUnderflow "And"
64
false
false
0
7
31
21
10
11
null
null
nevrenato/HetsAlloy
Comorphisms/SuleCFOL2SoftFOL.hs
gpl-2.0
makeGens :: SPSign.Sign -> IdTypeSPIdMap -> [Named (FORMULA f)] -> Result (SortMap, FuncMap, IdTypeSPIdMap, [Named SPTerm]) {- ^ The list of SoftFOL sentences gives exhaustiveness for generated sorts with only constant constructors and\/or subsort injections, by simply trans...
806
makeGens :: SPSign.Sign -> IdTypeSPIdMap -> [Named (FORMULA f)] -> Result (SortMap, FuncMap, IdTypeSPIdMap, [Named SPTerm]) makeGens sign idMap fs = case foldl (makeGen sign) (return (Map.empty, idMap, [], [])) fs of Result ds mv -> maybe (Result ds Nothing) (\ (opM, idMap', pairs...
548
makeGens sign idMap fs = case foldl (makeGen sign) (return (Map.empty, idMap, [], [])) fs of Result ds mv -> maybe (Result ds Nothing) (\ (opM, idMap', pairs, exhaustSens) -> Result ds (Just (foldr (uncurry Map.insert) ...
415
true
true
2
13
292
188
102
86
null
null
msiegenthaler/haskell-xbee
System/Hardware/XBee/Connector/Handle.hs
bsd-3-clause
handleDebugConnector :: IO Handle -> ThreadedConnector handleDebugConnector handle = sousiConnector (mk <$> handle) where mk h = debugToSysout (portCommandSource h, portCommandSink h)
187
handleDebugConnector :: IO Handle -> ThreadedConnector handleDebugConnector handle = sousiConnector (mk <$> handle) where mk h = debugToSysout (portCommandSource h, portCommandSink h)
187
handleDebugConnector handle = sousiConnector (mk <$> handle) where mk h = debugToSysout (portCommandSource h, portCommandSink h)
132
false
true
0
7
25
56
27
29
null
null
juhp/stack
src/Stack/Types/Config.hs
bsd-3-clause
configMonoidInstallGHCName :: Text configMonoidInstallGHCName = "install-ghc"
77
configMonoidInstallGHCName :: Text configMonoidInstallGHCName = "install-ghc"
77
configMonoidInstallGHCName = "install-ghc"
42
false
true
0
4
5
11
6
5
null
null
daherb/Haskell-Muste
muste-lib/Main.hs
artistic-2.0
updateClick (Just (Click pos count)) newPos | pos == newPos = Just $ Click pos (count + 1) | otherwise = Just $ Click newPos 1
130
updateClick (Just (Click pos count)) newPos | pos == newPos = Just $ Click pos (count + 1) | otherwise = Just $ Click newPos 1
130
updateClick (Just (Click pos count)) newPos | pos == newPos = Just $ Click pos (count + 1) | otherwise = Just $ Click newPos 1
130
false
false
1
9
29
67
32
35
null
null
davidzhulijun/TAM
RegisterMachine/Models/CMA12.hs
bsd-3-clause
trans (JM a) = jjump (A a)
26
trans (JM a) = jjump (A a)
26
trans (JM a) = jjump (A a)
26
false
false
0
7
6
25
11
14
null
null
FranklinChen/Haskell-Pipes-Library
benchmarks/LiftBench.hs
bsd-3-clause
defaultMax :: Int defaultMax = 10000
36
defaultMax :: Int defaultMax = 10000
36
defaultMax = 10000
18
false
true
0
4
5
11
6
5
null
null
j-mueller/virtual-hom
src/VirtualHom/Html.hs
bsd-3-clause
var_ :: Elem cb () var_ = elm "var"
35
var_ :: Elem cb () var_ = elm "var"
35
var_ = elm "var"
16
false
true
0
6
8
21
10
11
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
groundDamage ProtossForge = 0
29
groundDamage ProtossForge = 0
29
groundDamage ProtossForge = 0
29
false
false
0
5
3
9
4
5
null
null
Blaisorblade/pts
src-lib/PTS/Dynamics/Evaluation.hs
bsd-3-clause
equivTerm :: Bindings Eval -> TypedTerm Eval -> TypedTerm Eval -> Bool equivTerm env t1 t2 = runEval env $ do v1 <- eval t1 v2 <- eval t2 equiv v1 v2
155
equivTerm :: Bindings Eval -> TypedTerm Eval -> TypedTerm Eval -> Bool equivTerm env t1 t2 = runEval env $ do v1 <- eval t1 v2 <- eval t2 equiv v1 v2
155
equivTerm env t1 t2 = runEval env $ do v1 <- eval t1 v2 <- eval t2 equiv v1 v2
84
false
true
0
9
37
74
32
42
null
null
Frefreak/Gideon
src/MarketUtil.hs
bsd-3-clause
marketOrderSellCompare :: MarketOrder -> MarketOrder -> Ordering marketOrderSellCompare = \a b -> compare (moPrice a) (moPrice b)
129
marketOrderSellCompare :: MarketOrder -> MarketOrder -> Ordering marketOrderSellCompare = \a b -> compare (moPrice a) (moPrice b)
129
marketOrderSellCompare = \a b -> compare (moPrice a) (moPrice b)
64
false
true
0
8
16
43
22
21
null
null
cbpark/hep-kinematics
src/HEP/Kinematics/Vector/ThreeVector.hs
bsd-3-clause
setXYZ :: a -> a -> a -> ThreeVector a setXYZ x y z = ThreeVector (V3 x y z)
76
setXYZ :: a -> a -> a -> ThreeVector a setXYZ x y z = ThreeVector (V3 x y z)
76
setXYZ x y z = ThreeVector (V3 x y z)
37
false
true
0
9
19
50
23
27
null
null
tdeekens/tda452-code
Lab-4-Submission/Battleship.hs
mit
nextTarget :: Direction -> Coord -> Maybe Coord nextTarget North (0,_) = Nothing
80
nextTarget :: Direction -> Coord -> Maybe Coord nextTarget North (0,_) = Nothing
80
nextTarget North (0,_) = Nothing
32
false
true
0
9
12
38
18
20
null
null
goakley/Hackskell
src/Hack/Assembler.hs
gpl-3.0
c2wrd AndDM = 4096
18
c2wrd AndDM = 4096
18
c2wrd AndDM = 4096
18
false
false
1
5
3
13
4
9
null
null
phischu/fragnix
tests/packages/scotty/Data.OrdPSQ.Internal.hs
bsd-3-clause
moduleError :: String -> String -> a moduleError fun msg = error ("Data.OrdPSQ.Internal." ++ fun ++ ':' : ' ' : msg)
116
moduleError :: String -> String -> a moduleError fun msg = error ("Data.OrdPSQ.Internal." ++ fun ++ ':' : ' ' : msg)
116
moduleError fun msg = error ("Data.OrdPSQ.Internal." ++ fun ++ ':' : ' ' : msg)
79
false
true
0
10
21
51
24
27
null
null
JustusAdam/schedule-planner
src/SchedulePlanner/Scraper/TUDresden.hs
lgpl-3.0
onlyIf a _ = return a
21
onlyIf a _ = return a
21
onlyIf a _ = return a
21
false
false
0
4
5
16
6
10
null
null
janschulz/pandoc
src/Text/Pandoc/Readers/CommonMark.hs
gpl-2.0
addBlock (Node _ (LIST listAttrs) nodes) = (constructor (map (setTightness . addBlocks . children) nodes) :) where constructor = case listType listAttrs of BULLET_LIST -> BulletList ORDERED_LIST -> OrderedList (start, DefaultSty...
708
addBlock (Node _ (LIST listAttrs) nodes) = (constructor (map (setTightness . addBlocks . children) nodes) :) where constructor = case listType listAttrs of BULLET_LIST -> BulletList ORDERED_LIST -> OrderedList (start, DefaultSty...
708
addBlock (Node _ (LIST listAttrs) nodes) = (constructor (map (setTightness . addBlocks . children) nodes) :) where constructor = case listType listAttrs of BULLET_LIST -> BulletList ORDERED_LIST -> OrderedList (start, DefaultSty...
708
false
false
1
11
306
162
82
80
null
null
39aldo39/klfc
src/Pkl.hs
gpl-3.0
printLetter _ _ letter = "--" <$ tell [show' letter ⊕ " is not supported in pkl"]
81
printLetter _ _ letter = "--" <$ tell [show' letter ⊕ " is not supported in pkl"]
81
printLetter _ _ letter = "--" <$ tell [show' letter ⊕ " is not supported in pkl"]
81
false
false
1
9
16
28
13
15
null
null
ndmitchell/extra
src/Data/List/Extra.hs
bsd-3-clause
unescapeJSON (x:xs) = x : unescapeJSON xs
41
unescapeJSON (x:xs) = x : unescapeJSON xs
41
unescapeJSON (x:xs) = x : unescapeJSON xs
41
false
false
0
6
6
24
11
13
null
null
gregberns/HaskellKoans
src/koans/FListFunctions.hs
apache-2.0
koans :: Koan koans = describe "List Functions" $ do koanMapStr koanMapIntToStr koanFilter koanFoldlInt koanFoldlStr
121
koans :: Koan koans = describe "List Functions" $ do koanMapStr koanMapIntToStr koanFilter koanFoldlInt koanFoldlStr
121
koans = describe "List Functions" $ do koanMapStr koanMapIntToStr koanFilter koanFoldlInt koanFoldlStr
107
false
true
0
7
19
33
14
19
null
null
NogikuchiKBYS/hsit-sandbox
src/Eval.hs
bsd-3-clause
perform BOr = transbop (||)
27
perform BOr = transbop (||)
27
perform BOr = transbop (||)
27
false
false
0
5
4
14
7
7
null
null
olsner/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isImmutableTyVar :: TyVar -> Bool isImmutableTyVar tv = isSkolemTyVar tv
72
isImmutableTyVar :: TyVar -> Bool isImmutableTyVar tv = isSkolemTyVar tv
72
isImmutableTyVar tv = isSkolemTyVar tv
38
false
true
0
5
9
21
10
11
null
null
eniac314/aquarium
src/Col.hs
gpl-3.0
unionCol :: Col a -> Col a -> Col a unionCol c1 c2 = let !t = colNextKey c1 + colNextKey c2 in Col (seq t t) (Map.union (colAssocs c1) (colAssocs c2))
159
unionCol :: Col a -> Col a -> Col a unionCol c1 c2 = let !t = colNextKey c1 + colNextKey c2 in Col (seq t t) (Map.union (colAssocs c1) (colAssocs c2))
159
unionCol c1 c2 = let !t = colNextKey c1 + colNextKey c2 in Col (seq t t) (Map.union (colAssocs c1) (colAssocs c2))
123
false
true
0
11
40
91
41
50
null
null
fpco/stackage-server
src/Stackage/Database/Cron.hs
mit
hackageDeprecatedUrl :: Request hackageDeprecatedUrl = "https://hackage.haskell.org/packages/deprecated.json"
109
hackageDeprecatedUrl :: Request hackageDeprecatedUrl = "https://hackage.haskell.org/packages/deprecated.json"
109
hackageDeprecatedUrl = "https://hackage.haskell.org/packages/deprecated.json"
77
false
true
0
4
5
11
6
5
null
null
mfpi/q-inqu
Game/World/Lens.hs
mit
isCollidable :: ObjectId -> Get Bool isCollidable oId = to collidable where collidable w = Set.member oId $ objPosAndBoundary w objectsWithPos w = Set.fromList $ w^..wCommon.wcPositions.itraversed.asIndex objectsWithBoundary w = Set.fromList $ w^..wCommon.wcBoundaries.itraversed.asIndex ...
408
isCollidable :: ObjectId -> Get Bool isCollidable oId = to collidable where collidable w = Set.member oId $ objPosAndBoundary w objectsWithPos w = Set.fromList $ w^..wCommon.wcPositions.itraversed.asIndex objectsWithBoundary w = Set.fromList $ w^..wCommon.wcBoundaries.itraversed.asIndex ...
408
isCollidable oId = to collidable where collidable w = Set.member oId $ objPosAndBoundary w objectsWithPos w = Set.fromList $ w^..wCommon.wcPositions.itraversed.asIndex objectsWithBoundary w = Set.fromList $ w^..wCommon.wcBoundaries.itraversed.asIndex objPosAndBoundary w = Set.inte...
371
false
true
1
8
78
129
59
70
null
null
oisdk/trie
Trie.hsproj/Trie.hs
mit
subs :: Ord a => [a] -> Trie a -> [[a]] subs x t@(Trie m _) = (complete x t) ++ (M.toList m >>= prepResult (subs x))
116
subs :: Ord a => [a] -> Trie a -> [[a]] subs x t@(Trie m _) = (complete x t) ++ (M.toList m >>= prepResult (subs x))
116
subs x t@(Trie m _) = (complete x t) ++ (M.toList m >>= prepResult (subs x))
76
false
true
0
10
26
87
44
43
null
null
ruiting/opencog
opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban/WordList.hs
agpl-3.0
handleBAIprefix :: (String,String) -> (String,String) handleBAIprefix (b,d) = if t2 `elem` se then (b,t2 ++ ' ' : nd) else (b,nd) where se = ["se","te","ve","xe"] t2 = take 2 b nd = d ++ " " --Parser Expects a space behind every word
257
handleBAIprefix :: (String,String) -> (String,String) handleBAIprefix (b,d) = if t2 `elem` se then (b,t2 ++ ' ' : nd) else (b,nd) where se = ["se","te","ve","xe"] t2 = take 2 b nd = d ++ " " --Parser Expects a space behind every word
257
handleBAIprefix (b,d) = if t2 `elem` se then (b,t2 ++ ' ' : nd) else (b,nd) where se = ["se","te","ve","xe"] t2 = take 2 b nd = d ++ " " --Parser Expects a space behind every word
203
false
true
5
8
66
126
66
60
null
null
rueshyna/gogol
gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs
mpl-2.0
-- | Whether this student submission is associated with the Developer Console -- project making the request. See google.classroom.Work.CreateCourseWork -- for more details. Read-only. ssAssociatedWithDeveloper :: Lens' StudentSubmission (Maybe Bool) ssAssociatedWithDeveloper = lens _ssAssociatedWithDeveloper (\...
362
ssAssociatedWithDeveloper :: Lens' StudentSubmission (Maybe Bool) ssAssociatedWithDeveloper = lens _ssAssociatedWithDeveloper (\ s a -> s{_ssAssociatedWithDeveloper = a})
178
ssAssociatedWithDeveloper = lens _ssAssociatedWithDeveloper (\ s a -> s{_ssAssociatedWithDeveloper = a})
112
true
true
2
9
48
57
27
30
null
null
fredmorcos/attic
snippets/haskell/trees.hs
isc
treeFold :: (b -> b -> b) -> (a -> b) -> Tree a -> b treeFold fb fl = g where g (Leaf x) = fl x g (Branch l r) = fb (g l) (g r)
145
treeFold :: (b -> b -> b) -> (a -> b) -> Tree a -> b treeFold fb fl = g where g (Leaf x) = fl x g (Branch l r) = fb (g l) (g r)
145
treeFold fb fl = g where g (Leaf x) = fl x g (Branch l r) = fb (g l) (g r)
92
false
true
0
9
55
101
50
51
null
null
damoxc/ganeti
src/Ganeti/Utils.hs
gpl-2.0
exitIfEmpty s [] = exitErr s
31
exitIfEmpty s [] = exitErr s
31
exitIfEmpty s [] = exitErr s
31
false
false
0
6
8
16
7
9
null
null
bos/wreq
Network/Wreq/Lens.hs
bsd-3-clause
-- | A lens onto the hostname portion of a proxy configuration. proxyHost :: Lens' Proxy ByteString proxyHost = TH.proxyHost
124
proxyHost :: Lens' Proxy ByteString proxyHost = TH.proxyHost
60
proxyHost = TH.proxyHost
24
true
true
0
5
19
19
10
9
null
null
bacher09/darkplaces-text
src/DarkPlaces/Text/Types.hs
gpl-2.0
isTextData :: DPTextToken a -> Bool isTextData = not . isColor
62
isTextData :: DPTextToken a -> Bool isTextData = not . isColor
62
isTextData = not . isColor
26
false
true
0
6
10
22
11
11
null
null
onponomarev/ganeti
src/Ganeti/MaintD/Server.hs
bsd-2-clause
-- | Prepare function for luxid. prepMain :: PrepFn CheckResult PrepResult prepMain opts _ = httpConfFromOpts GanetiMaintd opts
127
prepMain :: PrepFn CheckResult PrepResult prepMain opts _ = httpConfFromOpts GanetiMaintd opts
94
prepMain opts _ = httpConfFromOpts GanetiMaintd opts
52
true
true
0
5
17
27
13
14
null
null
Chobbes/Juicy.Pixels
src/Codec/Picture/Jpg.hs
bsd-3-clause
encodeInt st ssss n = writeBits' st (fromIntegral $ n - 1) (fromIntegral ssss)
86
encodeInt st ssss n = writeBits' st (fromIntegral $ n - 1) (fromIntegral ssss)
86
encodeInt st ssss n = writeBits' st (fromIntegral $ n - 1) (fromIntegral ssss)
86
false
false
0
8
21
37
18
19
null
null
b1g3ar5/Spreadsheet
SpreadsheetTest.hs
mit
{------------------------------------------------------------------------------------------------------------- CODE GRAVEYARD --------------------------------------------------------------------------------------------------------------} e1 :: CellFn e1 = nval 18 `eadd` nval 24
281
e1 :: CellFn e1 = nval 18 `eadd` nval 24
40
e1 = nval 18 `eadd` nval 24
27
true
true
0
6
16
30
14
16
null
null
plaprade/aeson
Data/Aeson/TH.hs
bsd-3-clause
mkParseJSON :: Options -- ^ Encoding options. -> Name -- ^ Name of the encoded type. -> Q Exp mkParseJSON opts name = withType name (\_ cons -> consFromJSON name opts cons)
200
mkParseJSON :: Options -- ^ Encoding options. -> Name -- ^ Name of the encoded type. -> Q Exp mkParseJSON opts name = withType name (\_ cons -> consFromJSON name opts cons)
200
mkParseJSON opts name = withType name (\_ cons -> consFromJSON name opts cons)
82
false
true
0
8
59
51
26
25
null
null
brendanhay/gogol
gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types/Product.hs
mpl-2.0
-- | List of \`QuotaLimit\` definitions for the service. qLimits :: Lens' Quota [QuotaLimit] qLimits = lens _qLimits (\ s a -> s{_qLimits = a}) . _Default . _Coerce
172
qLimits :: Lens' Quota [QuotaLimit] qLimits = lens _qLimits (\ s a -> s{_qLimits = a}) . _Default . _Coerce
115
qLimits = lens _qLimits (\ s a -> s{_qLimits = a}) . _Default . _Coerce
79
true
true
0
11
36
53
28
25
null
null
rockdragon/julia-programming
code/haskell/Actions.hs
mit
numbers :: [Int] numbers = [1..10]
34
numbers :: [Int] numbers = [1..10]
34
numbers = [1..10]
17
false
true
0
7
5
26
12
14
null
null
elieux/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
doTrashStmts :: WriterT LlvmAccum LlvmM () doTrashStmts = do stmts <- lift getTrashStmts tell $ LlvmAccum stmts mempty
126
doTrashStmts :: WriterT LlvmAccum LlvmM () doTrashStmts = do stmts <- lift getTrashStmts tell $ LlvmAccum stmts mempty
126
doTrashStmts = do stmts <- lift getTrashStmts tell $ LlvmAccum stmts mempty
83
false
true
1
9
25
47
19
28
null
null
JPMoresmau/BuildWrapper
src/Language/Haskell/BuildWrapper/GHC.hs
bsd-3-clause
tokenType ITdeprecated_prag="P"
32
tokenType ITdeprecated_prag="P"
32
tokenType ITdeprecated_prag="P"
32
false
false
0
4
2
10
4
6
null
null
mthvedt/hbridge
src/Solver.hs
epl-1.0
-- A trick: a set of 4 moves printTrick :: (IDeal d, Show b) => [(Line (DDState d), b)] -> [Char] printTrick pms = blockOutState finall center where [firstl, _, _, finall] = fst <$> pms firstp = currpos firstl firstMover = rotate (-1) $ hotseat firstp winner = fromJust . highPlayer...
836
printTrick :: (IDeal d, Show b) => [(Line (DDState d), b)] -> [Char] printTrick pms = blockOutState finall center where [firstl, _, _, finall] = fst <$> pms firstp = currpos firstl firstMover = rotate (-1) $ hotseat firstp winner = fromJust . highPlayer $ currpos finall m...
807
printTrick pms = blockOutState finall center where [firstl, _, _, finall] = fst <$> pms firstp = currpos firstl firstMover = rotate (-1) $ hotseat firstp winner = fromJust . highPlayer $ currpos finall movesByDir = take 4 . drop (4 - fromEnum firstMover) . cycle $ show . ...
738
true
true
14
12
283
348
168
180
null
null
TomMD/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
pcDataConWithFixity' :: Bool -> Name -> Unique -> [TyVar] -> [Type] -> TyCon -> DataCon -- The Name should be in the DataName name space; it's the name -- of the DataCon itself. pcDataConWithFixity' declared_infix dc_name wrk_key tyvars arg_tys tycon = data_con where data_con = mkDataCon dc_name declared_infix...
1,463
pcDataConWithFixity' :: Bool -> Name -> Unique -> [TyVar] -> [Type] -> TyCon -> DataCon pcDataConWithFixity' declared_infix dc_name wrk_key tyvars arg_tys tycon = data_con where data_con = mkDataCon dc_name declared_infix (map (const no_bang) arg_tys) [] -- No labelled field...
1,372
pcDataConWithFixity' declared_infix dc_name wrk_key tyvars arg_tys tycon = data_con where data_con = mkDataCon dc_name declared_infix (map (const no_bang) arg_tys) [] -- No labelled fields tyvars [] -- No existential type variables ...
1,284
true
true
0
10
559
218
114
104
null
null
ucsd-progsys/nanomaly
src/NanoML/Classify.hs
bsd-3-clause
typePat :: MonadEval m => Pat -> m (Type, [(Var, Type)]) -- TODO: NEED CTS!!!! typePat = \case VarPat _ v -> do t <- TVar <$> freshTVar return (t, [(v,t)]) LitPat _ l -> do t <- makeType $ typeOfLit l return (t, []) IntervalPat _ l1 l2 -> do t1 <- makeType $ typeOfLit l1 t2 <- makeType $ t...
2,021
typePat :: MonadEval m => Pat -> m (Type, [(Var, Type)]) typePat = \case VarPat _ v -> do t <- TVar <$> freshTVar return (t, [(v,t)]) LitPat _ l -> do t <- makeType $ typeOfLit l return (t, []) IntervalPat _ l1 l2 -> do t1 <- makeType $ typeOfLit l1 t2 <- makeType $ typeOfLit l2 -- try...
1,999
typePat = \case VarPat _ v -> do t <- TVar <$> freshTVar return (t, [(v,t)]) LitPat _ l -> do t <- makeType $ typeOfLit l return (t, []) IntervalPat _ l1 l2 -> do t1 <- makeType $ typeOfLit l1 t2 <- makeType $ typeOfLit l2 -- tryUnify t1 t2 emitCt t1 t2 return (t1, []) ConsPa...
1,942
true
true
0
19
647
955
464
491
null
null
remyoudompheng/hs-language-go
tests/TestMain.hs
gpl-3.0
testLexFile :: String -> TestTree testLexFile fname = testCase ("lex "++fname) a where a = do source <- readFile fname let tokens = goTokenize source mapM_ return tokens
201
testLexFile :: String -> TestTree testLexFile fname = testCase ("lex "++fname) a where a = do source <- readFile fname let tokens = goTokenize source mapM_ return tokens
201
testLexFile fname = testCase ("lex "++fname) a where a = do source <- readFile fname let tokens = goTokenize source mapM_ return tokens
167
false
true
1
11
59
77
32
45
null
null
gereeter/simple-regions
src/Data/Resource/Handle.hs
mit
hSetEcho :: (MonadSafe m, MonadIO m) => Handle s -> Bool -> RegionT s m () hSetEcho h echo = withResource h (\h' -> liftIO $ IO.hSetEcho h' echo)
145
hSetEcho :: (MonadSafe m, MonadIO m) => Handle s -> Bool -> RegionT s m () hSetEcho h echo = withResource h (\h' -> liftIO $ IO.hSetEcho h' echo)
145
hSetEcho h echo = withResource h (\h' -> liftIO $ IO.hSetEcho h' echo)
70
false
true
0
10
28
81
38
43
null
null
alphaHeavy/cabal
cabal-install/Distribution/Client/HttpUtils.hs
bsd-3-clause
uri2proxy :: URI -> Maybe Proxy uri2proxy uri@URI{ uriScheme = "http:" , uriAuthority = Just (URIAuth auth' host port) } = Just (Proxy (host ++ port) auth) where auth = if null auth' then Nothing else Just (AuthBasic "" usr pwd uri) (usr,pwd'...
451
uri2proxy :: URI -> Maybe Proxy uri2proxy uri@URI{ uriScheme = "http:" , uriAuthority = Just (URIAuth auth' host port) } = Just (Proxy (host ++ port) auth) where auth = if null auth' then Nothing else Just (AuthBasic "" usr pwd uri) (usr,pwd'...
451
uri2proxy uri@URI{ uriScheme = "http:" , uriAuthority = Just (URIAuth auth' host port) } = Just (Proxy (host ++ port) auth) where auth = if null auth' then Nothing else Just (AuthBasic "" usr pwd uri) (usr,pwd') = break (==':') auth' ...
419
false
true
2
10
201
160
79
81
null
null
robdockins/orlin
src/Orlin/AST.hs
bsd-2-clause
prebinderToBinder :: PMonad m => PreBinder -> m (Binder Ident) prebinderToBinder (Binder is x) = fmap (Binder is) $ maybe (return Nothing) (fmap Just . preexprToExpr) x
171
prebinderToBinder :: PMonad m => PreBinder -> m (Binder Ident) prebinderToBinder (Binder is x) = fmap (Binder is) $ maybe (return Nothing) (fmap Just . preexprToExpr) x
171
prebinderToBinder (Binder is x) = fmap (Binder is) $ maybe (return Nothing) (fmap Just . preexprToExpr) x
108
false
true
0
9
29
78
37
41
null
null
habbler/GridFlowCover
test/Test.hs
bsd-3-clause
testGrid2 = Grid (7,6) [EndPoints (0,0) (6,5) ]
47
testGrid2 = Grid (7,6) [EndPoints (0,0) (6,5) ]
47
testGrid2 = Grid (7,6) [EndPoints (0,0) (6,5) ]
47
false
false
1
7
7
41
21
20
null
null
wavewave/madgraph-auto
test/madgraphRun.hs
gpl-3.0
-- | getScriptSetup :: IO ScriptSetup getScriptSetup = do homedir <- getHomeDirectory mdldir <- (</> "template") <$> PModel.getDataDir rundir <- (</> "template") <$> PMadGraph.getDataDir return $ SS { modeltmpldir = mdldir , runtmpldir = rundir , sandboxdir = homedir </> "temp/montecarl...
556
getScriptSetup :: IO ScriptSetup getScriptSetup = do homedir <- getHomeDirectory mdldir <- (</> "template") <$> PModel.getDataDir rundir <- (</> "template") <$> PMadGraph.getDataDir return $ SS { modeltmpldir = mdldir , runtmpldir = rundir , sandboxdir = homedir </> "temp/montecarlo/sandb...
549
getScriptSetup = do homedir <- getHomeDirectory mdldir <- (</> "template") <$> PModel.getDataDir rundir <- (</> "template") <$> PMadGraph.getDataDir return $ SS { modeltmpldir = mdldir , runtmpldir = rundir , sandboxdir = homedir </> "temp/montecarlo/sandbox" , mg5base = homedir...
516
true
true
0
10
151
126
72
54
null
null
phischu/fragnix
builtins/base/GHC.Conc.Sync.hs
bsd-3-clause
yield :: IO () yield = IO $ \s -> case (yield# s) of s1 -> (# s1, () #) {- | 'labelThread' stores a string as identifier for this thread if you built a RTS with debugging support. This identifier will be used in the debugging output to make distinction of different threads easier (otherwise you only have the thread...
541
yield :: IO () yield = IO $ \s -> case (yield# s) of s1 -> (# s1, () #) {- | 'labelThread' stores a string as identifier for this thread if you built a RTS with debugging support. This identifier will be used in the debugging output to make distinction of different threads easier (otherwise you only have the thread...
541
yield = IO $ \s -> case (yield# s) of s1 -> (# s1, () #) {- | 'labelThread' stores a string as identifier for this thread if you built a RTS with debugging support. This identifier will be used in the debugging output to make distinction of different threads easier (otherwise you only have the thread state object\'...
526
false
true
0
11
91
49
26
23
null
null
nikita-volkov/postgresql-binary
tasty/Main/Gens.hs
mit
microsUTCTime :: Gen UTCTime microsUTCTime = localTimeToUTC <$> timeZone <*> microsLocalTime
94
microsUTCTime :: Gen UTCTime microsUTCTime = localTimeToUTC <$> timeZone <*> microsLocalTime
94
microsUTCTime = localTimeToUTC <$> timeZone <*> microsLocalTime
65
false
true
0
6
12
22
11
11
null
null
tom-szczarkowski/matasano-crypto-puzzles-solutions
third-party/galois/Data/Digest/Pure/SHA.hs
mit
sha384 :: ByteString -> Digest SHA512State sha384 bs_in = Digest bs_out where bs_pad = padSHA512 bs_in fstate = runSHA initialSHA384State processSHA512Block bs_pad bs_out = runPut $! synthesizeSHA384 fstate -- |For those for whom only the biggest hashes will do, this computes the -- SHA-512 hash of the given By...
380
sha384 :: ByteString -> Digest SHA512State sha384 bs_in = Digest bs_out where bs_pad = padSHA512 bs_in fstate = runSHA initialSHA384State processSHA512Block bs_pad bs_out = runPut $! synthesizeSHA384 fstate -- |For those for whom only the biggest hashes will do, this computes the -- SHA-512 hash of the given By...
380
sha384 bs_in = Digest bs_out where bs_pad = padSHA512 bs_in fstate = runSHA initialSHA384State processSHA512Block bs_pad bs_out = runPut $! synthesizeSHA384 fstate -- |For those for whom only the biggest hashes will do, this computes the -- SHA-512 hash of the given ByteString. The output will be 64 bytes, or -...
337
false
true
4
7
67
74
32
42
null
null
kmels/tersus
Tersus/DataTypes/TApplication.hs
bsd-2-clause
tAppIdentifier appid = ("tapp" .> appid <. "identifier")
57
tAppIdentifier appid = ("tapp" .> appid <. "identifier")
57
tAppIdentifier appid = ("tapp" .> appid <. "identifier")
57
false
false
0
7
8
20
10
10
null
null
yu-i9/thih
src/Thih/Static/Prelude.hs
bsd-3-clause
rangeMfun = "range" :>: (Forall [Star] ([isIn1 cIx (TGen 0)] :=> (TAp (TAp tTuple2 (TGen 0)) (TGen 0) `fn` TAp tList (TGen 0))))
180
rangeMfun = "range" :>: (Forall [Star] ([isIn1 cIx (TGen 0)] :=> (TAp (TAp tTuple2 (TGen 0)) (TGen 0) `fn` TAp tList (TGen 0))))
180
rangeMfun = "range" :>: (Forall [Star] ([isIn1 cIx (TGen 0)] :=> (TAp (TAp tTuple2 (TGen 0)) (TGen 0) `fn` TAp tList (TGen 0))))
180
false
false
1
17
74
91
45
46
null
null
nkoep/dotfiles
xmonad/.xmonad/xmonad.hs
apache-2.0
-- Add support for fullscreen videos in Firefox. addNETSupported :: Atom -> X () addNETSupported x = withDisplay $ \dpy -> do r <- asks theRoot a_NET_SUPPORTED <- getAtom "_NET_SUPPORTED" a <- getAtom "ATOM" liftIO $ do sup <- (join . maybeToList) <$> getWindowProper...
473
addNETSupported :: Atom -> X () addNETSupported x = withDisplay $ \dpy -> do r <- asks theRoot a_NET_SUPPORTED <- getAtom "_NET_SUPPORTED" a <- getAtom "ATOM" liftIO $ do sup <- (join . maybeToList) <$> getWindowProperty32 dpy a_NET_SUPPORTED r when (fromInteg...
424
addNETSupported x = withDisplay $ \dpy -> do r <- asks theRoot a_NET_SUPPORTED <- getAtom "_NET_SUPPORTED" a <- getAtom "ATOM" liftIO $ do sup <- (join . maybeToList) <$> getWindowProperty32 dpy a_NET_SUPPORTED r when (fromIntegral x `notElem` sup) $ ...
392
true
true
0
16
129
136
64
72
null
null
DaMSL/K3
src/Language/K3/Codegen/CPP/Primitives.hs
apache-2.0
getKTypeP :: K3 Expression -> Maybe (K3 Type) getKTypeP e = case e @~ \case { EType _ -> True; _ -> False } of { Just (EType t) -> Just t; Nothing -> Nothing }
159
getKTypeP :: K3 Expression -> Maybe (K3 Type) getKTypeP e = case e @~ \case { EType _ -> True; _ -> False } of { Just (EType t) -> Just t; Nothing -> Nothing }
159
getKTypeP e = case e @~ \case { EType _ -> True; _ -> False } of { Just (EType t) -> Just t; Nothing -> Nothing }
113
false
true
0
10
35
89
44
45
null
null
rahulmutt/ghcvm
compiler/Eta/Main/GhcMake.hs
bsd-3-clause
depanal :: GhcMonad m => [ModuleName] -- ^ excluded modules -> Bool -- ^ allow duplicate roots -> m ModuleGraph depanal excluded_mods allow_dup_roots = do hsc_env <- getSession let dflags = hsc_dflags hsc_env targets = hsc_targets hsc_env old_graph = ...
1,698
depanal :: GhcMonad m => [ModuleName] -- ^ excluded modules -> Bool -- ^ allow duplicate roots -> m ModuleGraph depanal excluded_mods allow_dup_roots = do hsc_env <- getSession let dflags = hsc_dflags hsc_env targets = hsc_targets hsc_env old_graph = ...
1,698
depanal excluded_mods allow_dup_roots = do hsc_env <- getSession let dflags = hsc_dflags hsc_env targets = hsc_targets hsc_env old_graph = hsc_mod_graph hsc_env liftIO $ showPass dflags "Chasing dependencies" liftIO $ debugTraceMsg dflags 2 (hcat [ text "Chasing modules...
1,549
false
true
0
16
380
225
112
113
null
null
nbloomf/st-haskell
src/STH/Lib/List.hs
gpl-3.0
fromSparseList :: a -> [(a,Int)] -> [a] fromSparseList x [] = []
64
fromSparseList :: a -> [(a,Int)] -> [a] fromSparseList x [] = []
64
fromSparseList x [] = []
24
false
true
0
8
11
40
22
18
null
null
greenrd/sort-dli
src/Main.hs
bsd-3-clause
contentToText :: Content -> Text contentToText (ContentText t) = t
66
contentToText :: Content -> Text contentToText (ContentText t) = t
66
contentToText (ContentText t) = t
33
false
true
0
9
9
30
13
17
null
null
phischu/fragnix
tests/packages/scotty/Network.Sendfile.Linux.hs
bsd-3-clause
---------------------------------------------------------------- -- | -- Simple binding for sendfile() of Linux. -- Used system calls: -- -- - EntireFile -- open(), stat(), sendfile(), and close() -- -- - PartOfFile -- open(), sendfile(), and close() -- -- If the size of the file is unknown when sending the entire f...
909
sendfile :: Socket -> FilePath -> FileRange -> IO () -> IO () sendfile sock path range hook = bracket setup teardown $ \fd -> sendfileFd sock fd range hook where setup = openFd path ReadOnly Nothing defaultFileFlags{nonBlock=True} teardown = closeFd
263
sendfile sock path range hook = bracket setup teardown $ \fd -> sendfileFd sock fd range hook where setup = openFd path ReadOnly Nothing defaultFileFlags{nonBlock=True} teardown = closeFd
201
true
true
0
10
166
115
65
50
null
null
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32F427/RCC.hs
bsd-3-clause
regRCC_AHB3ENR :: BitDataReg RCC_AHB3ENR regRCC_AHB3ENR = mkBitDataRegNamed (rcc_periph_base + 0x38) "rcc_ahb3enr"
114
regRCC_AHB3ENR :: BitDataReg RCC_AHB3ENR regRCC_AHB3ENR = mkBitDataRegNamed (rcc_periph_base + 0x38) "rcc_ahb3enr"
114
regRCC_AHB3ENR = mkBitDataRegNamed (rcc_periph_base + 0x38) "rcc_ahb3enr"
73
false
true
0
7
10
26
13
13
null
null
leshchevds/ganeti
test/hs/Test/Ganeti/PartialParams.hs
bsd-2-clause
-- | Checks for serialisation idempotence. testFillParamsLaw1 :: (PartialParams f p, Show f, Eq f) => f -> p -> Property testFillParamsLaw1 f p = fillParams (fillParams f p) p ==? fillParams f p
213
testFillParamsLaw1 :: (PartialParams f p, Show f, Eq f) => f -> p -> Property testFillParamsLaw1 f p = fillParams (fillParams f p) p ==? fillParams f p
170
testFillParamsLaw1 f p = fillParams (fillParams f p) p ==? fillParams f p
73
true
true
0
8
52
70
35
35
null
null
LeifW/rdf4h
src/Text/RDF/RDF4H/TurtleParser.hs
bsd-3-clause
in_range :: Char -> [(Char, Char)] -> Bool in_range c = any (\(c1, c2) -> c >= c1 && c <= c2)
93
in_range :: Char -> [(Char, Char)] -> Bool in_range c = any (\(c1, c2) -> c >= c1 && c <= c2)
93
in_range c = any (\(c1, c2) -> c >= c1 && c <= c2)
50
false
true
0
10
21
60
33
27
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
ssMasterCandidatesCerts :: String ssMasterCandidatesCerts = "master_candidates_certs"
85
ssMasterCandidatesCerts :: String ssMasterCandidatesCerts = "master_candidates_certs"
85
ssMasterCandidatesCerts = "master_candidates_certs"
51
false
true
0
6
5
18
7
11
null
null
ublubu/shapes
shapes/src/Physics/Linear.hs
mit
crosszV2 :: V2 -> Double -> V2 crosszV2 (V2 ax ay) (D# bz) = V2 x y where x = ay *## bz y = negateDouble# (ax *## bz)
127
crosszV2 :: V2 -> Double -> V2 crosszV2 (V2 ax ay) (D# bz) = V2 x y where x = ay *## bz y = negateDouble# (ax *## bz)
127
crosszV2 (V2 ax ay) (D# bz) = V2 x y where x = ay *## bz y = negateDouble# (ax *## bz)
96
false
true
1
8
38
71
35
36
null
null
noinia/virtual-persistent-fs
src/Data/FileSystem/Internal.hs
bsd-3-clause
unsafeTraverseTopDown :: Applicative f => (a -> f b) -> FSTree t m a -> f (FSTree t m b) unsafeTraverseTopDown f (File n a) = (File n) <$> f a
153
unsafeTraverseTopDown :: Applicative f => (a -> f b) -> FSTree t m a -> f (FSTree t m b) unsafeTraverseTopDown f (File n a) = (File n) <$> f a
153
unsafeTraverseTopDown f (File n a) = (File n) <$> f a
64
false
true
0
10
41
82
39
43
null
null
Bodigrim/fast-digits
tests/Tests.hs
gpl-3.0
undigitsD :: Int -> [Int] -> Integer undigitsD base ns = D.unDigits (toInteger base) (map toInteger ns)
103
undigitsD :: Int -> [Int] -> Integer undigitsD base ns = D.unDigits (toInteger base) (map toInteger ns)
103
undigitsD base ns = D.unDigits (toInteger base) (map toInteger ns)
66
false
true
0
7
16
48
24
24
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
jobjectPrimTyConKey = mkPreludeTyConUnique 81
45
jobjectPrimTyConKey = mkPreludeTyConUnique 81
45
jobjectPrimTyConKey = mkPreludeTyConUnique 81
45
false
false
1
5
3
12
4
8
null
null
23Skidoo/xmlhtml
src/Text/XmlHtml/XML/Parse.hs
bsd-3-clause
piTarget :: Parser () piTarget = do n <- name when (T.map toLower n == "xml") $ fail "xml declaration can't occur here" ------------------------------------------------------------------------------
208
piTarget :: Parser () piTarget = do n <- name when (T.map toLower n == "xml") $ fail "xml declaration can't occur here" ------------------------------------------------------------------------------
208
piTarget = do n <- name when (T.map toLower n == "xml") $ fail "xml declaration can't occur here" ------------------------------------------------------------------------------
186
false
true
0
12
33
51
24
27
null
null
tjakway/blackjack-simulator
src/Jakway/Blackjack/IO/DatabaseCommon.hs
mit
dropTables :: IConnection a => a -> TableNames -> IO () dropTables conn tableNames = mapM_ (flipInner2 run conn []) dropTableStatements >> commit conn --CASCADE is postgres-specific #ifdef BUILD_POSTGRESQL where dropTableStatements = [ "BEGIN TRANSACTION", "DROP ...
1,145
dropTables :: IConnection a => a -> TableNames -> IO () dropTables conn tableNames = mapM_ (flipInner2 run conn []) dropTableStatements >> commit conn --CASCADE is postgres-specific #ifdef BUILD_POSTGRESQL where dropTableStatements = [ "BEGIN TRANSACTION", "DROP ...
1,145
dropTables conn tableNames = mapM_ (flipInner2 run conn []) dropTableStatements >> commit conn --CASCADE is postgres-specific #ifdef BUILD_POSTGRESQL where dropTableStatements = [ "BEGIN TRANSACTION", "DROP TABLE IF EXISTS cards CASCADE", ...
1,089
false
true
0
11
434
132
70
62
null
null
jwiegley/ghc-release
libraries/containers/Data/Map/Base.hs
gpl-3.0
fromListConstr :: Constr fromListConstr = mkConstr mapDataType "fromList" [] Prefix
83
fromListConstr :: Constr fromListConstr = mkConstr mapDataType "fromList" [] Prefix
83
fromListConstr = mkConstr mapDataType "fromList" [] Prefix
58
false
true
0
6
9
28
12
16
null
null
thielema/wxhaskell
wx/src/Graphics/UI/WX/Controls.hs
lgpl-2.1
-- | Create a multi-line text rich-text control with a certain wrap mode -- Enables font and color settings on windows, while being equal to 'textCtrl' -- on other platforms. Note: the 'wrap' and 'alignment' -- have to be set at creation time or the default to 'WrapNone' and 'AlignLeft' respectively. -- -- * Instances:...
657
textCtrlRich :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) textCtrlRich parent props = textCtrlEx parent (wxTE_MULTILINE .+. getRichTE2) props
154
textCtrlRich parent props = textCtrlEx parent (wxTE_MULTILINE .+. getRichTE2) props
85
true
true
0
11
108
74
40
34
null
null
DaMSL/K3
src/Language/K3/TypeSystem/Manifestation/Monad.hs
apache-2.0
usingBoundType :: BoundType -> ManifestM a -> ManifestM a usingBoundType bt x = do env <- ask let env' = env { envBoundType = bt } local (const env') x -- |Performs a computation in the dual bound type. This is used when a type -- must be constructed in a contravariant position.
288
usingBoundType :: BoundType -> ManifestM a -> ManifestM a usingBoundType bt x = do env <- ask let env' = env { envBoundType = bt } local (const env') x -- |Performs a computation in the dual bound type. This is used when a type -- must be constructed in a contravariant position.
288
usingBoundType bt x = do env <- ask let env' = env { envBoundType = bt } local (const env') x -- |Performs a computation in the dual bound type. This is used when a type -- must be constructed in a contravariant position.
230
false
true
0
12
61
75
35
40
null
null
andrewaguiar/s99-haskell
p12.hs
mit
ecode [(0, a)] = []
20
decode [(0, a)] = []
20
decode [(0, a)] = []
20
false
false
0
7
5
20
11
9
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo IndexOffAddrOp_Float = mkGenPrimOp (fsLit "indexFloatOffAddr#") [] [addrPrimTy, intPrimTy] (floatPrimTy)
116
primOpInfo IndexOffAddrOp_Float = mkGenPrimOp (fsLit "indexFloatOffAddr#") [] [addrPrimTy, intPrimTy] (floatPrimTy)
116
primOpInfo IndexOffAddrOp_Float = mkGenPrimOp (fsLit "indexFloatOffAddr#") [] [addrPrimTy, intPrimTy] (floatPrimTy)
116
false
false
0
7
10
35
18
17
null
null
chemist/russian-morphology
BuildDict.hs
bsd-3-clause
convertParadigms :: Paradigms -> TParadigms convertParadigms = V.map fun where fun = map (\(x,y,z) -> (decodeUtf8 x, decodeUtf8 y, z))
138
convertParadigms :: Paradigms -> TParadigms convertParadigms = V.map fun where fun = map (\(x,y,z) -> (decodeUtf8 x, decodeUtf8 y, z))
138
convertParadigms = V.map fun where fun = map (\(x,y,z) -> (decodeUtf8 x, decodeUtf8 y, z))
94
false
true
0
9
23
63
34
29
null
null
brendanhay/pagerduty
src/Control/Monad/Trans/PagerDuty.hs
mpl-2.0
scoped :: MonadReader (Env s) m => (Env s -> m a) -> m a scoped f = ask >>= f
77
scoped :: MonadReader (Env s) m => (Env s -> m a) -> m a scoped f = ask >>= f
77
scoped f = ask >>= f
20
false
true
0
9
20
57
26
31
null
null
JacquesCarette/literate-scientific-software
code/drasil-gool/GOOL/Drasil/LanguageRenderer/LanguagePolymorphic.hs
bsd-2-clause
setMethod :: (RenderSym repr) => VS (repr (Variable repr)) -> MS (repr (Method repr)) setMethod v = zoom lensMStoVS v >>= (\vr -> S.method (setterName $ variableName vr) public dynamic S.void [S.param v] setBody) where setBody = S.oneLiner $ S.objVarSelf v &= S.valueOf v
279
setMethod :: (RenderSym repr) => VS (repr (Variable repr)) -> MS (repr (Method repr)) setMethod v = zoom lensMStoVS v >>= (\vr -> S.method (setterName $ variableName vr) public dynamic S.void [S.param v] setBody) where setBody = S.oneLiner $ S.objVarSelf v &= S.valueOf v
279
setMethod v = zoom lensMStoVS v >>= (\vr -> S.method (setterName $ variableName vr) public dynamic S.void [S.param v] setBody) where setBody = S.oneLiner $ S.objVarSelf v &= S.valueOf v
190
false
true
1
12
51
144
68
76
null
null
IreneKnapp/Faction
faction/Distribution/Client/Utils.hs
bsd-3-clause
inDir :: Maybe FilePath -> IO () -> IO () inDir Nothing m = m
61
inDir :: Maybe FilePath -> IO () -> IO () inDir Nothing m = m
61
inDir Nothing m = m
19
false
true
0
8
14
37
17
20
null
null
ennocramer/hindent
src/HIndent/Styles/ChrisDone.hs
bsd-3-clause
-- | Is an expression flat? isFlatExp :: Exp NodeInfo -> Bool isFlatExp (Lambda _ _ e) = isFlatExp e
100
isFlatExp :: Exp NodeInfo -> Bool isFlatExp (Lambda _ _ e) = isFlatExp e
72
isFlatExp (Lambda _ _ e) = isFlatExp e
38
true
true
0
7
19
35
17
18
null
null
selectel/mongoDB-haskell
Database/MongoDB/Query.hs
apache-2.0
insertAll :: (MonadIO m) => Collection -> [Document] -> Action m [Value] -- ^ Insert documents into collection and return their \"_id\" values, which are created automatically if not supplied. If a document fails to be inserted (eg. due to duplicate key) then remaining docs are still inserted. LastError is set if any d...
380
insertAll :: (MonadIO m) => Collection -> [Document] -> Action m [Value] insertAll = insert' [KeepGoing]
104
insertAll = insert' [KeepGoing]
31
true
true
0
10
62
51
26
25
null
null
JanAhrens/yesod-auth-xing
lib/Yesod/Auth/XING.hs
bsd-3-clause
writeTokenToSession :: YesodAuth m => Text -> Credential -> GHandler s m () writeTokenToSession name credential = do setSessionBS (name `mappend` "Token") (token credential) setSessionBS (name `mappend` "Secret") (tokenSecret credential)
249
writeTokenToSession :: YesodAuth m => Text -> Credential -> GHandler s m () writeTokenToSession name credential = do setSessionBS (name `mappend` "Token") (token credential) setSessionBS (name `mappend` "Secret") (tokenSecret credential)
249
writeTokenToSession name credential = do setSessionBS (name `mappend` "Token") (token credential) setSessionBS (name `mappend` "Secret") (tokenSecret credential)
165
false
true
0
10
41
91
44
47
null
null
gergoerdi/metafun
src/Language/Kiff/Typing/State.hs
gpl-3.0
withCons :: [(VarName, Ty)] -> Typing a -> Typing a withCons cons = Typing . local (\ ctx@Ctx{conmap = conmap} -> ctx{conmap = conmap `Map.union` (Map.fromList cons)}) . erws
174
withCons :: [(VarName, Ty)] -> Typing a -> Typing a withCons cons = Typing . local (\ ctx@Ctx{conmap = conmap} -> ctx{conmap = conmap `Map.union` (Map.fromList cons)}) . erws
174
withCons cons = Typing . local (\ ctx@Ctx{conmap = conmap} -> ctx{conmap = conmap `Map.union` (Map.fromList cons)}) . erws
122
false
true
0
15
28
97
51
46
null
null
andersjel/haskell-text-and-plots
src/Text/DocL.hs
mit
-- | Polymorphic version of 'col'. This allows, for instance, 'Int' and 'String' -- values to be used in plots. It is up to the caller to ensure that the values -- make sense to <http://c3js.org/ C3.js>. col' :: ToObj b => String -> (a -> b) -> Column a col' h f = Column h (toObj . f)
285
col' :: ToObj b => String -> (a -> b) -> Column a col' h f = Column h (toObj . f)
81
col' h f = Column h (toObj . f)
31
true
true
0
10
58
61
30
31
null
null
gentoo-haskell/haskell-updater
Output.hs
gpl-3.0
-- Print a list of packages, with a description of what they are. pkgListPrintLn :: Verbosity -> String -> [Package] -> IO () pkgListPrintLn v desc pkgs = do if null pkgs then say v $ unwords ["No", desc, "packages found!"] else do say v $ unwords ["Found the following" ...
400
pkgListPrintLn :: Verbosity -> String -> [Package] -> IO () pkgListPrintLn v desc pkgs = do if null pkgs then say v $ unwords ["No", desc, "packages found!"] else do say v $ unwords ["Found the following" , desc, "packages:"] printList v printPkg pkgs ...
334
pkgListPrintLn v desc pkgs = do if null pkgs then say v $ unwords ["No", desc, "packages found!"] else do say v $ unwords ["Found the following" , desc, "packages:"] printList v printPkg pkgs say v ""
274
true
true
0
13
133
117
56
61
null
null
niswegmann/copilot-core
src/Copilot/Core/External.hs
bsd-3-clause
-------------------------------------------------------------------------------- externVars :: Spec -> [ExtVar] externVars = nubBy eqExt . toList . all externVarsExpr where eqExt :: ExtVar -> ExtVar -> Bool eqExt ExtVar { externVarName = name1 } ExtVar { externVarName = name2 } = name1 == name2
306
externVars :: Spec -> [ExtVar] externVars = nubBy eqExt . toList . all externVarsExpr where eqExt :: ExtVar -> ExtVar -> Bool eqExt ExtVar { externVarName = name1 } ExtVar { externVarName = name2 } = name1 == name2
224
externVars = nubBy eqExt . toList . all externVarsExpr where eqExt :: ExtVar -> ExtVar -> Bool eqExt ExtVar { externVarName = name1 } ExtVar { externVarName = name2 } = name1 == name2
193
true
true
0
8
50
81
42
39
null
null
Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes
yesod/Handler/ProductVariantList.hs
gpl-3.0
getProductVariantListR :: Handler Value getProductVariantListR = do prods <- runDB $ selectList [] [Asc ProductVariantProduct, Asc ProductVariantSku] returnJson $ object ["productVariant" .= prods]
213
getProductVariantListR :: Handler Value getProductVariantListR = do prods <- runDB $ selectList [] [Asc ProductVariantProduct, Asc ProductVariantSku] returnJson $ object ["productVariant" .= prods]
213
getProductVariantListR = do prods <- runDB $ selectList [] [Asc ProductVariantProduct, Asc ProductVariantSku] returnJson $ object ["productVariant" .= prods]
173
false
true
0
12
38
67
30
37
null
null
tolysz/prepare-ghcjs
spec-lts8/ghci/GHCi/RemoteTypes.hs
bsd-3-clause
fromRemotePtr :: RemotePtr a -> Ptr a fromRemotePtr (RemotePtr p) = wordPtrToPtr (fromIntegral p)
97
fromRemotePtr :: RemotePtr a -> Ptr a fromRemotePtr (RemotePtr p) = wordPtrToPtr (fromIntegral p)
97
fromRemotePtr (RemotePtr p) = wordPtrToPtr (fromIntegral p)
59
false
true
0
7
13
39
18
21
null
null
liamoc/tea-hs
Tea/Input.hs
bsd-3-clause
sdlKey SDL.SDLK_KP9 = KeyPad9
38
sdlKey SDL.SDLK_KP9 = KeyPad9
38
sdlKey SDL.SDLK_KP9 = KeyPad9
38
false
false
0
6
12
11
5
6
null
null
mettekou/ghc
compiler/types/Type.hs
bsd-3-clause
isCoercionTy :: Type -> Bool isCoercionTy (CoercionTy _) = True
63
isCoercionTy :: Type -> Bool isCoercionTy (CoercionTy _) = True
63
isCoercionTy (CoercionTy _) = True
34
false
true
0
7
9
24
12
12
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/ARB/query_buffer_object.txt ARB_query_buffer_object> extension supported? -- Note that in the presence of multiple contexts with different capabilities, -- this might be wrong. Use 'glGetARBQueryBufferObject' in those cases instead. gl_ARB_query_buffer_object :: Bool g...
394
gl_ARB_query_buffer_object :: Bool gl_ARB_query_buffer_object = member "GL_ARB_query_buffer_object" extensions
110
gl_ARB_query_buffer_object = member "GL_ARB_query_buffer_object" extensions
75
true
true
0
5
38
19
11
8
null
null
mstksg/expr-gadt
src/Data/ExprGADT/Eval.hs
bsd-3-clause
elimForall :: forall n. ExprTy n -> Maybe (ExprTy n) elimForall = elimForallWith $ \ix -> case ix of FZ -> Nothing FS ix' -> Just ix'
211
elimForall :: forall n. ExprTy n -> Maybe (ExprTy n) elimForall = elimForallWith $ \ix -> case ix of FZ -> Nothing FS ix' -> Just ix'
211
elimForall = elimForallWith $ \ix -> case ix of FZ -> Nothing FS ix' -> Just ix'
158
false
true
0
10
104
68
32
36
null
null