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
runjak/carbon-adf
Carbon/Backend/PostgreSQL/Item.hs
gpl-3.0
getItem' :: SqlValue -> Query (Either Error (Item Id)) getItem' i conn = do -- Fetching the basic item entry let getI = "SELECT descriptionid, articleid, acceptanceconditionid, " ++"relationid, discussionid, resultsetid, creation, deletion, " ++"commitmessage, commitauthor FROM items WHERE ite...
2,327
getItem' :: SqlValue -> Query (Either Error (Item Id)) getItem' i conn = do -- Fetching the basic item entry let getI = "SELECT descriptionid, articleid, acceptanceconditionid, " ++"relationid, discussionid, resultsetid, creation, deletion, " ++"commitmessage, commitauthor FROM items WHERE ite...
2,327
getItem' i conn = do -- Fetching the basic item entry let getI = "SELECT descriptionid, articleid, acceptanceconditionid, " ++"relationid, discussionid, resultsetid, creation, deletion, " ++"commitmessage, commitauthor FROM items WHERE itemid = ?" row <- quickQuery' conn getI [i] case row ...
2,272
false
true
0
15
696
628
319
309
null
null
dorchard/camfort
src/Camfort/Specification/Units/InferenceBackend.hs
apache-2.0
-- hmatrix 0.17 changed interface m @@> i = m `atIndex` i
57
m @@> i = m `atIndex` i
23
m @@> i = m `atIndex` i
23
true
false
3
5
11
24
12
12
null
null
jyp/prettiest
paper/BenchmarkXML.hs
gpl-3.0
hpjContent :: Content -> HPJ.Doc hpjContent (Elem e) = hpjXML e
63
hpjContent :: Content -> HPJ.Doc hpjContent (Elem e) = hpjXML e
63
hpjContent (Elem e) = hpjXML e
30
false
true
0
7
10
29
14
15
null
null
annenkov/contracts
Coq/Extraction/contracts-haskell/src/Examples/TranslationExample.hs
mit
trTemplateCut = cutPayoff (transC (fromHoas templateEx))
56
trTemplateCut = cutPayoff (transC (fromHoas templateEx))
56
trTemplateCut = cutPayoff (transC (fromHoas templateEx))
56
false
false
0
9
5
21
10
11
null
null
spikelynch/annales
app/Annales/Empire.hs
bsd-3-clause
yearDesc :: Empire -> TextGenCh yearDesc e = h2 $ sentence $ yearof $ emperor e where yearof Nothing = word "Interregnum" yearof (Just em) = list [ word "Reign of", pName $ em ]
187
yearDesc :: Empire -> TextGenCh yearDesc e = h2 $ sentence $ yearof $ emperor e where yearof Nothing = word "Interregnum" yearof (Just em) = list [ word "Reign of", pName $ em ]
187
yearDesc e = h2 $ sentence $ yearof $ emperor e where yearof Nothing = word "Interregnum" yearof (Just em) = list [ word "Reign of", pName $ em ]
155
false
true
1
7
44
75
37
38
null
null
wayofthepie/neo4j-bolt
src/PackStream/Internal/Message.hs
bsd-3-clause
mkInt32Byte = MarkerByte 0xCA
29
mkInt32Byte = MarkerByte 0xCA
29
mkInt32Byte = MarkerByte 0xCA
29
false
false
0
5
3
9
4
5
null
null
curry-club-aux/haskell-flipdots
src/Graphics/Flipdots.hs
mit
sendImage :: Img -> FlipboardConfig -> IO () sendImage img cfg@(FlipboardConfig _hostname _port dims) = sendImage' (renderImage img dims) cfg
143
sendImage :: Img -> FlipboardConfig -> IO () sendImage img cfg@(FlipboardConfig _hostname _port dims) = sendImage' (renderImage img dims) cfg
143
sendImage img cfg@(FlipboardConfig _hostname _port dims) = sendImage' (renderImage img dims) cfg
98
false
true
0
8
21
55
27
28
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/ModifyVpcAttribute.hs
mpl-2.0
-- | Indicates whether the instances launched in the VPC get DNS hostnames. If -- enabled, instances in the VPC get DNS hostnames; otherwise, they do not. -- -- You can only enable DNS hostnames if you also enable DNS support. mvaEnableDnsHostnames :: Lens' ModifyVpcAttribute (Maybe AttributeBooleanValue) mvaEnableDnsH...
405
mvaEnableDnsHostnames :: Lens' ModifyVpcAttribute (Maybe AttributeBooleanValue) mvaEnableDnsHostnames = lens _mvaEnableDnsHostnames (\s a -> s { _mvaEnableDnsHostnames = a })
178
mvaEnableDnsHostnames = lens _mvaEnableDnsHostnames (\s a -> s { _mvaEnableDnsHostnames = a })
98
true
true
0
9
63
49
28
21
null
null
pjones/thetvdb
Network/API/TheTVDB/Types/Context.hs
mit
-- Helper function to create a URL from a Query. makeURL :: Query query => Context -> query -> URL makeURL c q = T.concat [apiBaseURL, path q (apiKey c) (apiLang c), qStr] where qStr = T.pack $ B.unpack $ renderQuery True $ simpleQueryToQuery (params q) -- Use the HTTP module to make a remote HTTP GET call for the ...
324
makeURL :: Query query => Context -> query -> URL makeURL c q = T.concat [apiBaseURL, path q (apiKey c) (apiLang c), qStr] where qStr = T.pack $ B.unpack $ renderQuery True $ simpleQueryToQuery (params q) -- Use the HTTP module to make a remote HTTP GET call for the API.
275
makeURL c q = T.concat [apiBaseURL, path q (apiKey c) (apiLang c), qStr] where qStr = T.pack $ B.unpack $ renderQuery True $ simpleQueryToQuery (params q) -- Use the HTTP module to make a remote HTTP GET call for the API.
225
true
true
0
9
64
102
51
51
null
null
TurpIF/Drawhub
src/main/Drawhub/Region.hs
mit
pointBimap :: (a -> b) -> (a -> b) -> Point a -> Point b pointBimap fx fy (Point x y) = Point (fx x) (fy y)
107
pointBimap :: (a -> b) -> (a -> b) -> Point a -> Point b pointBimap fx fy (Point x y) = Point (fx x) (fy y)
107
pointBimap fx fy (Point x y) = Point (fx x) (fy y)
50
false
true
0
11
26
79
38
41
null
null
ml9951/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
tupArgPresent :: LHsTupArg id -> Bool tupArgPresent (L _ (Present {})) = True
77
tupArgPresent :: LHsTupArg id -> Bool tupArgPresent (L _ (Present {})) = True
77
tupArgPresent (L _ (Present {})) = True
39
false
true
0
9
12
36
18
18
null
null
ihc/futhark
src/Futhark/Optimise/MemoryBlockMerging/VariableMemory.hs
isc
lookInLambda :: LoreConstraints lore => Lambda lore -> FindM lore () lookInLambda (Lambda params body _) = do forM_ params lookInLParam lookInBody body
171
lookInLambda :: LoreConstraints lore => Lambda lore -> FindM lore () lookInLambda (Lambda params body _) = do forM_ params lookInLParam lookInBody body
171
lookInLambda (Lambda params body _) = do forM_ params lookInLParam lookInBody body
86
false
true
0
8
42
59
26
33
null
null
hdevtools/hdevtools
src/CommandArgs.hs
mit
dummyAdmin :: HDevTools dummyAdmin = Admin { socket = Nothing , ghcOpts = [] , cabalOpts = [] , start_server = False , noDaemon = False , status = False , stop_server = False , debug = False , noStack = False }
267
dummyAdmin :: HDevTools dummyAdmin = Admin { socket = Nothing , ghcOpts = [] , cabalOpts = [] , start_server = False , noDaemon = False , status = False , stop_server = False , debug = False , noStack = False }
267
dummyAdmin = Admin { socket = Nothing , ghcOpts = [] , cabalOpts = [] , start_server = False , noDaemon = False , status = False , stop_server = False , debug = False , noStack = False }
243
false
true
0
7
99
71
45
26
null
null
uduki/hsQt
Qtc/Gui/QTextDocument.hs
bsd-2-clause
setMetaInformation :: QTextDocument a -> ((MetaInformation, String)) -> IO () setMetaInformation x0 (x1, x2) = withObjectPtr x0 $ \cobj_x0 -> withCWString x2 $ \cstr_x2 -> qtc_QTextDocument_setMetaInformation cobj_x0 (toCLong $ qEnum_toInt x1) cstr_x2
261
setMetaInformation :: QTextDocument a -> ((MetaInformation, String)) -> IO () setMetaInformation x0 (x1, x2) = withObjectPtr x0 $ \cobj_x0 -> withCWString x2 $ \cstr_x2 -> qtc_QTextDocument_setMetaInformation cobj_x0 (toCLong $ qEnum_toInt x1) cstr_x2
261
setMetaInformation x0 (x1, x2) = withObjectPtr x0 $ \cobj_x0 -> withCWString x2 $ \cstr_x2 -> qtc_QTextDocument_setMetaInformation cobj_x0 (toCLong $ qEnum_toInt x1) cstr_x2
183
false
true
0
12
41
88
45
43
null
null
bwalkowi/RBT
src/RBT.hs
bsd-3-clause
pushRedToLeft t = t
19
pushRedToLeft t = t
19
pushRedToLeft t = t
19
false
false
0
5
3
9
4
5
null
null
egaburov/funstuff
Haskell/monads/writet1.hs
apache-2.0
half1 :: Int -> Wr Int half1 x = do tell (["I just halved " ++ (show x) ++ "!"]) return (x `div` 2)
115
half1 :: Int -> Wr Int half1 x = do tell (["I just halved " ++ (show x) ++ "!"]) return (x `div` 2)
115
half1 x = do tell (["I just halved " ++ (show x) ++ "!"]) return (x `div` 2)
92
false
true
0
14
39
67
32
35
null
null
alfpark/bond
compiler/src/Language/Bond/Syntax/Util.hs
mit
foldMapType f t@(BT_UserDefined _ args) = f t <> F.foldMap (foldMapType f) args
79
foldMapType f t@(BT_UserDefined _ args) = f t <> F.foldMap (foldMapType f) args
79
foldMapType f t@(BT_UserDefined _ args) = f t <> F.foldMap (foldMapType f) args
79
false
false
0
8
12
42
20
22
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The ID of the spreadsheet the data was retrieved from. bgvrSpreadsheetId :: Lens' BatchGetValuesResponse (Maybe Text) bgvrSpreadsheetId = lens _bgvrSpreadsheetId (\ s a -> s{_bgvrSpreadsheetId = a})
211
bgvrSpreadsheetId :: Lens' BatchGetValuesResponse (Maybe Text) bgvrSpreadsheetId = lens _bgvrSpreadsheetId (\ s a -> s{_bgvrSpreadsheetId = a})
151
bgvrSpreadsheetId = lens _bgvrSpreadsheetId (\ s a -> s{_bgvrSpreadsheetId = a})
88
true
true
1
9
36
52
25
27
null
null
NikolayS/postgrest
src/PostgREST/QueryBuilder.hs
mit
pgFmtSelectItem table (f@(_, jp), Just cast ) = "CAST (" <> pgFmtField table f <> " AS " <> cast <> " )" <> pgFmtAsJsonPath jp
126
pgFmtSelectItem table (f@(_, jp), Just cast ) = "CAST (" <> pgFmtField table f <> " AS " <> cast <> " )" <> pgFmtAsJsonPath jp
126
pgFmtSelectItem table (f@(_, jp), Just cast ) = "CAST (" <> pgFmtField table f <> " AS " <> cast <> " )" <> pgFmtAsJsonPath jp
126
false
false
0
10
25
59
29
30
null
null
danr/hipspec
examples/old-examples/quickspec/ProductiveUseOfFailure.hs
gpl-3.0
prop_T15 :: Nat -> Prop Nat prop_T15 x = x + S x =:= S (x + x)
67
prop_T15 :: Nat -> Prop Nat prop_T15 x = x + S x =:= S (x + x)
67
prop_T15 x = x + S x =:= S (x + x)
39
false
true
0
8
22
42
20
22
null
null
YoshikuniJujo/hake_haskell
examples/testModule/Module2.hs
gpl-3.0
var2 = "var2"
13
var2 = "var2"
13
var2 = "var2"
13
false
false
0
4
2
6
3
3
null
null
thalerjonathan/phd
thesis/code/taglessfinal/src/SIR/Model.hs
gpl-3.0
createSIRStates :: Int -> Int -> Int -> [SIRState] createSIRStates s i r = ss ++ is ++ rs where ss = replicate s Susceptible is = replicate i Infected rs = replicate r Recovered
192
createSIRStates :: Int -> Int -> Int -> [SIRState] createSIRStates s i r = ss ++ is ++ rs where ss = replicate s Susceptible is = replicate i Infected rs = replicate r Recovered
192
createSIRStates s i r = ss ++ is ++ rs where ss = replicate s Susceptible is = replicate i Infected rs = replicate r Recovered
141
false
true
2
8
49
74
37
37
null
null
achernyak/stack
etc/scripts/release.hs
bsd-3-clause
dropDirectoryPrefix :: FilePath -> FilePath -> FilePath dropDirectoryPrefix prefix path = case stripPrefix (toStandard prefix ++ "/") (toStandard path) of Nothing -> error ("dropDirectoryPrefix: cannot drop " ++ show prefix ++ " from " ++ show path) Just stripped -> stripped -- | String representat...
349
dropDirectoryPrefix :: FilePath -> FilePath -> FilePath dropDirectoryPrefix prefix path = case stripPrefix (toStandard prefix ++ "/") (toStandard path) of Nothing -> error ("dropDirectoryPrefix: cannot drop " ++ show prefix ++ " from " ++ show path) Just stripped -> stripped -- | String representat...
349
dropDirectoryPrefix prefix path = case stripPrefix (toStandard prefix ++ "/") (toStandard path) of Nothing -> error ("dropDirectoryPrefix: cannot drop " ++ show prefix ++ " from " ++ show path) Just stripped -> stripped -- | String representation of stack package version.
293
false
true
0
13
69
89
43
46
null
null
tolysz/hs-tls
test-scripts/TestClient.hs
bsd-3-clause
showResultStatus (Skipped _) = "SKIPPED"
40
showResultStatus (Skipped _) = "SKIPPED"
40
showResultStatus (Skipped _) = "SKIPPED"
40
false
false
0
6
4
16
7
9
null
null
tjakway/ghcjvm
utils/genprimopcode/Main.hs
bsd-3-clause
ppType (TyApp (VecTyCon _ pptc) []) = pptc
47
ppType (TyApp (VecTyCon _ pptc) []) = pptc
47
ppType (TyApp (VecTyCon _ pptc) []) = pptc
47
false
false
0
8
12
28
13
15
null
null
tel/enc
src/Data/Encrypted/Internal.hs
mit
b64text :: ByteString -> Text b64text = TE.decodeUtf8 . B64.encode
66
b64text :: ByteString -> Text b64text = TE.decodeUtf8 . B64.encode
66
b64text = TE.decodeUtf8 . B64.encode
36
false
true
0
6
9
23
12
11
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ListPopulationClause' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'lpcTerms' listPopulationClause :: ListPopulationClause listPopulationClause = ListPopulationClause' {_lpcTerms = Nothing}
306
listPopulationClause :: ListPopulationClause listPopulationClause = ListPopulationClause' {_lpcTerms = Nothing}
115
listPopulationClause = ListPopulationClause' {_lpcTerms = Nothing}
66
true
true
0
7
46
31
17
14
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QDateTimeEdit.hs
bsd-2-clause
fMSecSection :: Sections fMSecSection = ifSections $ 2
56
fMSecSection :: Sections fMSecSection = ifSections $ 2
56
fMSecSection = ifSections $ 2
31
false
true
0
6
9
18
8
10
null
null
aburnett88/HSat
tests-src/Test/Problem/Instances/Common/Clauses.hs
mit
mkClausesFromClauseTest1 :: TestTree mkClausesFromClauseTest1 = testProperty ("toList . getvect . mkClausesFromClause c " `equiv` " c") $ property (\clauses -> let val = V.toList . getVectClause $ mkClausesFromClause clauses in clauses === val )
259
mkClausesFromClauseTest1 :: TestTree mkClausesFromClauseTest1 = testProperty ("toList . getvect . mkClausesFromClause c " `equiv` " c") $ property (\clauses -> let val = V.toList . getVectClause $ mkClausesFromClause clauses in clauses === val )
259
mkClausesFromClauseTest1 = testProperty ("toList . getvect . mkClausesFromClause c " `equiv` " c") $ property (\clauses -> let val = V.toList . getVectClause $ mkClausesFromClause clauses in clauses === val )
222
false
true
0
13
47
66
34
32
null
null
marknsikora/euler
euler008/euler008.hs
mit
euler008 :: [Int] -> Int euler008 = maximum . map (product . take 5) . tails
76
euler008 :: [Int] -> Int euler008 = maximum . map (product . take 5) . tails
76
euler008 = maximum . map (product . take 5) . tails
51
false
true
1
9
15
47
21
26
null
null
mlite/hLLVM
src/Llvm/Pass/DataUsage.hs
bsd-3-clause
scanDefine :: (CheckpointMonad m, FuelMonad m, Show g, Ord g, Show a, DataUsageUpdator g a) => IrCxt g -> TlDefine g a -> m (DataUsage g) scanDefine s (TlDefine fn entry graph) = scanGraph formalParamIds entry graph where formalParamIds :: S.Set Lname formalParamIds = let FunSignature { fs_para...
771
scanDefine :: (CheckpointMonad m, FuelMonad m, Show g, Ord g, Show a, DataUsageUpdator g a) => IrCxt g -> TlDefine g a -> m (DataUsage g) scanDefine s (TlDefine fn entry graph) = scanGraph formalParamIds entry graph where formalParamIds :: S.Set Lname formalParamIds = let FunSignature { fs_para...
771
scanDefine s (TlDefine fn entry graph) = scanGraph formalParamIds entry graph where formalParamIds :: S.Set Lname formalParamIds = let FunSignature { fs_params = r} = fi_signature fn in foldl' (\p x -> case x of FunOperandAsRet (DtypeScalarP _) _...
618
false
true
1
15
335
254
122
132
null
null
kojiromike/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
highestFC (PNoImplicits tm) = highestFC tm
48
highestFC (PNoImplicits tm) = highestFC tm
48
highestFC (PNoImplicits tm) = highestFC tm
48
false
false
0
6
11
19
8
11
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/UnApprove.hs
mpl-2.0
-- | The ID of the product. puaProductId :: Lens' ProductsUnApprove Text puaProductId = lens _puaProductId (\ s a -> s{_puaProductId = a})
140
puaProductId :: Lens' ProductsUnApprove Text puaProductId = lens _puaProductId (\ s a -> s{_puaProductId = a})
112
puaProductId = lens _puaProductId (\ s a -> s{_puaProductId = a})
67
true
true
0
9
24
42
22
20
null
null
tpsinnem/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LLSHR (ITFixed ty)) [x, y] = bitOp v "LShr" ty [x, y]
61
doOp v (LLSHR (ITFixed ty)) [x, y] = bitOp v "LShr" ty [x, y]
61
doOp v (LLSHR (ITFixed ty)) [x, y] = bitOp v "LShr" ty [x, y]
61
false
false
0
8
13
49
24
25
null
null
nikita-volkov/hasql-th
library/Hasql/TH/Extraction/ChildExprList.hs
mit
funcTable = \case FuncExprFuncTable a b -> funcExprWindowless a <> optOrdinality b RowsFromFuncTable a b -> rowsfromList a <> optOrdinality b
145
funcTable = \case FuncExprFuncTable a b -> funcExprWindowless a <> optOrdinality b RowsFromFuncTable a b -> rowsfromList a <> optOrdinality b
145
funcTable = \case FuncExprFuncTable a b -> funcExprWindowless a <> optOrdinality b RowsFromFuncTable a b -> rowsfromList a <> optOrdinality b
145
false
false
1
10
24
54
22
32
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F27.hs
bsd-3-clause
ptr_glTextureStorage3DMultisampleEXT :: FunPtr (GLuint -> GLenum -> GLsizei -> GLenum -> GLsizei -> GLsizei -> GLsizei -> GLboolean -> IO ()) ptr_glTextureStorage3DMultisampleEXT = unsafePerformIO $ getCommand "glTextureStorage3DMultisampleEXT"
244
ptr_glTextureStorage3DMultisampleEXT :: FunPtr (GLuint -> GLenum -> GLsizei -> GLenum -> GLsizei -> GLsizei -> GLsizei -> GLboolean -> IO ()) ptr_glTextureStorage3DMultisampleEXT = unsafePerformIO $ getCommand "glTextureStorage3DMultisampleEXT"
244
ptr_glTextureStorage3DMultisampleEXT = unsafePerformIO $ getCommand "glTextureStorage3DMultisampleEXT"
102
false
true
0
16
26
61
30
31
null
null
markborkum/json2rdf-hs
src/JSON2RDF/RDF/Graph.hs
unlicense
setLiteralLanguageTag :: (MonadPlus m) => Maybe T.Text -> RDFLabel -> m RDFLabel setLiteralLanguageTag langTag (PlainLit val _) = return (PlainLit val langTag)
161
setLiteralLanguageTag :: (MonadPlus m) => Maybe T.Text -> RDFLabel -> m RDFLabel setLiteralLanguageTag langTag (PlainLit val _) = return (PlainLit val langTag)
161
setLiteralLanguageTag langTag (PlainLit val _) = return (PlainLit val langTag)
80
false
true
0
8
23
60
29
31
null
null
atomb/dalvik
Dalvik/Printer.hs
bsd-3-clause
insnString _ _ (BinopLit16 RSub dst src i) = mkInsn "rsub-int" [iregStr8 dst, iregStr8 src, "#int " +++ A.int16Dec i] +++ intComm16' (fromIntegral i)
162
insnString _ _ (BinopLit16 RSub dst src i) = mkInsn "rsub-int" [iregStr8 dst, iregStr8 src, "#int " +++ A.int16Dec i] +++ intComm16' (fromIntegral i)
162
insnString _ _ (BinopLit16 RSub dst src i) = mkInsn "rsub-int" [iregStr8 dst, iregStr8 src, "#int " +++ A.int16Dec i] +++ intComm16' (fromIntegral i)
162
false
false
1
9
36
69
31
38
null
null
beni55/aeson
Data/Aeson/Types/Instances.hs
bsd-3-clause
-- | @withBool expected f value@ applies @f@ to the 'Bool' when @value@ is a @Bool@ -- and fails using @'typeMismatch' expected@ otherwise. withBool :: String -> (Bool -> Parser a) -> Value -> Parser a withBool _ f (Bool arr) = f arr
242
withBool :: String -> (Bool -> Parser a) -> Value -> Parser a withBool _ f (Bool arr) = f arr
100
withBool _ f (Bool arr) = f arr
38
true
true
0
11
52
58
28
30
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/monads/2017-06-snoyman-readert-design-pattern/src/HC.hs
unlicense
hctop :: IO () hctop = hspec test
33
hctop :: IO () hctop = hspec test
33
hctop = hspec test
18
false
true
0
6
7
19
9
10
null
null
johnpmayer/elm-compiler
src/Generate/JavaScript.hs
bsd-3-clause
destructuredArgs :: [P.Optimized] -> State Int ([String], [Opt.Def]) destructuredArgs args = do (argVars, maybePatternDefs) <- unzip <$> mapM destructPattern args return (argVars, Maybe.catMaybes maybePatternDefs)
222
destructuredArgs :: [P.Optimized] -> State Int ([String], [Opt.Def]) destructuredArgs args = do (argVars, maybePatternDefs) <- unzip <$> mapM destructPattern args return (argVars, Maybe.catMaybes maybePatternDefs)
222
destructuredArgs args = do (argVars, maybePatternDefs) <- unzip <$> mapM destructPattern args return (argVars, Maybe.catMaybes maybePatternDefs)
153
false
true
0
10
32
81
42
39
null
null
futtetennista/IntroductionToFunctionalProgramming
PiH/src/Calculator.hs
mit
char :: Char -> Parser Char char c = mfilterp (==c)
53
char :: Char -> Parser Char char c = mfilterp (==c)
53
char c = mfilterp (==c)
25
false
true
0
6
12
31
15
16
null
null
hargettp/raft
tests/TestRaft.hs
mit
nameTest :: String -> String -> String nameTest base text = base ++ "-" ++ text
79
nameTest :: String -> String -> String nameTest base text = base ++ "-" ++ text
79
nameTest base text = base ++ "-" ++ text
40
false
true
0
6
15
32
16
16
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1711463 = 2076
34
getValueFromProduct 1711463 = 2076
34
getValueFromProduct 1711463 = 2076
34
false
false
0
5
3
9
4
5
null
null
rvion/ride
jetpack/src/Data/Text/AsT.hs
bsd-3-clause
-- t_stripPrefix :: Text -> Text -> Maybe Text t_stripPrefix = I.stripPrefix
76
t_stripPrefix = I.stripPrefix
29
t_stripPrefix = I.stripPrefix
29
true
false
0
5
11
9
5
4
null
null
blamario/grampa
grammatical-parsers/examples/BooleanTransformations.hs
bsd-2-clause
raise op Blank = op
19
raise op Blank = op
19
raise op Blank = op
19
false
false
1
5
4
16
5
11
null
null
machine-intelligence/Botworld
ct2hs.hs
bsd-3-clause
treeTuple :: Parser Constree treeTuple = treeify <$> bracketed (sepBy1 tdata (spaces *> char ',' <* spaces)) where bracketed = between (char '(' *> spaces) (spaces <* char ')') treeify [] = error "sepBy1 failure" treeify [x] = x treeify (x:xs) = Cons x (treeify xs)
273
treeTuple :: Parser Constree treeTuple = treeify <$> bracketed (sepBy1 tdata (spaces *> char ',' <* spaces)) where bracketed = between (char '(' *> spaces) (spaces <* char ')') treeify [] = error "sepBy1 failure" treeify [x] = x treeify (x:xs) = Cons x (treeify xs)
273
treeTuple = treeify <$> bracketed (sepBy1 tdata (spaces *> char ',' <* spaces)) where bracketed = between (char '(' *> spaces) (spaces <* char ')') treeify [] = error "sepBy1 failure" treeify [x] = x treeify (x:xs) = Cons x (treeify xs)
244
false
true
0
12
53
125
62
63
null
null
davean/waldo
Waldo/CityLoc.hs
bsd-3-clause
riverside = mkCity (( 33.948056) !.! (-117.396111)) 15
57
riverside = mkCity (( 33.948056) !.! (-117.396111)) 15
57
riverside = mkCity (( 33.948056) !.! (-117.396111)) 15
57
false
false
1
9
10
29
14
15
null
null
tjakway/ghcjvm
compiler/utils/UniqDFM.hs
bsd-3-clause
lookupUDFM :: Uniquable key => UniqDFM elt -> key -> Maybe elt lookupUDFM (UDFM m _i) k = taggedFst `fmap` M.lookup (getKey $ getUnique k) m
140
lookupUDFM :: Uniquable key => UniqDFM elt -> key -> Maybe elt lookupUDFM (UDFM m _i) k = taggedFst `fmap` M.lookup (getKey $ getUnique k) m
140
lookupUDFM (UDFM m _i) k = taggedFst `fmap` M.lookup (getKey $ getUnique k) m
77
false
true
0
11
25
72
34
38
null
null
DougBurke/swish
tests/RDFProofTest.hs
lgpl-2.1
query23str :: B.Builder query23str = mconcat [ prefix2 , "?a rel:son ?b . \n" , "?a rel:son ?c . \n" ]
114
query23str :: B.Builder query23str = mconcat [ prefix2 , "?a rel:son ?b . \n" , "?a rel:son ?c . \n" ]
114
query23str = mconcat [ prefix2 , "?a rel:son ?b . \n" , "?a rel:son ?c . \n" ]
90
false
true
0
5
32
25
14
11
null
null
ssaavedra/liquidhaskell
tests/equationalproofs/neg/Axiomatize.hs
bsd-3-clause
applySub :: [(Name, Type)] -> Type -> Type applySub θ t@(VarT v) = fromMaybe t (lookup v θ)
91
applySub :: [(Name, Type)] -> Type -> Type applySub θ t@(VarT v) = fromMaybe t (lookup v θ)
91
applySub θ t@(VarT v) = fromMaybe t (lookup v θ)
48
false
true
0
8
17
55
29
26
null
null
Dridus/alexandria
server/app/ImporterMain.hs
mit
main :: IO () main = importerMain
33
main :: IO () main = importerMain
33
main = importerMain
19
false
true
0
7
6
22
9
13
null
null
danr/hipspec
examples/old-examples/older-examples/Count.hs
gpl-3.0
Z + y = y
13
Z + y = y
13
Z + y = y
13
false
false
0
5
8
12
5
7
null
null
stu-smith/rendering-in-haskell
src/experiment08/Core.hs
mit
magnitude :: NonUnitVector -> Double magnitude = sqrt . magnitudeSquared
76
magnitude :: NonUnitVector -> Double magnitude = sqrt . magnitudeSquared
76
magnitude = sqrt . magnitudeSquared
39
false
true
0
5
13
19
10
9
null
null
GaloisInc/saw-script
src/SAWScript/Value.hs
bsd-3-clause
evaluateTypedTerm :: SharedContext -> TypedTerm -> IO C.Value evaluateTypedTerm sc (TypedTerm (TypedTermSchema schema) trm) = C.runEval mempty . exportValueWithSchema schema =<< evaluate sc trm
195
evaluateTypedTerm :: SharedContext -> TypedTerm -> IO C.Value evaluateTypedTerm sc (TypedTerm (TypedTermSchema schema) trm) = C.runEval mempty . exportValueWithSchema schema =<< evaluate sc trm
195
evaluateTypedTerm sc (TypedTerm (TypedTermSchema schema) trm) = C.runEval mempty . exportValueWithSchema schema =<< evaluate sc trm
133
false
true
0
9
25
64
30
34
null
null
kim/amazonka
amazonka-elb/gen/Network/AWS/ELB/Types.hs
mpl-2.0
-- | 'LoadBalancerDescription' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'lbdAvailabilityZones' @::@ ['Text'] -- -- * 'lbdBackendServerDescriptions' @::@ ['BackendServerDescription'] -- -- * 'lbdCanonicalHostedZoneName' @::@ 'Maybe' 'Text' -- -- * 'lbdCanonicalHostedZoneNameID' ...
1,744
loadBalancerDescription :: LoadBalancerDescription loadBalancerDescription = LoadBalancerDescription { _lbdLoadBalancerName = Nothing , _lbdDNSName = Nothing , _lbdCanonicalHostedZoneName = Nothing , _lbdCanonicalHostedZoneNameID = Nothing , _lbdListenerDescriptions ...
836
loadBalancerDescription = LoadBalancerDescription { _lbdLoadBalancerName = Nothing , _lbdDNSName = Nothing , _lbdCanonicalHostedZoneName = Nothing , _lbdCanonicalHostedZoneNameID = Nothing , _lbdListenerDescriptions = mempty , _lbdPolicies = Not...
785
true
true
0
7
435
149
108
41
null
null
chemouna/99Haskell
src/Problem1.hs
bsd-3-clause
myLast3 = head . reverse
24
myLast3 = head . reverse
24
myLast3 = head . reverse
24
false
false
1
5
4
13
5
8
null
null
spechub/Hets
OWL2/ASKeywords.hs
gpl-2.0
dgBodyS :: String dgBodyS = "DGBody"
36
dgBodyS :: String dgBodyS = "DGBody"
36
dgBodyS = "DGBody"
18
false
true
0
4
5
11
6
5
null
null
mgold/Elm
src/Canonicalize/Environment.hs
bsd-3-clause
toDealiaser :: Environment -> Map.Map String String toDealiaser (Env _ _ unions aliases _) = let dealiasUnion (localName, canonicalSet) = case Set.toList canonicalSet of [canonicalName] -> Just (Var.toString canonicalName, localName) _ -> Nothing dealiasAlias (lo...
820
toDealiaser :: Environment -> Map.Map String String toDealiaser (Env _ _ unions aliases _) = let dealiasUnion (localName, canonicalSet) = case Set.toList canonicalSet of [canonicalName] -> Just (Var.toString canonicalName, localName) _ -> Nothing dealiasAlias (lo...
820
toDealiaser (Env _ _ unions aliases _) = let dealiasUnion (localName, canonicalSet) = case Set.toList canonicalSet of [canonicalName] -> Just (Var.toString canonicalName, localName) _ -> Nothing dealiasAlias (localName, canonicalSet) = case Set.toList canon...
768
false
true
0
15
231
269
138
131
null
null
vTurbine/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
{- Note [Custom type errors in constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When GHC reports a type-error about an unsolved-constraint, we check to see if the constraint contains any custom-type errors, and if so we report them. Here are some examples of constraints containing type errors: TypeError msg ...
1,842
getUserTypeErrorMsg :: Ct -> Maybe Type getUserTypeErrorMsg ct = findUserTypeError (ctPred ct) where findUserTypeError t = msum ( userTypeError_maybe t : map findUserTypeError (subTys t) ) subTys t = case splitAppTys t of ...
530
getUserTypeErrorMsg ct = findUserTypeError (ctPred ct) where findUserTypeError t = msum ( userTypeError_maybe t : map findUserTypeError (subTys t) ) subTys t = case splitAppTys t of (t,[]) -> ...
490
true
true
0
12
627
145
73
72
null
null
brendanhay/gogol
gogol-cloudfunctions/gen/Network/Google/CloudFunctions/Types/Product.hs
mpl-2.0
-- | The amount of memory in MB available for a function. Defaults to 256MB. cfAvailableMemoryMb :: Lens' CloudFunction (Maybe Int32) cfAvailableMemoryMb = lens _cfAvailableMemoryMb (\ s a -> s{_cfAvailableMemoryMb = a}) . mapping _Coerce
252
cfAvailableMemoryMb :: Lens' CloudFunction (Maybe Int32) cfAvailableMemoryMb = lens _cfAvailableMemoryMb (\ s a -> s{_cfAvailableMemoryMb = a}) . mapping _Coerce
175
cfAvailableMemoryMb = lens _cfAvailableMemoryMb (\ s a -> s{_cfAvailableMemoryMb = a}) . mapping _Coerce
118
true
true
0
10
48
55
28
27
null
null
codemac/yi-editor
src/Yi/Syntax/JavaScript.hs
gpl-2.0
-- * Simple parsers -- | Parses a comment. comment :: P TT TT comment = symbol (\t -> case fromTT t of Comment _ -> True _ -> False)
193
comment :: P TT TT comment = symbol (\t -> case fromTT t of Comment _ -> True _ -> False)
149
comment = symbol (\t -> case fromTT t of Comment _ -> True _ -> False)
130
true
true
0
11
90
51
26
25
null
null
vikraman/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (HsLam matches) = pprMatches (LambdaExpr :: HsMatchContext id) matches
81
ppr_expr (HsLam matches) = pprMatches (LambdaExpr :: HsMatchContext id) matches
81
ppr_expr (HsLam matches) = pprMatches (LambdaExpr :: HsMatchContext id) matches
81
false
false
0
7
11
29
14
15
null
null
JoeyEremondi/elm-type-effect
src/Canonicalize/Variable.hs
bsd-3-clause
tvar :: R.Region -> Env.Environment -> String -> Result.ResultErr (Either Var.Canonical (Var.Canonical, [String], Type.Canonical) ) tvar region env var = case adts ++ aliases of [] -> notFound region "type" (Map.keys (Env._adts env) ++ Map.keys (Env...
706
tvar :: R.Region -> Env.Environment -> String -> Result.ResultErr (Either Var.Canonical (Var.Canonical, [String], Type.Canonical) ) tvar region env var = case adts ++ aliases of [] -> notFound region "type" (Map.keys (Env._adts env) ++ Map.keys (Env...
706
tvar region env var = case adts ++ aliases of [] -> notFound region "type" (Map.keys (Env._adts env) ++ Map.keys (Env._aliases env)) var [v] -> Result.var' extract v vs -> preferLocals' region env extract "type" vs var where adts = map Left (maybe [] Set.toList (Map.lookup var (Env._adts e...
510
false
true
3
14
228
300
143
157
null
null
ideas-edu/ideas
src/Ideas/Common/Exercise.hs
apache-2.0
randomTerms :: QCGen -> Exercise a -> Maybe Difficulty -> [a] randomTerms rng ex mdif = rec rng where rec a = maybe id (:) (randomTerm a ex mdif) (rec (snd (next a))) -- | An exercise generator for testing purposes (including corner cases); first generator only.
272
randomTerms :: QCGen -> Exercise a -> Maybe Difficulty -> [a] randomTerms rng ex mdif = rec rng where rec a = maybe id (:) (randomTerm a ex mdif) (rec (snd (next a))) -- | An exercise generator for testing purposes (including corner cases); first generator only.
271
randomTerms rng ex mdif = rec rng where rec a = maybe id (:) (randomTerm a ex mdif) (rec (snd (next a))) -- | An exercise generator for testing purposes (including corner cases); first generator only.
209
false
true
1
11
56
102
47
55
null
null
brodyberg/Notes
PrettyJSON.hsproj/Prettify.hs
mit
compact :: Doc -> String compact x = transform [x] where transform [] = "" transform (d:ds) = case d of Empty -> transform ds Char c -> c : transform ds Text s -> s ++ transform ds Line -> '\n' : tra...
429
compact :: Doc -> String compact x = transform [x] where transform [] = "" transform (d:ds) = case d of Empty -> transform ds Char c -> c : transform ds Text s -> s ++ transform ds Line -> '\n' : tra...
429
compact x = transform [x] where transform [] = "" transform (d:ds) = case d of Empty -> transform ds Char c -> c : transform ds Text s -> s ++ transform ds Line -> '\n' : transform ds ...
404
false
true
0
13
210
157
78
79
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/Encoding.hs
bsd-3-clause
-- Common case first -- Constructors encode_ch '(' = "ZL"
59
encode_ch '(' = "ZL"
21
encode_ch '(' = "ZL"
21
true
false
0
5
11
11
6
5
null
null
kazu-yamamoto/http-types
Network/HTTP/Types/Status.hs
bsd-3-clause
-- | Request Entity Too Large 413 status413 :: Status status413 = mkStatus 413 "Request Entity Too Large"
105
status413 :: Status status413 = mkStatus 413 "Request Entity Too Large"
71
status413 = mkStatus 413 "Request Entity Too Large"
51
true
true
0
6
17
25
10
15
null
null
rueshyna/gogol
gogol-iam/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/List.hs
mpl-2.0
-- | Optional limit on the number of service accounts to include in the -- response. Further accounts can subsequently be obtained by including the -- ListServiceAccountsResponse.next_page_token in a subsequent request. psalPageSize :: Lens' ProjectsServiceAccountsList (Maybe Int32) psalPageSize = lens _psalPageSize ...
375
psalPageSize :: Lens' ProjectsServiceAccountsList (Maybe Int32) psalPageSize = lens _psalPageSize (\ s a -> s{_psalPageSize = a}) . mapping _Coerce
155
psalPageSize = lens _psalPageSize (\ s a -> s{_psalPageSize = a}) . mapping _Coerce
91
true
true
1
9
58
58
30
28
null
null
hvr/jhc
src/E/Arbitrary.hs
mit
ge = do e <- genE print e putStrLn (render $ (ePretty e :: Doc)) putDoc (pprint (getType e))
108
ge = do e <- genE print e putStrLn (render $ (ePretty e :: Doc)) putDoc (pprint (getType e))
108
ge = do e <- genE print e putStrLn (render $ (ePretty e :: Doc)) putDoc (pprint (getType e))
108
false
false
1
12
34
63
27
36
null
null
achirkin/qua-kit
apps/hs/qua-server/src/Handler/Mooc/Analysis.hs
mit
stupidTuples :: ( ( E.Value ExerciseId , E.Value UserId , E.Value ScenarioId , E.Value UTCTime , E.Value Text , E.Value ScenarioAnalysisId , E.Value Int) , Entity SAImage , ( Entity SAImage , Entity SAImage , ( Entity SAImage, Entity SAImage, Entity SA...
1,141
stupidTuples :: ( ( E.Value ExerciseId , E.Value UserId , E.Value ScenarioId , E.Value UTCTime , E.Value Text , E.Value ScenarioAnalysisId , E.Value Int) , Entity SAImage , ( Entity SAImage , Entity SAImage , ( Entity SAImage, Entity SAImage, Entity SA...
1,141
stupidTuples ( ( E.Value aiExerciseId , E.Value aiUserId , E.Value aiScenarioId , E.Value aiTimeStamp , E.Value aiDescription , E.Value aiScenarioAnalysisId , E.Value aiObjectCount) , aiBlocks' , ( aiVotesB', aiVotesT' , ( aiVotesR2', aiVotesR3', aiVotesR4', aiVotesR5', aiVotesR6...
731
false
true
17
9
327
280
153
127
null
null
byorgey/BlogLiterately
src/Text/BlogLiterately/Highlight.hs
gpl-3.0
highlight :: (FormatOptions -> [SourceLine] -> a) -- ^ Formatter -> Attr -- ^ Attributes of the CodeBlock -> Text -- ^ Raw contents of the CodeBlock -> Maybe a -- ^ Maybe the formatted result highlight formatter (_, classes, keyvals) rawCode = let firstNum = case safeRead (fromMayb...
1,034
highlight :: (FormatOptions -> [SourceLine] -> a) -- ^ Formatter -> Attr -- ^ Attributes of the CodeBlock -> Text -- ^ Raw contents of the CodeBlock -> Maybe a highlight formatter (_, classes, keyvals) rawCode = let firstNum = case safeRead (fromMaybe "1" $ lookup "startFrom" keyva...
1,002
highlight formatter (_, classes, keyvals) rawCode = let firstNum = case safeRead (fromMaybe "1" $ lookup "startFrom" keyvals) of Just n -> n Nothing -> 1 fmtOpts = defaultFormatOpts{ startNumber = firstNum, numberLines = any (`elem...
806
true
true
0
16
405
246
133
113
null
null
mettekou/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
mkWpCastN :: TcCoercionN -> HsWrapper mkWpCastN co | isTcReflCo co = WpHole | otherwise = ASSERT2(tcCoercionRole co == Nominal, ppr co) WpCast (mkTcSubCo co)
185
mkWpCastN :: TcCoercionN -> HsWrapper mkWpCastN co | isTcReflCo co = WpHole | otherwise = ASSERT2(tcCoercionRole co == Nominal, ppr co) WpCast (mkTcSubCo co)
185
mkWpCastN co | isTcReflCo co = WpHole | otherwise = ASSERT2(tcCoercionRole co == Nominal, ppr co) WpCast (mkTcSubCo co)
147
false
true
1
8
51
63
30
33
null
null
cronburg/deckbuild
Haskell/Macros.hs
bsd-3-clause
maybeHead = listToMaybe
23
maybeHead = listToMaybe
23
maybeHead = listToMaybe
23
false
false
0
4
2
6
3
3
null
null
rfranek/duckling
Duckling/Time/PL/Rules.hs
bsd-3-clause
ruleNthTimeAfterTime :: Rule ruleNthTimeAfterTime = Rule { name = "nth <time> after <time>" , pattern = [ dimension Ordinal , dimension Time , regex "po" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal od:Token Time td1:_:Token Time td2:_) -> tt $ predNthAfte...
376
ruleNthTimeAfterTime :: Rule ruleNthTimeAfterTime = Rule { name = "nth <time> after <time>" , pattern = [ dimension Ordinal , dimension Time , regex "po" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal od:Token Time td1:_:Token Time td2:_) -> tt $ predNthAfte...
376
ruleNthTimeAfterTime = Rule { name = "nth <time> after <time>" , pattern = [ dimension Ordinal , dimension Time , regex "po" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal od:Token Time td1:_:Token Time td2:_) -> tt $ predNthAfter (TOrdinal.value od - 1) td1...
347
false
true
0
17
105
137
70
67
null
null
javgh/mtgoxapi
Network/MtGoxAPI/Types.hs
bsd-3-clause
collapseErrors (Right (Error err)) = Left err
45
collapseErrors (Right (Error err)) = Left err
45
collapseErrors (Right (Error err)) = Left err
45
false
false
0
8
6
25
11
14
null
null
vincenthz/hs-foundation
programs/SumDouble.hs
bsd-3-clause
main :: IO () main = runConduit (sourceHandle stdin .| fromBytes UTF8 .| words .| sinkList) >>= putStrLn . show . foldl' (+) 0.0 . catMaybes . fmap readDouble
170
main :: IO () main = runConduit (sourceHandle stdin .| fromBytes UTF8 .| words .| sinkList) >>= putStrLn . show . foldl' (+) 0.0 . catMaybes . fmap readDouble
170
main = runConduit (sourceHandle stdin .| fromBytes UTF8 .| words .| sinkList) >>= putStrLn . show . foldl' (+) 0.0 . catMaybes . fmap readDouble
156
false
true
0
15
40
70
34
36
null
null
kojiromike/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCImp n) f = case lookupCtxtExact n (idris_implicits i) of Just v -> return f { ibc_implicits = (n,v): ibc_implicits f } _ -> ifail "IBC write failed"
210
ibc i (IBCImp n) f = case lookupCtxtExact n (idris_implicits i) of Just v -> return f { ibc_implicits = (n,v): ibc_implicits f } _ -> ifail "IBC write failed"
210
ibc i (IBCImp n) f = case lookupCtxtExact n (idris_implicits i) of Just v -> return f { ibc_implicits = (n,v): ibc_implicits f } _ -> ifail "IBC write failed"
210
false
false
1
12
81
81
37
44
null
null
yesodweb/shakespeare
test/Text/HamletSpec.hs
mit
caseTag :: Assertion caseTag = do helper "<p class=\"foo\"><div id=\"bar\">baz</div></p>" [hamlet| $newline text <p .foo> <#bar>baz |] helper "<p class=\"foo.bar\"><div id=\"bar\">baz</div></p>" [hamlet| $newline text <p class=foo.bar> <#bar>baz |]
260
caseTag :: Assertion caseTag = do helper "<p class=\"foo\"><div id=\"bar\">baz</div></p>" [hamlet| $newline text <p .foo> <#bar>baz |] helper "<p class=\"foo.bar\"><div id=\"bar\">baz</div></p>" [hamlet| $newline text <p class=foo.bar> <#bar>baz |]
260
caseTag = do helper "<p class=\"foo\"><div id=\"bar\">baz</div></p>" [hamlet| $newline text <p .foo> <#bar>baz |] helper "<p class=\"foo.bar\"><div id=\"bar\">baz</div></p>" [hamlet| $newline text <p class=foo.bar> <#bar>baz |]
239
false
true
0
8
39
42
21
21
null
null
sopvop/cabal
cabal-install/Distribution/Client/CmdBuild.hs
bsd-3-clause
-- | The @build@ command does a lot. It brings the install plan up to date, -- selects that part of the plan needed by the given or implicit targets and -- then executes the plan. -- -- For more details on how this works, see the module -- "Distribution.Client.ProjectOrchestration" -- buildAction :: (ConfigFlags, Confi...
1,590
buildAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags) -> [String] -> GlobalFlags -> IO () buildAction (configFlags, configExFlags, installFlags, haddockFlags) targetStrings globalFlags = do userTargets <- readUserBuildTargets targetStrings buildCtx@ProjectBuildContext...
1,304
buildAction (configFlags, configExFlags, installFlags, haddockFlags) targetStrings globalFlags = do userTargets <- readUserBuildTargets targetStrings buildCtx@ProjectBuildContext{buildSettings, elaboratedPlan} <- runProjectPreBuildPhase verbosity ( globalFlags, configFlags, c...
1,184
true
true
0
16
412
244
129
115
null
null
gridaphobe/target
bench/Main.hs
mit
main :: IO () main = do print =<< logCsv "bench/List.insert.csv" =<< listInsertTests print =<< logCsv "bench/RBTree.add.csv" =<< rbTreeAddTests -- print =<< logCsv "bench/Expr.subst.csv" =<< exprSubstTests print =<< logCsv "bench/Map.delete.csv" =<< mapDeleteTests print =<< logCsv "...
445
main :: IO () main = do print =<< logCsv "bench/List.insert.csv" =<< listInsertTests print =<< logCsv "bench/RBTree.add.csv" =<< rbTreeAddTests -- print =<< logCsv "bench/Expr.subst.csv" =<< exprSubstTests print =<< logCsv "bench/Map.delete.csv" =<< mapDeleteTests print =<< logCsv "...
445
main = do print =<< logCsv "bench/List.insert.csv" =<< listInsertTests print =<< logCsv "bench/RBTree.add.csv" =<< rbTreeAddTests -- print =<< logCsv "bench/Expr.subst.csv" =<< exprSubstTests print =<< logCsv "bench/Map.delete.csv" =<< mapDeleteTests print =<< logCsv "bench/Map.diff...
431
false
true
0
9
85
87
39
48
null
null
beni55/bayes-stack
BayesStack/DirMulti.hs
bsd-3-clause
obsProb :: (Enum a, Real w, Functor f, Foldable f) => Multinom w a -> f (a, w) -> Probability obsProb (Multinom {dmProbs=prob}) obs = Foldable.product $ fmap (\(k,w)->(realToFrac $ prob EM.! k)^^w) obs where (^^) :: Real w => Log Double -> w -> Log Double x ^^ y = Exp $ realToFrac y * ln x
312
obsProb :: (Enum a, Real w, Functor f, Foldable f) => Multinom w a -> f (a, w) -> Probability obsProb (Multinom {dmProbs=prob}) obs = Foldable.product $ fmap (\(k,w)->(realToFrac $ prob EM.! k)^^w) obs where (^^) :: Real w => Log Double -> w -> Log Double x ^^ y = Exp $ realToFrac y * ln x
312
obsProb (Multinom {dmProbs=prob}) obs = Foldable.product $ fmap (\(k,w)->(realToFrac $ prob EM.! k)^^w) obs where (^^) :: Real w => Log Double -> w -> Log Double x ^^ y = Exp $ realToFrac y * ln x
210
false
true
7
11
79
184
90
94
null
null
phischu/fragnix
builtins/base/Foreign.C.String.hs
bsd-3-clause
-- -- | Determines whether a character can be accurately encoded in a 'CString'. -- -- Unrepresentable characters are converted to '?' or their nearest visual equivalent. charIsRepresentable :: Char -> IO Bool charIsRepresentable c = getForeignEncoding >>= flip GHC.charIsRepresentable c
287
charIsRepresentable :: Char -> IO Bool charIsRepresentable c = getForeignEncoding >>= flip GHC.charIsRepresentable c
116
charIsRepresentable c = getForeignEncoding >>= flip GHC.charIsRepresentable c
77
true
true
0
7
40
38
18
20
null
null
nomeata/ghc
compiler/cmm/PprCmmExpr.hs
bsd-3-clause
pprArea :: Area -> SDoc pprArea Old = text "old"
55
pprArea :: Area -> SDoc pprArea Old = text "old"
55
pprArea Old = text "old"
31
false
true
0
7
16
26
11
15
null
null
vigoos/Farrago-OS
aura-master/aura-master/src/Aura/Packages/ABS.hs
gpl-2.0
synced :: String -> String -> Aura Bool synced repo pkg = liftIO . doesFileExist $ absPkgbuildPath repo pkg
107
synced :: String -> String -> Aura Bool synced repo pkg = liftIO . doesFileExist $ absPkgbuildPath repo pkg
107
synced repo pkg = liftIO . doesFileExist $ absPkgbuildPath repo pkg
67
false
true
0
7
18
40
19
21
null
null
zepto-lang/zepto-js
src/Zepto/Parser.hs
gpl-2.0
parseAtom :: Parser LispVal parseAtom = do first <- letter <|> symbol <|> oneOf "." rest <- many (letter <|> digit <|> symbol <|> oneOf ".") let atom = first : rest if atom == "." then pzero else return $ fromSimple $ Atom atom
310
parseAtom :: Parser LispVal parseAtom = do first <- letter <|> symbol <|> oneOf "." rest <- many (letter <|> digit <|> symbol <|> oneOf ".") let atom = first : rest if atom == "." then pzero else return $ fromSimple $ Atom atom
310
parseAtom = do first <- letter <|> symbol <|> oneOf "." rest <- many (letter <|> digit <|> symbol <|> oneOf ".") let atom = first : rest if atom == "." then pzero else return $ fromSimple $ Atom atom
282
false
true
0
13
127
105
48
57
null
null
martine/gat
FileMode.hs
gpl-2.0
s_IFDIR = 0o40000
17
s_IFDIR = 0o40000
17
s_IFDIR = 0o40000
17
false
false
0
4
2
6
3
3
null
null
raichoo/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
translateConstant (BI 0) = JSNum (JSInteger JSBigZero)
72
translateConstant (BI 0) = JSNum (JSInteger JSBigZero)
72
translateConstant (BI 0) = JSNum (JSInteger JSBigZero)
72
false
false
0
7
24
24
11
13
null
null
harry830622/cis194-solutions
06-laziness/Fibonacci.hs
mit
-- Exercise 2 fibs2 :: [Integer] fibs2 = 0 : 1 : [fibs2 !! (i - 2) + fibs2 !! (i - 1) | i <- [2 ..]]
100
fibs2 :: [Integer] fibs2 = 0 : 1 : [fibs2 !! (i - 2) + fibs2 !! (i - 1) | i <- [2 ..]]
86
fibs2 = 0 : 1 : [fibs2 !! (i - 2) + fibs2 !! (i - 1) | i <- [2 ..]]
67
true
true
0
12
27
71
37
34
null
null
sonyandy/tnt
Control/Monad/Code/Internal.hs
bsd-3-clause
i2b = insn 0 Opcode.i2b
23
i2b = insn 0 Opcode.i2b
23
i2b = insn 0 Opcode.i2b
23
false
false
0
6
4
13
6
7
null
null
jgm/pandoc-types
src/Text/Pandoc/Arbitrary.hs
bsd-3-clause
arbRow :: Int -> Gen Row arbRow n = do cs <- choose (0, 5) Row <$> arbAttr <*> vectorOf cs (arbCell n)
106
arbRow :: Int -> Gen Row arbRow n = do cs <- choose (0, 5) Row <$> arbAttr <*> vectorOf cs (arbCell n)
106
arbRow n = do cs <- choose (0, 5) Row <$> arbAttr <*> vectorOf cs (arbCell n)
81
false
true
0
11
26
64
29
35
null
null
Callidon/toolkit
haskell/quicksort.hs
mit
quicksort (x:tx) = let leftSorted = quicksort (filter (<= x) tx) rightSorted = quicksort (filter (> x) tx) in leftSorted ++ [x] ++ rightSorted
152
quicksort (x:tx) = let leftSorted = quicksort (filter (<= x) tx) rightSorted = quicksort (filter (> x) tx) in leftSorted ++ [x] ++ rightSorted
152
quicksort (x:tx) = let leftSorted = quicksort (filter (<= x) tx) rightSorted = quicksort (filter (> x) tx) in leftSorted ++ [x] ++ rightSorted
152
false
false
0
12
33
73
38
35
null
null
dorchard/camfort
src/Camfort/Specification/Stencils/Model.hs
apache-2.0
lowerBound (Bound Nothing _) = error "Approximation doesn't have a lower bound."
80
lowerBound (Bound Nothing _) = error "Approximation doesn't have a lower bound."
80
lowerBound (Bound Nothing _) = error "Approximation doesn't have a lower bound."
80
false
false
0
7
11
20
9
11
null
null
BartMassey/chunk
hunit.hs
bsd-3-clause
naiveChunk :: Int -> [a] -> [[a]] naiveChunk n l | n >= length l = [l] | otherwise = take n l : naiveChunk n (drop n l)
135
naiveChunk :: Int -> [a] -> [[a]] naiveChunk n l | n >= length l = [l] | otherwise = take n l : naiveChunk n (drop n l)
135
naiveChunk n l | n >= length l = [l] | otherwise = take n l : naiveChunk n (drop n l)
101
false
true
0
9
44
80
39
41
null
null
spechub/Hets
CSL/EPRelation.hs
gpl-2.0
{- | (1) If the arguments are disjoint -> 'Nothing' (2) If all extended parameter constraints from the first argument are subsumed by the second argument -> second argument with deleted entries for these extended parameters (3) Otherwise -> error: the first argument must be subsumed by or disjoint ...
1,612
projectEPs :: EPExps -> EPExps -> Maybe EPExps projectEPs e1 e2 | isStarEP e1 = Just e2 | otherwise = -- take first element from e1 delete it from e1 and proceed with it let ((k, v), e1') = Map.deleteFindMin e1 e2' = Map.delete k e2 in case Map.lookup k e2 of Not...
1,268
projectEPs e1 e2 | isStarEP e1 = Just e2 | otherwise = -- take first element from e1 delete it from e1 and proceed with it let ((k, v), e1') = Map.deleteFindMin e1 e2' = Map.delete k e2 in case Map.lookup k e2 of Nothing -> projectEPs e1' e2 Just v2 ...
1,221
true
true
0
17
523
207
101
106
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_PL_STRING_QR :: Int wxSTC_PL_STRING_QR = 29
49
wxSTC_PL_STRING_QR :: Int wxSTC_PL_STRING_QR = 29
49
wxSTC_PL_STRING_QR = 29
23
false
true
0
6
5
18
7
11
null
null
hinance/hinance
src/default/user_data.hs
gpl-3.0
blue = "#337AB7"
16
blue = "#337AB7"
16
blue = "#337AB7"
16
false
false
1
5
2
10
3
7
null
null
olorin/amazonka
amazonka-route53/gen/Network/AWS/Route53/CreateHostedZone.hs
mpl-2.0
-- | A complex type that contains identifying information about the hosted -- zone. chzrsHostedZone :: Lens' CreateHostedZoneResponse HostedZone chzrsHostedZone = lens _chzrsHostedZone (\ s a -> s{_chzrsHostedZone = a})
219
chzrsHostedZone :: Lens' CreateHostedZoneResponse HostedZone chzrsHostedZone = lens _chzrsHostedZone (\ s a -> s{_chzrsHostedZone = a})
135
chzrsHostedZone = lens _chzrsHostedZone (\ s a -> s{_chzrsHostedZone = a})
74
true
true
0
9
29
41
23
18
null
null
dicomgrid/dicom-haskell-library
src/Data/DICOM/Dictionary.hs
gpl-3.0
rotationoffset :: B.ByteString -> Element rotationoffset = ds $ tag (TagGroup 0x0018) (TagElement 0x1146)
105
rotationoffset :: B.ByteString -> Element rotationoffset = ds $ tag (TagGroup 0x0018) (TagElement 0x1146)
105
rotationoffset = ds $ tag (TagGroup 0x0018) (TagElement 0x1146)
63
false
true
2
7
13
46
20
26
null
null
rimmington/cabal
Cabal/Distribution/Simple/Build.hs
bsd-3-clause
buildLib :: Verbosity -> Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> IO () buildLib verbosity numJobs pkg_descr lbi lib clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.buildLib verbosity numJob...
762
buildLib :: Verbosity -> Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> IO () buildLib verbosity numJobs pkg_descr lbi lib clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.buildLib verbosity numJob...
762
buildLib verbosity numJobs pkg_descr lbi lib clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.buildLib verbosity numJobs pkg_descr lbi lib clbi GHCJS -> GHCJS.buildLib verbosity numJobs pkg_descr lbi lib clbi JHC -> JHC.buildLib verbosity pkg_descr lbi lib clbi LHC -> LHC.buil...
578
false
true
8
12
219
212
98
114
null
null