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
minamiyama1994/T-shirt-creator
dist/build/autogen/Paths_TS.hs
gpl-3.0
version :: Version version = Version {versionBranch = [0,0,0], versionTags = []}
80
version :: Version version = Version {versionBranch = [0,0,0], versionTags = []}
80
version = Version {versionBranch = [0,0,0], versionTags = []}
61
false
true
0
8
11
46
24
22
null
null
gibiansky/IHaskell
src/IHaskell/Eval/Evaluate.hs
mit
requiredGlobalImports :: [String] requiredGlobalImports = [ "import qualified Prelude as IHaskellPrelude" , "import qualified System.Directory as IHaskellDirectory" , "import qualified System.Posix.IO as IHaskellIO" , "import qualified System.IO as IHaskellSysIO" , "import qualified Language.Haskell.TH as IHa...
332
requiredGlobalImports :: [String] requiredGlobalImports = [ "import qualified Prelude as IHaskellPrelude" , "import qualified System.Directory as IHaskellDirectory" , "import qualified System.Posix.IO as IHaskellIO" , "import qualified System.IO as IHaskellSysIO" , "import qualified Language.Haskell.TH as IHa...
332
requiredGlobalImports = [ "import qualified Prelude as IHaskellPrelude" , "import qualified System.Directory as IHaskellDirectory" , "import qualified System.Posix.IO as IHaskellIO" , "import qualified System.IO as IHaskellSysIO" , "import qualified Language.Haskell.TH as IHaskellTH" ]
298
false
true
0
5
47
29
18
11
null
null
energyflowanalysis/efa-2.1
hlint/efa2.hs
bsd-3-clause
warn "ge length" = length x >= length y ==> void x >= void y where note = "this comparison is lazy"
99
warn "ge length" = length x >= length y ==> void x >= void y where note = "this comparison is lazy"
99
warn "ge length" = length x >= length y ==> void x >= void y where note = "this comparison is lazy"
99
false
false
0
8
21
40
18
22
null
null
supermitch/learn-haskell
real-world-haskell/ch03/Tree.hs
mit
-- We don't have null, for a tree with no children -- Instead we use the no-argument Empty constructor. simpleTree = Node "parent" (Node "left child" Empty Empty) (Node "right child" Empty Empty)
223
simpleTree = Node "parent" (Node "left child" Empty Empty) (Node "right child" Empty Empty)
118
simpleTree = Node "parent" (Node "left child" Empty Empty) (Node "right child" Empty Empty)
118
true
false
1
6
60
40
18
22
null
null
nishiuramakoto/logiku
test/Handler/PrologSpec.hs
gpl-3.0
goals22 :: PrologIO [Goal] goals22 = do l <- getFreeVar return [ reverseList (plist [a,b,c,d,e]) l ]
105
goals22 :: PrologIO [Goal] goals22 = do l <- getFreeVar return [ reverseList (plist [a,b,c,d,e]) l ]
105
goals22 = do l <- getFreeVar return [ reverseList (plist [a,b,c,d,e]) l ]
78
false
true
0
13
21
65
32
33
null
null
hdgarrood/scotty-fay
test/Main.hs
mit
test_configuringBasePath :: H.Assertion test_configuringBasePath = assertEq "/js" $ (configBasePath . buildConfig $ (under "/js" . from "src"))
155
test_configuringBasePath :: H.Assertion test_configuringBasePath = assertEq "/js" $ (configBasePath . buildConfig $ (under "/js" . from "src"))
155
test_configuringBasePath = assertEq "/js" $ (configBasePath . buildConfig $ (under "/js" . from "src"))
115
false
true
0
10
28
44
22
22
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkGrepQ1= verify checkShouldUseGrepQ "[[ $(foo | grep bar) ]]"
70
prop_checkGrepQ1= verify checkShouldUseGrepQ "[[ $(foo | grep bar) ]]"
70
prop_checkGrepQ1= verify checkShouldUseGrepQ "[[ $(foo | grep bar) ]]"
70
false
false
1
5
8
15
5
10
null
null
dmp1ce/Haskell-Programming-Exercises
Chapter 29/iniParser.hs
unlicense
maybeSuccess :: Result a -> Maybe a maybeSuccess (Success a) = Just a
69
maybeSuccess :: Result a -> Maybe a maybeSuccess (Success a) = Just a
69
maybeSuccess (Success a) = Just a
33
false
true
0
7
12
33
15
18
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The sort order per column. Later specifications are used when values are -- equal in the earlier specifications. bfSortSpecs :: Lens' BasicFilter [SortSpec] bfSortSpecs = lens _bfSortSpecs (\ s a -> s{_bfSortSpecs = a}) . _Default . _Coerce
259
bfSortSpecs :: Lens' BasicFilter [SortSpec] bfSortSpecs = lens _bfSortSpecs (\ s a -> s{_bfSortSpecs = a}) . _Default . _Coerce
141
bfSortSpecs = lens _bfSortSpecs (\ s a -> s{_bfSortSpecs = a}) . _Default . _Coerce
97
true
true
2
9
53
59
29
30
null
null
michaelt/streaming-bytestring
Data/ByteString/Streaming/Char8.hs
bsd-3-clause
-- | /O(1)/ Extract the first element of a ByteString, which may be non-empty head :: Monad m => ByteString m r -> m (Of (Maybe Char) r) head = liftM (\(m:>r) -> fmap w2c m :> r) . R.head
187
head :: Monad m => ByteString m r -> m (Of (Maybe Char) r) head = liftM (\(m:>r) -> fmap w2c m :> r) . R.head
109
head = liftM (\(m:>r) -> fmap w2c m :> r) . R.head
50
true
true
0
11
39
78
39
39
null
null
nushio3/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprGRHS ctxt (GRHS guards body) = sep [vbar <+> interpp'SP guards, pp_rhs ctxt body]
85
pprGRHS ctxt (GRHS guards body) = sep [vbar <+> interpp'SP guards, pp_rhs ctxt body]
85
pprGRHS ctxt (GRHS guards body) = sep [vbar <+> interpp'SP guards, pp_rhs ctxt body]
85
false
false
0
8
14
40
19
21
null
null
hlian/basilica
Database/Users.hs
mit
getUserByEmail :: Connection -> EmailAddress -> IO (Maybe User) getUserByEmail conn email = listToMaybe <$> fmap toUser <$> quickQuery' conn query [toSql email] where query = "select * from users where email = ?"
216
getUserByEmail :: Connection -> EmailAddress -> IO (Maybe User) getUserByEmail conn email = listToMaybe <$> fmap toUser <$> quickQuery' conn query [toSql email] where query = "select * from users where email = ?"
216
getUserByEmail conn email = listToMaybe <$> fmap toUser <$> quickQuery' conn query [toSql email] where query = "select * from users where email = ?"
152
false
true
0
9
37
65
31
34
null
null
Cortlandd/haskell-opencv
doc/images.hs
bsd-3-clause
bikes_512x341 :: Flower_512x341 bikes_512x341 = smallerKodakImg bikes_768x512
77
bikes_512x341 :: Flower_512x341 bikes_512x341 = smallerKodakImg bikes_768x512
77
bikes_512x341 = smallerKodakImg bikes_768x512
45
false
true
0
5
6
14
7
7
null
null
ciderpunx/57-exercises-for-programmers
src/P37PasswordGen.hs
gpl-3.0
mkPass :: Int -> Int -> Int -> IO String mkPass l s n = do ss <- get s syms ns <- get n nums cs <- get c chrs shuffle (ss ++ ns ++ cs) where c = l - s - n
176
mkPass :: Int -> Int -> Int -> IO String mkPass l s n = do ss <- get s syms ns <- get n nums cs <- get c chrs shuffle (ss ++ ns ++ cs) where c = l - s - n
176
mkPass l s n = do ss <- get s syms ns <- get n nums cs <- get c chrs shuffle (ss ++ ns ++ cs) where c = l - s - n
135
false
true
0
10
66
102
47
55
null
null
torrlane/haskell_learning
src/Hl/Csv/Model.hs
bsd-3-clause
parseAccountSummary :: FileContent -> AccountSummary parseAccountSummary accountSummaryContents = AccountSummary {date = asDate, shareHoldings = holdings} where asDate = getAccountSummaryDate accountSummaryContents holdings = parseShareHoldings accountSummaryContents -- | takes the csv content of the accou...
453
parseAccountSummary :: FileContent -> AccountSummary parseAccountSummary accountSummaryContents = AccountSummary {date = asDate, shareHoldings = holdings} where asDate = getAccountSummaryDate accountSummaryContents holdings = parseShareHoldings accountSummaryContents -- | takes the csv content of the accou...
453
parseAccountSummary accountSummaryContents = AccountSummary {date = asDate, shareHoldings = holdings} where asDate = getAccountSummaryDate accountSummaryContents holdings = parseShareHoldings accountSummaryContents -- | takes the csv content of the accountSummary and extracts the date -- TODO - this return...
400
false
true
0
6
68
53
29
24
null
null
achirkin/fgeom
test/MathTests/Polynomial.hs
bsd-3-clause
polyRootsR5 :: Double -> Double -> Double -> Double -> Double -> Double -> Bool polyRootsR5 a b c d e f = all (\y -> abs y <= mag*10e-10) vals where xs = polyRootReal poly poly = [f,e,d,c,b,a] vals = map (polyValueWide poly) xs mag = maximum . map (polyModulus poly) $ xs
310
polyRootsR5 :: Double -> Double -> Double -> Double -> Double -> Double -> Bool polyRootsR5 a b c d e f = all (\y -> abs y <= mag*10e-10) vals where xs = polyRootReal poly poly = [f,e,d,c,b,a] vals = map (polyValueWide poly) xs mag = maximum . map (polyModulus poly) $ xs
309
polyRootsR5 a b c d e f = all (\y -> abs y <= mag*10e-10) vals where xs = polyRootReal poly poly = [f,e,d,c,b,a] vals = map (polyValueWide poly) xs mag = maximum . map (polyModulus poly) $ xs
229
false
true
3
10
92
146
75
71
null
null
NickolayStorm/usatu-learning
Logical programming/CourseWork/Control/control.hs
mit
-- Отбиваемся как б-ги -- Рука, отбиваемая карта, ко33ырь -> вернем отбившую карту findFightBack :: Hand -> Card -> Suit -> Maybe Card findFightBack cards card trump = let -- Лучшей картой будет та, -- которой отбиться меньшая стоимость -> -- отсо...
2,145
findFightBack :: Hand -> Card -> Suit -> Maybe Card findFightBack cards card trump = let -- Лучшей картой будет та, -- которой отбиться меньшая стоимость -> -- отсортируем по достоинству sorts = sortBy ordCard cards re...
2,050
findFightBack cards card trump = let -- Лучшей картой будет та, -- которой отбиться меньшая стоимость -> -- отсортируем по достоинству sorts = sortBy ordCard cards rez = return (sorts, card) <<= ...
1,998
true
true
0
20
1,132
383
197
186
null
null
matterhorn-chat/matterhorn
src/Matterhorn/State/NotifyPrefs.hs
bsd-3-clause
notifyPrefsForm :: TeamId -> UserNotifyProps -> ChannelNotifyProps -> Form ChannelNotifyProps e Name notifyPrefsForm tId globalDefaults = newForm [ checkboxField muteLens (MuteToggleField tId) "Mute channel" , (padTop $ Pad 1) @@= checkboxField channelMentionLens (ChannelMentionsField tId) "Ignore chann...
787
notifyPrefsForm :: TeamId -> UserNotifyProps -> ChannelNotifyProps -> Form ChannelNotifyProps e Name notifyPrefsForm tId globalDefaults = newForm [ checkboxField muteLens (MuteToggleField tId) "Mute channel" , (padTop $ Pad 1) @@= checkboxField channelMentionLens (ChannelMentionsField tId) "Ignore chann...
787
notifyPrefsForm tId globalDefaults = newForm [ checkboxField muteLens (MuteToggleField tId) "Mute channel" , (padTop $ Pad 1) @@= checkboxField channelMentionLens (ChannelMentionsField tId) "Ignore channel mentions" , radioStyle "Desktop notifications" @@= mkNotifyButtons (De...
686
false
true
0
10
165
187
92
95
null
null
expipiplus1/vulkan
src/Vulkan/Extensions/VK_QNX_screen_surface.hs
bsd-3-clause
-- | vkGetPhysicalDeviceScreenPresentationSupportQNX - Query physical device -- for presentation to QNX Screen -- -- = Description -- -- This platform-specific function /can/ be called prior to creating a -- surface. -- -- == Valid Usage (Implicit) -- -- = See Also -- -- <https://www.khronos.org/registry/vulkan/specs/1...
3,656
getPhysicalDeviceScreenPresentationSupportQNX :: forall io . (MonadIO io) => -- | @physicalDevice@ is the physical device. -- -- ...
3,217
getPhysicalDeviceScreenPresentationSupportQNX physicalDevice queueFamilyIndex window = liftIO $ do let vkGetPhysicalDeviceScreenPresentationSupportQNXPtr = pVkGetPhysicalDeviceScreenPresentationSupportQNX (case physicalDevice of PhysicalDevice{instanceCmds} -> instanceCmds) unless (vkGetPhysicalDeviceScreenPresenta...
1,295
true
true
6
11
1,260
217
138
79
null
null
shockkolate/web-routes
Web/Routes/PathInfo.hs
bsd-3-clause
showParseError :: ParseError -> String showParseError pErr = let pos = errorPos pErr posMsg = sourceName pos ++ " (segment " ++ show (sourceLine pos) ++ " character " ++ show (sourceColumn pos) ++ "): " msgs = errorMessages pErr in posMsg ++ showErrorMessages "or" "unknown parse error" "expecting" ...
352
showParseError :: ParseError -> String showParseError pErr = let pos = errorPos pErr posMsg = sourceName pos ++ " (segment " ++ show (sourceLine pos) ++ " character " ++ show (sourceColumn pos) ++ "): " msgs = errorMessages pErr in posMsg ++ showErrorMessages "or" "unknown parse error" "expecting" ...
352
showParseError pErr = let pos = errorPos pErr posMsg = sourceName pos ++ " (segment " ++ show (sourceLine pos) ++ " character " ++ show (sourceColumn pos) ++ "): " msgs = errorMessages pErr in posMsg ++ showErrorMessages "or" "unknown parse error" "expecting" "unexpected" "end of input" msgs
313
false
true
2
15
74
107
50
57
null
null
joelburget/Cologne
Cologne.hs
bsd-3-clause
-- Only outputs if `verbosity` is set to Normal or Loud, not Quiet putStrLnNormal :: String -> IO () putStrLnNormal = whenNormal . putStrLn
139
putStrLnNormal :: String -> IO () putStrLnNormal = whenNormal . putStrLn
72
putStrLnNormal = whenNormal . putStrLn
38
true
true
0
7
23
25
13
12
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProFiles/Insert.hs
mpl-2.0
-- | Multipart request metadata. mpfiPayload :: Lens' ManagementProFilesInsert ProFile mpfiPayload = lens _mpfiPayload (\ s a -> s{_mpfiPayload = a})
151
mpfiPayload :: Lens' ManagementProFilesInsert ProFile mpfiPayload = lens _mpfiPayload (\ s a -> s{_mpfiPayload = a})
118
mpfiPayload = lens _mpfiPayload (\ s a -> s{_mpfiPayload = a})
64
true
true
0
9
22
42
22
20
null
null
benma/bitd
src/BitD/Util/LevelDB.hs
bsd-3-clause
del :: LevelDBKey db key val => db -> key -> ResourceT IO () del db key = LDB.delete (getDb db) def (serializeKey' key)
119
del :: LevelDBKey db key val => db -> key -> ResourceT IO () del db key = LDB.delete (getDb db) def (serializeKey' key)
119
del db key = LDB.delete (getDb db) def (serializeKey' key)
58
false
true
0
9
23
63
30
33
null
null
fosskers/mapalgebra
test/Test.hs
bsd-3-clause
lazybig :: Raster D p 65536 65536 Int lazybig = constant D Par 5
64
lazybig :: Raster D p 65536 65536 Int lazybig = constant D Par 5
64
lazybig = constant D Par 5
26
false
true
0
5
13
29
14
15
null
null
seishun/aoc2016
day7.hs
mit
hasCorrespondingBab ab (x:xs) = hasCorrespondingBab ab xs
57
hasCorrespondingBab ab (x:xs) = hasCorrespondingBab ab xs
57
hasCorrespondingBab ab (x:xs) = hasCorrespondingBab ab xs
57
false
false
0
7
6
23
11
12
null
null
amccausl/Swish
Swish/HaskellRDF/GraphTest.hs
lgpl-2.1
b4 = LV "b4"
12
b4 = LV "b4"
12
b4 = LV "b4"
12
false
false
1
5
3
12
4
8
null
null
zenhack/haskell-capnp
cmd/capnpc-haskell/Trans/CgrToStage1.hs
mit
brandToBrand :: NodeMap Stage1.Node -> Parsed Schema.Brand -> Stage1.Brand brandToBrand nodeMap Schema.Brand{scopes} = C.MapBrand $ M.fromList $ mapMaybe scopeToScope (V.toList scopes) where scopeToScope Schema.Brand'Scope{scopeId, union'} = case union' of Schema.Brand'Scope'unknown' _ -> Nothing ...
1,149
brandToBrand :: NodeMap Stage1.Node -> Parsed Schema.Brand -> Stage1.Brand brandToBrand nodeMap Schema.Brand{scopes} = C.MapBrand $ M.fromList $ mapMaybe scopeToScope (V.toList scopes) where scopeToScope Schema.Brand'Scope{scopeId, union'} = case union' of Schema.Brand'Scope'unknown' _ -> Nothing ...
1,149
brandToBrand nodeMap Schema.Brand{scopes} = C.MapBrand $ M.fromList $ mapMaybe scopeToScope (V.toList scopes) where scopeToScope Schema.Brand'Scope{scopeId, union'} = case union' of Schema.Brand'Scope'unknown' _ -> Nothing Schema.Brand'Scope'inherit -> Nothing Schema.Brand'Scope'bind b...
1,074
false
true
0
23
463
268
129
139
null
null
GaloisInc/halvm-ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
{- Note [getIdFromTrivialExpr] ~~~~~~~~~~~~~~~~~~~~~~~~~~~ When substituting in a breakpoint we need to strip away the type cruft from a trivial expression and get back to the Id. The invariant is that the expression we're substituting was originally trivial according to exprIsTrivial, AND the expression is not a lite...
885
getIdFromTrivialExpr :: CoreExpr -> Id getIdFromTrivialExpr e = fromMaybe (pprPanic "getIdFromTrivialExpr" (ppr e)) (getIdFromTrivialExpr_maybe e)
166
getIdFromTrivialExpr e = fromMaybe (pprPanic "getIdFromTrivialExpr" (ppr e)) (getIdFromTrivialExpr_maybe e)
127
true
true
0
9
149
44
22
22
null
null
adk9/haskell-streamit
Language/StreamIt/Graph.hs
bsd-3-clause
addSplitjoin :: (Elt a, Elt b) => Bool -> StreamIt a b () -> StreamIt a b () addSplitjoin named a = do (id0, node) <- get (id1, node1) <- lift $ evalStream id0 a put (id1, node) addNode $ SplitJoin named node1 -- Split-join composite streams.
252
addSplitjoin :: (Elt a, Elt b) => Bool -> StreamIt a b () -> StreamIt a b () addSplitjoin named a = do (id0, node) <- get (id1, node1) <- lift $ evalStream id0 a put (id1, node) addNode $ SplitJoin named node1 -- Split-join composite streams.
252
addSplitjoin named a = do (id0, node) <- get (id1, node1) <- lift $ evalStream id0 a put (id1, node) addNode $ SplitJoin named node1 -- Split-join composite streams.
175
false
true
0
9
56
117
58
59
null
null
DavidAlphaFox/darcs
src/Darcs/Patch/Conflict.hs
gpl-2.0
commuteNoConflictsFL (q :> p :>: ps) = do p' :> q' <- commuteNoConflicts (q :> p) ps' :> q'' <- commuteNoConflictsFL (q' :> ps) return (p' :>: ps' :> q'')
244
commuteNoConflictsFL (q :> p :>: ps) = do p' :> q' <- commuteNoConflicts (q :> p) ps' :> q'' <- commuteNoConflictsFL (q' :> ps) return (p' :>: ps' :> q'')
244
commuteNoConflictsFL (q :> p :>: ps) = do p' :> q' <- commuteNoConflicts (q :> p) ps' :> q'' <- commuteNoConflictsFL (q' :> ps) return (p' :>: ps' :> q'')
244
false
false
0
10
119
79
38
41
null
null
the-real-blackh/hexpat
test/eachTagStrategy.hs
bsd-3-clause
vitalStats :: (Show tag) => String -> Node tag String -> IO () vitalStats name n = do putStrLn $ "Processing tree: " ++ name display " " "" n
146
vitalStats :: (Show tag) => String -> Node tag String -> IO () vitalStats name n = do putStrLn $ "Processing tree: " ++ name display " " "" n
146
vitalStats name n = do putStrLn $ "Processing tree: " ++ name display " " "" n
83
false
true
0
9
34
64
30
34
null
null
chwthewke/hackup
src/Hackup/Config/Parser.hs
mit
-- 4. shake getField :: (AsValue a) => ConfigField -> (Value -> V b) -> Getter a (V b) getField field p = fieldKey field . to ( fmap runIdentity . parsedFieldM field p . requiredField field)
254
getField :: (AsValue a) => ConfigField -> (Value -> V b) -> Getter a (V b) getField field p = fieldKey field . to ( fmap runIdentity . parsedFieldM field p . requiredField field)
241
getField field p = fieldKey field . to ( fmap runIdentity . parsedFieldM field p . requiredField field)
166
true
true
0
10
100
87
42
45
null
null
dagezi/ToysMat
src/Toys/Mat/Mat.hs
bsd-3-clause
msmul :: (MatField f) => f -> Matrix f -> Matrix f msmul a (Mat vecs) = Mat [vsmul a v | v <- vecs]
99
msmul :: (MatField f) => f -> Matrix f -> Matrix f msmul a (Mat vecs) = Mat [vsmul a v | v <- vecs]
99
msmul a (Mat vecs) = Mat [vsmul a v | v <- vecs]
48
false
true
0
11
24
69
32
37
null
null
spatial-reasoning/homer
homer.hs
bsd-2-clause
-- functions used in the section above showUsage _ = do prg <- getProgName hPutStrLn stderr ( usageInfo ("\nUsage: " ++ prg ++ " [Option]... ConvFile1 CompFile1 " ++ "ConvFile2 CompFile2\n") options) exitWith ExitSuccess
252
showUsage _ = do prg <- getProgName hPutStrLn stderr ( usageInfo ("\nUsage: " ++ prg ++ " [Option]... ConvFile1 CompFile1 " ++ "ConvFile2 CompFile2\n") options) exitWith ExitSuccess
213
showUsage _ = do prg <- getProgName hPutStrLn stderr ( usageInfo ("\nUsage: " ++ prg ++ " [Option]... ConvFile1 CompFile1 " ++ "ConvFile2 CompFile2\n") options) exitWith ExitSuccess
213
true
false
0
13
65
54
25
29
null
null
JakeWheat/Chaos-2010
Games/Chaos2010/Database/Board_size.hs
bsd-3-clause
board_size :: Table Board_size board_size = baseTable "board_size"
66
board_size :: Table Board_size board_size = baseTable "board_size"
66
board_size = baseTable "board_size"
35
false
true
0
6
7
23
9
14
null
null
Courseography/courseography
app/Export/GetImages.hs
gpl-3.0
getTimetableImage :: T.Text -> T.Text -> IO (String, String) getTimetableImage courses termSession = do -- generate 2 random names rand <- randomName let svgFilename = rand ++ ".svg" imageFilename = rand ++ ".png" renderTable svgFilename courses termSession createImageFile svgFilename imageF...
418
getTimetableImage :: T.Text -> T.Text -> IO (String, String) getTimetableImage courses termSession = do -- generate 2 random names rand <- randomName let svgFilename = rand ++ ".svg" imageFilename = rand ++ ".png" renderTable svgFilename courses termSession createImageFile svgFilename imageF...
418
getTimetableImage courses termSession = do -- generate 2 random names rand <- randomName let svgFilename = rand ++ ".svg" imageFilename = rand ++ ".png" renderTable svgFilename courses termSession createImageFile svgFilename imageFilename return (svgFilename, imageFilename) -- | Generat...
357
false
true
0
10
83
98
48
50
null
null
QuickChick/Luck
luck/src/Core/IntRep.hs
mit
printRep (Union rs) = concat $ intersperse "-" $ map printRep rs
64
printRep (Union rs) = concat $ intersperse "-" $ map printRep rs
64
printRep (Union rs) = concat $ intersperse "-" $ map printRep rs
64
false
false
0
7
11
31
14
17
null
null
Deewiant/haschoo
Haschoo/Evaluator/Standard/Boolean.hs
bsd-3-clause
scmIsBoolean [] = tooFewArgs "boolean?"
49
scmIsBoolean [] = tooFewArgs "boolean?"
49
scmIsBoolean [] = tooFewArgs "boolean?"
49
false
false
0
6
14
14
6
8
null
null
ComputationWithBoundedResources/jat
src/Jat/PState/Fun.hs
bsd-3-clause
programLocation (EState _) = []
39
programLocation (EState _) = []
39
programLocation (EState _) = []
39
false
false
0
7
12
17
8
9
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs
mpl-2.0
-- | A link to the KB in the Windows update catalog - -- https:\/\/www.catalog.update.microsoft.com\/ kbURL :: Lens' KnowledgeBase (Maybe Text) kbURL = lens _kbURL (\ s a -> s{_kbURL = a})
188
kbURL :: Lens' KnowledgeBase (Maybe Text) kbURL = lens _kbURL (\ s a -> s{_kbURL = a})
86
kbURL = lens _kbURL (\ s a -> s{_kbURL = a})
44
true
true
1
9
31
50
26
24
null
null
keithodulaigh/Hets
DFOL/AS_DFOL.hs
gpl-2.0
formulaRecForm t = t
20
formulaRecForm t = t
20
formulaRecForm t = t
20
false
false
0
5
3
9
4
5
null
null
haskell-distributed/distributed-process-platform
src/Control/Distributed/Process/Platform/Execution/Exchange/Internal.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Client Facing API -- -------------------------------------------------------------------------------- -- | Posts an arbitrary 'Serializable' datum to an /exchange/. The raw datum...
542
post :: Serializable a => Exchange -> a -> Process () post ex msg = postMessage ex $ Message "" [] (unsafeWrapMessage msg)
122
post ex msg = postMessage ex $ Message "" [] (unsafeWrapMessage msg)
68
true
true
2
10
120
69
34
35
null
null
uduki/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
qCast_QListView :: Object a -> IO (QListView ()) qCast_QListView _qobj = return (objectCast _qobj)
100
qCast_QListView :: Object a -> IO (QListView ()) qCast_QListView _qobj = return (objectCast _qobj)
100
qCast_QListView _qobj = return (objectCast _qobj)
51
false
true
0
10
15
46
20
26
null
null
ExcaliburZero/pixelated-avatar-generator
src/Graphics/Avatars/Pixelated.hs
mit
scaleList factor (x:xs) = replicate factor x ++ scaleList factor xs
67
scaleList factor (x:xs) = replicate factor x ++ scaleList factor xs
67
scaleList factor (x:xs) = replicate factor x ++ scaleList factor xs
67
false
false
0
7
10
32
15
17
null
null
jotrk/xhb-ewmh
src/Graphics/XHB/Ewmh.hs
bsd-2-clause
setNetSupportingWmCheck :: EwmhCtx m => Connection -> WINDOW -> m () setNetSupportingWmCheck c = setRootProp c NET_SUPPORTING_WM_CHECK AtomWINDOW
145
setNetSupportingWmCheck :: EwmhCtx m => Connection -> WINDOW -> m () setNetSupportingWmCheck c = setRootProp c NET_SUPPORTING_WM_CHECK AtomWINDOW
145
setNetSupportingWmCheck c = setRootProp c NET_SUPPORTING_WM_CHECK AtomWINDOW
76
false
true
0
9
17
41
19
22
null
null
jmitchell/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
normaliseTrace :: Bool -> Context -> Env -> TT Name -> TT Name normaliseTrace tr ctxt env t = evalState (do val <- eval tr ctxt [] (map finalEntry env) (finalise t) [] quote 0 val) initEval
211
normaliseTrace :: Bool -> Context -> Env -> TT Name -> TT Name normaliseTrace tr ctxt env t = evalState (do val <- eval tr ctxt [] (map finalEntry env) (finalise t) [] quote 0 val) initEval
211
normaliseTrace tr ctxt env t = evalState (do val <- eval tr ctxt [] (map finalEntry env) (finalise t) [] quote 0 val) initEval
148
false
true
0
12
58
102
46
56
null
null
merijn/parsers
src/Text/Parser/Token.hs
bsd-3-clause
-- | Token parser @semiSep1 p@ parses /one/ or more occurrences of @p@ -- separated by 'semi'. Returns a list of values returned by @p@. semiSep1 :: TokenParsing m => m a -> m [a] semiSep1 p = sepBy1 p semi
206
semiSep1 :: TokenParsing m => m a -> m [a] semiSep1 p = sepBy1 p semi
69
semiSep1 p = sepBy1 p semi
26
true
true
0
8
40
41
20
21
null
null
ltcmelo/psychec
formalism/muC.hs
bsd-3-clause
-------------------------- -- Auxiliary generators -- -------------------------- -- | Keep or drop a constraint. keepOrDrop :: Shape -> Type -> Shape -> Type -> BinOptr -> K keepOrDrop sp1 a1 sp2 a2 op = if (fst sp1 /= fst sp2 && (fst sp1 == P || fst sp2 == P) && fst sp1 /= U && fst sp2 /= U) the...
852
keepOrDrop :: Shape -> Type -> Shape -> Type -> BinOptr -> K keepOrDrop sp1 a1 sp2 a2 op = if (fst sp1 /= fst sp2 && (fst sp1 == P || fst sp2 == P) && fst sp1 /= U && fst sp2 /= U) then T else if (op == Assign) then (a2 :<=: a1) else if (fst sp1 == I && fst sp2 == FP) t...
738
keepOrDrop sp1 a1 sp2 a2 op = if (fst sp1 /= fst sp2 && (fst sp1 == P || fst sp2 == P) && fst sp1 /= U && fst sp2 /= U) then T else if (op == Assign) then (a2 :<=: a1) else if (fst sp1 == I && fst sp2 == FP) then (a1 :<=: a2) else if (fst sp1 == FP && fst sp...
677
true
true
0
16
352
281
149
132
null
null
merijn/parsers
src/Text/Parser/Token.hs
bsd-3-clause
-- | parse a reserved operator or identifier using a given style given 'Text'. reserveText :: (TokenParsing m, Monad m) => IdentifierStyle m -> Text -> m () reserveText s name = token $ try $ do _ <- highlight (_styleReservedHighlight s) $ text name notFollowedBy (_styleLetter s) <?> "end of " ++ show name
314
reserveText :: (TokenParsing m, Monad m) => IdentifierStyle m -> Text -> m () reserveText s name = token $ try $ do _ <- highlight (_styleReservedHighlight s) $ text name notFollowedBy (_styleLetter s) <?> "end of " ++ show name
235
reserveText s name = token $ try $ do _ <- highlight (_styleReservedHighlight s) $ text name notFollowedBy (_styleLetter s) <?> "end of " ++ show name
157
true
true
0
12
61
102
48
54
null
null
shlevy/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
callSize :: Int -- ^ number of value args -> Int -- ^ number of value args that are void -> Int callSize n_val_args voids = 10 * (1 + n_val_args - voids)
158
callSize :: Int -- ^ number of value args -> Int -- ^ number of value args that are void -> Int callSize n_val_args voids = 10 * (1 + n_val_args - voids)
158
callSize n_val_args voids = 10 * (1 + n_val_args - voids)
57
false
true
0
9
37
47
23
24
null
null
nukisman/elm-format-short
parser/src/Parse/Helpers.hs
bsd-3-clause
processAs :: (T.GenTokenParser String u SourceM -> IParser a) -> String -> IParser a processAs processor s = calloutParser s (processor lexer) where calloutParser :: String -> IParser a -> IParser a calloutParser inp p = either (fail . show) return (iParse p inp) lexer :: T.GenTokenParser Strin...
964
processAs :: (T.GenTokenParser String u SourceM -> IParser a) -> String -> IParser a processAs processor s = calloutParser s (processor lexer) where calloutParser :: String -> IParser a -> IParser a calloutParser inp p = either (fail . show) return (iParse p inp) lexer :: T.GenTokenParser Strin...
964
processAs processor s = calloutParser s (processor lexer) where calloutParser :: String -> IParser a -> IParser a calloutParser inp p = either (fail . show) return (iParse p inp) lexer :: T.GenTokenParser String u SourceM lexer = T.makeTokenParser elmDef -- I don't know how many of the...
879
false
true
2
10
306
276
142
134
null
null
vshatskyi/i3wm-config-haskell
app/DSL.hs
bsd-3-clause
raw a = hoist $ Raw a
21
raw a = hoist $ Raw a
21
raw a = hoist $ Raw a
21
false
false
0
6
6
16
7
9
null
null
ocramz/petsc-hs
examples/Test2.hs
gpl-3.0
-- petscInitialized = do -- i <- petscInitialized' -- if i then return True -- else return False -- PETSC_EXTERN PetscErrorCode PetscFinalized(PetscBool *); petscFinalized :: IO Bool petscFinalized = withPtr ( \p -> [C.exp|int{ PetscFinalized($(PetscBool * p)) }|] ) >>= handleErrTup
302
petscFinalized :: IO Bool petscFinalized = withPtr ( \p -> [C.exp|int{ PetscFinalized($(PetscBool * p)) }|] ) >>= handleErrTup
129
petscFinalized = withPtr ( \p -> [C.exp|int{ PetscFinalized($(PetscBool * p)) }|] ) >>= handleErrTup
103
true
true
0
9
59
40
25
15
null
null
emmanueltouzery/cigale-timesheet
tests/SvnSpec.hs
mit
testBasicCommit :: Spec testBasicCommit = it "parses a basic SVN commit" $ do let source = [strT| ------------------------------------------------------------------------ r939 | emmanuelt | 2012-11-15 13:49:13 +0100 (Thu, 15 Nov 2012) | 1 line Changed paths: M ...
1,307
testBasicCommit :: Spec testBasicCommit = it "parses a basic SVN commit" $ do let source = [strT| ------------------------------------------------------------------------ r939 | emmanuelt | 2012-11-15 13:49:13 +0100 (Thu, 15 Nov 2012) | 1 line Changed paths: M ...
1,307
testBasicCommit = it "parses a basic SVN commit" $ do let source = [strT| ------------------------------------------------------------------------ r939 | emmanuelt | 2012-11-15 13:49:13 +0100 (Thu, 15 Nov 2012) | 1 line Changed paths: M /EAndroid/trunk/res/draw...
1,283
false
true
0
15
397
113
62
51
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_POINT_SIZE_MAX_ARB :: GLenum gl_POINT_SIZE_MAX_ARB = 0x8127
62
gl_POINT_SIZE_MAX_ARB :: GLenum gl_POINT_SIZE_MAX_ARB = 0x8127
62
gl_POINT_SIZE_MAX_ARB = 0x8127
30
false
true
0
4
5
11
6
5
null
null
wavewave/gnuplot
src/Graphics/Gnuplot/Simple.hs
bsd-3-clause
yRangeFromAttr (YRange rng) = Just rng
38
yRangeFromAttr (YRange rng) = Just rng
38
yRangeFromAttr (YRange rng) = Just rng
38
false
false
0
7
5
18
8
10
null
null
mcmaniac/ghc
compiler/iface/BinIface.hs
bsd-3-clause
putFastString :: BinDictionary -> BinHandle -> FastString -> IO () putFastString dict bh fs = allocateFastString dict fs >>= put_ bh
132
putFastString :: BinDictionary -> BinHandle -> FastString -> IO () putFastString dict bh fs = allocateFastString dict fs >>= put_ bh
132
putFastString dict bh fs = allocateFastString dict fs >>= put_ bh
65
false
true
0
9
20
47
22
25
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/PackageIndex.hs
gpl-3.0
dependencyCycles :: PackageIndex -> [[InstalledPackageInfo]] dependencyCycles index = [ vs | Graph.CyclicSCC vs <- Graph.stronglyConnComp adjacencyList ] where adjacencyList = [ (pkg, installedPackageId pkg, IPI.depends pkg) | pkg <- allPackages index ] -- | All packages that have immediat...
442
dependencyCycles :: PackageIndex -> [[InstalledPackageInfo]] dependencyCycles index = [ vs | Graph.CyclicSCC vs <- Graph.stronglyConnComp adjacencyList ] where adjacencyList = [ (pkg, installedPackageId pkg, IPI.depends pkg) | pkg <- allPackages index ] -- | All packages that have immediat...
442
dependencyCycles index = [ vs | Graph.CyclicSCC vs <- Graph.stronglyConnComp adjacencyList ] where adjacencyList = [ (pkg, installedPackageId pkg, IPI.depends pkg) | pkg <- allPackages index ] -- | All packages that have immediate dependencies that are not in the index. -- -- Returns such ...
381
false
true
0
9
88
88
47
41
null
null
polux/snippets
MiniSl.hs
apache-2.0
succ t = Appl "S" [t]
21
succ t = Appl "S" [t]
21
succ t = Appl "S" [t]
21
false
false
0
6
5
17
8
9
null
null
stu-smith/project-euler-haskell
Euler-007.hs
mit
isPrime x = (find (> 1) $ factors x) == Nothing
47
isPrime x = (find (> 1) $ factors x) == Nothing
47
isPrime x = (find (> 1) $ factors x) == Nothing
47
false
false
1
9
10
34
15
19
null
null
sitewisely/zellige
src/Data/Geometry/Clip/Internal/LineNichollLeeNicholl.hs
apache-2.0
-- Rotate line 270° clockwise about the origin rotateLine270c :: TypesGeography.GeoStorableLine -> TypesGeography.GeoStorableLine rotateLine270c (TypesGeography.GeoStorableLine p1 p2) = TypesGeography.GeoStorableLine (rotatePoint270c p1) (rotatePoint270c p2)
260
rotateLine270c :: TypesGeography.GeoStorableLine -> TypesGeography.GeoStorableLine rotateLine270c (TypesGeography.GeoStorableLine p1 p2) = TypesGeography.GeoStorableLine (rotatePoint270c p1) (rotatePoint270c p2)
213
rotateLine270c (TypesGeography.GeoStorableLine p1 p2) = TypesGeography.GeoStorableLine (rotatePoint270c p1) (rotatePoint270c p2)
130
true
true
0
7
24
57
27
30
null
null
johannesgerer/buchhaltung
src/Buchhaltung/Importers.hs
mit
p :: ParsecT [Char] u Identity [Char] p = do a <- C.manyTill C.anyChar (C.try $ C.string "\n\"Neu\";") return a -- comdirectVisaImporter :: CustomImport2 -- comdirectVisaImporter = Importer windoof comdirectVisaCSVImport -- paypalImport :: AccountMap -> T.Text -> [ImportedEntry] -- paypalImport accountMapping...
819
p :: ParsecT [Char] u Identity [Char] p = do a <- C.manyTill C.anyChar (C.try $ C.string "\n\"Neu\";") return a -- comdirectVisaImporter :: CustomImport2 -- comdirectVisaImporter = Importer windoof comdirectVisaCSVImport -- paypalImport :: AccountMap -> T.Text -> [ImportedEntry] -- paypalImport accountMapping...
819
p = do a <- C.manyTill C.anyChar (C.try $ C.string "\n\"Neu\";") return a -- comdirectVisaImporter :: CustomImport2 -- comdirectVisaImporter = Importer windoof comdirectVisaCSVImport -- paypalImport :: AccountMap -> T.Text -> [ImportedEntry] -- paypalImport accountMappings = aqbankingCsvImport accountMappings...
781
false
true
0
13
208
79
42
37
null
null
lukexi/stack
src/Stack/Types/Config.hs
bsd-3-clause
extraBinDirs :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Bool -> [Path Abs Dir]) extraBinDirs = do deps <- installationRootDeps local <- installationRootLocal return $ \locals -> if locals then [local </> bindirSuffix, deps </> bindirSuffix] else [deps </> bindi...
434
extraBinDirs :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Bool -> [Path Abs Dir]) extraBinDirs = do deps <- installationRootDeps local <- installationRootLocal return $ \locals -> if locals then [local </> bindirSuffix, deps </> bindirSuffix] else [deps </> bindi...
434
extraBinDirs = do deps <- installationRootDeps local <- installationRootLocal return $ \locals -> if locals then [local </> bindirSuffix, deps </> bindirSuffix] else [deps </> bindirSuffix] -- | Get the minimal environment override, useful for just calling external -- processes like git or ...
323
false
true
0
11
101
109
58
51
null
null
olsner/ghc
compiler/prelude/THNames.hs
bsd-3-clause
letSIdKey = mkPreludeMiscIdUnique 311
44
letSIdKey = mkPreludeMiscIdUnique 311
44
letSIdKey = mkPreludeMiscIdUnique 311
44
false
false
0
5
10
9
4
5
null
null
silky/csound-expression
src/Csound/Air/Wave.hs
bsd-3-clause
urndBlosc a = rndPhs (ublosc' a)
32
urndBlosc a = rndPhs (ublosc' a)
32
urndBlosc a = rndPhs (ublosc' a)
32
false
false
0
7
5
18
8
10
null
null
brendanhay/gogol
gogol-composer/gen/Network/Google/Resource/Composer/Projects/Locations/Environments/Create.hs
mpl-2.0
-- | Creates a value of 'ProjectsLocationsEnvironmentsCreate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'plecParent' -- -- * 'plecXgafv' -- -- * 'plecUploadProtocol' -- -- * 'plecAccessToken' -- -- * 'plecUploadType' -- -- * 'ple...
835
projectsLocationsEnvironmentsCreate :: Text -- ^ 'plecParent' -> Environment -- ^ 'plecPayload' -> ProjectsLocationsEnvironmentsCreate projectsLocationsEnvironmentsCreate pPlecParent_ pPlecPayload_ = ProjectsLocationsEnvironmentsCreate' { _plecParent = pPlecParent_ , _plecXgafv = Nothing , _pl...
482
projectsLocationsEnvironmentsCreate pPlecParent_ pPlecPayload_ = ProjectsLocationsEnvironmentsCreate' { _plecParent = pPlecParent_ , _plecXgafv = Nothing , _plecUploadProtocol = Nothing , _plecAccessToken = Nothing , _plecUploadType = Nothing , _plecPayload = pPlecPayload_ , _plecCallback ...
335
true
true
0
8
150
96
62
34
null
null
urv/fixhs
src/Data/FIX/Spec/FIX42.hs
lgpl-2.1
tStrikeTime :: FIXTag tStrikeTime = FIXTag { tName = "StrikeTime" , tnum = 443 , tparser = toFIXTimestamp , arbitraryValue = FIXTimestamp <$> arbitrary }
166
tStrikeTime :: FIXTag tStrikeTime = FIXTag { tName = "StrikeTime" , tnum = 443 , tparser = toFIXTimestamp , arbitraryValue = FIXTimestamp <$> arbitrary }
166
tStrikeTime = FIXTag { tName = "StrikeTime" , tnum = 443 , tparser = toFIXTimestamp , arbitraryValue = FIXTimestamp <$> arbitrary }
144
false
true
0
8
37
45
26
19
null
null
bennofs/reflex-qml
src/Reflex/QML/Internal.hs
bsd-3-clause
-- | Create an object definition with just this single member. -- This is typically used in conjunction with the Monoid instance, like this: -- @objMember member <> objRegister register <> ...@ objMember :: Applicative m => Member () -> ObjectDef m objMember m = mempty { members = pure m }
290
objMember :: Applicative m => Member () -> ObjectDef m objMember m = mempty { members = pure m }
96
objMember m = mempty { members = pure m }
41
true
true
0
8
51
47
24
23
null
null
strager/b-shake
B/Shake/Directory.hs
bsd-3-clause
partitionM f (x:xs) = do t <- f x (a,b) <- partitionM f xs return $ if t then (x:a,b) else (a,x:b) -- | Remove all empty directories and files that match any of the patterns beneath a directory. -- Some examples: -- -- @ -- 'removeFiles' \"output\" [\"\/\/*\"] -- 'removeFiles' \".\" [\"\/\/*.hi\",\"\/\/...
452
partitionM f (x:xs) = do t <- f x (a,b) <- partitionM f xs return $ if t then (x:a,b) else (a,x:b) -- | Remove all empty directories and files that match any of the patterns beneath a directory. -- Some examples: -- -- @ -- 'removeFiles' \"output\" [\"\/\/*\"] -- 'removeFiles' \".\" [\"\/\/*.hi\",\"\/\/...
452
partitionM f (x:xs) = do t <- f x (a,b) <- partitionM f xs return $ if t then (x:a,b) else (a,x:b) -- | Remove all empty directories and files that match any of the patterns beneath a directory. -- Some examples: -- -- @ -- 'removeFiles' \"output\" [\"\/\/*\"] -- 'removeFiles' \".\" [\"\/\/*.hi\",\"\/\/...
452
false
false
0
10
96
91
52
39
null
null
anammari/pandoc
src/Text/Pandoc/Writers/S5.hs
gpl-2.0
s5Meta :: String s5Meta = "<!-- configuration parameters -->\n<meta name=\"defaultView\" content=\"slideshow\" />\n<meta name=\"controlVis\" content=\"hidden\" />\n"
165
s5Meta :: String s5Meta = "<!-- configuration parameters -->\n<meta name=\"defaultView\" content=\"slideshow\" />\n<meta name=\"controlVis\" content=\"hidden\" />\n"
165
s5Meta = "<!-- configuration parameters -->\n<meta name=\"defaultView\" content=\"slideshow\" />\n<meta name=\"controlVis\" content=\"hidden\" />\n"
148
false
true
0
6
14
18
7
11
null
null
rfranek/duckling
Duckling/Distance/HR/Corpus.hs
bsd-3-clause
allExamples :: [Example] allExamples = concat [ examples (DistanceValue Kilometre 3) [ "3 kilometra" , "3 km" , "3km" , "3k" ] , examples (DistanceValue Kilometre 3.0) [ "3,0 km" ] , examples (DistanceValue Mile 8) ...
531
allExamples :: [Example] allExamples = concat [ examples (DistanceValue Kilometre 3) [ "3 kilometra" , "3 km" , "3km" , "3k" ] , examples (DistanceValue Kilometre 3.0) [ "3,0 km" ] , examples (DistanceValue Mile 8) ...
531
allExamples = concat [ examples (DistanceValue Kilometre 3) [ "3 kilometra" , "3 km" , "3km" , "3k" ] , examples (DistanceValue Kilometre 3.0) [ "3,0 km" ] , examples (DistanceValue Mile 8) [ "8 milja" ...
506
false
true
0
9
253
131
68
63
null
null
dysinger/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types.hs
mpl-2.0
-- | 'DBParameterGroup' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dbpgDBParameterGroupFamily' @::@ 'Maybe' 'Text' -- -- * 'dbpgDBParameterGroupName' @::@ 'Maybe' 'Text' -- -- * 'dbpgDescription' @::@ 'Maybe' 'Text' -- dbparameterGroup :: DBParameterGroup dbparameterGroup = DBPa...
470
dbparameterGroup :: DBParameterGroup dbparameterGroup = DBParameterGroup { _dbpgDBParameterGroupName = Nothing , _dbpgDBParameterGroupFamily = Nothing , _dbpgDescription = Nothing }
210
dbparameterGroup = DBParameterGroup { _dbpgDBParameterGroupName = Nothing , _dbpgDBParameterGroupFamily = Nothing , _dbpgDescription = Nothing }
173
true
true
0
7
82
45
30
15
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F28.hs
bsd-3-clause
ptr_glUnmapBufferOES :: FunPtr (GLenum -> IO GLboolean) ptr_glUnmapBufferOES = unsafePerformIO $ getCommand "glUnmapBufferOES"
126
ptr_glUnmapBufferOES :: FunPtr (GLenum -> IO GLboolean) ptr_glUnmapBufferOES = unsafePerformIO $ getCommand "glUnmapBufferOES"
126
ptr_glUnmapBufferOES = unsafePerformIO $ getCommand "glUnmapBufferOES"
70
false
true
0
8
12
31
15
16
null
null
masashi-y/dynet.hs
examples/rte/Main.hs
bsd-3-clause
makeVocab :: Int -> [(Label, Tree, Tree)] -> [Token] makeVocab threshold ts = foldl makeVocab' [] $ wordCount $ concatMap getTokens2 ts where getTokens2 (_, t1, t2) = getTokens t1 ++ getTokens t2 makeVocab' ws (w, f) = if f >= threshold then w : ws else ws -------- Hyperparameters
296
makeVocab :: Int -> [(Label, Tree, Tree)] -> [Token] makeVocab threshold ts = foldl makeVocab' [] $ wordCount $ concatMap getTokens2 ts where getTokens2 (_, t1, t2) = getTokens t1 ++ getTokens t2 makeVocab' ws (w, f) = if f >= threshold then w : ws else ws -------- Hyperparameters
296
makeVocab threshold ts = foldl makeVocab' [] $ wordCount $ concatMap getTokens2 ts where getTokens2 (_, t1, t2) = getTokens t1 ++ getTokens t2 makeVocab' ws (w, f) = if f >= threshold then w : ws else ws -------- Hyperparameters
243
false
true
0
8
64
121
65
56
null
null
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Types/Refinements.hs
bsd-3-clause
notExprReft = relReft Ne
26
notExprReft = relReft Ne
26
notExprReft = relReft Ne
26
false
false
0
5
5
9
4
5
null
null
sdiehl/ghc
compiler/GHC/Runtime/Layout.hs
bsd-3-clause
----------------------------------------------------------------------------- -- Size-related things fixedHdrSize :: DynFlags -> ByteOff fixedHdrSize dflags = wordsToBytes dflags (fixedHdrSizeW dflags)
202
fixedHdrSize :: DynFlags -> ByteOff fixedHdrSize dflags = wordsToBytes dflags (fixedHdrSizeW dflags)
100
fixedHdrSize dflags = wordsToBytes dflags (fixedHdrSizeW dflags)
64
true
true
0
7
16
31
16
15
null
null
ekmett/ghc
compiler/main/DynFlags.hs
bsd-3-clause
extraGccViaCFlags :: DynFlags -> [String] extraGccViaCFlags dflags = sExtraGccViaCFlags (settings dflags)
109
extraGccViaCFlags :: DynFlags -> [String] extraGccViaCFlags dflags = sExtraGccViaCFlags (settings dflags)
109
extraGccViaCFlags dflags = sExtraGccViaCFlags (settings dflags)
63
false
true
0
8
14
36
16
20
null
null
rblaze/haskell-dbus
examples/introspect.hs
apache-2.0
printIface :: I.Interface -> IO () printIface iface = do putStr " " putStrLn (formatInterfaceName (I.interfaceName iface)) mapM_ printMethod (I.interfaceMethods iface) mapM_ printSignal (I.interfaceSignals iface) mapM_ printProperty (I.interfaceProperties iface) putStrLn ""
302
printIface :: I.Interface -> IO () printIface iface = do putStr " " putStrLn (formatInterfaceName (I.interfaceName iface)) mapM_ printMethod (I.interfaceMethods iface) mapM_ printSignal (I.interfaceSignals iface) mapM_ printProperty (I.interfaceProperties iface) putStrLn ""
302
printIface iface = do putStr " " putStrLn (formatInterfaceName (I.interfaceName iface)) mapM_ printMethod (I.interfaceMethods iface) mapM_ printSignal (I.interfaceSignals iface) mapM_ printProperty (I.interfaceProperties iface) putStrLn ""
267
false
true
0
12
58
105
46
59
null
null
m-alvarez/jhc
src/Ho/ReadSource.hs
mit
langmap = Map.fromList [ "m4" ==> FO.M4, "cpp" ==> FO.Cpp, "foreignfunctioninterface" ==> FO.Ffi, "implicitprelude" ==> FO.Prelude, "unboxedtuples" ==> FO.UnboxedTuples, "unboxedvalues" ==> FO.UnboxedValues, "monomorphismrestriction" ==> FO.MonomorphismRestriction, "explicitforall" ==> F...
736
langmap = Map.fromList [ "m4" ==> FO.M4, "cpp" ==> FO.Cpp, "foreignfunctioninterface" ==> FO.Ffi, "implicitprelude" ==> FO.Prelude, "unboxedtuples" ==> FO.UnboxedTuples, "unboxedvalues" ==> FO.UnboxedValues, "monomorphismrestriction" ==> FO.MonomorphismRestriction, "explicitforall" ==> F...
736
langmap = Map.fromList [ "m4" ==> FO.M4, "cpp" ==> FO.Cpp, "foreignfunctioninterface" ==> FO.Ffi, "implicitprelude" ==> FO.Prelude, "unboxedtuples" ==> FO.UnboxedTuples, "unboxedvalues" ==> FO.UnboxedValues, "monomorphismrestriction" ==> FO.MonomorphismRestriction, "explicitforall" ==> F...
736
false
false
1
8
145
220
115
105
null
null
urbanslug/ghc
compiler/utils/UnVarGraph.hs
bsd-3-clause
neighbors :: UnVarGraph -> Var -> UnVarSet neighbors (UnVarGraph g) v = unionUnVarSets $ concatMap go $ bagToList g where go (CG s) = (if v `elemUnVarSet` s then [s] else []) go (CBPG s1 s2) = (if v `elemUnVarSet` s1 then [s2] else []) ++ (if v `elemUnVarSet` s2 then [s1] else ...
323
neighbors :: UnVarGraph -> Var -> UnVarSet neighbors (UnVarGraph g) v = unionUnVarSets $ concatMap go $ bagToList g where go (CG s) = (if v `elemUnVarSet` s then [s] else []) go (CBPG s1 s2) = (if v `elemUnVarSet` s1 then [s2] else []) ++ (if v `elemUnVarSet` s2 then [s1] else ...
323
neighbors (UnVarGraph g) v = unionUnVarSets $ concatMap go $ bagToList g where go (CG s) = (if v `elemUnVarSet` s then [s] else []) go (CBPG s1 s2) = (if v `elemUnVarSet` s1 then [s2] else []) ++ (if v `elemUnVarSet` s2 then [s1] else [])
280
false
true
1
9
95
147
81
66
null
null
sol/hpack
src/Hpack/Render.hs
mit
renderVersion :: DependencyVersion -> String renderVersion (DependencyVersion _ c) = renderVersionConstraint c
110
renderVersion :: DependencyVersion -> String renderVersion (DependencyVersion _ c) = renderVersionConstraint c
110
renderVersion (DependencyVersion _ c) = renderVersionConstraint c
65
false
true
0
7
11
29
14
15
null
null
np/hlatex
Language/LaTeX/Builder/Math.hs
bsd-3-clause
mit :: MathDecl mit = mathDecl "mit"
36
mit :: MathDecl mit = mathDecl "mit"
36
mit = mathDecl "mit"
20
false
true
0
5
6
14
7
7
null
null
hackern/network-transport-ivc
src/Network/Transport/IVC.hs
mit
createHandler :: XenStore -> MVar TransportState -> EndPointAddress -> EndPointAddress -> String -> IO () createHandler xs ts from to connName = do void . forkIO $ do state <- readMVar ts -- error occur if the endpoint does not exist let Just localendpoint = M.lookup to (localEndPoints st...
1,037
createHandler :: XenStore -> MVar TransportState -> EndPointAddress -> EndPointAddress -> String -> IO () createHandler xs ts from to connName = do void . forkIO $ do state <- readMVar ts -- error occur if the endpoint does not exist let Just localendpoint = M.lookup to (localEndPoints st...
1,037
createHandler xs ts from to connName = do void . forkIO $ do state <- readMVar ts -- error occur if the endpoint does not exist let Just localendpoint = M.lookup to (localEndPoints state) es = localEndPointState localendpoint chan = eventChan localend...
917
false
true
0
19
300
287
136
151
null
null
deggis/CV-geo
src/CV/Geo.hs
bsd-3-clause
chanValue :: GeoImage (Image GrayScale D32) -> Width -> GeoPoint -> Double chanValue i@GeoImage{..} width p = let region = getWGS84MetricBox i width p in realToFrac . IM.average $ region
197
chanValue :: GeoImage (Image GrayScale D32) -> Width -> GeoPoint -> Double chanValue i@GeoImage{..} width p = let region = getWGS84MetricBox i width p in realToFrac . IM.average $ region
197
chanValue i@GeoImage{..} width p = let region = getWGS84MetricBox i width p in realToFrac . IM.average $ region
122
false
true
0
9
40
78
38
40
null
null
allanderek/ipclib
Ipc/Ipc.hs
gpl-2.0
ipcBannerInfo :: [ String ] ipcBannerInfo = [ "** The International PEPA compiler:" , "ipc v" ++ ipcVersion , "Produced on location in/between Edinburgh, " , "Leeds, London, Ludlow, Lucca and Sophia-Antipolis" , "2002-8" , "Contributors:" , " Jeremy Bradley, Allan Clark," , " Stephen Gilmore and F...
389
ipcBannerInfo :: [ String ] ipcBannerInfo = [ "** The International PEPA compiler:" , "ipc v" ++ ipcVersion , "Produced on location in/between Edinburgh, " , "Leeds, London, Ludlow, Lucca and Sophia-Antipolis" , "2002-8" , "Contributors:" , " Jeremy Bradley, Allan Clark," , " Stephen Gilmore and F...
389
ipcBannerInfo = [ "** The International PEPA compiler:" , "ipc v" ++ ipcVersion , "Produced on location in/between Edinburgh, " , "Leeds, London, Ludlow, Lucca and Sophia-Antipolis" , "2002-8" , "Contributors:" , " Jeremy Bradley, Allan Clark," , " Stephen Gilmore and Fragkiskos Gounelas" , "Que...
361
false
true
0
6
80
45
28
17
null
null
Mooophy/DMA
ch02/proj11.hs
mit
e = encrypt sonnet 3
21
e = encrypt sonnet 3
21
e = encrypt sonnet 3
21
false
false
1
5
5
16
5
11
null
null
yigitozkavci/ivy
src/Cenary/Codegen/Context.hs
mit
newEmptyCtx :: Context address newEmptyCtx = Context M.empty
60
newEmptyCtx :: Context address newEmptyCtx = Context M.empty
60
newEmptyCtx = Context M.empty
29
false
true
0
6
7
25
10
15
null
null
timjb/protocol-buffers
hprotoc/Text/ProtocolBuffers/ProtoCompile/Gen.hs
apache-2.0
declToEnum :: EnumInfo -> [Decl] declToEnum ei = [ TypeSig src [Ident "toMaybe'Enum"] (TyFun (TyCon (prelude "Int")) (typeApp "Maybe" (TyCon (unqualName (enumName ei))))) , FunBind (map toEnum'one values ++ [final]) ] where values = enumValues ei ...
487
declToEnum :: EnumInfo -> [Decl] declToEnum ei = [ TypeSig src [Ident "toMaybe'Enum"] (TyFun (TyCon (prelude "Int")) (typeApp "Maybe" (TyCon (unqualName (enumName ei))))) , FunBind (map toEnum'one values ++ [final]) ] where values = enumValues ei ...
487
declToEnum ei = [ TypeSig src [Ident "toMaybe'Enum"] (TyFun (TyCon (prelude "Int")) (typeApp "Maybe" (TyCon (unqualName (enumName ei))))) , FunBind (map toEnum'one values ++ [final]) ] where values = enumValues ei toEnum'one (v,n) = match "toMaybe...
454
false
true
2
16
136
194
93
101
null
null
frantisekfarka/ghc-dsi
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
interesting :: Platform -> Reg -> Bool interesting _ (RegVirtual _) = True
94
interesting :: Platform -> Reg -> Bool interesting _ (RegVirtual _) = True
94
interesting _ (RegVirtual _) = True
55
false
true
0
7
32
30
15
15
null
null
green-haskell/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
-- | Get the flavour of the given 'Ct' ctFlavour :: Ct -> CtFlavour ctFlavour = ctEvFlavour . ctEvidence
104
ctFlavour :: Ct -> CtFlavour ctFlavour = ctEvFlavour . ctEvidence
65
ctFlavour = ctEvFlavour . ctEvidence
36
true
true
0
5
18
20
11
9
null
null
Knewton/rifactor
src/Rifactor/AWS.hs
apache-2.0
comparingResource :: AwsResource -> AwsResource -> Ordering comparingResource (Reserved _ r0) (Reserved _ r1) = comparing (view riInstanceType) r0 r1 <> comparing (view riOfferingType) r0 r1 <> comparing (view riAvailabilityZone) r0 r1 <> comparing (view riProductDescription) r0 r1
290
comparingResource :: AwsResource -> AwsResource -> Ordering comparingResource (Reserved _ r0) (Reserved _ r1) = comparing (view riInstanceType) r0 r1 <> comparing (view riOfferingType) r0 r1 <> comparing (view riAvailabilityZone) r0 r1 <> comparing (view riProductDescription) r0 r1
290
comparingResource (Reserved _ r0) (Reserved _ r1) = comparing (view riInstanceType) r0 r1 <> comparing (view riOfferingType) r0 r1 <> comparing (view riAvailabilityZone) r0 r1 <> comparing (view riProductDescription) r0 r1
230
false
true
0
10
45
104
50
54
null
null
beni55/base-compat
typediff/src/TypeDiff.hs
mit
normalizeConstrainNames :: Type -> Type normalizeConstrainNames t = transformBi f t where f :: QName -> QName f name = case name of Qual (ModuleName "GHC.Base") (Ident "Applicative") -> Qual (ModuleName "Control.Applicative") (Ident "Applicative") Qual (ModuleName "GHC.Base") (Ident "Alternative")...
926
normalizeConstrainNames :: Type -> Type normalizeConstrainNames t = transformBi f t where f :: QName -> QName f name = case name of Qual (ModuleName "GHC.Base") (Ident "Applicative") -> Qual (ModuleName "Control.Applicative") (Ident "Applicative") Qual (ModuleName "GHC.Base") (Ident "Alternative")...
926
normalizeConstrainNames t = transformBi f t where f :: QName -> QName f name = case name of Qual (ModuleName "GHC.Base") (Ident "Applicative") -> Qual (ModuleName "Control.Applicative") (Ident "Applicative") Qual (ModuleName "GHC.Base") (Ident "Alternative") -> Qual (ModuleName "Control.Applicativ...
886
false
true
0
10
160
342
161
181
null
null
rvion/ride
jetpack-gen/src/Gen.hs
bsd-3-clause
parseReexports :: IO [(String, String)] parseReexports = do print (jetpackFolder ++ "imports.md") f <- readFile (jetpackFolder ++ "imports.md") x <- mapM myread $ lines f print " parsed:" print $ "total: " ++ (show.length $ catMaybes x) return $ map (\(Qualified a b) -> (a,b)) (catMaybes x) where myr...
593
parseReexports :: IO [(String, String)] parseReexports = do print (jetpackFolder ++ "imports.md") f <- readFile (jetpackFolder ++ "imports.md") x <- mapM myread $ lines f print " parsed:" print $ "total: " ++ (show.length $ catMaybes x) return $ map (\(Qualified a b) -> (a,b)) (catMaybes x) where myr...
593
parseReexports = do print (jetpackFolder ++ "imports.md") f <- readFile (jetpackFolder ++ "imports.md") x <- mapM myread $ lines f print " parsed:" print $ "total: " ++ (show.length $ catMaybes x) return $ map (\(Qualified a b) -> (a,b)) (catMaybes x) where myread :: String -> IO (Maybe Reexport) ...
553
false
true
0
14
154
259
120
139
null
null
Gabriel439/Haskell-Pipes-Handle-Library
src/Pipes/Reader.hs
bsd-3-clause
{-| Transform a read-only handle to only output elements that satisfy a predicate > Pipes.Prelude.filter f = stream (Pipes.Reader.filter f) -} filter :: Monad m => (a -> Bool) -> Consumer' a m a filter predicate = go where go = do a <- await if (predicate a) then return a ...
332
filter :: Monad m => (a -> Bool) -> Consumer' a m a filter predicate = go where go = do a <- await if (predicate a) then return a else go
184
filter predicate = go where go = do a <- await if (predicate a) then return a else go
132
true
true
0
11
104
74
37
37
null
null
dsorokin/aivika-experiment-chart
examples/TruckHaulingSituation/Experiment.hs
bsd-3-clause
loaderQueueCount = T.queueCount loaderQueue
48
loaderQueueCount = T.queueCount loaderQueue
48
loaderQueueCount = T.queueCount loaderQueue
48
false
false
0
6
8
11
5
6
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/IoTTopicRuleAction.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-sns ittraSns :: Lens' IoTTopicRuleAction (Maybe IoTTopicRuleSnsAction) ittraSns = lens _ioTTopicRuleActionSns (\s a -> s { _ioTTopicRuleActionSns = a })
285
ittraSns :: Lens' IoTTopicRuleAction (Maybe IoTTopicRuleSnsAction) ittraSns = lens _ioTTopicRuleActionSns (\s a -> s { _ioTTopicRuleActionSns = a })
148
ittraSns = lens _ioTTopicRuleActionSns (\s a -> s { _ioTTopicRuleActionSns = a })
81
true
true
1
9
21
50
25
25
null
null
pocketberserker/logict
Control/Monad/Logic.hs
bsd-3-clause
------------------------------------------------------------------------- -- | Extracts all results from a LogicT computation. observeAllT :: Monad m => LogicT m a -> m [a] observeAllT m = unLogicT m (liftM . (:)) (return [])
225
observeAllT :: Monad m => LogicT m a -> m [a] observeAllT m = unLogicT m (liftM . (:)) (return [])
98
observeAllT m = unLogicT m (liftM . (:)) (return [])
52
true
true
0
8
30
62
32
30
null
null
liff/adventofcode-2016
app/Day4.hs
bsd-3-clause
rot :: Int -> Char -> Char rot _ '-' = ' '
42
rot :: Int -> Char -> Char rot _ '-' = ' '
42
rot _ '-' = ' '
15
false
true
0
8
12
30
13
17
null
null
bjpop/blip
blip/src/Repl.hs
bsd-3-clause
withInputState :: (InputState -> Repl a) -> Repl a withInputState f = f =<< (gets repl_inputState)
98
withInputState :: (InputState -> Repl a) -> Repl a withInputState f = f =<< (gets repl_inputState)
98
withInputState f = f =<< (gets repl_inputState)
47
false
true
1
9
15
47
22
25
null
null
athanclark/rose-trees
src/Data/Tree/Set.hs
bsd-3-clause
-- | Bottom-up version isProperSubtreeOf' :: Eq a => SetTree a -> SetTree a -> Bool isProperSubtreeOf' xss (SetTree _ ys) = getAny $ F.foldMap (Any . isSubtreeOf' xss) ys
172
isProperSubtreeOf' :: Eq a => SetTree a -> SetTree a -> Bool isProperSubtreeOf' xss (SetTree _ ys) = getAny $ F.foldMap (Any . isSubtreeOf' xss) ys
149
isProperSubtreeOf' xss (SetTree _ ys) = getAny $ F.foldMap (Any . isSubtreeOf' xss) ys
88
true
true
0
9
31
67
32
35
null
null