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
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2740 = 2739
11
2740 = 2739
11
2740 = 2739
11
false
false
1
5
2
10
3
7
null
null
erikd/fastpack
src/Data/FastPack/Get.hs
bsd-2-clause
plusPtrE :: Exp plusPtrE = mkVarE "Data.FastPack.Functions.plusPtr"
67
plusPtrE :: Exp plusPtrE = mkVarE "Data.FastPack.Functions.plusPtr"
67
plusPtrE = mkVarE "Data.FastPack.Functions.plusPtr"
51
false
true
0
6
6
20
8
12
null
null
olsner/ghc
compiler/rename/RnBinds.hs
bsd-3-clause
rnMatch :: Outputable (body RdrName) => HsMatchContext Name -> (Located (body RdrName) -> RnM (Located (body Name), FreeVars)) -> LMatch RdrName (Located (body RdrName)) -> RnM (LMatch Name (Located (body Name)), FreeVars) rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
303
rnMatch :: Outputable (body RdrName) => HsMatchContext Name -> (Located (body RdrName) -> RnM (Located (body Name), FreeVars)) -> LMatch RdrName (Located (body RdrName)) -> RnM (LMatch Name (Located (body Name)), FreeVars) rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
303
rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
56
false
true
0
15
63
132
64
68
null
null
tomicm/puh-hash
Language/Exec.hs
gpl-2.0
evalExpr :: VarTable -> Expr -> String evalExpr vTable (Str str) = str
70
evalExpr :: VarTable -> Expr -> String evalExpr vTable (Str str) = str
70
evalExpr vTable (Str str) = str
31
false
true
0
7
12
30
15
15
null
null
fhsjaagshs/niagra
src/Data/Niagra/Properties/Border.hs
mit
borderTopWidth :: (Monad m) => Builder -> NiagraT m () borderTopWidth = declaration "border-top-width"
102
borderTopWidth :: (Monad m) => Builder -> NiagraT m () borderTopWidth = declaration "border-top-width"
102
borderTopWidth = declaration "border-top-width"
47
false
true
0
8
13
34
17
17
null
null
mettekou/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
-- loop :: forall b d c. a (b,d) (c,d) -> a b c -- note the swapping of d and c do_loop :: DsCmdEnv -> Type -> Type -> Type -> CoreExpr -> CoreExpr do_loop ids b_ty c_ty d_ty f = mkApps (loop_id ids) [Type b_ty, Type d_ty, Type c_ty, f]
238
do_loop :: DsCmdEnv -> Type -> Type -> Type -> CoreExpr -> CoreExpr do_loop ids b_ty c_ty d_ty f = mkApps (loop_id ids) [Type b_ty, Type d_ty, Type c_ty, f]
158
do_loop ids b_ty c_ty d_ty f = mkApps (loop_id ids) [Type b_ty, Type d_ty, Type c_ty, f]
90
true
true
0
9
53
76
39
37
null
null
robeverest/accelerate
Data/Array/Accelerate/Trafo/Sharing.hs
bsd-3-clause
showPreExpOp ShapeSize{} = "ShapeSize"
45
showPreExpOp ShapeSize{} = "ShapeSize"
45
showPreExpOp ShapeSize{} = "ShapeSize"
45
false
false
0
6
10
13
6
7
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/toInteger_1.hs
mit
toIntegerMyInt :: MyInt -> Integer toIntegerMyInt x = Integer x
65
toIntegerMyInt :: MyInt -> Integer toIntegerMyInt x = Integer x
65
toIntegerMyInt x = Integer x
28
false
true
0
7
11
26
11
15
null
null
vladimir-ipatov/ganeti
test/hs/Test/Ganeti/Objects.hs
gpl-2.0
-- | Check that node serialisation is idempotent. prop_Node_serialisation :: Node -> Property prop_Node_serialisation = testSerialisation
137
prop_Node_serialisation :: Node -> Property prop_Node_serialisation = testSerialisation
87
prop_Node_serialisation = testSerialisation
43
true
true
0
5
15
16
9
7
null
null
energyflowanalysis/efa-2.1
demo/sliceSignals/Demo_sliceZeroCrossSignals.hs
bsd-3-clause
node0, node1 :: Node node0 = Node0
34
node0, node1 :: Node node0 = Node0
34
node0 = Node0
13
false
true
0
4
6
13
8
5
null
null
Peaker/bitmap
Data/Bitmap/IO.hs
bsd-3-clause
- | Copy into a new \"black\" bitmap; common generalization of crop and extend. copySubImage' :: PixelComponent t => Bitmap t -- ^ source image -> Offset -- ^ source rectangle offset -> Size -- ^ source rectangle size -> Size -- ^ target image size -> Offset ...
759
copySubImage' :: PixelComponent t => Bitmap t -- ^ source image -> Offset -- ^ source rectangle offset -> Size -- ^ source rectangle size -> Size -- ^ target image size -> Offset -- ^ target rectangle offset -> IO (Bitmap t) copySubImage' bm1 ofs1 rsiz ...
678
copySubImage' bm1 ofs1 rsiz tsiz ofs2 = do let align = bitmapRowAlignment bm1 nchn = bitmapNChannels bm1 bm2 <- newBitmap tsiz nchn (Just align) copySubImageInto bm1 ofs1 rsiz bm2 ofs2 return bm2 -- | The source rectangle may be arbitrary, may or may not intersect the -- source image in any way. W...
386
true
true
9
10
212
154
71
83
null
null
omefire/megaparsec
old-tests/Bugs/Bug9.hs
bsd-2-clause
integer :: Stream s m Char => ParsecT s u m Integer integer = lexeme L.integer
78
integer :: Stream s m Char => ParsecT s u m Integer integer = lexeme L.integer
78
integer = lexeme L.integer
26
false
true
0
6
15
36
17
19
null
null
shanewilson/cgtools
src/CGTools/Validate/Internal.hs
apache-2.0
lengthCheck :: LengthLimit -> LineNum -> Line -> Maybe Error lengthCheck limit n l | notUrl && tooLong = Just $ errorMsg n (T.pack $ "Length must be <= " ++ show limit ++ " (is " ++ show len ++ ")") | otherwise = Nothing where len = T.length l tooLong = len > limit notUrl = " " `T.isInfixOf` l
312
lengthCheck :: LengthLimit -> LineNum -> Line -> Maybe Error lengthCheck limit n l | notUrl && tooLong = Just $ errorMsg n (T.pack $ "Length must be <= " ++ show limit ++ " (is " ++ show len ++ ")") | otherwise = Nothing where len = T.length l tooLong = len > limit notUrl = " " `T.isInfixOf` l
312
lengthCheck limit n l | notUrl && tooLong = Just $ errorMsg n (T.pack $ "Length must be <= " ++ show limit ++ " (is " ++ show len ++ ")") | otherwise = Nothing where len = T.length l tooLong = len > limit notUrl = " " `T.isInfixOf` l
251
false
true
1
14
79
126
62
64
null
null
seagreen/hjsonschema
src/JSONSchema/Validator/Draft4/Array.hs
mit
uniqueItemsVal :: UniqueItems -> Vector Value -> Maybe UniqueItemsInvalid uniqueItemsVal (UniqueItems True) xs | allUniqueValues xs = Nothing | otherwise = Just (UniqueItemsInvalid xs)
199
uniqueItemsVal :: UniqueItems -> Vector Value -> Maybe UniqueItemsInvalid uniqueItemsVal (UniqueItems True) xs | allUniqueValues xs = Nothing | otherwise = Just (UniqueItemsInvalid xs)
199
uniqueItemsVal (UniqueItems True) xs | allUniqueValues xs = Nothing | otherwise = Just (UniqueItemsInvalid xs)
125
false
true
0
8
38
63
28
35
null
null
idontgetoutmuch/Kalman
src/Numeric/Kalman.hs
mit
runUKF :: (KnownNat m, KnownNat n) => (a -> R n -> R m) -- ^ System measurement function \(\boldsymbol{h}_i\) -> (a -> Sym m) -- ^ Covariance matrix encoding measurement noise \(R_i\) -> (a -> R n -> R n) -- ^ System evolution function -- \(\boldsymbol{a}_i(\boldsymbol{u}, \boldsymbo...
2,325
runUKF :: (KnownNat m, KnownNat n) => (a -> R n -> R m) -- ^ System measurement function \(\boldsymbol{h}_i\) -> (a -> Sym m) -- ^ Covariance matrix encoding measurement noise \(R_i\) -> (a -> R n -> R n) -- ^ System evolution function -- \(\boldsymbol{a}_i(\boldsymbol{u}, \boldsymbo...
2,233
runUKF measure measCov evolve sysCov input estSys newMeas = updatedEstimate where predictedSystem = runUKFPrediction evolve sysCov input estSys updatedEstimate = runUKFUpdate measure measCov input predictedSystem newMeas -- | The Kalman smoothing process (sometimes also called the -- Rauch-Tung-Striebel ...
1,433
true
true
0
16
510
219
122
97
null
null
Julianporter/Haskell-MapReduce
src/Parallel/MapReduce/WordCount/Tests.hs
bsd-3-clause
prop_Equal :: Positive Int -- ^ The upper bound on test size -> (Positive Int,Positive Int) -- ^ The proposed test set -> Property -- ^ Whether the test passed prop_Equal b p = forAll (makeWords n m) $ \words -> countWords (mapReduce 16 words) == fromIntegral ...
614
prop_Equal :: Positive Int -- ^ The upper bound on test size -> (Positive Int,Positive Int) -- ^ The proposed test set -> Property prop_Equal b p = forAll (makeWords n m) $ \words -> countWords (mapReduce 16 words) == fromIntegral n where (n,m) = shrinkIt b p ...
565
prop_Equal b p = forAll (makeWords n m) $ \words -> countWords (mapReduce 16 words) == fromIntegral n where (n,m) = shrinkIt b p -- ##################################################################### -- THE TESTS: TEST 2 -- ###########################################################...
403
true
true
0
10
171
103
54
49
null
null
karknu/rws
src/Ethernet.hs
bsd-3-clause
macAddressPart :: Parser Word8 macAddressPart = do h1 <- hexDigit h2 <- hexDigit char ':' let w = digitToInt h1 `shiftL` 4 .|. digitToInt h2 return (fromIntegral w)
174
macAddressPart :: Parser Word8 macAddressPart = do h1 <- hexDigit h2 <- hexDigit char ':' let w = digitToInt h1 `shiftL` 4 .|. digitToInt h2 return (fromIntegral w)
174
macAddressPart = do h1 <- hexDigit h2 <- hexDigit char ':' let w = digitToInt h1 `shiftL` 4 .|. digitToInt h2 return (fromIntegral w)
143
false
true
0
12
37
71
32
39
null
null
ambiata/mafia
src/Mafia/Cabal/Index.hs
bsd-3-clause
isTreeRef :: Tar.Entry -> Bool isTreeRef x = Tar.entryPath x == "local-build-tree-reference/"
93
isTreeRef :: Tar.Entry -> Bool isTreeRef x = Tar.entryPath x == "local-build-tree-reference/"
93
isTreeRef x = Tar.entryPath x == "local-build-tree-reference/"
62
false
true
0
7
11
35
15
20
null
null
UBMLtonGroup/timberc
src/Kindle.hs
bsd-3-clause
cMap f (CRaise e) = CRaise e
50
cMap f (CRaise e) = CRaise e
50
cMap f (CRaise e) = CRaise e
50
false
false
0
6
28
22
9
13
null
null
bitemyapp/ganeti
src/Ganeti/Query/Query.hs
bsd-2-clause
queryFields (QueryFields (ItemTypeOpCode QRGroup) fields) = Ok $ fieldsExtractor Group.fieldsMap fields
105
queryFields (QueryFields (ItemTypeOpCode QRGroup) fields) = Ok $ fieldsExtractor Group.fieldsMap fields
105
queryFields (QueryFields (ItemTypeOpCode QRGroup) fields) = Ok $ fieldsExtractor Group.fieldsMap fields
105
false
false
2
9
12
35
16
19
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/CelloMuted.hs
bsd-3-clause
note32 :: Note note32 = Note (Pitch 415.305 56 "g#4") 33 (Range (NoteRange (NoteRangeAmplitude 7475.49 18 1.24) (NoteRangeHarmonicFreq 1 415.3)) (NoteRange (NoteRangeAmplitude 415.3 1 1175.0) (NoteRangeHarmonicFreq 24 9967.32))) [Harmonic 1...
1,028
note32 :: Note note32 = Note (Pitch 415.305 56 "g#4") 33 (Range (NoteRange (NoteRangeAmplitude 7475.49 18 1.24) (NoteRangeHarmonicFreq 1 415.3)) (NoteRange (NoteRangeAmplitude 415.3 1 1175.0) (NoteRangeHarmonicFreq 24 9967.32))) [Harmonic 1...
1,028
note32 = Note (Pitch 415.305 56 "g#4") 33 (Range (NoteRange (NoteRangeAmplitude 7475.49 18 1.24) (NoteRangeHarmonicFreq 1 415.3)) (NoteRange (NoteRangeAmplitude 415.3 1 1175.0) (NoteRangeHarmonicFreq 24 9967.32))) [Harmonic 1 1.634 1175.0 ...
1,013
false
true
0
11
295
405
210
195
null
null
markus-git/co-feldspar
src/Feldspar/Hardware/Primitive.hs
bsd-3-clause
hardwarePrimWitType Int32HT = Dict
36
hardwarePrimWitType Int32HT = Dict
36
hardwarePrimWitType Int32HT = Dict
36
false
false
0
5
5
9
4
5
null
null
DavidAlphaFox/darcs
src/Darcs/Util/Printer.hs
gpl-2.0
printable, invisiblePrintable, hiddenPrintable, userchunkPrintable :: Printable -> Doc printable x = Doc $ \st -> defP (printers st) x st
137
printable, invisiblePrintable, hiddenPrintable, userchunkPrintable :: Printable -> Doc printable x = Doc $ \st -> defP (printers st) x st
137
printable x = Doc $ \st -> defP (printers st) x st
50
false
true
0
9
19
46
26
20
null
null
twopoint718/haifa
src/Utils.hs
gpl-2.0
swap (x,y) = (y,x)
18
swap (x,y) = (y,x)
18
swap (x,y) = (y,x)
18
false
false
0
5
3
22
12
10
null
null
folsen/haskell-startapp
src/App.hs
mit
guestOnlyHook :: Action (HVect xs) (HVect (IsGuest ': xs)) guestOnlyHook = maybeUser $ \mUser -> do oldCtx <- getContext case mUser of Nothing -> return (IsGuest :&: oldCtx) Just _ -> redirect "/"
230
guestOnlyHook :: Action (HVect xs) (HVect (IsGuest ': xs)) guestOnlyHook = maybeUser $ \mUser -> do oldCtx <- getContext case mUser of Nothing -> return (IsGuest :&: oldCtx) Just _ -> redirect "/"
230
guestOnlyHook = maybeUser $ \mUser -> do oldCtx <- getContext case mUser of Nothing -> return (IsGuest :&: oldCtx) Just _ -> redirect "/"
171
false
true
0
14
66
88
43
45
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp IndexByteArrayOp_Int8 = _ILIT(189)
47
tagOf_PrimOp IndexByteArrayOp_Int8 = _ILIT(189)
47
tagOf_PrimOp IndexByteArrayOp_Int8 = _ILIT(189)
47
false
false
0
6
3
15
7
8
null
null
forste/haReFork
StrategyLib-4.0-beta/examples/joos-rule02/Parser.hs
bsd-3-clause
parseProgram = do cds <- many parseClassDeclaration bs <- parseBlock return (Program cds bs)
109
parseProgram = do cds <- many parseClassDeclaration bs <- parseBlock return (Program cds bs)
109
parseProgram = do cds <- many parseClassDeclaration bs <- parseBlock return (Program cds bs)
109
false
false
1
10
30
41
16
25
null
null
cartazio/arithmoi
Math/NumberTheory/Primes/Factorisation/QuadraticSieve.hs
mit
findSmoothNumbers :: V.Vector (Integer, SignedPrimeIntSet) -> V.Vector (S.IntSet, SignedPrimeIntSet) findSmoothNumbers = V.imapMaybe selectSmooth where selectSmooth index (residue, factorisation) | residue == 1 = Just (S.singleton index, factorisation) | otherwise = Nothing -- Find all primes, whi...
358
findSmoothNumbers :: V.Vector (Integer, SignedPrimeIntSet) -> V.Vector (S.IntSet, SignedPrimeIntSet) findSmoothNumbers = V.imapMaybe selectSmooth where selectSmooth index (residue, factorisation) | residue == 1 = Just (S.singleton index, factorisation) | otherwise = Nothing -- Find all primes, whi...
358
findSmoothNumbers = V.imapMaybe selectSmooth where selectSmooth index (residue, factorisation) | residue == 1 = Just (S.singleton index, factorisation) | otherwise = Nothing -- Find all primes, which appear only once in the input list.
257
false
true
0
9
64
97
49
48
null
null
keera-studios/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
qCastList_QInputEvent x = qcl_QInputEvent [] x
46
qCastList_QInputEvent x = qcl_QInputEvent [] x
46
qCastList_QInputEvent x = qcl_QInputEvent [] x
46
false
false
0
6
5
16
7
9
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs
bsd-3-clause
gl_CONSTANT_ATTENUATION :: GLenum gl_CONSTANT_ATTENUATION = 0x1207
66
gl_CONSTANT_ATTENUATION :: GLenum gl_CONSTANT_ATTENUATION = 0x1207
66
gl_CONSTANT_ATTENUATION = 0x1207
32
false
true
0
4
5
11
6
5
null
null
olsner/ghc
testsuite/tests/boxy/boxy.hs
bsd-3-clause
qG :: (forall a. a -> a -> a) -> (forall a. a -> a) -> (forall g. (g -> g) -> (g -> g)) qG choose id = choose id
112
qG :: (forall a. a -> a -> a) -> (forall a. a -> a) -> (forall g. (g -> g) -> (g -> g)) qG choose id = choose id
112
qG choose id = choose id
24
false
true
0
11
30
85
45
40
null
null
DavidAlphaFox/ghc
libraries/containers/benchmarks/Set.hs
bsd-3-clause
del :: [Int] -> S.Set Int -> S.Set Int del xs s0 = foldl' (\s k -> S.delete k s) s0 xs
86
del :: [Int] -> S.Set Int -> S.Set Int del xs s0 = foldl' (\s k -> S.delete k s) s0 xs
86
del xs s0 = foldl' (\s k -> S.delete k s) s0 xs
47
false
true
0
9
21
65
31
34
null
null
schell/orion
src/Web/Orion.hs
bsd-3-clause
readCfgUserDBFilePath :: MonadTrans (m LT.Text) => ScottyAction m FilePath readCfgUserDBFilePath = readCfg getCfgUserDBFilePath
127
readCfgUserDBFilePath :: MonadTrans (m LT.Text) => ScottyAction m FilePath readCfgUserDBFilePath = readCfg getCfgUserDBFilePath
127
readCfgUserDBFilePath = readCfg getCfgUserDBFilePath
52
false
true
0
10
12
39
17
22
null
null
Melvar/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
refsIn :: TT Name -> [Name] refsIn (P _ n _) = [n]
50
refsIn :: TT Name -> [Name] refsIn (P _ n _) = [n]
50
refsIn (P _ n _) = [n]
22
false
true
0
9
12
43
20
23
null
null
grandpascorpion/canon
Math/NumberTheory/Canon.hs
gpl-3.0
tooBigToAdd (HX _ _ _) = True
30
tooBigToAdd (HX _ _ _) = True
30
tooBigToAdd (HX _ _ _) = True
30
false
false
0
7
7
19
9
10
null
null
jfischoff/async-extras
src/Control/Concurrent/Async/Lifted/Extra.hs
bsd-3-clause
withParent :: MonadBaseControl IO m => Async a -> m b -> m (Async (StM m b)) withParent parent act = async $ link parent >> act
139
withParent :: MonadBaseControl IO m => Async a -> m b -> m (Async (StM m b)) withParent parent act = async $ link parent >> act
139
withParent parent act = async $ link parent >> act
50
false
true
0
13
38
72
32
40
null
null
brendanhay/gogol
gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs
mpl-2.0
-- | The content (text) as provided by the author, stored without any HTML -- formatting. When creating or updating a comment, this value must be -- supplied as plain text in the request. coOriginalContent :: Lens' CommentObject (Maybe Text) coOriginalContent = lens _coOriginalContent (\ s a -> s{_coOriginalCon...
330
coOriginalContent :: Lens' CommentObject (Maybe Text) coOriginalContent = lens _coOriginalContent (\ s a -> s{_coOriginalContent = a})
142
coOriginalContent = lens _coOriginalContent (\ s a -> s{_coOriginalContent = a})
88
true
true
0
9
58
50
27
23
null
null
amccausl/Swish
Swish/HaskellRDF/N3FormatterTest.hs
lgpl-2.1
tx311 = arc s1 p1 o1
20
tx311 = arc s1 p1 o1
20
tx311 = arc s1 p1 o1
20
false
false
0
5
5
13
6
7
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Insert.hs
mpl-2.0
-- | V1 error format. lsiXgafv :: Lens' LiveStreamsInsert (Maybe Xgafv) lsiXgafv = lens _lsiXgafv (\ s a -> s{_lsiXgafv = a})
125
lsiXgafv :: Lens' LiveStreamsInsert (Maybe Xgafv) lsiXgafv = lens _lsiXgafv (\ s a -> s{_lsiXgafv = a})
103
lsiXgafv = lens _lsiXgafv (\ s a -> s{_lsiXgafv = a})
53
true
true
1
9
21
51
25
26
null
null
snoyberg/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
{- Applications are dealt with specially because we want the "build hack" to work. Note [Arguments of let-bound constructors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider f x = let y = expensive x in let z = (True,y) in (case z of {(p,q)->q}, case z of {(p,q)->q}) We feel free to duplica...
1,802
occAnalApp :: OccEnv -> (Expr CoreBndr, [Arg CoreBndr], [Tickish Id]) -> (UsageDetails, Expr CoreBndr) occAnalApp env (Var fun, args, ticks) | null ticks = (uds, mkApps (Var fun) args') | otherwise = (uds, mkTicks ticks $ mkApps (Var fun) args') where uds = fun_uds +++ final_args_uds ...
1,298
occAnalApp env (Var fun, args, ticks) | null ticks = (uds, mkApps (Var fun) args') | otherwise = (uds, mkTicks ticks $ mkApps (Var fun) args') where uds = fun_uds +++ final_args_uds !(args_uds, args') = occAnalArgs env args one_shots !final_args_uds = markManyIf (isRhsEnv env && is_exp) args_uds ...
1,173
true
true
7
9
460
248
133
115
null
null
tonyday567/numhask-array
src/NumHask/Array/Dynamic.hs
bsd-3-clause
mmult :: (Ring a) => Array a -> Array a -> Array a mmult (Array sx x) (Array sy y) = tabulate [m, n] go where go [] = throw (NumHaskException "Needs two dimensions") go [_] = throw (NumHaskException "Needs two dimensions") go (i : j : _) = sum $ V.zipWith (*) (V.slice (fromIntegral i * k) k x) (V....
415
mmult :: (Ring a) => Array a -> Array a -> Array a mmult (Array sx x) (Array sy y) = tabulate [m, n] go where go [] = throw (NumHaskException "Needs two dimensions") go [_] = throw (NumHaskException "Needs two dimensions") go (i : j : _) = sum $ V.zipWith (*) (V.slice (fromIntegral i * k) k x) (V....
415
mmult (Array sx x) (Array sy y) = tabulate [m, n] go where go [] = throw (NumHaskException "Needs two dimensions") go [_] = throw (NumHaskException "Needs two dimensions") go (i : j : _) = sum $ V.zipWith (*) (V.slice (fromIntegral i * k) k x) (V.generate k (\x' -> y V.! (fromIntegral j + x' * n))) (m...
356
false
true
0
15
116
239
121
118
null
null
jystic/language-livescript
src/Language/Livescript/Lexer.hs
apache-2.0
semi :: Parser String semi = T.semi lex
39
semi :: Parser String semi = T.semi lex
39
semi = T.semi lex
17
false
true
1
6
7
22
9
13
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2258 = 2257
11
2258 = 2257
11
2258 = 2257
11
false
false
1
5
2
10
3
7
null
null
Paow/encore
src/types/Typechecker/Util.hs
bsd-3-clause
checkValidUseOfBreak = Typechecker.TypeError.validUseOfBreak . bt
65
checkValidUseOfBreak = Typechecker.TypeError.validUseOfBreak . bt
65
checkValidUseOfBreak = Typechecker.TypeError.validUseOfBreak . bt
65
false
false
1
6
4
17
7
10
null
null
YoshikuniJujo/funpaala
samples/25_nml/Nml.hs
bsd-3-clause
token :: String -> Maybe (Token, String) token "" = Nothing
59
token :: String -> Maybe (Token, String) token "" = Nothing
59
token "" = Nothing
18
false
true
0
7
10
27
14
13
null
null
gangsterveggies/julia-pinheiro-compiler
StaticAnalysis.hs
gpl-2.0
staticAnalysis :: [Code] -> [Code] staticAnalysis c = staticAnalysisGo ScopeMap.empty c
87
staticAnalysis :: [Code] -> [Code] staticAnalysis c = staticAnalysisGo ScopeMap.empty c
87
staticAnalysis c = staticAnalysisGo ScopeMap.empty c
52
false
true
0
6
10
31
16
15
null
null
MarcelineVQ/advent2016
src/Day2.hs
bsd-3-clause
runSecond :: IO String runSecond = seriesPad startPad . parseInput <$> readFile "./input/d2.txt"
96
runSecond :: IO String runSecond = seriesPad startPad . parseInput <$> readFile "./input/d2.txt"
96
runSecond = seriesPad startPad . parseInput <$> readFile "./input/d2.txt"
73
false
true
0
7
12
28
13
15
null
null
tittoassini/typed
test/Test/Data/Values.hs
bsd-3-clause
treeN33Large :: Tree ((N,N,N),(N,N,N),(N,N,N)) treeN33Large = mkTree asN33 largeSize
84
treeN33Large :: Tree ((N,N,N),(N,N,N),(N,N,N)) treeN33Large = mkTree asN33 largeSize
84
treeN33Large = mkTree asN33 largeSize
37
false
true
0
7
8
55
33
22
null
null
trenta3/zeno-0.2.0.1
Example.hs
mit
sorted (x:y:ys) | x <= y = sorted (y:ys) | otherwise = False
64
sorted (x:y:ys) | x <= y = sorted (y:ys) | otherwise = False
64
sorted (x:y:ys) | x <= y = sorted (y:ys) | otherwise = False
64
false
false
1
8
16
49
23
26
null
null
benkolera/xml-conduit-decode
src/Text/XML/Decode/Parsers.hs
mit
parseIsoDay :: Text -> Either Text IsoDay parseIsoDay = fmap IsoDay . parseXmlTime "UTCDay" isoDayFormat
104
parseIsoDay :: Text -> Either Text IsoDay parseIsoDay = fmap IsoDay . parseXmlTime "UTCDay" isoDayFormat
104
parseIsoDay = fmap IsoDay . parseXmlTime "UTCDay" isoDayFormat
62
false
true
1
7
14
38
16
22
null
null
mainland/dph
dph-examples/examples/smoke/data/Bool/Vectorised.hs
bsd-3-clause
fromBool :: Bool -> Int fromBool False = 0
43
fromBool :: Bool -> Int fromBool False = 0
43
fromBool False = 0
19
false
true
0
5
9
18
9
9
null
null
thalerjonathan/phd
public/ArtIterating/code/haskell/PureAgentsAct/src/SIRS/RunSIRS.hs
gpl-3.0
stepWithRendering :: (Int, Int) -> SIRSSimHandle -> Double -> IO () stepWithRendering dims hdl dt = simulateIO (Front.display winTitle winSize) GLO.white 30 hdl (modelToPicture dims) ...
361
stepWithRendering :: (Int, Int) -> SIRSSimHandle -> Double -> IO () stepWithRendering dims hdl dt = simulateIO (Front.display winTitle winSize) GLO.white 30 hdl (modelToPicture dims) ...
361
stepWithRendering dims hdl dt = simulateIO (Front.display winTitle winSize) GLO.white 30 hdl (modelToPicture dims) (stepIteration dt)
293
false
true
0
9
186
78
39
39
null
null
cies/gelatin
gelatin-core/src/Gelatin/Core/Color.hs
bsd-3-clause
chocolate :: (Num a, Fractional a) => V4 a chocolate = V4 (210/255) (105/255) (30/255) 1
88
chocolate :: (Num a, Fractional a) => V4 a chocolate = V4 (210/255) (105/255) (30/255) 1
88
chocolate = V4 (210/255) (105/255) (30/255) 1
45
false
true
0
7
15
59
31
28
null
null
urbanslug/ghc
testsuite/tests/perf/compiler/T783.hs
bsd-3-clause
foo x | x == 77 = 77
20
foo x | x == 77 = 77
20
foo x | x == 77 = 77
20
false
false
0
8
7
23
9
14
null
null
kim/amazonka
amazonka-rds/gen/Network/AWS/RDS/RestoreDBInstanceFromDBSnapshot.hs
mpl-2.0
-- | Specifies if the DB instance is a Multi-AZ deployment. -- -- Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ -- parameter is set to 'true'. rdbifdbsMultiAZ :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool) rdbifdbsMultiAZ = lens _rdbifdbsMultiAZ (\s a -> s { _rdbifdbsMultiAZ = a })
320
rdbifdbsMultiAZ :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool) rdbifdbsMultiAZ = lens _rdbifdbsMultiAZ (\s a -> s { _rdbifdbsMultiAZ = a })
146
rdbifdbsMultiAZ = lens _rdbifdbsMultiAZ (\s a -> s { _rdbifdbsMultiAZ = a })
76
true
true
1
9
47
53
28
25
null
null
heathweiss/Tricad
src/Examples/ShoeLift/SandalsHeel.hs
gpl-2.0
treadCubes = treadTopFaces ++++ treadBtmFaces
52
treadCubes = treadTopFaces ++++ treadBtmFaces
52
treadCubes = treadTopFaces ++++ treadBtmFaces
52
false
false
3
5
11
15
5
10
null
null
olsner/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
matchContextErrString LambdaExpr = text "lambda"
58
matchContextErrString LambdaExpr = text "lambda"
58
matchContextErrString LambdaExpr = text "lambda"
58
false
false
0
5
14
12
5
7
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Html/ParseLazy.hs
gpl-3.0
comment :: HParser Comment comment = do bracket (tok TokCommentOpen) (tok TokCommentClose) freetext
103
comment :: HParser Comment comment = do bracket (tok TokCommentOpen) (tok TokCommentClose) freetext
103
comment = do bracket (tok TokCommentOpen) (tok TokCommentClose) freetext
76
false
true
1
10
16
40
17
23
null
null
lamdu/lamdu
src/Lamdu/Cache.hs
gpl-3.0
decl :: Decl Functions decl = Functions <$> function memoableInfer
74
decl :: Decl Functions decl = Functions <$> function memoableInfer
74
decl = Functions <$> function memoableInfer
51
false
true
0
6
17
21
10
11
null
null
MichielDerhaeg/stack
src/Stack/Types/Config.hs
bsd-3-clause
buildOptsMonoidTestsL :: Lens' BuildOptsMonoid (Maybe Bool) buildOptsMonoidTestsL = lens (getFirst . buildMonoidTests) (\buildMonoid t -> buildMonoid {buildMonoidTests = First t})
207
buildOptsMonoidTestsL :: Lens' BuildOptsMonoid (Maybe Bool) buildOptsMonoidTestsL = lens (getFirst . buildMonoidTests) (\buildMonoid t -> buildMonoid {buildMonoidTests = First t})
207
buildOptsMonoidTestsL = lens (getFirst . buildMonoidTests) (\buildMonoid t -> buildMonoid {buildMonoidTests = First t})
147
false
true
1
10
47
61
29
32
null
null
nushio3/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
isTcOcc (OccName TcClsName _) = True
36
isTcOcc (OccName TcClsName _) = True
36
isTcOcc (OccName TcClsName _) = True
36
false
false
0
7
5
17
8
9
null
null
RossMeikleham/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
-- | Transform the FCs in a PTerm. The first function transforms the -- general-purpose FCs, and the second transforms those that are used -- for semantic source highlighting, so they can be treated specially. mapPTermFC :: (FC -> FC) -> (FC -> FC) -> PTerm -> PTerm mapPTermFC f g (PQuote q) = PQuote q
303
mapPTermFC :: (FC -> FC) -> (FC -> FC) -> PTerm -> PTerm mapPTermFC f g (PQuote q) = PQuote q
93
mapPTermFC f g (PQuote q) = PQuote q
36
true
true
0
8
55
56
30
26
null
null
janschulz/pandoc
src/Text/Pandoc/Writers/Man.hs
gpl-2.0
bulletListItemToMan opts ((Para first):rest) = bulletListItemToMan opts ((Plain first):rest)
94
bulletListItemToMan opts ((Para first):rest) = bulletListItemToMan opts ((Plain first):rest)
94
bulletListItemToMan opts ((Para first):rest) = bulletListItemToMan opts ((Plain first):rest)
94
false
false
0
8
10
45
21
24
null
null
rahulmutt/ghcvm
compiler/Eta/HsSyn/HsBinds.hs
bsd-3-clause
isTypeLSig (L _(GenericSig {})) = True
38
isTypeLSig (L _(GenericSig {})) = True
38
isTypeLSig (L _(GenericSig {})) = True
38
false
false
0
9
5
24
12
12
null
null
tjhunter/karps
haskell/src/Spark/Core/Internal/Joins.hs
apache-2.0
{-| Explicit inner join. -} joinInner :: Column ref1 key -> Column ref1 value1 -> Column ref2 key -> Column ref2 value2 -> Dataset (key, value1, value2) joinInner key1 val1 key2 val2 = unsafeCastDataset (forceRight df) where df = joinInner' (untypedCol key1) (untypedCol val1) (untypedCol key2) (untypedCol val2) {-| ...
357
joinInner :: Column ref1 key -> Column ref1 value1 -> Column ref2 key -> Column ref2 value2 -> Dataset (key, value1, value2) joinInner key1 val1 key2 val2 = unsafeCastDataset (forceRight df) where df = joinInner' (untypedCol key1) (untypedCol val1) (untypedCol key2) (untypedCol val2) {-| Untyped version of the inner...
329
joinInner key1 val1 key2 val2 = unsafeCastDataset (forceRight df) where df = joinInner' (untypedCol key1) (untypedCol val1) (untypedCol key2) (untypedCol val2) {-| Untyped version of the inner join. -}
204
true
true
0
11
58
123
60
63
null
null
jedahu/hike
src/Hike/Control/Hike.hs
bsd-3-clause
mapHActionErrorF f (HAct io) = Free (HAct io)
45
mapHActionErrorF f (HAct io) = Free (HAct io)
45
mapHActionErrorF f (HAct io) = Free (HAct io)
45
false
false
0
7
7
26
12
14
null
null
psibi/persistent
persistent/Database/Persist.hs
mit
-- | Assign a field by multiplication (@*=@). -- -- === __Example usage__ -- -- @ -- multiplyAge :: MonadIO m => ReaderT SqlBackend m () -- multiplyAge = updateWhere [UserName ==. \"SPJ\" ] [UserAge *=. 2] -- @ -- -- The above query when applied on <#dataset dataset-1>, will produce this: -- -- > +-----+-----+--------+...
520
f *=. a = Update f a Multiply
29
f *=. a = Update f a Multiply
29
true
false
1
5
110
37
27
10
null
null
romanb/amazonka
amazonka-support/gen/Network/AWS/Support/Types.hs
mpl-2.0
-- | The unique identifier for the Trusted Advisor check. tacsCheckId :: Lens' TrustedAdvisorCheckSummary Text tacsCheckId = lens _tacsCheckId (\s a -> s { _tacsCheckId = a })
175
tacsCheckId :: Lens' TrustedAdvisorCheckSummary Text tacsCheckId = lens _tacsCheckId (\s a -> s { _tacsCheckId = a })
117
tacsCheckId = lens _tacsCheckId (\s a -> s { _tacsCheckId = a })
64
true
true
1
9
27
44
22
22
null
null
bmuk/Book2Words
book2words.hs
mit
getFrequency :: [Text] -> [(Text, Int)] getFrequency = map (head &&& length) . group . sort
91
getFrequency :: [Text] -> [(Text, Int)] getFrequency = map (head &&& length) . group . sort
91
getFrequency = map (head &&& length) . group . sort
51
false
true
0
9
15
45
25
20
null
null
phischu/fragnix
tests/packages/scotty/Math.NumberTheory.Logarithms.hs
bsd-3-clause
-- | Calculate the integer logarithm of an 'Integer' to base 10. -- The argument must be positive, otherwise an error is thrown. integerLog10 :: Integer -> Int integerLog10 n | n < 1 = error "Math.NumberTheory.Logarithms.integerLog10: argument must be positive" | otherwise = integerLog10' n
301
integerLog10 :: Integer -> Int integerLog10 n | n < 1 = error "Math.NumberTheory.Logarithms.integerLog10: argument must be positive" | otherwise = integerLog10' n
170
integerLog10 n | n < 1 = error "Math.NumberTheory.Logarithms.integerLog10: argument must be positive" | otherwise = integerLog10' n
139
true
true
1
8
55
43
21
22
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkUnused21= verifyNotTree checkUnusedAssignments "a=1; trap 'echo $a' INT"
82
prop_checkUnused21= verifyNotTree checkUnusedAssignments "a=1; trap 'echo $a' INT"
82
prop_checkUnused21= verifyNotTree checkUnusedAssignments "a=1; trap 'echo $a' INT"
82
false
false
1
5
7
15
5
10
null
null
HackerFoo/peg
Peg/BuiltIn.hs
gpl-3.0
-------------------- Built-ins -------------------- -- need to parse into form [Word0 out0 in0 in1, Word1 out1 out2 in2, ...] -- infinite DAG builtins = wordMap [ -- numeric ("add_int#", op_ 2 1), ("sub_int#", op_ 2 1), ("mul_int#", op_ 2 1), ("div_int#", op_ 2 1), ("mod_int#", op_ 2 1), ("divMod_int#"...
4,441
builtins = wordMap [ -- numeric ("add_int#", op_ 2 1), ("sub_int#", op_ 2 1), ("mul_int#", op_ 2 1), ("div_int#", op_ 2 1), ("mod_int#", op_ 2 1), ("divMod_int#", op_ 2 2), ("quot_int#", op_ 2 1), ("rem_int#", op_ 2 1), ("quotRem_int#", op_ 2 2), ("pos_power_int#", op_ 2 1), ("pos_power_float#"...
4,297
builtins = wordMap [ -- numeric ("add_int#", op_ 2 1), ("sub_int#", op_ 2 1), ("mul_int#", op_ 2 1), ("div_int#", op_ 2 1), ("mod_int#", op_ 2 1), ("divMod_int#", op_ 2 2), ("quot_int#", op_ 2 1), ("rem_int#", op_ 2 1), ("quotRem_int#", op_ 2 2), ("pos_power_int#", op_ 2 1), ("pos_power_float#"...
4,297
true
false
0
17
1,661
1,634
859
775
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxUSER_DASH :: Int wxUSER_DASH = 105
36
wxUSER_DASH :: Int wxUSER_DASH = 105
36
wxUSER_DASH = 105
17
false
true
0
4
5
11
6
5
null
null
alphaKAI/mal
haskell/step3_env.hs
mpl-2.0
main = do load_history repl_env <- env_new Nothing env_set repl_env (MalSymbol "+") $ _func add env_set repl_env (MalSymbol "-") $ _func sub env_set repl_env (MalSymbol "*") $ _func mult env_set repl_env (MalSymbol "/") $ _func divd repl_loop repl_env
280
main = do load_history repl_env <- env_new Nothing env_set repl_env (MalSymbol "+") $ _func add env_set repl_env (MalSymbol "-") $ _func sub env_set repl_env (MalSymbol "*") $ _func mult env_set repl_env (MalSymbol "/") $ _func divd repl_loop repl_env
280
main = do load_history repl_env <- env_new Nothing env_set repl_env (MalSymbol "+") $ _func add env_set repl_env (MalSymbol "-") $ _func sub env_set repl_env (MalSymbol "*") $ _func mult env_set repl_env (MalSymbol "/") $ _func divd repl_loop repl_env
280
false
false
1
11
66
113
46
67
null
null
kgadek/novelist
bench/Bench.hs
bsd-2-clause
genPruneBench :: Int -> Int -> [NovelistF.Novella] genPruneBench seed = (:[]) . NovelistFQC.unANovella . QC.unGen (QC.arbitrary :: QC.Gen (NovelistFQC.ANovella 'NovelistFQC.Mixed)) (QC.mkQCGen seed)
219
genPruneBench :: Int -> Int -> [NovelistF.Novella] genPruneBench seed = (:[]) . NovelistFQC.unANovella . QC.unGen (QC.arbitrary :: QC.Gen (NovelistFQC.ANovella 'NovelistFQC.Mixed)) (QC.mkQCGen seed)
219
genPruneBench seed = (:[]) . NovelistFQC.unANovella . QC.unGen (QC.arbitrary :: QC.Gen (NovelistFQC.ANovella 'NovelistFQC.Mixed)) (QC.mkQCGen seed)
168
false
true
2
11
42
85
43
42
null
null
sinelaw/lamdu
Lamdu/Sugar/AddNames.hs
gpl-3.0
toInferred :: (MonadA tm, MonadNaming m) => Inferred (OldName m) tm (Expression (OldName m) tm a) -> m (Inferred (NewName m) tm (Expression (NewName m) tm a)) toInferred Inferred {..} = do value <- toExpression _iValue hole <- toHole _iHole pure Inferred { _iValue = value, _iHole = hole, .. }
305
toInferred :: (MonadA tm, MonadNaming m) => Inferred (OldName m) tm (Expression (OldName m) tm a) -> m (Inferred (NewName m) tm (Expression (NewName m) tm a)) toInferred Inferred {..} = do value <- toExpression _iValue hole <- toHole _iHole pure Inferred { _iValue = value, _iHole = hole, .. }
305
toInferred Inferred {..} = do value <- toExpression _iValue hole <- toHole _iHole pure Inferred { _iValue = value, _iHole = hole, .. }
140
false
true
10
11
62
140
73
67
null
null
jvranish/TheExperiment
src/Language/TheExperiment/Inferrer/Scope.hs
bsd-3-clause
applyScope :: (Functor f) => Env -> f (TypeRef, NodeId) -> f NodeData applyScope env a = fmap (\(ref, nId) -> NodeData env ref nId Nothing) a
141
applyScope :: (Functor f) => Env -> f (TypeRef, NodeId) -> f NodeData applyScope env a = fmap (\(ref, nId) -> NodeData env ref nId Nothing) a
141
applyScope env a = fmap (\(ref, nId) -> NodeData env ref nId Nothing) a
71
false
true
0
10
26
78
39
39
null
null
urbanslug/ghc
compiler/prelude/THNames.hs
bsd-3-clause
inlinableDataConKey = mkPreludeDataConUnique 42
47
inlinableDataConKey = mkPreludeDataConUnique 42
47
inlinableDataConKey = mkPreludeDataConUnique 42
47
false
false
1
5
3
12
4
8
null
null
spechub/Hets
GUI/HTkGenericATP.hs
gpl-2.0
{- | Generates a ('ProofStatusColour', 'String') tuple representing a Proved (but inconsistent) proof status. -} statusProvedButInconsistent :: (ProofStatusColour, String) statusProvedButInconsistent = (Brown, "Proved/Inconsistent")
236
statusProvedButInconsistent :: (ProofStatusColour, String) statusProvedButInconsistent = (Brown, "Proved/Inconsistent")
119
statusProvedButInconsistent = (Brown, "Proved/Inconsistent")
60
true
true
0
5
26
24
15
9
null
null
rueshyna/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GetOrderDealsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'godrDeals' getOrderDealsResponse :: GetOrderDealsResponse getOrderDealsResponse = GetOrderDealsResponse' { _godrDeals = Nothin...
327
getOrderDealsResponse :: GetOrderDealsResponse getOrderDealsResponse = GetOrderDealsResponse' { _godrDeals = Nothing }
134
getOrderDealsResponse = GetOrderDealsResponse' { _godrDeals = Nothing }
83
true
true
1
7
60
31
17
14
null
null
OpenXT/manager
updatemgr/UpdateMgr/Logic.hs
gpl-2.0
fileRoleToString (OtherFile other) = other
42
fileRoleToString (OtherFile other) = other
42
fileRoleToString (OtherFile other) = other
42
false
false
0
7
4
15
7
8
null
null
nymacro/hs-kmip
src/Ttlv/Parser/Binary.hs
bsd-3-clause
ttlvDataType (TtlvLongInt _) = 3
32
ttlvDataType (TtlvLongInt _) = 3
32
ttlvDataType (TtlvLongInt _) = 3
32
false
false
0
7
4
15
7
8
null
null
madjar/fhue
src/FHue/Hue.hs
bsd-3-clause
login :: String -> String -> Hue () login username password = do -- TODO reuse cookie to save time hGet "accounts/login/" -- To get a first CSRF token r <- hPost "accounts/login/" [ "username" := username, "password" := password] when ("Error!" `isInfixOf` (r ^. responseBody . to L.unpack)) -- TODO ugly (...
371
login :: String -> String -> Hue () login username password = do -- TODO reuse cookie to save time hGet "accounts/login/" -- To get a first CSRF token r <- hPost "accounts/login/" [ "username" := username, "password" := password] when ("Error!" `isInfixOf` (r ^. responseBody . to L.unpack)) -- TODO ugly (...
371
login username password = do -- TODO reuse cookie to save time hGet "accounts/login/" -- To get a first CSRF token r <- hPost "accounts/login/" [ "username" := username, "password" := password] when ("Error!" `isInfixOf` (r ^. responseBody . to L.unpack)) -- TODO ugly (throw LoginFailed) -- | Make a get...
335
false
true
0
13
77
104
53
51
null
null
isomorphism/hackage2
Distribution/Server/Acid.hs
bsd-3-clause
checkpointAcid :: Acid -> IO () checkpointAcid acid = do createCheckpoint (acidBuildReports acid) createCheckpoint (acidCandidatePackages acid) createCheckpoint (acidDistros acid) createCheckpoint (acidDocumentation acid) createCheckpoint (acidDownloadCounts acid) createCheckpoint...
789
checkpointAcid :: Acid -> IO () checkpointAcid acid = do createCheckpoint (acidBuildReports acid) createCheckpoint (acidCandidatePackages acid) createCheckpoint (acidDistros acid) createCheckpoint (acidDocumentation acid) createCheckpoint (acidDownloadCounts acid) createCheckpoint...
789
checkpointAcid acid = do createCheckpoint (acidBuildReports acid) createCheckpoint (acidCandidatePackages acid) createCheckpoint (acidDistros acid) createCheckpoint (acidDocumentation acid) createCheckpoint (acidDownloadCounts acid) createCheckpoint (acidHackageAdmins acid) ...
757
false
true
0
9
156
203
86
117
null
null
da-x/buildsome
src/Buildsome.hs
gpl-2.0
fst3 :: (a, b, c) -> a fst3 (x, _, _) = x
41
fst3 :: (a, b, c) -> a fst3 (x, _, _) = x
41
fst3 (x, _, _) = x
18
false
true
0
6
12
36
21
15
null
null
fmthoma/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
77
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
77
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
77
false
false
0
7
24
19
9
10
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Mounce/Quote.hs
mit
adjectiveCategory :: QuasiQuoter adjectiveCategory = QuasiQuoter { quoteExp = parseTopLevel validAdjectiveCategoryParser , quotePat = undefined , quoteType = undefined , quoteDec = undefined }
202
adjectiveCategory :: QuasiQuoter adjectiveCategory = QuasiQuoter { quoteExp = parseTopLevel validAdjectiveCategoryParser , quotePat = undefined , quoteType = undefined , quoteDec = undefined }
202
adjectiveCategory = QuasiQuoter { quoteExp = parseTopLevel validAdjectiveCategoryParser , quotePat = undefined , quoteType = undefined , quoteDec = undefined }
169
false
true
0
8
33
44
25
19
null
null
mikehat/blaze-css
src/Text/Blaze/Css21/Style.hs
bsd-3-clause
textAlign = B.cssStyle "text-align" "text-align: " . B.stringValue . toString
77
textAlign = B.cssStyle "text-align" "text-align: " . B.stringValue . toString
77
textAlign = B.cssStyle "text-align" "text-align: " . B.stringValue . toString
77
false
false
1
8
9
27
11
16
null
null
edofic/crdt
src/Data/Crdt/Transport/Postgresql.hs
apache-2.0
forkUpdater :: (CanUpdate s, FromJSON (Update s)) => CrdtVar s -> IO ThreadId forkUpdater c@(CrdtVar {conn}) = forkIO $ do execute_ conn "LISTEN updates;" forever $ do updateCrdtVar c getNotification conn
216
forkUpdater :: (CanUpdate s, FromJSON (Update s)) => CrdtVar s -> IO ThreadId forkUpdater c@(CrdtVar {conn}) = forkIO $ do execute_ conn "LISTEN updates;" forever $ do updateCrdtVar c getNotification conn
216
forkUpdater c@(CrdtVar {conn}) = forkIO $ do execute_ conn "LISTEN updates;" forever $ do updateCrdtVar c getNotification conn
138
false
true
2
9
42
91
43
48
null
null
cmahon/kraken
src/Kraken/Rest.hs
mit
ticker :: TickerOptions -> KrakenT Ticker ticker = lift . ticker_
65
ticker :: TickerOptions -> KrakenT Ticker ticker = lift . ticker_
65
ticker = lift . ticker_
23
false
true
0
6
10
22
11
11
null
null
creichert/persistent
persistent/Database/Persist/Types/Base.hs
mit
fromPersistValueText (PersistObjectId _) = Left "Cannot convert PersistObjectId to Text"
88
fromPersistValueText (PersistObjectId _) = Left "Cannot convert PersistObjectId to Text"
88
fromPersistValueText (PersistObjectId _) = Left "Cannot convert PersistObjectId to Text"
88
false
false
0
6
9
19
8
11
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo CopyByteArrayToAddrOp = mkGenPrimOp (fsLit "copyByteArrayToAddr#") [deltaTyVar] [byteArrayPrimTy, intPrimTy, addrPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)
190
primOpInfo CopyByteArrayToAddrOp = mkGenPrimOp (fsLit "copyByteArrayToAddr#") [deltaTyVar] [byteArrayPrimTy, intPrimTy, addrPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)
190
primOpInfo CopyByteArrayToAddrOp = mkGenPrimOp (fsLit "copyByteArrayToAddr#") [deltaTyVar] [byteArrayPrimTy, intPrimTy, addrPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)
190
false
false
0
7
15
51
27
24
null
null
Teaspot-Studio/gore-and-ash-sync
src/Game/GoreAndAsh/Sync/API.hs
bsd-3-clause
resolveSyncName :: forall t m a b . (SyncMonad t b m, NetworkMonad t b m) => Peer b -- ^ Where to ask the name id -> SyncName -- ^ Name to resolve -> m a -- ^ Initial value -> (SyncId -> m a) -- ^ Next component to switch in when id of the name is acquired -> m (Dynamic t a) -- ^ Fired when the function final...
1,145
resolveSyncName :: forall t m a b . (SyncMonad t b m, NetworkMonad t b m) => Peer b -- ^ Where to ask the name id -> SyncName -- ^ Name to resolve -> m a -- ^ Initial value -> (SyncId -> m a) -- ^ Next component to switch in when id of the name is acquired -> m (Dynamic t a) resolveSyncName peer name im m = d...
1,091
resolveSyncName peer name im m = do namesDyn <- syncKnownNames startNames <- sample . current $ namesDyn case H.lookup name startNames of Just i -> do a <- m i return $ pure a Nothing -> do opts <- syncOptions buildE <- getPostBuild let resolvedEMany = fforMaybe (updated name...
805
true
true
0
20
290
315
150
165
null
null
alexandrelucchesi/pfec
rest-client/src/Main.hs
apache-2.0
getConf :: IO (Config Snap AppConfig) getConf = commandLineAppConfig defaultConfig
82
getConf :: IO (Config Snap AppConfig) getConf = commandLineAppConfig defaultConfig
82
getConf = commandLineAppConfig defaultConfig
44
false
true
0
7
9
25
12
13
null
null
piccolo-lang/piccolo
src/Core/DebugSymbols.hs
gpl-3.0
genDebugSymbols :: [DebugEvent] -> IO () genDebugSymbols events = do handle <- openFile "/tmp/piccdebug" WriteMode emitDebugSymbols' events 0 handle hClose handle where emitDebugSymbols' [] _ _ = return () emitDebugSymbols' (proc:procs) i h = do let startLine = locStartLine $ localize proc ...
865
genDebugSymbols :: [DebugEvent] -> IO () genDebugSymbols events = do handle <- openFile "/tmp/piccdebug" WriteMode emitDebugSymbols' events 0 handle hClose handle where emitDebugSymbols' [] _ _ = return () emitDebugSymbols' (proc:procs) i h = do let startLine = locStartLine $ localize proc ...
865
genDebugSymbols events = do handle <- openFile "/tmp/piccdebug" WriteMode emitDebugSymbols' events 0 handle hClose handle where emitDebugSymbols' [] _ _ = return () emitDebugSymbols' (proc:procs) i h = do let startLine = locStartLine $ localize proc let startColumn = locStartColumn $ loc...
824
false
true
5
13
311
268
122
146
null
null
f1u77y/xmonad-contrib
XMonad/Layout/Groups/Helpers.hs
bsd-3-clause
swapUp :: X () swapUp = alt G.swapUp W.swapUp
45
swapUp :: X () swapUp = alt G.swapUp W.swapUp
45
swapUp = alt G.swapUp W.swapUp
30
false
true
0
6
8
25
12
13
null
null
mckeankylej/hwRecog
Network/Neuron.hs
mit
recluNeuron :: Neuron recluNeuron = Neuron reclu reclu' "reclu"
63
recluNeuron :: Neuron recluNeuron = Neuron reclu reclu' "reclu"
63
recluNeuron = Neuron reclu reclu' "reclu"
41
false
true
0
6
8
25
10
15
null
null
phischu/fragnix
tests/packages/scotty/Data.Aeson.Parser.UnescapePure.hs
bsd-3-clause
-- 'e' decodeHex 70 = 15
25
decodeHex 70 = 15
18
decodeHex 70 = 15
18
true
false
0
5
6
10
5
5
null
null
facebookincubator/duckling
Duckling/Time/RU/Rules.hs
bsd-3-clause
ruleDurationBeforeTime :: Rule ruleDurationBeforeTime = Rule { name = "<duration> before <time>" , pattern = [ dimension Duration , regex "перед" , dimension Time ] , prod = \case (Token Duration dd:_:Token Time td:_) -> tt $ durationBefore dd td _ -> Nothing }
305
ruleDurationBeforeTime :: Rule ruleDurationBeforeTime = Rule { name = "<duration> before <time>" , pattern = [ dimension Duration , regex "перед" , dimension Time ] , prod = \case (Token Duration dd:_:Token Time td:_) -> tt $ durationBefore dd td _ -> Nothing }
305
ruleDurationBeforeTime = Rule { name = "<duration> before <time>" , pattern = [ dimension Duration , regex "перед" , dimension Time ] , prod = \case (Token Duration dd:_:Token Time td:_) -> tt $ durationBefore dd td _ -> Nothing }
274
false
true
0
15
87
101
52
49
null
null
FPBrno/dht-dks
src/Data/DHT/DKS/Internal/Monad.hs
bsd-3-clause
-- {{{ Logging ---------------------------------------------------------------- -- | Log message. log :: LogStr -> DksM () log msg = asks _logger >>= \f -> liftIO $ f msg
171
log :: LogStr -> DksM () log msg = asks _logger >>= \f -> liftIO $ f msg
72
log msg = asks _logger >>= \f -> liftIO $ f msg
47
true
true
4
8
26
52
24
28
null
null