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
brendanhay/gogol
gogol-docs/gen/Network/Google/Docs/Types/Product.hs
mpl-2.0
-- | Indicates if there was a suggested change to padding_right. tcsssPaddingRightSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool) tcsssPaddingRightSuggested = lens _tcsssPaddingRightSuggested (\ s a -> s{_tcsssPaddingRightSuggested = a})
259
tcsssPaddingRightSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool) tcsssPaddingRightSuggested = lens _tcsssPaddingRightSuggested (\ s a -> s{_tcsssPaddingRightSuggested = a})
194
tcsssPaddingRightSuggested = lens _tcsssPaddingRightSuggested (\ s a -> s{_tcsssPaddingRightSuggested = a})
115
true
true
0
9
35
48
25
23
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
drbdMetaStripes :: String drbdMetaStripes = "meta-stripes"
58
drbdMetaStripes :: String drbdMetaStripes = "meta-stripes"
58
drbdMetaStripes = "meta-stripes"
32
false
true
0
6
5
18
7
11
null
null
joris-r/labaskel
Test.hs
apache-2.0
main = do quickCheckWith testArgs bRewriteIdentity quickCheckWith testArgs addParenOnlyAddParenthesis quickCheckWith testArgs addParenIsStable quickCheckWith testArgs testParsing quickCheckWith stdArgs{maxSuccess=1} $ show (runBParser "test" "MACHINE m VALUES x = 1~(22) END") == show (ru...
560
main = do quickCheckWith testArgs bRewriteIdentity quickCheckWith testArgs addParenOnlyAddParenthesis quickCheckWith testArgs addParenIsStable quickCheckWith testArgs testParsing quickCheckWith stdArgs{maxSuccess=1} $ show (runBParser "test" "MACHINE m VALUES x = 1~(22) END") == show (ru...
560
main = do quickCheckWith testArgs bRewriteIdentity quickCheckWith testArgs addParenOnlyAddParenthesis quickCheckWith testArgs addParenIsStable quickCheckWith testArgs testParsing quickCheckWith stdArgs{maxSuccess=1} $ show (runBParser "test" "MACHINE m VALUES x = 1~(22) END") == show (ru...
560
false
false
0
11
118
126
57
69
null
null
siddhanathan/ghc
testsuite/tests/rename/should_compile/timing001.hs
bsd-3-clause
a218 = a219
11
a218 = a219
11
a218 = a219
11
false
false
1
5
2
10
3
7
null
null
tittoassini/typed
test/Test/Data/Values.hs
bsd-3-clause
tupleT = ("tuple",(Two,One,(Five,Three,(Three,(),Two))))
56
tupleT = ("tuple",(Two,One,(Five,Three,(Three,(),Two))))
56
tupleT = ("tuple",(Two,One,(Five,Three,(Three,(),Two))))
56
false
false
1
9
2
44
26
18
null
null
meteogrid/bindings-gdal
tests/Arbitrary.hs
bsd-3-clause
(~==) :: (Fractional a, Ord a) => a -> a -> Bool a ~== b = abs(a-b)<epsilon where epsilon = 1e-2
98
(~==) :: (Fractional a, Ord a) => a -> a -> Bool a ~== b = abs(a-b)<epsilon where epsilon = 1e-2
98
a ~== b = abs(a-b)<epsilon where epsilon = 1e-2
49
false
true
3
10
22
74
34
40
null
null
ezyang/ghc
libraries/base/Text/Printf.hs
bsd-3-clause
uprintfs ('%':_) [] = errorMissingArgument
49
uprintfs ('%':_) [] = errorMissingArgument
49
uprintfs ('%':_) [] = errorMissingArgument
49
false
false
0
6
11
22
10
12
null
null
ttylec/QLogic
research/greechie.hs
gpl-3.0
reduce :: [[Set.Set TwoSystems]] -> [[Set.Set TwoSystems]] reduce = map Set.toList . reduce' [] . map Set.fromList
114
reduce :: [[Set.Set TwoSystems]] -> [[Set.Set TwoSystems]] reduce = map Set.toList . reduce' [] . map Set.fromList
114
reduce = map Set.toList . reduce' [] . map Set.fromList
55
false
true
0
9
16
60
30
30
null
null
Coggroach/Gluon
app/Main.hs
bsd-3-clause
runSelectedApp :: String -> IO() runSelectedApp s = case () of () | s == fileServerCompare0 -> mkFileServer fileServerIdentity0 | s == fileServerCompare1 -> mkFileServer fileServerIdentity1 | s == fileServerCompare2 -> mkFileServer fileServerIdentity2 | s == directoryServerCompare -> mkDirec...
436
runSelectedApp :: String -> IO() runSelectedApp s = case () of () | s == fileServerCompare0 -> mkFileServer fileServerIdentity0 | s == fileServerCompare1 -> mkFileServer fileServerIdentity1 | s == fileServerCompare2 -> mkFileServer fileServerIdentity2 | s == directoryServerCompare -> mkDirec...
436
runSelectedApp s = case () of () | s == fileServerCompare0 -> mkFileServer fileServerIdentity0 | s == fileServerCompare1 -> mkFileServer fileServerIdentity1 | s == fileServerCompare2 -> mkFileServer fileServerIdentity2 | s == directoryServerCompare -> mkDirectoryServer | s == security...
403
false
true
0
11
92
126
56
70
null
null
stormont/conduit-examples
examples/conduit-101-04/Main.hs
mit
-- Mostly from: http://www.yesodweb.com/blog/2014/03/network-conduit-async main = do putStrLn "-----------------------------------------------" putStrLn "EXAMPLE: Reading from one socket and writing to" putStrLn " another socket" putStrLn "-----------------------------------------------" putStrLn "Sta...
1,017
main = do putStrLn "-----------------------------------------------" putStrLn "EXAMPLE: Reading from one socket and writing to" putStrLn " another socket" putStrLn "-----------------------------------------------" putStrLn "Start the example server from conduit-101-02 for writing." putStrLn "" put...
942
main = do putStrLn "-----------------------------------------------" putStrLn "EXAMPLE: Reading from one socket and writing to" putStrLn " another socket" putStrLn "-----------------------------------------------" putStrLn "Start the example server from conduit-101-02 for writing." putStrLn "" put...
942
true
false
0
19
191
198
78
120
null
null
FranklinChen/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
toFType (FCon c) | c == sUN "C_Str" = FString | c == sUN "C_Float" = FArith ATFloat | c == sUN "C_Ptr" = FPtr | c == sUN "C_MPtr" = FManagedPtr | c == sUN "C_CData" = FCData | c == sUN "C_Unit" = FUnit
225
toFType (FCon c) | c == sUN "C_Str" = FString | c == sUN "C_Float" = FArith ATFloat | c == sUN "C_Ptr" = FPtr | c == sUN "C_MPtr" = FManagedPtr | c == sUN "C_CData" = FCData | c == sUN "C_Unit" = FUnit
225
toFType (FCon c) | c == sUN "C_Str" = FString | c == sUN "C_Float" = FArith ATFloat | c == sUN "C_Ptr" = FPtr | c == sUN "C_MPtr" = FManagedPtr | c == sUN "C_CData" = FCData | c == sUN "C_Unit" = FUnit
225
false
false
0
9
69
123
53
70
null
null
Cadynum/tremulous-query
Network/Tremulous/StrictMaybe.hs
gpl-3.0
fromMaybe :: a -> Maybe a -> a fromMaybe x Nothing = x
58
fromMaybe :: a -> Maybe a -> a fromMaybe x Nothing = x
58
fromMaybe x Nothing = x
27
false
true
0
7
16
27
13
14
null
null
stephenjbarr/stephen-planetbarr-com
site.hs
bsd-3-clause
postCtx :: Tags -> Context String postCtx tags = mconcat [ modificationTimeField "mtime" "%U" , dateField "date" "%B %e, %Y" , tagsField "tags" tags , defaultContext ]
187
postCtx :: Tags -> Context String postCtx tags = mconcat [ modificationTimeField "mtime" "%U" , dateField "date" "%B %e, %Y" , tagsField "tags" tags , defaultContext ]
187
postCtx tags = mconcat [ modificationTimeField "mtime" "%U" , dateField "date" "%B %e, %Y" , tagsField "tags" tags , defaultContext ]
153
false
true
0
7
46
51
25
26
null
null
sebastiaanvisser/orchid-doc
src/Text/Document/Plugin/TOC.hs
bsd-3-clause
ppCodeLaTeX s doc = OutputPlain "\\pagebreak\n\\tableofcontents\n\\pagebreak\n"
79
ppCodeLaTeX s doc = OutputPlain "\\pagebreak\n\\tableofcontents\n\\pagebreak\n"
79
ppCodeLaTeX s doc = OutputPlain "\\pagebreak\n\\tableofcontents\n\\pagebreak\n"
79
false
false
0
5
5
14
6
8
null
null
eryx67/haskell-libtorrent
src/Network/Libtorrent/PeerInfo.hs
bsd-3-clause
setRtt :: MonadIO m => PeerInfo -> CInt -> m () setRtt ho val = liftIO . withPtr ho $ \hoPtr -> [CU.exp| void { $(peer_info * hoPtr)->rtt = $(int val)} |]
158
setRtt :: MonadIO m => PeerInfo -> CInt -> m () setRtt ho val = liftIO . withPtr ho $ \hoPtr -> [CU.exp| void { $(peer_info * hoPtr)->rtt = $(int val)} |]
158
setRtt ho val = liftIO . withPtr ho $ \hoPtr -> [CU.exp| void { $(peer_info * hoPtr)->rtt = $(int val)} |]
110
false
true
3
10
35
65
31
34
null
null
kmyk/proof-haskell
Data/Rank1.hs
mit
readRank1PropS :: String -> Rank1PropS readRank1PropS = read
60
readRank1PropS :: String -> Rank1PropS readRank1PropS = read
60
readRank1PropS = read
21
false
true
0
7
7
22
9
13
null
null
heathweiss/Tricad
src/CornerPoints/CornerPoints.hs
gpl-2.0
(B2 b2) +++ (B3 b3) = BackTopLine {b2=b2, b3=b3}
53
(B2 b2) +++ (B3 b3) = BackTopLine {b2=b2, b3=b3}
53
(B2 b2) +++ (B3 b3) = BackTopLine {b2=b2, b3=b3}
53
false
false
0
7
13
38
20
18
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_T3_DEFAULT :: Int wxSTC_T3_DEFAULT = 0
44
wxSTC_T3_DEFAULT :: Int wxSTC_T3_DEFAULT = 0
44
wxSTC_T3_DEFAULT = 0
20
false
true
0
6
5
18
7
11
null
null
vsulabs/OptimizationMethodsHs
app/Main2.hs
bsd-3-clause
main :: IO () main = do a <- prompt "Enter left side" b <- prompt "Enter right side" putStrLn $ show $ goldMin f (a, b) where d = 0.000001 f = \x -> (x - 2) * (x - 4)
198
main :: IO () main = do a <- prompt "Enter left side" b <- prompt "Enter right side" putStrLn $ show $ goldMin f (a, b) where d = 0.000001 f = \x -> (x - 2) * (x - 4)
198
main = do a <- prompt "Enter left side" b <- prompt "Enter right side" putStrLn $ show $ goldMin f (a, b) where d = 0.000001 f = \x -> (x - 2) * (x - 4)
184
false
true
0
10
73
93
47
46
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
eqClassKey = mkPreludeClassUnique 3
48
eqClassKey = mkPreludeClassUnique 3
48
eqClassKey = mkPreludeClassUnique 3
48
false
false
0
5
16
9
4
5
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_ERLANG_MACRO :: Int wxSTC_ERLANG_MACRO = 10
49
wxSTC_ERLANG_MACRO :: Int wxSTC_ERLANG_MACRO = 10
49
wxSTC_ERLANG_MACRO = 10
23
false
true
0
6
5
18
7
11
null
null
zudov/html-email-validate
bench/Main.hs
bsd-3-clause
validEmails :: [Text] validEmails = [ "niceandsimple@example.com" , "very.common@example.com" , "a.little.lengthy.but.fine@dept.example.com" , "disposable.style.email.with+symbol@example.com" , "other.email-with-dash@example.com" , "admin@mailserver1...
427
validEmails :: [Text] validEmails = [ "niceandsimple@example.com" , "very.common@example.com" , "a.little.lengthy.but.fine@dept.example.com" , "disposable.style.email.with+symbol@example.com" , "other.email-with-dash@example.com" , "admin@mailserver1...
427
validEmails = [ "niceandsimple@example.com" , "very.common@example.com" , "a.little.lengthy.but.fine@dept.example.com" , "disposable.style.email.with+symbol@example.com" , "other.email-with-dash@example.com" , "admin@mailserver1" , "!#$...
405
false
true
0
5
133
38
24
14
null
null
ekmett/wxHaskell
samples/contrib/Camels.hs
lgpl-2.1
) x f (b:bs) = b : (|>) (x - 1) f bs m
39
(|>) x f (b:bs) = b : (|>) (x - 1) f bs
39
(|>) x f (b:bs) = b : (|>) (x - 1) f bs
39
false
false
1
8
14
45
22
23
null
null
knalbant/wrangell
DataOperations.hs
bsd-3-clause
grabIndices table ((Atom l):xs) = do i <- fmap unpackInteger $ getLabelIndex table l rest <- grabIndices table xs return $ i : rest
137
grabIndices table ((Atom l):xs) = do i <- fmap unpackInteger $ getLabelIndex table l rest <- grabIndices table xs return $ i : rest
137
grabIndices table ((Atom l):xs) = do i <- fmap unpackInteger $ getLabelIndex table l rest <- grabIndices table xs return $ i : rest
137
false
false
0
9
29
68
30
38
null
null
advancedtelematic/quickcheck-state-machine-model
src/Test/StateMachine/Types/Rank2.hs
bsd-3-clause
gfmap :: (Generic1 f, Functor (Rep1 f)) => (forall a. p a -> q a) -> f p -> f q gfmap f = to1 . fmap f . from1
110
gfmap :: (Generic1 f, Functor (Rep1 f)) => (forall a. p a -> q a) -> f p -> f q gfmap f = to1 . fmap f . from1
110
gfmap f = to1 . fmap f . from1
30
false
true
1
11
29
84
39
45
null
null
ian-ross/c2hs-macos-test
c2hs-0.26.1/src/C2HS/Gen/Bind.hs
mit
alignment CIntPT = return $ Storable.alignment (undefined :: CInt)
75
alignment CIntPT = return $ Storable.alignment (undefined :: CInt)
75
alignment CIntPT = return $ Storable.alignment (undefined :: CInt)
75
false
false
0
7
17
24
12
12
null
null
kuribas/hmetafont
Typography/HMetafont.hs
bsd-3-clause
typart = xformF
15
typart = xformF
15
typart = xformF
15
false
false
0
4
2
6
3
3
null
null
sdiehl/ghc
compiler/GHC/Stg/Lift/Analysis.hs
bsd-3-clause
freeVarsOfRhs (StgRhsClosure fvs _ _ _ _) = fvs
47
freeVarsOfRhs (StgRhsClosure fvs _ _ _ _) = fvs
47
freeVarsOfRhs (StgRhsClosure fvs _ _ _ _) = fvs
47
false
false
0
6
8
24
11
13
null
null
rueshyna/gogol
gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Get.hs
mpl-2.0
-- | Creates a value of 'TransferJobsGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'tjgXgafv' -- -- * 'tjgUploadProtocol' -- -- * 'tjgPp' -- -- * 'tjgAccessToken' -- -- * 'tjgJobName' -- -- * 'tjgUploadType' -- -- * 'tjgBearerTo...
764
transferJobsGet :: Text -- ^ 'tjgJobName' -> TransferJobsGet transferJobsGet pTjgJobName_ = TransferJobsGet' { _tjgXgafv = Nothing , _tjgUploadProtocol = Nothing , _tjgPp = True , _tjgAccessToken = Nothing , _tjgJobName = pTjgJobName_ , _tjgUploadType = Nothing , _tjgBearerToken ...
394
transferJobsGet pTjgJobName_ = TransferJobsGet' { _tjgXgafv = Nothing , _tjgUploadProtocol = Nothing , _tjgPp = True , _tjgAccessToken = Nothing , _tjgJobName = pTjgJobName_ , _tjgUploadType = Nothing , _tjgBearerToken = Nothing , _tjgProjectId = Nothing , _tjgCallback = Nothing ...
325
true
true
0
7
166
105
70
35
null
null
laszlopandy/elm-package
src/Install/Fetch.hs
bsd-3-clause
package :: (MonadIO m, MonadError String m) => Package.Name -> Package.Version -> m () package name@(Package.Name user _) version = ifNotExists name version $ do Http.send zipball extract files <- liftIO $ getDirectoryContents "." case List.find (List.isPrefixOf user) files of Nothing -> ...
611
package :: (MonadIO m, MonadError String m) => Package.Name -> Package.Version -> m () package name@(Package.Name user _) version = ifNotExists name version $ do Http.send zipball extract files <- liftIO $ getDirectoryContents "." case List.find (List.isPrefixOf user) files of Nothing -> ...
611
package name@(Package.Name user _) version = ifNotExists name version $ do Http.send zipball extract files <- liftIO $ getDirectoryContents "." case List.find (List.isPrefixOf user) files of Nothing -> throwError "Could not download source code successfully." Just dir -> ...
524
false
true
5
14
145
200
89
111
null
null
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Chapter10Exercises.hs
mit
seekritFunc' :: (Fractional b, Num b) => [Char] -> b seekritFunc' x = (sum (map (\w -> fromIntegral $ length w) (words x))) / fromIntegral (length (words x))
160
seekritFunc' :: (Fractional b, Num b) => [Char] -> b seekritFunc' x = (sum (map (\w -> fromIntegral $ length w) (words x))) / fromIntegral (length (words x))
160
seekritFunc' x = (sum (map (\w -> fromIntegral $ length w) (words x))) / fromIntegral (length (words x))
107
false
true
0
13
30
90
46
44
null
null
bsl/GLFW-b
Graphics/UI/GLFW.hs
bsd-2-clause
-- | See <http://www.glfw.org/docs/3.3/group__native.html#gac408b09a330749402d5d1fa1f5894dd9 glfwGetWin32Monitor> getWin32Monitor :: Window -> IO CString getWin32Monitor = c'glfwGetWin32Monitor . toC
199
getWin32Monitor :: Window -> IO CString getWin32Monitor = c'glfwGetWin32Monitor . toC
85
getWin32Monitor = c'glfwGetWin32Monitor . toC
45
true
true
0
6
15
23
12
11
null
null
jaccokrijnen/leksah
src/IDE/Command.hs
gpl-2.0
getMenuAndToolbars uiManager = do accGroup <- uiManagerGetAccelGroup uiManager mbMenu <- uiManagerGetWidget uiManager ("/ui/menubar" :: Text) let menu = case mbMenu of Just it -> castToMenuBar it Nothing -> throwIDE (__ "Menu>>makeMenu: failed to create menubar") ...
729
getMenuAndToolbars uiManager = do accGroup <- uiManagerGetAccelGroup uiManager mbMenu <- uiManagerGetWidget uiManager ("/ui/menubar" :: Text) let menu = case mbMenu of Just it -> castToMenuBar it Nothing -> throwIDE (__ "Menu>>makeMenu: failed to create menubar") ...
729
getMenuAndToolbars uiManager = do accGroup <- uiManagerGetAccelGroup uiManager mbMenu <- uiManagerGetWidget uiManager ("/ui/menubar" :: Text) let menu = case mbMenu of Just it -> castToMenuBar it Nothing -> throwIDE (__ "Menu>>makeMenu: failed to create menubar") ...
729
false
false
0
15
191
181
83
98
null
null
cornell-pl/HsAdapton
syb-with-class-and-effects/Setup.hs
bsd-3-clause
runTests' _ _ _ _ = system cmd >> return () where testdir = "tests" testcmd = "runhaskell ./Main.hs" cmd = "cd " ++ testdir ++ " && " ++ testcmd
165
runTests' _ _ _ _ = system cmd >> return () where testdir = "tests" testcmd = "runhaskell ./Main.hs" cmd = "cd " ++ testdir ++ " && " ++ testcmd
165
runTests' _ _ _ _ = system cmd >> return () where testdir = "tests" testcmd = "runhaskell ./Main.hs" cmd = "cd " ++ testdir ++ " && " ++ testcmd
165
false
false
2
8
51
61
28
33
null
null
ozgurakgun/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
genInterface :: Export -> JS genInterface (ExportData name) = JSNoop
68
genInterface :: Export -> JS genInterface (ExportData name) = JSNoop
68
genInterface (ExportData name) = JSNoop
39
false
true
0
7
9
24
12
12
null
null
spechub/Hets
CSL/Reduce_Interface.hs
gpl-2.0
casint :: Session a => a -> Named CMD -> IO (ProofStatus [EXPRESSION], [(Named CMD, ProofStatus [EXPRESSION])]) casint sess cmd = do proofstatus <- procString sess (senAttr cmd) $ exportReduce cmd ++ ";" return (proofstatus, [exportLemmaInt cmd proofstatus]) -- | performs quantifier elimination of...
339
casint :: Session a => a -> Named CMD -> IO (ProofStatus [EXPRESSION], [(Named CMD, ProofStatus [EXPRESSION])]) casint sess cmd = do proofstatus <- procString sess (senAttr cmd) $ exportReduce cmd ++ ";" return (proofstatus, [exportLemmaInt cmd proofstatus]) -- | performs quantifier elimination of...
339
casint sess cmd = do proofstatus <- procString sess (senAttr cmd) $ exportReduce cmd ++ ";" return (proofstatus, [exportLemmaInt cmd proofstatus]) -- | performs quantifier elimination of a given expression
216
false
true
0
13
68
117
58
59
null
null
airt/Haskell-99
src/NinetyNine/Parser/Combinator.hs
mit
chainl1 :: Parser a -> Parser (a -> a -> a) -> Parser a chainl1 p op = p >>= rest where rest x = next x <|> return x next x = do f <- op y <- p rest (f x y)
184
chainl1 :: Parser a -> Parser (a -> a -> a) -> Parser a chainl1 p op = p >>= rest where rest x = next x <|> return x next x = do f <- op y <- p rest (f x y)
184
chainl1 p op = p >>= rest where rest x = next x <|> return x next x = do f <- op y <- p rest (f x y)
128
false
true
7
11
71
121
52
69
null
null
geekingfrog/advent-of-code
src/Y2017/Day14.hs
bsd-3-clause
toGrid :: String -> A.Array (Int, Int) Status toGrid key = let hashes = fmap (\i -> H.knotHash (key ++ "-" ++ show i)) [0..127] bits = fmap (concatMap hexToBits . toBytes) hashes statuses = (fmap . fmap) (\x -> if x then Used else Free) bits withIdxs = fmap (zip [0..]) statuses assoc...
433
toGrid :: String -> A.Array (Int, Int) Status toGrid key = let hashes = fmap (\i -> H.knotHash (key ++ "-" ++ show i)) [0..127] bits = fmap (concatMap hexToBits . toBytes) hashes statuses = (fmap . fmap) (\x -> if x then Used else Free) bits withIdxs = fmap (zip [0..]) statuses assoc...
433
toGrid key = let hashes = fmap (\i -> H.knotHash (key ++ "-" ++ show i)) [0..127] bits = fmap (concatMap hexToBits . toBytes) hashes statuses = (fmap . fmap) (\x -> if x then Used else Free) bits withIdxs = fmap (zip [0..]) statuses assocList = [((x, y), s) | (y, row) <- zip [0..] wi...
387
false
true
0
15
114
232
127
105
null
null
brendanhay/gogol
gogol-billing/gen/Network/Google/Billing/Types/Product.hs
mpl-2.0
-- | The resource name for the SKU. Example: -- \"services\/DA34-426B-A397\/skus\/AA95-CD31-42FE\" skukName :: Lens' SKU (Maybe Text) skukName = lens _skukName (\ s a -> s{_skukName = a})
187
skukName :: Lens' SKU (Maybe Text) skukName = lens _skukName (\ s a -> s{_skukName = a})
88
skukName = lens _skukName (\ s a -> s{_skukName = a})
53
true
true
2
9
27
56
26
30
null
null
d16-processor/Haskell-C-
src/Backends/D16Naive/Optimize.hs
mit
indexed_mem ((Inst_RI Add reg1 (Const v)):i2@(Inst_RI op reg2 val2):(Inst_Mem St reg3 reg4 bf):rest) | reg1 == reg3 && reg2 == reg4 && reg1 /= reg2 = i2:(Inst_MemI St reg1 reg2 (Const v) bf Displacement):(indexed_mem rest)
230
indexed_mem ((Inst_RI Add reg1 (Const v)):i2@(Inst_RI op reg2 val2):(Inst_Mem St reg3 reg4 bf):rest) | reg1 == reg3 && reg2 == reg4 && reg1 /= reg2 = i2:(Inst_MemI St reg1 reg2 (Const v) bf Displacement):(indexed_mem rest)
230
indexed_mem ((Inst_RI Add reg1 (Const v)):i2@(Inst_RI op reg2 val2):(Inst_Mem St reg3 reg4 bf):rest) | reg1 == reg3 && reg2 == reg4 && reg1 /= reg2 = i2:(Inst_MemI St reg1 reg2 (Const v) bf Displacement):(indexed_mem rest)
230
false
false
0
12
42
127
63
64
null
null
mapinguari/SC_HS_Proxy
src/Hope.hs
mit
pathFinderF :: Node -> Node -> M.Map Node (Maybe Node) -> Maybe Path pathFinderF = pathFinder advance
101
pathFinderF :: Node -> Node -> M.Map Node (Maybe Node) -> Maybe Path pathFinderF = pathFinder advance
101
pathFinderF = pathFinder advance
32
false
true
0
10
16
42
20
22
null
null
SKA-ScienceDataProcessor/RC
MS6/dna/linux-perf-stat/Profiling/Linux/Perf/Stat/PMU.hs
apache-2.0
pmuGetBits :: String -> String -> Word64 -> String -> IO Word64 pmuGetBits deviceName config v descLine = do -- Get field name and value let (fld, val) = case split '=' descLine of [f, c] -> (f, read c) [f] -> (f, 1 :: Word64) _other -> ("", 0) if...
1,237
pmuGetBits :: String -> String -> Word64 -> String -> IO Word64 pmuGetBits deviceName config v descLine = do -- Get field name and value let (fld, val) = case split '=' descLine of [f, c] -> (f, read c) [f] -> (f, 1 :: Word64) _other -> ("", 0) if...
1,237
pmuGetBits deviceName config v descLine = do -- Get field name and value let (fld, val) = case split '=' descLine of [f, c] -> (f, read c) [f] -> (f, 1 :: Word64) _other -> ("", 0) if null fld then return v else do -- Read field description...
1,173
false
true
0
20
492
402
205
197
null
null
hvr/alex
src/Main.hs
bsd-3-clause
copyright :: String copyright = "Alex version " ++ projectVersion ++ ", (c) 2003 Chris Dornan and Simon Marlow\n"
113
copyright :: String copyright = "Alex version " ++ projectVersion ++ ", (c) 2003 Chris Dornan and Simon Marlow\n"
113
copyright = "Alex version " ++ projectVersion ++ ", (c) 2003 Chris Dornan and Simon Marlow\n"
93
false
true
0
6
18
19
10
9
null
null
TransformingMusicology/tabcode-haskell
tests/ParseTests.hs
gpl-3.0
structuredComments :: [Test] structuredComments = [ Test $ mkParseTest "{^}\n" (SystemBreak 1 1 Nothing) , Test $ mkParseTest "{>}{^}\n" (PageBreak 1 1 Nothing) ]
168
structuredComments :: [Test] structuredComments = [ Test $ mkParseTest "{^}\n" (SystemBreak 1 1 Nothing) , Test $ mkParseTest "{>}{^}\n" (PageBreak 1 1 Nothing) ]
168
structuredComments = [ Test $ mkParseTest "{^}\n" (SystemBreak 1 1 Nothing) , Test $ mkParseTest "{>}{^}\n" (PageBreak 1 1 Nothing) ]
139
false
true
0
9
29
58
30
28
null
null
svenssonjoel/MonadObsidian
Obsidian/MonadObsidian/Printing.hs
bsd-3-clause
printOp1 ATanH a = " atanh(" ++ pprint a ++ ")"
47
printOp1 ATanH a = " atanh(" ++ pprint a ++ ")"
47
printOp1 ATanH a = " atanh(" ++ pprint a ++ ")"
47
false
false
0
7
10
22
10
12
null
null
mydaum/cabal
Cabal/Distribution/Simple/Program/Builtin.hs
bsd-3-clause
lhcProgram :: Program lhcProgram = (simpleProgram "lhc") { programFindVersion = findProgramVersion "--numeric-version" id }
129
lhcProgram :: Program lhcProgram = (simpleProgram "lhc") { programFindVersion = findProgramVersion "--numeric-version" id }
129
lhcProgram = (simpleProgram "lhc") { programFindVersion = findProgramVersion "--numeric-version" id }
107
false
true
0
7
19
30
16
14
null
null
sjpet/quark
src/Quark/IOHelpers.hs
mit
startsWith s0 s = take (length s0) s == s0
42
startsWith s0 s = take (length s0) s == s0
42
startsWith s0 s = take (length s0) s == s0
42
false
false
1
8
9
32
12
20
null
null
rsasse/tamarin-prover
lib/theory/src/Theory/Constraint/System/Constraints.hs
gpl-3.0
-- | Pretty print a node conclusion. prettyNodeConc :: HighlightDocument d => NodeConc -> d prettyNodeConc (v, ConcIdx i) = parens (prettyNodeId v <> comma <-> int i)
166
prettyNodeConc :: HighlightDocument d => NodeConc -> d prettyNodeConc (v, ConcIdx i) = parens (prettyNodeId v <> comma <-> int i)
129
prettyNodeConc (v, ConcIdx i) = parens (prettyNodeId v <> comma <-> int i)
74
true
true
0
9
27
59
28
31
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/Capability.hs
bsd-3-clause
-------------------------------------------------------------------------------- enable :: EnableCap -> Capability -> IO () enable cap state = maybe recordInvalidEnum (f state) (marshalEnableCap cap) where f Disabled = glDisable f Enabled = glEnable -------------------------------------------------------...
345
enable :: EnableCap -> Capability -> IO () enable cap state = maybe recordInvalidEnum (f state) (marshalEnableCap cap) where f Disabled = glDisable f Enabled = glEnable --------------------------------------------------------------------------------
263
enable cap state = maybe recordInvalidEnum (f state) (marshalEnableCap cap) where f Disabled = glDisable f Enabled = glEnable --------------------------------------------------------------------------------
220
true
true
1
8
43
69
34
35
null
null
s9gf4ult/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Send a 201 "Created" response with the given route as the Location -- response header. sendResponseCreated :: MonadHandler m => Route (HandlerSite m) -> m a sendResponseCreated url = do r <- getUrlRender handlerError $ HCCreated $ r url -- | Send a 'W.Response'. Please note: this function is rarely -- nec...
565
sendResponseCreated :: MonadHandler m => Route (HandlerSite m) -> m a sendResponseCreated url = do r <- getUrlRender handlerError $ HCCreated $ r url -- | Send a 'W.Response'. Please note: this function is rarely -- necessary, and will /disregard/ any changes to response headers and session -- that you have al...
473
sendResponseCreated url = do r <- getUrlRender handlerError $ HCCreated $ r url -- | Send a 'W.Response'. Please note: this function is rarely -- necessary, and will /disregard/ any changes to response headers and session -- that you have already specified. This function short-circuits. It should be -- conside...
403
true
true
0
9
103
65
33
32
null
null
drx/petal
Syntax/Term.hs
mit
registers ((Load r1 r2 n) : is) = [r1, r2] ++ (registers is)
60
registers ((Load r1 r2 n) : is) = [r1, r2] ++ (registers is)
60
registers ((Load r1 r2 n) : is) = [r1, r2] ++ (registers is)
60
false
false
0
9
12
42
22
20
null
null
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types.hs
mpl-2.0
-- | The Id of the 'ChildWorkflowExecutionStarted' event recorded when this child -- workflow execution was started. This information can be useful for diagnosing -- problems by tracing back the chain of events leading up to this event. cweteaStartedEventId :: Lens' ChildWorkflowExecutionTerminatedEventAttributes Integ...
418
cweteaStartedEventId :: Lens' ChildWorkflowExecutionTerminatedEventAttributes Integer cweteaStartedEventId = lens _cweteaStartedEventId (\s a -> s { _cweteaStartedEventId = a })
181
cweteaStartedEventId = lens _cweteaStartedEventId (\s a -> s { _cweteaStartedEventId = a })
95
true
true
0
9
59
42
24
18
null
null
anton-dessiatov/ghc
compiler/types/CoAxiom.hs
bsd-3-clause
coAxiomSingleBranch_maybe :: CoAxiom br -> Maybe CoAxBranch coAxiomSingleBranch_maybe (CoAxiom { co_ax_branches = branches }) | FirstBranch br <- branches = Just br | otherwise = Nothing
194
coAxiomSingleBranch_maybe :: CoAxiom br -> Maybe CoAxBranch coAxiomSingleBranch_maybe (CoAxiom { co_ax_branches = branches }) | FirstBranch br <- branches = Just br | otherwise = Nothing
194
coAxiomSingleBranch_maybe (CoAxiom { co_ax_branches = branches }) | FirstBranch br <- branches = Just br | otherwise = Nothing
134
false
true
0
9
33
64
29
35
null
null
paulbarbu/ePseudocode
src/EPseudocode/Evaluator.hs
bsd-3-clause
le :: Env -> Expr -> Expr -> ErrorWithIO Bool le _ (Int l) (Int r) = return $ l <= r
84
le :: Env -> Expr -> Expr -> ErrorWithIO Bool le _ (Int l) (Int r) = return $ l <= r
84
le _ (Int l) (Int r) = return $ l <= r
38
false
true
0
11
21
58
27
31
null
null
mathhun/stack
src/Stack/Package.hs
bsd-3-clause
packageIdentifier :: Package -> Stack.Types.PackageIdentifier.PackageIdentifier packageIdentifier pkg = Stack.Types.PackageIdentifier.PackageIdentifier (packageName pkg) (packageVersion pkg)
210
packageIdentifier :: Package -> Stack.Types.PackageIdentifier.PackageIdentifier packageIdentifier pkg = Stack.Types.PackageIdentifier.PackageIdentifier (packageName pkg) (packageVersion pkg)
210
packageIdentifier pkg = Stack.Types.PackageIdentifier.PackageIdentifier (packageName pkg) (packageVersion pkg)
130
false
true
0
6
32
44
23
21
null
null
pascal-knodel/haskell-craft
_/links/E'4'16.hs
mit
isSpring May = True
22
isSpring May = True
22
isSpring May = True
22
false
false
0
5
6
9
4
5
null
null
pgj/bead
src/Bead/View/Content/TestScript/Page.hs
bsd-3-clause
-- ^ Modify an existing test script with CourseName Key Script pageDataCata create modify p = case p of Create cs -> create cs Modify cn tk ts -> modify cn tk ts
179
pageDataCata create modify p = case p of Create cs -> create cs Modify cn tk ts -> modify cn tk ts
115
pageDataCata create modify p = case p of Create cs -> create cs Modify cn tk ts -> modify cn tk ts
115
true
false
1
8
50
55
23
32
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
hvKernelArgs :: String hvKernelArgs = "kernel_args"
51
hvKernelArgs :: String hvKernelArgs = "kernel_args"
51
hvKernelArgs = "kernel_args"
28
false
true
0
4
5
11
6
5
null
null
jstolarek/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
-- | Add a finalizer that will run in the Q monad after the current module has -- been type checked. This only makes sense when run within a top-level splice. addModFinalizer :: Q () -> Q () addModFinalizer act = Q (qAddModFinalizer (unQ act))
243
addModFinalizer :: Q () -> Q () addModFinalizer act = Q (qAddModFinalizer (unQ act))
84
addModFinalizer act = Q (qAddModFinalizer (unQ act))
52
true
true
0
9
44
50
23
27
null
null
23Skidoo/aeson
Data/Aeson/Types/Instances.hs
bsd-3-clause
encodeWithKey :: (ToJSON k, ToJSON v) => ((k -> v -> Series -> Series) -> Series -> m -> Series) -> m -> Encoding encodeWithKey foldrWithKey = brackets '{' '}' . foldrWithKey go mempty where go k v c = Value (Encoding $ encodeKV k v) <> c
272
encodeWithKey :: (ToJSON k, ToJSON v) => ((k -> v -> Series -> Series) -> Series -> m -> Series) -> m -> Encoding encodeWithKey foldrWithKey = brackets '{' '}' . foldrWithKey go mempty where go k v c = Value (Encoding $ encodeKV k v) <> c
272
encodeWithKey foldrWithKey = brackets '{' '}' . foldrWithKey go mempty where go k v c = Value (Encoding $ encodeKV k v) <> c
127
false
true
0
12
81
114
57
57
null
null
Lacaranian/gridhs
grid.hs
mit
gridHeight (VSplit lGrid rGrid) = maximum [gridHeight lGrid, gridHeight rGrid]
78
gridHeight (VSplit lGrid rGrid) = maximum [gridHeight lGrid, gridHeight rGrid]
78
gridHeight (VSplit lGrid rGrid) = maximum [gridHeight lGrid, gridHeight rGrid]
78
false
false
0
7
9
33
15
18
null
null
iu-parfunc/AutoObsidian
interface_brainstorming/06_ExtensibleEffects/newVer/Eff1.hs
bsd-3-clause
mapMdebug' f (h:t) = do lift $ print h h' <- f h t' <- mapMdebug' f t return (h':t')
88
mapMdebug' f (h:t) = do lift $ print h h' <- f h t' <- mapMdebug' f t return (h':t')
88
mapMdebug' f (h:t) = do lift $ print h h' <- f h t' <- mapMdebug' f t return (h':t')
88
false
false
0
9
23
63
28
35
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Whether this is a default user role. Default user roles are created by -- the system for the account\/subaccount and cannot be modified or -- deleted. Each default user role comes with a basic set of preassigned -- permissions. urDefaultUserRole :: Lens' UserRole (Maybe Bool) urDefaultUserRole = lens _urDefaultU...
370
urDefaultUserRole :: Lens' UserRole (Maybe Bool) urDefaultUserRole = lens _urDefaultUserRole (\ s a -> s{_urDefaultUserRole = a})
137
urDefaultUserRole = lens _urDefaultUserRole (\ s a -> s{_urDefaultUserRole = a})
88
true
true
0
8
65
52
28
24
null
null
adunning/pandoc-citeproc
src/Text/CSL/Pandoc.hs
bsd-3-clause
mvPunctInsideQuote il il' = [il, il']
37
mvPunctInsideQuote il il' = [il, il']
37
mvPunctInsideQuote il il' = [il, il']
37
false
false
0
5
5
17
9
8
null
null
Soostone/hadron
src/Hadron/Run/Hadoop.hs
bsd-3-clause
------------------------------------------------------------------------------- hadoopMapReduce :: (Functor m, MonadIO m) => HadoopEnv -> MapReduceKey -> RunToken -> HadoopRunOpts -> ExceptT T.Text m () hadoopMapReduce HadoopEnv{..} mrKey runToken HadoopRunOpts{..} = do exec <- scriptIO getE...
3,679
hadoopMapReduce :: (Functor m, MonadIO m) => HadoopEnv -> MapReduceKey -> RunToken -> HadoopRunOpts -> ExceptT T.Text m () hadoopMapReduce HadoopEnv{..} mrKey runToken HadoopRunOpts{..} = do exec <- scriptIO getExecutablePath prog <- scriptIO getProgName echoInfo $ "Launching Hadoop ...
3,599
hadoopMapReduce HadoopEnv{..} mrKey runToken HadoopRunOpts{..} = do exec <- scriptIO getExecutablePath prog <- scriptIO getProgName echoInfo $ "Launching Hadoop job for MR key: " <> ls mrKey let args = mkArgs exec prog echoInfo $ "Hadoop arguments: " <> ls (intercalate " " args) (code, out, e...
3,452
true
true
84
14
1,272
828
449
379
null
null
ku-fpg/ecc-ldpc
src/ECC/Code/LDPC/Fast/CachedMult.hs
bsd-3-clause
mapMatrixlet :: (U.Unbox a, U.Unbox b) => (a -> b) -> Matrixlet a -> Matrixlet b mapMatrixlet f (Matrixlet sz a) = Matrixlet sz (fmap (fmap (mapArraylet f)) a)
159
mapMatrixlet :: (U.Unbox a, U.Unbox b) => (a -> b) -> Matrixlet a -> Matrixlet b mapMatrixlet f (Matrixlet sz a) = Matrixlet sz (fmap (fmap (mapArraylet f)) a)
159
mapMatrixlet f (Matrixlet sz a) = Matrixlet sz (fmap (fmap (mapArraylet f)) a)
78
false
true
0
11
28
89
44
45
null
null
benweitzman/quick-schema
src/Data/Json/Schema/Validation.hs
mit
schemaToJSON (String s) = A.String s
36
schemaToJSON (String s) = A.String s
36
schemaToJSON (String s) = A.String s
36
false
false
0
7
5
20
9
11
null
null
lueck/standoff-tools
testsuite/Test/StandOff/MarkupRange.hs
gpl-3.0
test_behind = assertEqual ((sampleRanges !! 2) `behind` (sampleRanges !! 3)) True
81
test_behind = assertEqual ((sampleRanges !! 2) `behind` (sampleRanges !! 3)) True
81
test_behind = assertEqual ((sampleRanges !! 2) `behind` (sampleRanges !! 3)) True
81
false
false
1
9
10
37
19
18
null
null
anggabc/ASD
Isi/a.hs
mit
--pembatas intersperse' n [] = []
34
intersperse' n [] = []
22
intersperse' n [] = []
22
true
false
0
6
6
16
8
8
null
null
yav/language-lua
src/Text/PrettyPrint/Leijen.hs
bsd-3-clause
column, nesting :: (Int -> Doc) -> Doc column f = Column f
65
column, nesting :: (Int -> Doc) -> Doc column f = Column f
65
column f = Column f
26
false
true
0
7
19
30
16
14
null
null
psfblair/freepalace
src/FreePalace/Handlers/Incoming.hs
apache-2.0
handleInboundEvent clientState (InboundMessages.MediaServerMessage mediaServerInfo) = handleMediaServerInfo clientState mediaServerInfo
135
handleInboundEvent clientState (InboundMessages.MediaServerMessage mediaServerInfo) = handleMediaServerInfo clientState mediaServerInfo
135
handleInboundEvent clientState (InboundMessages.MediaServerMessage mediaServerInfo) = handleMediaServerInfo clientState mediaServerInfo
135
false
false
0
8
7
24
11
13
null
null
olorin/amazonka
gen/src/Gen/AST/Data/Syntax.hs
mpl-2.0
conD :: ConDecl -> QualConDecl conD = QualConDecl noLoc [] []
61
conD :: ConDecl -> QualConDecl conD = QualConDecl noLoc [] []
61
conD = QualConDecl noLoc [] []
30
false
true
0
7
10
32
14
18
null
null
mcschroeder/ghc
compiler/coreSyn/CoreFVs.hs
bsd-3-clause
idFreeVars :: Id -> VarSet idFreeVars id = ASSERT( isId id) runFVSet $ idFreeVarsAcc id
87
idFreeVars :: Id -> VarSet idFreeVars id = ASSERT( isId id) runFVSet $ idFreeVarsAcc id
87
idFreeVars id = ASSERT( isId id) runFVSet $ idFreeVarsAcc id
60
false
true
0
8
14
42
18
24
null
null
Happstack/ixset
src/Data/IxSet/Ix.hs
bsd-3-clause
ixType_Data :: DataType ixType_Data = mkDataType "Happstack.Data.IxSet.Ix" [con_Ix_Data]
88
ixType_Data :: DataType ixType_Data = mkDataType "Happstack.Data.IxSet.Ix" [con_Ix_Data]
88
ixType_Data = mkDataType "Happstack.Data.IxSet.Ix" [con_Ix_Data]
64
false
true
0
6
7
19
10
9
null
null
daleooo/barrelfish
hake/RuleDefs.hs
mit
kernelLdFlags "scc" = SCC.kernelLdFlags
39
kernelLdFlags "scc" = SCC.kernelLdFlags
39
kernelLdFlags "scc" = SCC.kernelLdFlags
39
false
false
0
5
3
11
5
6
null
null
sol/hakyll
src/Hakyll/Web/Pandoc.hs
bsd-3-clause
readPandoc :: FileType -- ^ Determines how parsing happens -> Maybe (Identifier a) -- ^ Optional, for better error messages -> String -- ^ String to read -> Pandoc -- ^ Resulting document readPandoc = readPandocWith defaultHakyllParserState
317
readPandoc :: FileType -- ^ Determines how parsing happens -> Maybe (Identifier a) -- ^ Optional, for better error messages -> String -- ^ String to read -> Pandoc readPandoc = readPandocWith defaultHakyllParserState
278
readPandoc = readPandocWith defaultHakyllParserState
52
true
true
0
9
113
39
21
18
null
null
zalora/Angel
src/Angel/Config.hs
bsd-3-clause
modifyProg _ "directory" _ = error "wrong type for field 'directory'; string required"
86
modifyProg _ "directory" _ = error "wrong type for field 'directory'; string required"
86
modifyProg _ "directory" _ = error "wrong type for field 'directory'; string required"
86
false
false
0
5
12
16
7
9
null
null
zaxtax/hakaru
haskell/Language/Hakaru/CodeGen/Libs.hs
bsd-3-clause
fileT :: CTypeSpec fileT = CTypeDefType (Ident "FILE")
54
fileT :: CTypeSpec fileT = CTypeDefType (Ident "FILE")
54
fileT = CTypeDefType (Ident "FILE")
35
false
true
0
6
7
26
11
15
null
null
josefs/autosar
ARSim/arsim/AUTOSAR/ARSim.hs
bsd-3-clause
hear conn (WR a v) (Output b _) | a `conn` b = Update $ Output b v
123
hear conn (WR a v) (Output b _) | a `conn` b = Update $ Output b v
123
hear conn (WR a v) (Output b _) | a `conn` b = Update $ Output b v
123
false
false
1
7
74
53
24
29
null
null
oldmanmike/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
addTickStmt _isGuard (BindStmt pat e bind fail ty) = do liftM5 BindStmt (addTickLPat pat) (addTickLHsExprRHS e) (addTickSyntaxExpr hpcSrcSpan bind) (addTickSyntaxExpr hpcSrcSpan fail) (return ty)
283
addTickStmt _isGuard (BindStmt pat e bind fail ty) = do liftM5 BindStmt (addTickLPat pat) (addTickLHsExprRHS e) (addTickSyntaxExpr hpcSrcSpan bind) (addTickSyntaxExpr hpcSrcSpan fail) (return ty)
283
addTickStmt _isGuard (BindStmt pat e bind fail ty) = do liftM5 BindStmt (addTickLPat pat) (addTickLHsExprRHS e) (addTickSyntaxExpr hpcSrcSpan bind) (addTickSyntaxExpr hpcSrcSpan fail) (return ty)
283
false
false
0
9
111
75
36
39
null
null
gridaphobe/liquid-fixpoint
src/Language/Fixpoint/Types/Substitutions.hs
bsd-3-clause
catSubst :: Subst -> Subst -> Subst catSubst (Su s1) θ2@(Su s2) = Su $ M.union s1' s2 where s1' = subst θ2 <$> s1
139
catSubst :: Subst -> Subst -> Subst catSubst (Su s1) θ2@(Su s2) = Su $ M.union s1' s2 where s1' = subst θ2 <$> s1
139
catSubst (Su s1) θ2@(Su s2) = Su $ M.union s1' s2 where s1' = subst θ2 <$> s1
103
false
true
0
8
50
65
32
33
null
null
ghorn/dynobud
dynobud/tests/Qps/Qp.hs
lgpl-3.0
solveWithGlpk :: (KnownNat nx, KnownNat ng) => Qp nx ng -> GLPK.Solution solveWithGlpk qp = GLPK.simplex prob constraints bounds where -- unpack qp jacCoeffs :: [[Coef Double]] jacCoeffs = F.toList (fmap F.toList (qjacCoeffs qp)) bgs :: [(Double,Double)] bgs = F.toList (qbg qp) bxs :: [(Doub...
775
solveWithGlpk :: (KnownNat nx, KnownNat ng) => Qp nx ng -> GLPK.Solution solveWithGlpk qp = GLPK.simplex prob constraints bounds where -- unpack qp jacCoeffs :: [[Coef Double]] jacCoeffs = F.toList (fmap F.toList (qjacCoeffs qp)) bgs :: [(Double,Double)] bgs = F.toList (qbg qp) bxs :: [(Doub...
775
solveWithGlpk qp = GLPK.simplex prob constraints bounds where -- unpack qp jacCoeffs :: [[Coef Double]] jacCoeffs = F.toList (fmap F.toList (qjacCoeffs qp)) bgs :: [(Double,Double)] bgs = F.toList (qbg qp) bxs :: [(Double,Double)] bxs = F.toList (qbx qp) goffsets :: [Double] gof...
702
false
true
3
9
184
360
172
188
null
null
psandahl/big-engine
src/BigE/MousePicker.hs
mit
getPickId :: MonadIO m => (Int, Int) -> MousePicker -> m (Maybe PickId) getPickId (x, y) mousePicker = do TFB.enableRead $ framebuffer mousePicker pid <- liftIO readPixel TFB.disableRead if pid /= unpickableId then return $ Just pid else return Nothing where readPixel :: IO ...
655
getPickId :: MonadIO m => (Int, Int) -> MousePicker -> m (Maybe PickId) getPickId (x, y) mousePicker = do TFB.enableRead $ framebuffer mousePicker pid <- liftIO readPixel TFB.disableRead if pid /= unpickableId then return $ Just pid else return Nothing where readPixel :: IO ...
655
getPickId (x, y) mousePicker = do TFB.enableRead $ framebuffer mousePicker pid <- liftIO readPixel TFB.disableRead if pid /= unpickableId then return $ Just pid else return Nothing where readPixel :: IO PickId readPixel = withArray [0, 0, 0] $ \ptr -> do ...
583
false
true
0
12
229
218
106
112
null
null
jwiegley/ghc-release
libraries/containers/Data/Map/Base.hs
gpl-3.0
filterLt :: Ord k => MaybeS k -> Map k v -> Map k v filterLt NothingS t = t
75
filterLt :: Ord k => MaybeS k -> Map k v -> Map k v filterLt NothingS t = t
75
filterLt NothingS t = t
23
false
true
0
9
19
49
21
28
null
null
copland/cmdargs
System/Console/CmdArgs/GetOpt.hs
bsd-3-clause
- | Process the command-line, and return the list of values that matched -- (and those that didn\'t). The arguments are: -- -- * The order requirements (see 'ArgOrder') -- -- * The option descriptions (see 'OptDescr') -- -- * The actual command line arguments (presumably got from -- 'System.Environment.get...
938
getOpt :: ArgOrder a -> [OptDescr a] -> [String] -> ([a], [String], [String]) getOpt _ flags args = case process (convert "" flags) args of Left x -> ([],[],[x]) Right (a,b) -> (a,b,[]) -- | /Changes:/ This is exactly the same as 'getOpt', but the 3rd element of the -- tuple (second last) wil...
339
getOpt _ flags args = case process (convert "" flags) args of Left x -> ([],[],[x]) Right (a,b) -> (a,b,[]) -- | /Changes:/ This is exactly the same as 'getOpt', but the 3rd element of the -- tuple (second last) will be an empty list.
258
true
true
3
10
206
151
94
57
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Simulator/TermModel.hs
bsd-3-clause
unOp _sc _termOp valOp (Right x) = pure . Right $! valOp x
58
unOp _sc _termOp valOp (Right x) = pure . Right $! valOp x
58
unOp _sc _termOp valOp (Right x) = pure . Right $! valOp x
58
false
false
0
7
12
32
15
17
null
null
ku-fpg/blank-canvas
Graphics/Blank/Types/Font.hs
bsd-3-clause
-- | Shorthand for 'LighterWeight'. lighter :: FontWeight lighter = LighterWeight
81
lighter :: FontWeight lighter = LighterWeight
45
lighter = LighterWeight
23
true
true
0
6
10
19
8
11
null
null
benjumanji/methuselah-generator
src/Main.hs
mit
_Bool :: Prism' Text Bool _Bool = prism' focus refract where focus True = "True" focus False = "False" refract "True" = pure True refract "False" = pure False refract _ = Nothing
200
_Bool :: Prism' Text Bool _Bool = prism' focus refract where focus True = "True" focus False = "False" refract "True" = pure True refract "False" = pure False refract _ = Nothing
200
_Bool = prism' focus refract where focus True = "True" focus False = "False" refract "True" = pure True refract "False" = pure False refract _ = Nothing
174
false
true
1
5
54
76
33
43
null
null
dmeysman/tiny-compiler
src/Language/Tiny/Synthesis/Intermediate.hs
mit
statementsToIntermediate :: [Statement] -> State.State (Int, String, [SymbolTableEntry]) [IntermediateCode] statementsToIntermediate [] = return []
147
statementsToIntermediate :: [Statement] -> State.State (Int, String, [SymbolTableEntry]) [IntermediateCode] statementsToIntermediate [] = return []
147
statementsToIntermediate [] = return []
39
false
true
0
8
13
50
27
23
null
null
aktowns/ftgl
Graphics/Rendering/FTGL.hs
bsd-2-clause
-- | Get any errors associated with a layout. getLayoutError f = fgetLayoutError f
82
getLayoutError f = fgetLayoutError f
36
getLayoutError f = fgetLayoutError f
36
true
false
1
5
13
16
6
10
null
null
dagit/mattermost-api
src/Network/Mattermost.hs
bsd-3-clause
mmFlagPost :: Session -> UserId -> PostId -> IO () mmFlagPost sess uId pId = do let flaggedPost = FlaggedPost { flaggedPostUserId = uId , flaggedPostId = pId , flaggedPostStatus = True } let rawPath = "/api/v3/preferences/save" r...
625
mmFlagPost :: Session -> UserId -> PostId -> IO () mmFlagPost sess uId pId = do let flaggedPost = FlaggedPost { flaggedPostUserId = uId , flaggedPostId = pId , flaggedPostStatus = True } let rawPath = "/api/v3/preferences/save" r...
625
mmFlagPost sess uId pId = do let flaggedPost = FlaggedPost { flaggedPostUserId = uId , flaggedPostId = pId , flaggedPostStatus = True } let rawPath = "/api/v3/preferences/save" runLoggerS sess "mmFlagPost" $ HttpRequest POST rawPath (Just (toJSON [flaggedPos...
541
false
true
0
13
180
152
76
76
null
null
naruvimama/bassbull_how_i_start
src/Main.hs
mit
main :: IO () main = do csvData <- BL.readFile "battling.csv" let v = decode NoHeader csvData :: Either String (V.Vector BaseballStats) let summed = fmap (V.foldr summer 0) v putStrLn $ "Total atBats was: " ++ (show summed) where summer (name, year, team, atBats) n = n + atBats
288
main :: IO () main = do csvData <- BL.readFile "battling.csv" let v = decode NoHeader csvData :: Either String (V.Vector BaseballStats) let summed = fmap (V.foldr summer 0) v putStrLn $ "Total atBats was: " ++ (show summed) where summer (name, year, team, atBats) n = n + atBats
288
main = do csvData <- BL.readFile "battling.csv" let v = decode NoHeader csvData :: Either String (V.Vector BaseballStats) let summed = fmap (V.foldr summer 0) v putStrLn $ "Total atBats was: " ++ (show summed) where summer (name, year, team, atBats) n = n + atBats
274
false
true
2
14
59
119
58
61
null
null
kvalle/yahtzee.hs
src/Yahtzee/Hand.hs
mit
reroll gen (Hand hand) = Hand $ zipWith (\ (o, h) n -> if h then (o, h) else (n, h)) hand $ roll gen
105
reroll gen (Hand hand) = Hand $ zipWith (\ (o, h) n -> if h then (o, h) else (n, h)) hand $ roll gen
105
reroll gen (Hand hand) = Hand $ zipWith (\ (o, h) n -> if h then (o, h) else (n, h)) hand $ roll gen
105
false
false
0
11
29
69
38
31
null
null
murukeshm/scratchpad
haskell/Parser2.hs
gpl-2.0
iftoken = sptoken "if "
23
iftoken = sptoken "if "
23
iftoken = sptoken "if "
23
false
false
1
5
4
13
4
9
null
null
shnarazk/satter
Satter/Field.hs
gpl-3.0
gridViewOfTeam2 :: (Int, Int) -> [TwoD -> Bool] gridViewOfTeam2 (c, r) = [inGrid (c, r) i | i <- [c * r, c * r - 1 .. 1]]
121
gridViewOfTeam2 :: (Int, Int) -> [TwoD -> Bool] gridViewOfTeam2 (c, r) = [inGrid (c, r) i | i <- [c * r, c * r - 1 .. 1]]
121
gridViewOfTeam2 (c, r) = [inGrid (c, r) i | i <- [c * r, c * r - 1 .. 1]]
73
false
true
0
10
28
84
46
38
null
null
keera-studios/hsQt
Qtc/Gui/QSystemTrayIcon.hs
bsd-2-clause
qSystemTrayIconSupportsMessages :: (()) -> IO (Bool) qSystemTrayIconSupportsMessages () = withBoolResult $ qtc_QSystemTrayIcon_supportsMessages
149
qSystemTrayIconSupportsMessages :: (()) -> IO (Bool) qSystemTrayIconSupportsMessages () = withBoolResult $ qtc_QSystemTrayIcon_supportsMessages
149
qSystemTrayIconSupportsMessages () = withBoolResult $ qtc_QSystemTrayIcon_supportsMessages
96
false
true
0
7
17
35
18
17
null
null
mrakgr/futhark
src/futhark.hs
bsd-3-clause
kernelsProg :: String -> UntypedPassState -> FutharkM Kernels.Prog kernelsProg _ (Kernels prog) = return prog
111
kernelsProg :: String -> UntypedPassState -> FutharkM Kernels.Prog kernelsProg _ (Kernels prog) = return prog
111
kernelsProg _ (Kernels prog) = return prog
44
false
true
0
8
16
38
18
20
null
null
Marcus-Rosti/numerical-methods
test/Test_Ch_06.hs
gpl-2.0
err :: Double err = 10**(-4)
28
err :: Double err = 10**(-4)
28
err = 10**(-4)
14
false
true
0
7
5
20
11
9
null
null
Palmik/timers
src/Control/Concurrent/Timer/Lifted.hs
bsd-3-clause
-- | Executes the the given action once after the given delay elapsed, no sooner, maybe later. oneShotTimer :: MonadBaseControl IO m => m () -- ^ The action to be executed. -> Delay -- ^ The (minimal) time until the execution in microseconds. -> m (Timer m) oneShotTimer a d = Tim...
373
oneShotTimer :: MonadBaseControl IO m => m () -- ^ The action to be executed. -> Delay -- ^ The (minimal) time until the execution in microseconds. -> m (Timer m) oneShotTimer a d = Timer <$> (oneShotTimerImmutable a d >>= newMVar . Just)
278
oneShotTimer a d = Timer <$> (oneShotTimerImmutable a d >>= newMVar . Just)
75
true
true
0
10
100
70
35
35
null
null
tjakway/ghcjvm
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
getCallMethod _ _name _ (LFCon _) n_args _v_args _cg_loc _self_loop_info = ASSERT( n_args == 0 ) ReturnIt
107
getCallMethod _ _name _ (LFCon _) n_args _v_args _cg_loc _self_loop_info = ASSERT( n_args == 0 ) ReturnIt
107
getCallMethod _ _name _ (LFCon _) n_args _v_args _cg_loc _self_loop_info = ASSERT( n_args == 0 ) ReturnIt
107
false
false
2
6
18
47
20
27
null
null