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
amccausl/Swish
Swish/HaskellUtils/Network/URI.hs
lgpl-2.1
uriHexDigitChar :: UriParser Char uriHexDigitChar = hexDigit
61
uriHexDigitChar :: UriParser Char uriHexDigitChar = hexDigit
60
uriHexDigitChar = hexDigit
26
false
true
0
5
7
14
7
7
null
null
riccardotommasini/plp16
haskell/prepared/ESE20181120/Bintree.hs
apache-2.0
treeFoldr f acc EmptyTree = acc
31
treeFoldr f acc EmptyTree = acc
31
treeFoldr f acc EmptyTree = acc
31
false
false
1
5
5
19
6
13
null
null
utilForever/ProgrammingPractice
Solutions/MoNaDDu/Grade Management System/2/Part2.hs
mit
qsort (x:xs) = qsort [a | a <- xs, a > x] ++ x : qsort [a | a <- xs, x >= a]
76
qsort (x:xs) = qsort [a | a <- xs, a > x] ++ x : qsort [a | a <- xs, x >= a]
76
qsort (x:xs) = qsort [a | a <- xs, a > x] ++ x : qsort [a | a <- xs, x >= a]
76
false
false
0
10
23
69
34
35
null
null
takoeight0821/malgo
src/Malgo/Syntax.hs
bsd-3-clause
freevars :: (Eq (XId x), Hashable (XId x)) => Exp x -> HashSet (XId x) freevars (Var _ (WithPrefix v)) = one (v ^. value)
121
freevars :: (Eq (XId x), Hashable (XId x)) => Exp x -> HashSet (XId x) freevars (Var _ (WithPrefix v)) = one (v ^. value)
121
freevars (Var _ (WithPrefix v)) = one (v ^. value)
50
false
true
0
9
24
85
41
44
null
null
conal/hermit
src/HERMIT/Dictionary/Reasoning.hs
bsd-2-clause
(\/) :: Clause -> Clause -> Clause (\/) = Disj
46
(\/) :: Clause -> Clause -> Clause (\/) = Disj
46
(\/) = Disj
11
false
true
0
6
9
23
14
9
null
null
keithodulaigh/Hets
Haskell/TranslateId.hs
gpl-2.0
-- | Converts an identifier to a valid lower or upper case Haskell name translateIdWithType :: IdCase -> Id -> String translateIdWithType ty i = let s = translateId i "" c = if null s then error "translateIdWithTyper" else head s in case ty of UpperId -> if isLower c || c == '_' || isDigit c ...
511
translateIdWithType :: IdCase -> Id -> String translateIdWithType ty i = let s = translateId i "" c = if null s then error "translateIdWithTyper" else head s in case ty of UpperId -> if isLower c || c == '_' || isDigit c then "A__" ++ s else s LowerId -> if isUpper c ||...
439
translateIdWithType ty i = let s = translateId i "" c = if null s then error "translateIdWithTyper" else head s in case ty of UpperId -> if isLower c || c == '_' || isDigit c then "A__" ++ s else s LowerId -> if isUpper c || c == '_' || isDigit c || s `Set.member` lower...
393
true
true
0
16
152
158
78
80
null
null
gmalecha/skip-list
src/Data/SkipList.hs
mit
toSkipList :: Int -- ^ The step size in the index. -> [a] -- ^ The list to convert. -> SkipList a toSkipList quant = SkipList quant . toSkipIndex quant
173
toSkipList :: Int -- ^ The step size in the index. -> [a] -- ^ The list to convert. -> SkipList a toSkipList quant = SkipList quant . toSkipIndex quant
173
toSkipList quant = SkipList quant . toSkipIndex quant
53
false
true
0
8
51
44
21
23
null
null
cchalmers/shaped
src/Data/Dense/Storable.hs
bsd-3-clause
-- | Zip three arrays using the given function. If the array's don't -- have the same shape, the new array with be the intersection of the -- two shapes. zipWith3 :: (Shape f, Storable a, Storable b, Storable c, Storable d) => (a -> b -> c -> d) -> SArray f a -> SArray f b -> SAr...
372
zipWith3 :: (Shape f, Storable a, Storable b, Storable c, Storable d) => (a -> b -> c -> d) -> SArray f a -> SArray f b -> SArray f c -> SArray f d zipWith3 = G.zipWith3
214
zipWith3 = G.zipWith3
21
true
true
0
11
117
106
52
54
null
null
fmapfmapfmap/amazonka
amazonka-iam/gen/Network/AWS/IAM/ListSAMLProviders.hs
mpl-2.0
-- | The response status code. lsamlprsResponseStatus :: Lens' ListSAMLProvidersResponse Int lsamlprsResponseStatus = lens _lsamlprsResponseStatus (\ s a -> s{_lsamlprsResponseStatus = a})
188
lsamlprsResponseStatus :: Lens' ListSAMLProvidersResponse Int lsamlprsResponseStatus = lens _lsamlprsResponseStatus (\ s a -> s{_lsamlprsResponseStatus = a})
157
lsamlprsResponseStatus = lens _lsamlprsResponseStatus (\ s a -> s{_lsamlprsResponseStatus = a})
95
true
true
0
9
21
40
22
18
null
null
kazu-yamamoto/llrbtree
Data/Set/LLRBTree.hs
bsd-3-clause
deleteEQ _ _ _ _ _ _ = error "deleteEQ"
39
deleteEQ _ _ _ _ _ _ = error "deleteEQ"
39
deleteEQ _ _ _ _ _ _ = error "deleteEQ"
39
false
false
1
5
9
19
9
10
null
null
robeverest/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalBRotateR :: IntegralType a -> ((a, Int) -> a) evalBRotateR ty | IntegralDict <- integralDict ty = uncurry rotateR
117
evalBRotateR :: IntegralType a -> ((a, Int) -> a) evalBRotateR ty | IntegralDict <- integralDict ty = uncurry rotateR
117
evalBRotateR ty | IntegralDict <- integralDict ty = uncurry rotateR
67
false
true
0
9
18
50
24
26
null
null
Acidburn0zzz/haddock
haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
bsd-2-clause
hypSrcModuleUrl :: Module -> String hypSrcModuleUrl = hypSrcModuleFile
70
hypSrcModuleUrl :: Module -> String hypSrcModuleUrl = hypSrcModuleFile
70
hypSrcModuleUrl = hypSrcModuleFile
34
false
true
0
5
7
15
8
7
null
null
svalaskevicius/hob
src/lib/Hob/Command/ReloadSidebarTree.hs
gpl-3.0
reloadSidebarTreeCommandHandler :: CommandHandler reloadSidebarTreeCommandHandler = CommandHandler Nothing reloadCmd
116
reloadSidebarTreeCommandHandler :: CommandHandler reloadSidebarTreeCommandHandler = CommandHandler Nothing reloadCmd
116
reloadSidebarTreeCommandHandler = CommandHandler Nothing reloadCmd
66
false
true
0
5
7
16
8
8
null
null
fmapfmapfmap/amazonka
amazonka-ssm/gen/Network/AWS/SSM/CreateAssociation.hs
mpl-2.0
-- | The ID of the instance. caInstanceId :: Lens' CreateAssociation Text caInstanceId = lens _caInstanceId (\ s a -> s{_caInstanceId = a})
139
caInstanceId :: Lens' CreateAssociation Text caInstanceId = lens _caInstanceId (\ s a -> s{_caInstanceId = a})
110
caInstanceId = lens _caInstanceId (\ s a -> s{_caInstanceId = a})
65
true
true
0
9
22
40
22
18
null
null
EJahren/haskell-sdl2
Tests/Interactive/DrawLines.hs
gpl-3.0
windowHeight = 240
18
windowHeight = 240
18
windowHeight = 240
18
false
false
0
4
2
6
3
3
null
null
leroux/packages-haskeline
System/Console/Haskeline/Backend/Terminfo.hs
bsd-2-clause
clearLayoutT :: ActionM () clearLayoutT = do h <- asks height output (clearAll h) put initTermPos
109
clearLayoutT :: ActionM () clearLayoutT = do h <- asks height output (clearAll h) put initTermPos
109
clearLayoutT = do h <- asks height output (clearAll h) put initTermPos
82
false
true
0
9
27
44
19
25
null
null
y-usuzumi/survive-the-course
www.icourse163.org/ZJU-93001/第一周编程作业/2.hs
bsd-3-clause
maxSubseqSum :: [Int] -> (Int, Int, Int) maxSubseqSum a = _maxSubseqSum a $ ResultRepr 0 0 0 0 (head a) 0 True where _maxSubseqSum :: [Int] -> ResultRepr -> (Int, Int, Int) _maxSubseqSum [] resultRepr@ResultRepr{..} = if allNeg then (0, head a, last a) else (currMax, maxL, maxR) _maxSubseqSum (x:xs)...
1,441
maxSubseqSum :: [Int] -> (Int, Int, Int) maxSubseqSum a = _maxSubseqSum a $ ResultRepr 0 0 0 0 (head a) 0 True where _maxSubseqSum :: [Int] -> ResultRepr -> (Int, Int, Int) _maxSubseqSum [] resultRepr@ResultRepr{..} = if allNeg then (0, head a, last a) else (currMax, maxL, maxR) _maxSubseqSum (x:xs)...
1,441
maxSubseqSum a = _maxSubseqSum a $ ResultRepr 0 0 0 0 (head a) 0 True where _maxSubseqSum :: [Int] -> ResultRepr -> (Int, Int, Int) _maxSubseqSum [] resultRepr@ResultRepr{..} = if allNeg then (0, head a, last a) else (currMax, maxL, maxR) _maxSubseqSum (x:xs) resultRepr@ResultRepr{..} | currSu...
1,400
false
true
0
11
840
324
179
145
null
null
YellPika/effin
src/Data/Union.hs
bsd-3-clause
wrap :: f a -> Union (f ':+ l) a wrap = inject
46
wrap :: f a -> Union (f ':+ l) a wrap = inject
46
wrap = inject
13
false
true
0
9
12
38
17
21
null
null
rueshyna/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | Account name. biAccountName :: Lens' BillingInfo (Maybe Text) biAccountName = lens _biAccountName (\ s a -> s{_biAccountName = a})
143
biAccountName :: Lens' BillingInfo (Maybe Text) biAccountName = lens _biAccountName (\ s a -> s{_biAccountName = a})
124
biAccountName = lens _biAccountName (\ s a -> s{_biAccountName = a})
76
true
true
1
9
28
51
25
26
null
null
patperry/hs-linear-algebra
tests/STVector.hs
bsd-3-clause
prop_getNorm2 t x = runST $ x `readOnlyVector` \mx -> do n <- V.getNorm2 mx return $ n === V.norm2 x where _ = typed t x
146
prop_getNorm2 t x = runST $ x `readOnlyVector` \mx -> do n <- V.getNorm2 mx return $ n === V.norm2 x where _ = typed t x
146
prop_getNorm2 t x = runST $ x `readOnlyVector` \mx -> do n <- V.getNorm2 mx return $ n === V.norm2 x where _ = typed t x
146
false
false
0
11
52
68
32
36
null
null
fthomasmorel/Sudoku-solver
Sudoku.hs
mit
------------------------------------------------------------------------------------------------------------------------ -- DATA TO SUDOKU -- ------------------------------------------------------------------------------...
446
stringToInt :: [String] -> [Line] stringToInt s = map (\x -> map (digitToInt) x) s
82
stringToInt s = map (\x -> map (digitToInt) x) s
48
true
true
0
9
122
48
27
21
null
null
dashea/bdcs
importer/BDCS/Exceptions.hs
lgpl-2.1
throwIfNothingOtherwise :: Exception e => Maybe a -> e -> (a -> b) -> b throwIfNothingOtherwise (Just v) _ fn = fn v
118
throwIfNothingOtherwise :: Exception e => Maybe a -> e -> (a -> b) -> b throwIfNothingOtherwise (Just v) _ fn = fn v
118
throwIfNothingOtherwise (Just v) _ fn = fn v
46
false
true
0
10
24
56
27
29
null
null
thoughtpolice/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
checkLicense :: PackageDescription -> [PackageCheck] checkLicense pkg = catMaybes [ check (license pkg == UnspecifiedLicense) $ PackageDistInexcusable "The 'license' field is missing." , check (license pkg == AllRightsReserved) $ PackageDistSuspicious "The 'license' is AllRightsRes...
2,426
checkLicense :: PackageDescription -> [PackageCheck] checkLicense pkg = catMaybes [ check (license pkg == UnspecifiedLicense) $ PackageDistInexcusable "The 'license' field is missing." , check (license pkg == AllRightsReserved) $ PackageDistSuspicious "The 'license' is AllRightsRes...
2,426
checkLicense pkg = catMaybes [ check (license pkg == UnspecifiedLicense) $ PackageDistInexcusable "The 'license' field is missing." , check (license pkg == AllRightsReserved) $ PackageDistSuspicious "The 'license' is AllRightsReserved. Is that really what you want?" , case licens...
2,373
false
true
0
18
672
563
278
285
null
null
emwap/syntactic
tests/NanoFeldsparTests.hs
bsd-3-clause
prop_alphaEqBad a = alphaEq a (badRename a)
43
prop_alphaEqBad a = alphaEq a (badRename a)
43
prop_alphaEqBad a = alphaEq a (badRename a)
43
false
false
0
7
6
20
9
11
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GL/DisplayLists.hs
bsd-3-clause
callLists :: GLsizei -> DataType -> Ptr a -> IO () callLists n = glCallLists n . marshalDataType
96
callLists :: GLsizei -> DataType -> Ptr a -> IO () callLists n = glCallLists n . marshalDataType
96
callLists n = glCallLists n . marshalDataType
45
false
true
0
10
17
46
20
26
null
null
MasseR/zsh-battery
Symbols.hs
bsd-3-clause
barsymbol = '▶'
15
barsymbol = '▶'
15
barsymbol = '▶'
15
false
false
0
4
2
6
3
3
null
null
zeniuseducation/poly-euler
haskell/clojure.hs
epl-1.0
distinct ls = map ( head . group . sort ) $ ls
46
distinct ls = map ( head . group . sort ) $ ls
46
distinct ls = map ( head . group . sort ) $ ls
46
false
false
1
9
12
31
13
18
null
null
bitemyapp/ganeti
src/Ganeti/MaintD/Server.hs
bsd-2-clause
httpInterface :: IORef MemoryState -> Snap () httpInterface memstate = ifTop (method GET $ plainJSON [1 :: Int]) <|> dir "1" (ifTop (plainJSON J.JSNull) <|> route [ ("jobs", exposeState msJobs memstate) , ("evacuated", exposeState msEvacuated memstate) ...
411
httpInterface :: IORef MemoryState -> Snap () httpInterface memstate = ifTop (method GET $ plainJSON [1 :: Int]) <|> dir "1" (ifTop (plainJSON J.JSNull) <|> route [ ("jobs", exposeState msJobs memstate) , ("evacuated", exposeState msEvacuated memstate) ...
411
httpInterface memstate = ifTop (method GET $ plainJSON [1 :: Int]) <|> dir "1" (ifTop (plainJSON J.JSNull) <|> route [ ("jobs", exposeState msJobs memstate) , ("evacuated", exposeState msEvacuated memstate) , ("status", exposeState msIncidents memstat...
365
false
true
6
10
139
136
68
68
null
null
phadej/denotational-frp
src/Reactive/Denotational/Events.hs
mit
concatTimeMap :: (Time -> a -> Events b) -> Events a -> Events b concatTimeMap f = Events . impl (Time 0) . fromEvents where impl _ [] = [] impl t ((t', x) : es) = let ys = f (maxTime t t') x t'' = maxTime (maxTime t t') (endTime ys) ...
356
concatTimeMap :: (Time -> a -> Events b) -> Events a -> Events b concatTimeMap f = Events . impl (Time 0) . fromEvents where impl _ [] = [] impl t ((t', x) : es) = let ys = f (maxTime t t') x t'' = maxTime (maxTime t t') (endTime ys) ...
356
concatTimeMap f = Events . impl (Time 0) . fromEvents where impl _ [] = [] impl t ((t', x) : es) = let ys = f (maxTime t t') x t'' = maxTime (maxTime t t') (endTime ys) in fromEvents ys ++ impl t'' es
291
false
true
1
11
150
169
79
90
null
null
jberryman/chan-benchmarks
TestAtomics.hs
bsd-3-clause
maxInt = maxBound :: Int
24
maxInt = maxBound :: Int
24
maxInt = maxBound :: Int
24
false
false
0
4
4
9
5
4
null
null
dblia/nosql-ganeti
test/hs/Test/Ganeti/Utils.hs
gpl-2.0
prop_niceSort_single :: Property prop_niceSort_single = forAll genName $ \name -> conjoin [ printTestCase "single string" $ [name] ==? niceSort [name] , printTestCase "single plus empty" $ ["", name] ==? niceSort [name, ""] ]
235
prop_niceSort_single :: Property prop_niceSort_single = forAll genName $ \name -> conjoin [ printTestCase "single string" $ [name] ==? niceSort [name] , printTestCase "single plus empty" $ ["", name] ==? niceSort [name, ""] ]
235
prop_niceSort_single = forAll genName $ \name -> conjoin [ printTestCase "single string" $ [name] ==? niceSort [name] , printTestCase "single plus empty" $ ["", name] ==? niceSort [name, ""] ]
202
false
true
0
8
42
78
41
37
null
null
deech/stack
src/Stack/Runners.hs
bsd-3-clause
withUserFileLock :: (MonadBaseControl IO m, MonadIO m) => GlobalOpts -> Path Abs Dir -> (Maybe FileLock -> m a) -> m a withUserFileLock go@GlobalOpts{} dir act = do env <- liftIO getEnvironment let toLock = lookup "STACK_LOCK" env == Just "true...
1,707
withUserFileLock :: (MonadBaseControl IO m, MonadIO m) => GlobalOpts -> Path Abs Dir -> (Maybe FileLock -> m a) -> m a withUserFileLock go@GlobalOpts{} dir act = do env <- liftIO getEnvironment let toLock = lookup "STACK_LOCK" env == Just "true...
1,707
withUserFileLock go@GlobalOpts{} dir act = do env <- liftIO getEnvironment let toLock = lookup "STACK_LOCK" env == Just "true" if toLock then do let lockfile = $(mkRelFile "lockfile") let pth = dir </> lockfile ensureDir dir -- Just in case of asynchro...
1,520
false
true
31
9
850
360
186
174
null
null
ewestern/geos
tests/Data/Geometry/Geos/SerializeSpec.hs
mit
multiLineStringWKB = "0105000020C46E000001000000010200000004000000EE2DE25E859A20410829F224364B5A41BD757FB6679A204115C6D8E9304B5A4177111862469A2041A03F04E32C4B5A41BC1D3ADD459A2041793C8CD92C4B5A41" :: BS.ByteString
212
multiLineStringWKB = "0105000020C46E000001000000010200000004000000EE2DE25E859A20410829F224364B5A41BD757FB6679A204115C6D8E9304B5A4177111862469A2041A03F04E32C4B5A41BC1D3ADD459A2041793C8CD92C4B5A41" :: BS.ByteString
212
multiLineStringWKB = "0105000020C46E000001000000010200000004000000EE2DE25E859A20410829F224364B5A41BD757FB6679A204115C6D8E9304B5A4177111862469A2041A03F04E32C4B5A41BC1D3ADD459A2041793C8CD92C4B5A41" :: BS.ByteString
212
false
false
0
5
4
11
6
5
null
null
Javran/Project-Euler
src/ProjectEuler/Problem68.hs
mit
solutions :: StateT [Int] [] [Int] solutions = do outer@[a1,a2,a3,a4,a5] <- replicateM 5 pickOne' guard $ 10 `elem` outer b1 <- pickOne' b2 <- pickOne' let correctSum = guard . (== a1 + b1 + b2) b3 <- pickOne' correctSum $ a2 + b2 + b3 b4 <- pickOne' correctSum $ a3 + b3 + b4 b5 ...
871
solutions :: StateT [Int] [] [Int] solutions = do outer@[a1,a2,a3,a4,a5] <- replicateM 5 pickOne' guard $ 10 `elem` outer b1 <- pickOne' b2 <- pickOne' let correctSum = guard . (== a1 + b1 + b2) b3 <- pickOne' correctSum $ a2 + b2 + b3 b4 <- pickOne' correctSum $ a3 + b3 + b4 b5 ...
871
solutions = do outer@[a1,a2,a3,a4,a5] <- replicateM 5 pickOne' guard $ 10 `elem` outer b1 <- pickOne' b2 <- pickOne' let correctSum = guard . (== a1 + b1 + b2) b3 <- pickOne' correctSum $ a2 + b2 + b3 b4 <- pickOne' correctSum $ a3 + b3 + b4 b5 <- pickOne' correctSum $ a4 + b...
836
false
true
1
13
387
333
172
161
null
null
mrkkrp/stack
src/Stack/Docker.hs
bsd-3-clause
runContainerAndExit :: (StackM env m, HasConfig env) => GetCmdArgs env m -> Maybe (Path Abs Dir) -- ^ Project root (maybe) -> m () -- ^ Action to run before -> m () -- ^ Action to run after -> m () runContainerAndExit getCmdArgs mprojectRoot be...
8,168
runContainerAndExit :: (StackM env m, HasConfig env) => GetCmdArgs env m -> Maybe (Path Abs Dir) -- ^ Project root (maybe) -> m () -- ^ Action to run before -> m () -- ^ Action to run after -> m () runContainerAndExit getCmdArgs mprojectRoot be...
8,168
runContainerAndExit getCmdArgs mprojectRoot before after = do config <- view configL let docker = configDocker config envOverride <- getEnvOverride (configPlatform config) checkDockerVersion envOverride docker (env,isStdinTerminal,isStder...
7,934
false
true
7
22
2,559
1,968
994
974
null
null
GaloisInc/halvm-ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
isGoodBreakExpr (HsAppTypeOut {}) = True
40
isGoodBreakExpr (HsAppTypeOut {}) = True
40
isGoodBreakExpr (HsAppTypeOut {}) = True
40
false
false
0
7
4
16
8
8
null
null
sgillespie/ghc
testsuite/tests/deriving/should_run/drvrun006.hs
bsd-3-clause
val2 :: Tree Int val2 = Leaf 2 :^: Leaf (-1)
44
val2 :: Tree Int val2 = Leaf 2 :^: Leaf (-1)
44
val2 = Leaf 2 :^: Leaf (-1)
27
false
true
0
8
10
29
14
15
null
null
thomie/vector
Data/Vector/Fusion/Stream/Monadic.hs
bsd-3-clause
enumFromTo_intlike x y = x `seq` y `seq` Stream step x where {-# INLINE_INNER step #-} step z | z <= y = return $ Yield z (z+1) | otherwise = return $ Done
181
enumFromTo_intlike x y = x `seq` y `seq` Stream step x where {-# INLINE_INNER step #-} step z | z <= y = return $ Yield z (z+1) | otherwise = return $ Done
181
enumFromTo_intlike x y = x `seq` y `seq` Stream step x where {-# INLINE_INNER step #-} step z | z <= y = return $ Yield z (z+1) | otherwise = return $ Done
181
false
false
1
9
59
91
42
49
null
null
peterson/lets-tree
src/Lets/RoseTree.hs
bsd-3-clause
-- -- sample -- rt1 = singleton 1
34
rt1 = singleton 1
17
rt1 = singleton 1
17
true
false
1
5
8
15
7
8
null
null
brendanhay/gogol
gogol-run/gen/Network/Google/Resource/Run/Projects/Locations/Services/SetIAMPolicy.hs
mpl-2.0
-- | V1 error format. plssipXgafv :: Lens' ProjectsLocationsServicesSetIAMPolicy (Maybe Xgafv) plssipXgafv = lens _plssipXgafv (\ s a -> s{_plssipXgafv = a})
159
plssipXgafv :: Lens' ProjectsLocationsServicesSetIAMPolicy (Maybe Xgafv) plssipXgafv = lens _plssipXgafv (\ s a -> s{_plssipXgafv = a})
137
plssipXgafv = lens _plssipXgafv (\ s a -> s{_plssipXgafv = a})
64
true
true
0
9
23
46
25
21
null
null
zepto-lang/zepto-js
src/Zepto/Parser.hs
gpl-2.0
bin2digx digint (x:xs) = let old = 2 * digint + (if x == '0' then 0 else 1) in bin2digx old xs
122
bin2digx digint (x:xs) = let old = 2 * digint + (if x == '0' then 0 else 1) in bin2digx old xs
122
bin2digx digint (x:xs) = let old = 2 * digint + (if x == '0' then 0 else 1) in bin2digx old xs
122
false
false
0
12
50
58
29
29
null
null
davidsd/snaplet-liftajax
src/Snap/Snaplet/LiftAjax/Splice.hs
bsd-3-clause
jsonButton :: (HasAjax b, FromJSON a) => JExpr -> ButtonCallback b a -> Splice (Handler b b) jsonButton j c = ajaxButton $ onClick $ callWithJson j c
163
jsonButton :: (HasAjax b, FromJSON a) => JExpr -> ButtonCallback b a -> Splice (Handler b b) jsonButton j c = ajaxButton $ onClick $ callWithJson j c
163
jsonButton j c = ajaxButton $ onClick $ callWithJson j c
56
false
true
0
10
41
68
33
35
null
null
deweyvm/starstats
src/StarStats/DB/Utils.hs
mit
assemble :: [(String, Int, Int)] -> [[(String, Int, Int)]] assemble xs = groupBy (\(n, _, _) (m, _, _) -> n == m) xs
117
assemble :: [(String, Int, Int)] -> [[(String, Int, Int)]] assemble xs = groupBy (\(n, _, _) (m, _, _) -> n == m) xs
116
assemble xs = groupBy (\(n, _, _) (m, _, _) -> n == m) xs
57
false
true
0
8
24
82
49
33
null
null
facebookincubator/duckling
Duckling/AmountOfMoney/AR/Rules.hs
bsd-3-clause
ruleIntervalMin :: Rule ruleIntervalMin = Rule { name = "at least/over/above/more than <amount-of-money>" , pattern = [ regex "فوق||[أا]كثر من|على ال[اأ]قل" , Predicate isSimpleAmountOfMoney ] , prod = \tokens -> case tokens of (_: Token AmountOfMoney AmountOfMoneyData {TAmountOfMoney.val...
456
ruleIntervalMin :: Rule ruleIntervalMin = Rule { name = "at least/over/above/more than <amount-of-money>" , pattern = [ regex "فوق||[أا]كثر من|على ال[اأ]قل" , Predicate isSimpleAmountOfMoney ] , prod = \tokens -> case tokens of (_: Token AmountOfMoney AmountOfMoneyData {TAmountOfMoney.val...
456
ruleIntervalMin = Rule { name = "at least/over/above/more than <amount-of-money>" , pattern = [ regex "فوق||[أا]كثر من|على ال[اأ]قل" , Predicate isSimpleAmountOfMoney ] , prod = \tokens -> case tokens of (_: Token AmountOfMoney AmountOfMoneyData {TAmountOfMoney.value = Just to, TAmountOfM...
432
false
true
0
19
105
127
66
61
null
null
vladfi1/hs-misc
SimplePHOAS.hs
mit
showExp' (v:vs) (Lam f) = "(\\" ++ v ++ " -> " ++ showExp' vs (f v) ++ ")"
74
showExp' (v:vs) (Lam f) = "(\\" ++ v ++ " -> " ++ showExp' vs (f v) ++ ")"
74
showExp' (v:vs) (Lam f) = "(\\" ++ v ++ " -> " ++ showExp' vs (f v) ++ ")"
74
false
false
0
9
18
51
25
26
null
null
edofic/effect-handlers
test/Examples/Exception.hs
mit
------------------------------------------------------- prg1 = throw "something went wrong"
92
prg1 = throw "something went wrong"
35
prg1 = throw "something went wrong"
35
true
false
0
5
7
10
5
5
null
null
leepike/copilot-language
src/Copilot/Language/Operators/Extern.hs
bsd-3-clause
externW8 :: String -> Maybe [Word8] -> Stream Word8 externW8 = extern
71
externW8 :: String -> Maybe [Word8] -> Stream Word8 externW8 = extern
71
externW8 = extern
18
false
true
0
8
13
28
14
14
null
null
statusfailed/pp
Language/PP/Eval.hs
mit
genIO (Free (P m)) = m >>= (genIO . snd)
40
genIO (Free (P m)) = m >>= (genIO . snd)
40
genIO (Free (P m)) = m >>= (genIO . snd)
40
false
false
0
9
9
32
16
16
null
null
scolobb/fgl
Data/Graph/Inductive/Example.hs
bsd-3-clause
clr528 = mkGraph [(1,'s'),(2,'u'),(3,'v'),(4,'x'),(5,'y')] [(1,2,10),(1,4,5),(2,3,1),(2,4,2),(3,5,4), (4,2,3),(4,3,9),(4,5,2),(5,1,7),(5,3,6)]
177
clr528 = mkGraph [(1,'s'),(2,'u'),(3,'v'),(4,'x'),(5,'y')] [(1,2,10),(1,4,5),(2,3,1),(2,4,2),(3,5,4), (4,2,3),(4,3,9),(4,5,2),(5,1,7),(5,3,6)]
177
clr528 = mkGraph [(1,'s'),(2,'u'),(3,'v'),(4,'x'),(5,'y')] [(1,2,10),(1,4,5),(2,3,1),(2,4,2),(3,5,4), (4,2,3),(4,3,9),(4,5,2),(5,1,7),(5,3,6)]
177
false
false
1
6
40
180
115
65
null
null
dysinger/amazonka
amazonka-cloudtrail/gen/Network/AWS/CloudTrail/UpdateTrail.hs
mpl-2.0
-- | Specifies whether the trail is publishing events from global services such as -- IAM to the log files. utrIncludeGlobalServiceEvents :: Lens' UpdateTrailResponse (Maybe Bool) utrIncludeGlobalServiceEvents = lens _utrIncludeGlobalServiceEvents (\s a -> s { _utrIncludeGlobalServiceEvents = a })
310
utrIncludeGlobalServiceEvents :: Lens' UpdateTrailResponse (Maybe Bool) utrIncludeGlobalServiceEvents = lens _utrIncludeGlobalServiceEvents (\s a -> s { _utrIncludeGlobalServiceEvents = a })
202
utrIncludeGlobalServiceEvents = lens _utrIncludeGlobalServiceEvents (\s a -> s { _utrIncludeGlobalServiceEvents = a })
130
true
true
0
8
50
48
26
22
null
null
pniedzielski/fowlie-mga
src/Main.hs
gpl-3.0
nullToNothing x = Just x
25
nullToNothing x = Just x
25
nullToNothing x = Just x
25
false
false
0
5
5
12
5
7
null
null
tcoenraad/functioneel-programmeren
practica/serie3/8.balance-tree.hs
mit
depth Leaf1c = 1
16
depth Leaf1c = 1
16
depth Leaf1c = 1
16
false
false
0
4
3
10
4
6
null
null
oldmanmike/ghc
compiler/types/Coercion.hs
bsd-3-clause
ppr_co p co@(TransCo {}) = maybeParen p FunPrec $ case trans_co_list co [] of [] -> panic "ppr_co" (co:cos) -> sep ( ppr_co FunPrec co : [ char ';' <+> ppr_co FunPrec co | co <- cos])
313
ppr_co p co@(TransCo {}) = maybeParen p FunPrec $ case trans_co_list co [] of [] -> panic "ppr_co" (co:cos) -> sep ( ppr_co FunPrec co : [ char ';' <+> ppr_co FunPrec co | co <- cos])
313
ppr_co p co@(TransCo {}) = maybeParen p FunPrec $ case trans_co_list co [] of [] -> panic "ppr_co" (co:cos) -> sep ( ppr_co FunPrec co : [ char ';' <+> ppr_co FunPrec co | co <- cos])
313
false
false
0
14
166
103
50
53
null
null
suhailshergill/liboleg
Control/CCRef.hs
bsd-3-clause
testls0 = (expect [] =<<) . runCC $ do p <- newPrompt pushPrompt p ( (return . ("a":)) =<< (pushPrompt p (shift0P p (\_ -> (shift0P p (\_ -> return []))))))
182
testls0 = (expect [] =<<) . runCC $ do p <- newPrompt pushPrompt p ( (return . ("a":)) =<< (pushPrompt p (shift0P p (\_ -> (shift0P p (\_ -> return []))))))
182
testls0 = (expect [] =<<) . runCC $ do p <- newPrompt pushPrompt p ( (return . ("a":)) =<< (pushPrompt p (shift0P p (\_ -> (shift0P p (\_ -> return []))))))
182
false
false
4
22
56
107
53
54
null
null
ambiata/tatooine-cli
src/Ambiata/Cli/Env.hs
apache-2.0
runmode :: Bool -> RunMode runmode True = OneShot
49
runmode :: Bool -> RunMode runmode True = OneShot
49
runmode True = OneShot
22
false
true
0
5
8
18
9
9
null
null
tpsinnem/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
gccDbg _ = "-O2"
16
gccDbg _ = "-O2"
16
gccDbg _ = "-O2"
16
false
false
0
4
3
10
4
6
null
null
Persi/shellcheck
ShellCheck/Parser.hs
gpl-3.0
readConditionContents single = readCondContents `attempting` lookAhead (do pos <- getPosition s <- many1 letter when (s `elem` commonCommands) $ parseProblemAt pos WarningC 1009 "Use '...
7,289
readConditionContents single = readCondContents `attempting` lookAhead (do pos <- getPosition s <- many1 letter when (s `elem` commonCommands) $ parseProblemAt pos WarningC 1009 "Use '...
7,289
readConditionContents single = readCondContents `attempting` lookAhead (do pos <- getPosition s <- many1 letter when (s `elem` commonCommands) $ parseProblemAt pos WarningC 1009 "Use '...
7,289
false
false
5
16
2,699
1,859
861
998
null
null
glguy/ssh-hans
src/Network/SSH/Protocol.hs
bsd-3-clause
getNameList :: Get [ShortByteString] getNameList = do len <- getWord32be bytes <- getBytes (fromIntegral len) return (map toShort (S.split comma bytes)) where comma = fromIntegral (ord ',')
208
getNameList :: Get [ShortByteString] getNameList = do len <- getWord32be bytes <- getBytes (fromIntegral len) return (map toShort (S.split comma bytes)) where comma = fromIntegral (ord ',')
208
getNameList = do len <- getWord32be bytes <- getBytes (fromIntegral len) return (map toShort (S.split comma bytes)) where comma = fromIntegral (ord ',')
171
false
true
0
12
45
81
38
43
null
null
nickbart1980/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
lhsCodeBlock :: MarkdownParser (F Blocks) lhsCodeBlock = do guardEnabled Ext_literate_haskell (return . B.codeBlockWith ("",["sourceCode","literate","haskell"],[]) <$> (lhsCodeBlockBird <|> lhsCodeBlockLaTeX)) <|> (return . B.codeBlockWith ("",["sourceCode","haskell"],[]) <$> lhsCodeBlockInv...
329
lhsCodeBlock :: MarkdownParser (F Blocks) lhsCodeBlock = do guardEnabled Ext_literate_haskell (return . B.codeBlockWith ("",["sourceCode","literate","haskell"],[]) <$> (lhsCodeBlockBird <|> lhsCodeBlockLaTeX)) <|> (return . B.codeBlockWith ("",["sourceCode","haskell"],[]) <$> lhsCodeBlockInv...
329
lhsCodeBlock = do guardEnabled Ext_literate_haskell (return . B.codeBlockWith ("",["sourceCode","literate","haskell"],[]) <$> (lhsCodeBlockBird <|> lhsCodeBlockLaTeX)) <|> (return . B.codeBlockWith ("",["sourceCode","haskell"],[]) <$> lhsCodeBlockInverseBird)
287
false
true
0
13
52
109
59
50
null
null
jano017/Discord.hs
src/Network/Discord/Framework.hs
mit
handle a@(Event s p) (D.UnknownEvent v o) | s == v = runAsync (clientProxy a) $ p o
108
handle a@(Event s p) (D.UnknownEvent v o) | s == v = runAsync (clientProxy a) $ p o
108
handle a@(Event s p) (D.UnknownEvent v o) | s == v = runAsync (clientProxy a) $ p o
108
false
false
0
9
42
58
27
31
null
null
vituscze/logic
src/Logic/Checked.hs
bsd-3-clause
prepend t (F x:qs) f = case prepend t qs f of Some t' f' pf -> Some (mergeSing t' JustForallS) (Forall x f') (mergeLeq t t' pf)
139
prepend t (F x:qs) f = case prepend t qs f of Some t' f' pf -> Some (mergeSing t' JustForallS) (Forall x f') (mergeLeq t t' pf)
139
prepend t (F x:qs) f = case prepend t qs f of Some t' f' pf -> Some (mergeSing t' JustForallS) (Forall x f') (mergeLeq t t' pf)
139
false
false
1
10
39
85
38
47
null
null
snowmantw/Frag
src/AFRPMiscellany.hs
gpl-2.0
sel5_3 :: (t, t1, t2, t3, t4) -> t2 sel5_3 (_,_,x,_,_) = x
58
sel5_3 :: (t, t1, t2, t3, t4) -> t2 sel5_3 (_,_,x,_,_) = x
58
sel5_3 (_,_,x,_,_) = x
22
false
true
0
6
12
48
29
19
null
null
brendanhay/pagerduty
src/Network/PagerDuty/REST/Schedules.hs
mpl-2.0
-- | Filters the result, showing only the schedules whose name matches the query. lsQuery :: Lens' (Request ListSchedules s b) (Maybe Text) lsQuery = upd.lsQuery'
162
lsQuery :: Lens' (Request ListSchedules s b) (Maybe Text) lsQuery = upd.lsQuery'
80
lsQuery = upd.lsQuery'
22
true
true
3
7
25
47
19
28
null
null
Noeda/compiled-expressions
src/Data/CompiledExpression/Internal.hs
mit
jitThread :: MVar () -> IO () jitThread ready_mvar = mask $ \restore -> do setMultithreaded True withContext $ \ctx -> withJIT ctx 0 $ \jit -> do i_own_context <- atomically $ do result <- readTMVar globalJit case result of Nothing -> do void $...
597
jitThread :: MVar () -> IO () jitThread ready_mvar = mask $ \restore -> do setMultithreaded True withContext $ \ctx -> withJIT ctx 0 $ \jit -> do i_own_context <- atomically $ do result <- readTMVar globalJit case result of Nothing -> do void $...
597
jitThread ready_mvar = mask $ \restore -> do setMultithreaded True withContext $ \ctx -> withJIT ctx 0 $ \jit -> do i_own_context <- atomically $ do result <- readTMVar globalJit case result of Nothing -> do void $ takeTMVar globalJit ...
567
false
true
0
28
222
200
90
110
null
null
FranklinChen/music-score
sketch/old/update/update6.hs
bsd-3-clause
-- down :: (HasPitches a a, AffineSpace (Pitch a)) => Interval a -> a -> a down a = pitches %~ (.-^ a)
102
down a = pitches %~ (.-^ a)
27
down a = pitches %~ (.-^ a)
27
true
false
3
6
22
24
11
13
null
null
silkapp/ordered-list
src/Data/List/Ordered.hs
bsd-3-clause
-- | /O(1)/ Create a singleton ordered list. singleton :: a -> List a singleton x = let s = [x] in FromBoth s s
112
singleton :: a -> List a singleton x = let s = [x] in FromBoth s s
66
singleton x = let s = [x] in FromBoth s s
41
true
true
0
9
25
41
20
21
null
null
fmapfmapfmap/amazonka
amazonka-dynamodb/test/Test/AWS/Gen/DynamoDB.hs
mpl-2.0
testBatchGetItemResponse :: BatchGetItemResponse -> TestTree testBatchGetItemResponse = res "BatchGetItemResponse" "fixture/BatchGetItemResponse.proto" dynamoDB (Proxy :: Proxy BatchGetItem)
206
testBatchGetItemResponse :: BatchGetItemResponse -> TestTree testBatchGetItemResponse = res "BatchGetItemResponse" "fixture/BatchGetItemResponse.proto" dynamoDB (Proxy :: Proxy BatchGetItem)
206
testBatchGetItemResponse = res "BatchGetItemResponse" "fixture/BatchGetItemResponse.proto" dynamoDB (Proxy :: Proxy BatchGetItem)
145
false
true
0
6
30
36
17
19
null
null
kmilner/tamarin-prover
lib/theory/src/Theory/Model/Fact.hs
gpl-3.0
isProtoFact _ = False
48
isProtoFact _ = False
48
isProtoFact _ = False
48
false
false
0
5
30
9
4
5
null
null
brendanhay/gogol
gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs
mpl-2.0
-- | Size in GB of the boot disk (default is 100GB). gcmvdcBootDiskSizeGb :: Lens' GoogleCloudMlV1__DiskConfig (Maybe Int32) gcmvdcBootDiskSizeGb = lens _gcmvdcBootDiskSizeGb (\ s a -> s{_gcmvdcBootDiskSizeGb = a}) . mapping _Coerce
246
gcmvdcBootDiskSizeGb :: Lens' GoogleCloudMlV1__DiskConfig (Maybe Int32) gcmvdcBootDiskSizeGb = lens _gcmvdcBootDiskSizeGb (\ s a -> s{_gcmvdcBootDiskSizeGb = a}) . mapping _Coerce
193
gcmvdcBootDiskSizeGb = lens _gcmvdcBootDiskSizeGb (\ s a -> s{_gcmvdcBootDiskSizeGb = a}) . mapping _Coerce
121
true
true
0
10
45
55
28
27
null
null
uduki/hsQt
Qtc/Enums/Gui/QGraphicsItem.hs
bsd-2-clause
eItemClipsChildrenToShape :: GraphicsItemFlag eItemClipsChildrenToShape = ieGraphicsItemFlag $ 16
99
eItemClipsChildrenToShape :: GraphicsItemFlag eItemClipsChildrenToShape = ieGraphicsItemFlag $ 16
99
eItemClipsChildrenToShape = ieGraphicsItemFlag $ 16
53
false
true
0
6
9
18
8
10
null
null
FranklinChen/IHaskell
ipython-kernel/examples/Calc.hs
mit
execRazor val Count clear send = do i <- liftIO $ takeMVar val modify (first $ consRes (Got Count i)) sendState liftIO $ putMVar val (i + 1) return i where sendState = liftIO clear >> fst <$> get >>= liftIO . send -- | Generate a language configuration for some initial state
293
execRazor val Count clear send = do i <- liftIO $ takeMVar val modify (first $ consRes (Got Count i)) sendState liftIO $ putMVar val (i + 1) return i where sendState = liftIO clear >> fst <$> get >>= liftIO . send -- | Generate a language configuration for some initial state
293
execRazor val Count clear send = do i <- liftIO $ takeMVar val modify (first $ consRes (Got Count i)) sendState liftIO $ putMVar val (i + 1) return i where sendState = liftIO clear >> fst <$> get >>= liftIO . send -- | Generate a language configuration for some initial state
293
false
false
0
12
70
109
50
59
null
null
ancientlanguage/haskell-analysis
greek-morph/src/Grammar/Greek/Morph/ShouldElide/Round.hs
mit
shouldElide :: Round InvalidElisionForm InvalidElisionCandidate (CoreWord :* Elision :* InitialAspiration) (CoreWord :* ShouldElide :* InitialAspiration) shouldElide = Round (over _Failure pure . to) (over _Failure pure . from) where to (w :^ IsElided :^ nasp) | Just (w' :^ nasp') <- Map.lookup (w :^ nasp) ...
729
shouldElide :: Round InvalidElisionForm InvalidElisionCandidate (CoreWord :* Elision :* InitialAspiration) (CoreWord :* ShouldElide :* InitialAspiration) shouldElide = Round (over _Failure pure . to) (over _Failure pure . from) where to (w :^ IsElided :^ nasp) | Just (w' :^ nasp') <- Map.lookup (w :^ nasp) ...
729
shouldElide = Round (over _Failure pure . to) (over _Failure pure . from) where to (w :^ IsElided :^ nasp) | Just (w' :^ nasp') <- Map.lookup (w :^ nasp) reverseElisionForms = Success $ w' :^ ShouldElide :^ nasp' to (w :^ NotElided :^ nasp) = Success $ w :^ ShouldNotElide :^ nasp to x = Failure $ Invali...
571
false
true
0
11
155
288
142
146
null
null
wavewave/EventAnalysis
lib/HEP/Automation/EventAnalysis/FileDriver.hs
bsd-2-clause
-- | -- :: DecayTopSink LHEvent PtlInfoMap CountIO c -> Conduit Event CountIO (Int,(),c) lheventIter :: Monad m => Conduit Event m (Maybe (LHEvent, PtlInfoMap, [DecayTop PtlIDInfo])) lheventIter = parseEvent =$= decayTopConduit =$= ordDecayTopConduit
253
lheventIter :: Monad m => Conduit Event m (Maybe (LHEvent, PtlInfoMap, [DecayTop PtlIDInfo])) lheventIter = parseEvent =$= decayTopConduit =$= ordDecayTopConduit
161
lheventIter = parseEvent =$= decayTopConduit =$= ordDecayTopConduit
67
true
true
0
11
36
56
30
26
null
null
spechub/Hets
CSL/Keywords.hs
gpl-2.0
floorS :: String floorS = "floor"
33
floorS :: String floorS = "floor"
33
floorS = "floor"
16
false
true
0
6
5
18
7
11
null
null
beni55/text
tests/Tests/Properties.hs
bsd-2-clause
tb_hexadecimal_word64 (a::Word64) = tb_hex a
44
tb_hexadecimal_word64 (a::Word64) = tb_hex a
44
tb_hexadecimal_word64 (a::Word64) = tb_hex a
44
false
false
0
7
4
19
9
10
null
null
liangcun/ConceptsOfSpatialInformation
CoreConceptsHs/Location.hs
apache-2.0
errorSRS = "spatial reference system error"
43
errorSRS = "spatial reference system error"
43
errorSRS = "spatial reference system error"
43
false
false
0
4
5
6
3
3
null
null
polarina/sdl2
Graphics/UI/SDL/Filesystem.hs
bsd-3-clause
writeBE64 :: MonadIO m => Ptr RWops -> Word64 -> m CSize writeBE64 v1 v2 = liftIO $ writeBE64' v1 v2
100
writeBE64 :: MonadIO m => Ptr RWops -> Word64 -> m CSize writeBE64 v1 v2 = liftIO $ writeBE64' v1 v2
100
writeBE64 v1 v2 = liftIO $ writeBE64' v1 v2
43
false
true
0
8
20
46
21
25
null
null
pparkkin/eta
compiler/ETA/Utils/Encoding.hs
bsd-3-clause
countUTF8Chars :: Ptr Word8 -> Int -> IO Int countUTF8Chars ptr len = go ptr 0 where !end = ptr `plusPtr` len go p !n | p >= end = return n | otherwise = do case utf8DecodeChar# (unPtr p) of (# _, nBytes# #) -> go (p `plusPtr#` nBytes#) (n+1)
318
countUTF8Chars :: Ptr Word8 -> Int -> IO Int countUTF8Chars ptr len = go ptr 0 where !end = ptr `plusPtr` len go p !n | p >= end = return n | otherwise = do case utf8DecodeChar# (unPtr p) of (# _, nBytes# #) -> go (p `plusPtr#` nBytes#) (n+1)
318
countUTF8Chars ptr len = go ptr 0 where !end = ptr `plusPtr` len go p !n | p >= end = return n | otherwise = do case utf8DecodeChar# (unPtr p) of (# _, nBytes# #) -> go (p `plusPtr#` nBytes#) (n+1)
273
false
true
1
13
126
137
64
73
null
null
eigengrau/hlint
data/Default.hs
bsd-3-clause
error "Evaluate" = foldl f z [] ==> z
37
error "Evaluate" = foldl f z [] ==> z
37
error "Evaluate" = foldl f z [] ==> z
37
false
false
2
5
8
31
11
20
null
null
ulricha/dsh-tpc-h
gen/TradeGen.hs
bsd-3-clause
genDayStockTrades opts day stock trades nextTs n = do price <- uniformR (1 :: Double, 10000) (o_gen opts) let trade = Trade price stock nextTs day tsOffset <- uniformR (1, 10) (o_gen opts) genDayStockTrades opts day stock (trade <| trades) (nextTs + tsOffset) (n - 1)
286
genDayStockTrades opts day stock trades nextTs n = do price <- uniformR (1 :: Double, 10000) (o_gen opts) let trade = Trade price stock nextTs day tsOffset <- uniformR (1, 10) (o_gen opts) genDayStockTrades opts day stock (trade <| trades) (nextTs + tsOffset) (n - 1)
286
genDayStockTrades opts day stock trades nextTs n = do price <- uniformR (1 :: Double, 10000) (o_gen opts) let trade = Trade price stock nextTs day tsOffset <- uniformR (1, 10) (o_gen opts) genDayStockTrades opts day stock (trade <| trades) (nextTs + tsOffset) (n - 1)
286
false
false
0
10
64
125
62
63
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/EnumConvert.hs
mit
getWrapParamEnum TAxis = gl_TEXTURE_WRAP_T
42
getWrapParamEnum TAxis = gl_TEXTURE_WRAP_T
42
getWrapParamEnum TAxis = gl_TEXTURE_WRAP_T
42
false
false
0
5
3
9
4
5
null
null
Teino1978-Corp/Teino1978-Corp-alex
src/ParseMonad.hs
bsd-3-clause
newRMac :: String -> RExp -> P () newRMac rmac rexp = P $ \s -> Right (s{rmac_env = Map.insert rmac rexp (rmac_env s)}, ())
126
newRMac :: String -> RExp -> P () newRMac rmac rexp = P $ \s -> Right (s{rmac_env = Map.insert rmac rexp (rmac_env s)}, ())
126
newRMac rmac rexp = P $ \s -> Right (s{rmac_env = Map.insert rmac rexp (rmac_env s)}, ())
92
false
true
0
13
27
72
37
35
null
null
Paow/encore
src/ir/AST/Util.hs
bsd-3-clause
getChildren ArrayLiteral {args} = args
38
getChildren ArrayLiteral {args} = args
38
getChildren ArrayLiteral {args} = args
38
false
false
1
6
4
20
8
12
null
null
sordina/Edn
Print.hs
mit
(<>) :: Builder -> Builder -> Builder (<>) = mappend
52
(<>) :: Builder -> Builder -> Builder (<>) = mappend
52
(<>) = mappend
14
false
true
0
8
9
30
15
15
null
null
alpheccar/diagrams-pdf
src/Diagrams/Backend/Pdf.hs
bsd-3-clause
pdfImage :: (Monad m, PDFGlobals m) => PDFReference PDFJpeg -- ^ Reference to the Jpeg image in the PDF resources -> m (Diagram Pdf R2) pdfImage ref = do (w,h) <- P.bounds ref let r :: Path R2 r = rect w h # moveOriginTo (p2 (-w/2, h/2.0)) diag = mkQD (Prim (PdfImage mempty re...
533
pdfImage :: (Monad m, PDFGlobals m) => PDFReference PDFJpeg -- ^ Reference to the Jpeg image in the PDF resources -> m (Diagram Pdf R2) pdfImage ref = do (w,h) <- P.bounds ref let r :: Path R2 r = rect w h # moveOriginTo (p2 (-w/2, h/2.0)) diag = mkQD (Prim (PdfImage mempty re...
533
pdfImage ref = do (w,h) <- P.bounds ref let r :: Path R2 r = rect w h # moveOriginTo (p2 (-w/2, h/2.0)) diag = mkQD (Prim (PdfImage mempty ref)) (getEnvelope r) (getTrace r) mempty (Query $ \p -> Any (isInsideEvenOd...
379
false
true
0
17
200
223
110
113
null
null
markuspf/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
processRecords :: Archive -> Idris () processRecords ar = do rs <- getEntry [] "ibc_records" ar mapM_ (\ (n, r) -> updateIState (\i -> i { idris_records = addDef n r (idris_records i) })) rs
206
processRecords :: Archive -> Idris () processRecords ar = do rs <- getEntry [] "ibc_records" ar mapM_ (\ (n, r) -> updateIState (\i -> i { idris_records = addDef n r (idris_records i) })) rs
206
processRecords ar = do rs <- getEntry [] "ibc_records" ar mapM_ (\ (n, r) -> updateIState (\i -> i { idris_records = addDef n r (idris_records i) })) rs
168
false
true
0
17
50
93
47
46
null
null
spechub/Hets
THF/Sublogic.hs
gpl-2.0
joinCoreSl _ THFP = THFP
24
joinCoreSl _ THFP = THFP
24
joinCoreSl _ THFP = THFP
24
false
false
1
5
4
13
5
8
null
null
energyflowanalysis/efa-2.1
demo/additiveTermsStatic/Main.hs
bsd-3-clause
simplify :: Term -> Term simplify = Op.toNormalTerm . NonEmpty.sum . Op.expand . Op.fromNormalTerm
107
simplify :: Term -> Term simplify = Op.toNormalTerm . NonEmpty.sum . Op.expand . Op.fromNormalTerm
107
simplify = Op.toNormalTerm . NonEmpty.sum . Op.expand . Op.fromNormalTerm
82
false
true
0
8
22
35
18
17
null
null
energyflowanalysis/efa-2.1
src/EFA/Signal/ConvertTable.hs
bsd-3-clause
{- Diese ganzen 'error's sind hier falsch. Die Fehler muessen im Parser abgefangen werden. -} getPowerSignals :: (Functor f) => Map String (TPT.T Double) -> f String -> f (Sig.TSignal [] Double, Sig.PSignal [] Double) getPowerSignals tabPower = fmap (f . convertToSignal2D . flip (Map.findWi...
513
getPowerSignals :: (Functor f) => Map String (TPT.T Double) -> f String -> f (Sig.TSignal [] Double, Sig.PSignal [] Double) getPowerSignals tabPower = fmap (f . convertToSignal2D . flip (Map.findWithDefault (error "getPowerSignals: signal not found")) tabPower) where f (x, NonEmpty.Cons y ...
418
getPowerSignals tabPower = fmap (f . convertToSignal2D . flip (Map.findWithDefault (error "getPowerSignals: signal not found")) tabPower) where f (x, NonEmpty.Cons y []) = (x, y) f _ = error $ "getPowerSignals: NonEmpty.Cons contains more than one element"
282
true
true
2
12
110
160
77
83
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
ratioDataConName = conName gHC_REAL (fsLit ":%") ratioDataConKey
77
ratioDataConName = conName gHC_REAL (fsLit ":%") ratioDataConKey
77
ratioDataConName = conName gHC_REAL (fsLit ":%") ratioDataConKey
77
false
false
0
7
19
19
9
10
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLC_SORT_ASCENDING :: Int wxLC_SORT_ASCENDING = 16384
54
wxLC_SORT_ASCENDING :: Int wxLC_SORT_ASCENDING = 16384
54
wxLC_SORT_ASCENDING = 16384
27
false
true
0
4
5
11
6
5
null
null
CBMM/petersonfaces
petersonfaces-frontend/src/Main.hs
bsd-3-clause
apWidget :: MonadWidget t m => m (Dynamic t (a -> b)) -> m (Dynamic t a) -> m (Dynamic t b) apWidget mf ma = do f <- mf a <- ma return $ zipDynWith ($) f a
161
apWidget :: MonadWidget t m => m (Dynamic t (a -> b)) -> m (Dynamic t a) -> m (Dynamic t b) apWidget mf ma = do f <- mf a <- ma return $ zipDynWith ($) f a
161
apWidget mf ma = do f <- mf a <- ma return $ zipDynWith ($) f a
69
false
true
0
11
44
103
49
54
null
null
zeniuseducation/poly-euler
haskell/prob201-300.hs
epl-1.0
usePrimes = primesUnder 25
26
usePrimes = primesUnder 25
26
usePrimes = primesUnder 25
26
false
false
0
5
3
9
4
5
null
null
sumitsahrawat/calculator
src/Math/REPL/Prim/Bindings.hs
gpl-2.0
-- | Get a variable from @Bindings@ getVar :: String -> Bindings -> Maybe Double getVar s b = M.lookup s (varMap b)
115
getVar :: String -> Bindings -> Maybe Double getVar s b = M.lookup s (varMap b)
79
getVar s b = M.lookup s (varMap b)
34
true
true
0
8
22
46
21
25
null
null
brendanhay/gogol
gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs
mpl-2.0
-- | A URL provided by this administrative body for looking up general -- election information. abElectionInfoURL :: Lens' AdministrativeBody (Maybe Text) abElectionInfoURL = lens _abElectionInfoURL (\ s a -> s{_abElectionInfoURL = a})
243
abElectionInfoURL :: Lens' AdministrativeBody (Maybe Text) abElectionInfoURL = lens _abElectionInfoURL (\ s a -> s{_abElectionInfoURL = a})
147
abElectionInfoURL = lens _abElectionInfoURL (\ s a -> s{_abElectionInfoURL = a})
88
true
true
2
9
40
56
26
30
null
null
rubenpieters/gre-project
shared/src/UserInput.hs
bsd-3-clause
clearDmg = singleton ClearDmg
29
clearDmg = singleton ClearDmg
29
clearDmg = singleton ClearDmg
29
false
false
1
5
3
12
4
8
null
null
jean-edouard/manager
xenmgr/XenMgr/Config.hs
gpl-2.0
appGetSwitcherResistance :: Rpc Int appGetSwitcherResistance = dbReadWithDefault 10 "/switcher/resistance"
106
appGetSwitcherResistance :: Rpc Int appGetSwitcherResistance = dbReadWithDefault 10 "/switcher/resistance"
106
appGetSwitcherResistance = dbReadWithDefault 10 "/switcher/resistance"
70
false
true
0
5
8
19
9
10
null
null
MaxOw/awesomium
src/Graphics/UI/Awesomium/WebCore.hs
lgpl-3.0
-- | Deletes a certain cookie on a certain URL. deleteCookie :: String -- ^ The URL that we will be deleting cookies on. -> String -- ^ The name of the cookie that will be deleted. -> IO () deleteCookie = awe_webcore_delete_cookie
242
deleteCookie :: String -- ^ The URL that we will be deleting cookies on. -> String -- ^ The name of the cookie that will be deleted. -> IO () deleteCookie = awe_webcore_delete_cookie
194
deleteCookie = awe_webcore_delete_cookie
40
true
true
0
8
54
27
15
12
null
null
bch29/streaming-png
src/Codec/Picture/Png/Streaming/MainData.hs
lgpl-3.0
-------------------------------------------------------------------------------- -- Main function {-| Given a stream of PNG chunks, decode the image data from it. The resulting bytes can be directly interpreted as pixels, whose format depends on the image's colour type. -} decodeImageData :: (MonadThrow m, MonadIO m...
716
decodeImageData :: (MonadThrow m, MonadIO m) => HeaderData -> Stream (PNGChunk m) m r -> ByteString m r decodeImageData hd@HeaderData{..} = let prevByteDistance = case getBitsPerPixel hdBitDepth hdColourType of Just bpp -> (fromIntegral bpp + 4) `div` 8 Nothing -> 1 in Q...
441
decodeImageData hd@HeaderData{..} = let prevByteDistance = case getBitsPerPixel hdBitDepth hdColourType of Just bpp -> (fromIntegral bpp + 4) `div` 8 Nothing -> 1 in Q.fromChunks . reconstructScanlines prevByteDistance . splitImageDataByScanlines hd . getDecompressedImageData
320
true
true
9
8
147
119
65
54
null
null
abakst/liquidhaskell
tests/todo/Aliases.hs
bsd-3-clause
foo :: [Int] {-@ foo :: Foos @-} foo = []
41
foo :: [Int] foo = []
21
foo = []
8
true
true
0
5
10
17
10
7
null
null