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
matkli/hscheme
Main.hs
gpl-3.0
-- | Main program main :: IO () main = do args <- getArgs case args of [] -> getTopEnv >>= (sequence_ . repeat . readEvalPrint) ("--test":_) -> runTests _ -> runOne $ head args -- | Run simple read-eval-print loop.
270
main :: IO () main = do args <- getArgs case args of [] -> getTopEnv >>= (sequence_ . repeat . readEvalPrint) ("--test":_) -> runTests _ -> runOne $ head args -- | Run simple read-eval-print loop.
252
main = do args <- getArgs case args of [] -> getTopEnv >>= (sequence_ . repeat . readEvalPrint) ("--test":_) -> runTests _ -> runOne $ head args -- | Run simple read-eval-print loop.
238
true
true
1
14
96
85
41
44
null
null
sopvop/snap-core
src/Snap/Internal/Parsing.hs
bsd-3-clause
hexd :: Char -> Builder hexd c0 = char8 '%' <> word8 hi <> word8 low where !c = c2w c0 toDigit = c2w . intToDigit !low = toDigit $ fromEnum $ c .&. 0xf !hi = toDigit $ (c .&. 0xf0) `shiftr` 4 shiftr (W8# a#) (I# b#) = I# (word2Int# (uncheckedShiftRL# a# b#)) ----------------...
382
hexd :: Char -> Builder hexd c0 = char8 '%' <> word8 hi <> word8 low where !c = c2w c0 toDigit = c2w . intToDigit !low = toDigit $ fromEnum $ c .&. 0xf !hi = toDigit $ (c .&. 0xf0) `shiftr` 4 shiftr (W8# a#) (I# b#) = I# (word2Int# (uncheckedShiftRL# a# b#)) ----------------...
382
hexd c0 = char8 '%' <> word8 hi <> word8 low where !c = c2w c0 toDigit = c2w . intToDigit !low = toDigit $ fromEnum $ c .&. 0xf !hi = toDigit $ (c .&. 0xf0) `shiftr` 4 shiftr (W8# a#) (I# b#) = I# (word2Int# (uncheckedShiftRL# a# b#)) ----------------------------------------...
358
false
true
0
9
100
143
69
74
null
null
clauderichard/Euclaude
Demos.hs
mit
demoNagel :: Demo demoNagel t@(Triangle a b c) = let n = nagelpoint t in do draw white $ t draw cyan $ n draw cyan $ t `ceviansThrough` n
187
demoNagel :: Demo demoNagel t@(Triangle a b c) = let n = nagelpoint t in do draw white $ t draw cyan $ n draw cyan $ t `ceviansThrough` n
186
demoNagel t@(Triangle a b c) = let n = nagelpoint t in do draw white $ t draw cyan $ n draw cyan $ t `ceviansThrough` n
168
false
true
0
11
79
77
36
41
null
null
mdsteele/fallback
src/Fallback/State/Tags.hs
gpl-3.0
areaRegion BurningMaze = Tahariam
33
areaRegion BurningMaze = Tahariam
33
areaRegion BurningMaze = Tahariam
33
false
false
1
5
3
13
4
9
null
null
a10nik/midiRhythm
src/MidiRhythm/Rhythm.hs
bsd-3-clause
avgPress presses = Just ( avg notePressVelocity , avg notePressDuration , avg notePressPitch , NonNeg.fromNumber (genericLength presses)) where avg getX = NonNeg.fromNumber ((average $ map getX presses) :: Double)
280
avgPress presses = Just ( avg notePressVelocity , avg notePressDuration , avg notePressPitch , NonNeg.fromNumber (genericLength presses)) where avg getX = NonNeg.fromNumber ((average $ map getX presses) :: Double)
280
avgPress presses = Just ( avg notePressVelocity , avg notePressDuration , avg notePressPitch , NonNeg.fromNumber (genericLength presses)) where avg getX = NonNeg.fromNumber ((average $ map getX presses) :: Double)
280
false
false
0
9
95
78
38
40
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
fromMName "Bolivia" = Just BO
29
fromMName "Bolivia" = Just BO
29
fromMName "Bolivia" = Just BO
29
false
false
0
5
4
12
5
7
null
null
LightAndLight/hindley-milner
src/Phil/PHP.hs
bsd-3-clause
binOpToSource Divide = "/"
26
binOpToSource Divide = "/"
26
binOpToSource Divide = "/"
26
false
false
0
5
3
9
4
5
null
null
davdar/maam
src/FP/DerivingMonoid.hs
bsd-3-clause
makeMonoid :: Name -> Q [Dec] makeMonoid name = do (cx, ty, tyargs, c, _) <- maybeZero . (coerceSingleConADT *. view tyConIL) *$ liftQ $ reify name (con, fieldtys) <- maybeZero $ coerceSimpleCon c makeMonoidLogic cx ty tyargs con fieldtys
244
makeMonoid :: Name -> Q [Dec] makeMonoid name = do (cx, ty, tyargs, c, _) <- maybeZero . (coerceSingleConADT *. view tyConIL) *$ liftQ $ reify name (con, fieldtys) <- maybeZero $ coerceSimpleCon c makeMonoidLogic cx ty tyargs con fieldtys
244
makeMonoid name = do (cx, ty, tyargs, c, _) <- maybeZero . (coerceSingleConADT *. view tyConIL) *$ liftQ $ reify name (con, fieldtys) <- maybeZero $ coerceSimpleCon c makeMonoidLogic cx ty tyargs con fieldtys
214
false
true
0
14
45
110
54
56
null
null
adbrowne/dynamodb-eventstore
dynamodb-eventstore-web/src/DynamoDbEventStore/Paging.hs
mit
buildStreamResult FeedDirectionForward (Just _lastEvent) events requestedStartEventNumber maxItems = let maxEventNumber = maximumMay $ recordedEventNumber <$> events minEventNumber = minimumMay $ recordedEventNumber <$> events nextEventNumber = fromMaybe (fromMaybe 0 ((\x -> x - 1) <$> requestedStartEvent...
1,009
buildStreamResult FeedDirectionForward (Just _lastEvent) events requestedStartEventNumber maxItems = let maxEventNumber = maximumMay $ recordedEventNumber <$> events minEventNumber = minimumMay $ recordedEventNumber <$> events nextEventNumber = fromMaybe (fromMaybe 0 ((\x -> x - 1) <$> requestedStartEvent...
1,009
buildStreamResult FeedDirectionForward (Just _lastEvent) events requestedStartEventNumber maxItems = let maxEventNumber = maximumMay $ recordedEventNumber <$> events minEventNumber = minimumMay $ recordedEventNumber <$> events nextEventNumber = fromMaybe (fromMaybe 0 ((\x -> x - 1) <$> requestedStartEvent...
1,009
false
false
0
16
184
256
143
113
null
null
DavidAlphaFox/ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
deMaybe :: TrieMap m => Maybe (m a) -> m a deMaybe Nothing = emptyTM
69
deMaybe :: TrieMap m => Maybe (m a) -> m a deMaybe Nothing = emptyTM
69
deMaybe Nothing = emptyTM
26
false
true
0
10
15
42
18
24
null
null
jstolarek/haddock
haddock-api/src/Haddock/GhcUtils.hs
bsd-2-clause
-- return the (name,version) of the package modulePackageInfo :: DynFlags -> Module -> (PackageName, Version) modulePackageInfo dflags modu = (packageName pkg, packageVersion pkg) where pkg = getPackageDetails dflags (modulePackageKey modu)
250
modulePackageInfo :: DynFlags -> Module -> (PackageName, Version) modulePackageInfo dflags modu = (packageName pkg, packageVersion pkg) where pkg = getPackageDetails dflags (modulePackageKey modu)
206
modulePackageInfo dflags modu = (packageName pkg, packageVersion pkg) where pkg = getPackageDetails dflags (modulePackageKey modu)
140
true
true
1
7
39
69
33
36
null
null
kevinbackhouse/Control-Monad-MultiPass
tests/TestMonoid2.hs
bsd-3-clause
instanceTest1 :: ST2 r w () instanceTest1 = run instanceTestBody1
65
instanceTest1 :: ST2 r w () instanceTest1 = run instanceTestBody1
65
instanceTest1 = run instanceTestBody1
37
false
true
0
6
9
23
11
12
null
null
onurzdg/clicklac
src/Database/PostgreSQL/Simple/Lifted.hs
bsd-3-clause
cute :: (PostgresClient m, ToRow q) => Query -> q -> m Int64 execute template qs = liftPSGClient (\c -> PS.execute c template qs)
140
execute :: (PostgresClient m, ToRow q) => Query -> q -> m Int64 execute template qs = liftPSGClient (\c -> PS.execute c template qs)
140
execute template qs = liftPSGClient (\c -> PS.execute c template qs)
68
false
true
0
9
34
62
31
31
null
null
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
a208 :: IO (); a208 = forever $ putStrLn "a208"
47
a208 :: IO () a208 = forever $ putStrLn "a208"
46
a208 = forever $ putStrLn "a208"
32
false
true
0
6
9
24
12
12
null
null
alexliew/learn_you_a_haskell
code/more_monads.hs
unlicense
gcd' :: Int -> Int -> Writer [String] Int gcd' a b | b == 0 = do tell ["Finished with " ++ show a] return a | otherwise = do tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)] gcd' b (a `mod` b)
230
gcd' :: Int -> Int -> Writer [String] Int gcd' a b | b == 0 = do tell ["Finished with " ++ show a] return a | otherwise = do tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)] gcd' b (a `mod` b)
230
gcd' a b | b == 0 = do tell ["Finished with " ++ show a] return a | otherwise = do tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)] gcd' b (a `mod` b)
188
false
true
1
14
77
133
63
70
null
null
carbolymer/blockchain
blockchain-node/src/Blockchain/Node/Core.hs
apache-2.0
-- | Calculates Proof of Work for the provided block and mining difficulty. Returns the new valid block with the updated -- proof of work calculateProofOfWork :: Block -> Int -> Block calculateProofOfWork block difficulty | isValidBlock block difficulty = block | otherwise = calculatePro...
374
calculateProofOfWork :: Block -> Int -> Block calculateProofOfWork block difficulty | isValidBlock block difficulty = block | otherwise = calculateProofOfWork (block { proof = proof block + 1}) difficulty
236
calculateProofOfWork block difficulty | isValidBlock block difficulty = block | otherwise = calculateProofOfWork (block { proof = proof block + 1}) difficulty
190
true
true
0
11
85
69
34
35
null
null
facebookincubator/duckling
Duckling/Numeral/AR/Helpers.hs
bsd-3-clause
parseArabicIntAsText :: Text -> Text parseArabicIntAsText = Text.pack . join . mapMaybe (`HashMap.lookup` numeralToStringMap) . Text.unpack
153
parseArabicIntAsText :: Text -> Text parseArabicIntAsText = Text.pack . join . mapMaybe (`HashMap.lookup` numeralToStringMap) . Text.unpack
153
parseArabicIntAsText = Text.pack . join . mapMaybe (`HashMap.lookup` numeralToStringMap) . Text.unpack
116
false
true
3
6
29
46
23
23
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x06C0' = "\x06D5\x0654"
39
decomposeChar '\x06C0' = "\x06D5\x0654"
39
decomposeChar '\x06C0' = "\x06D5\x0654"
39
false
false
1
5
3
13
4
9
null
null
sdiehl/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
-- See Note [Wiring in RuntimeRep] runtimeRepSimpleDataConNames :: [Name] runtimeRepSimpleDataConNames = zipWith3Lazy mk_special_dc_name [ fsLit "LiftedRep", fsLit "UnliftedRep" , fsLit "IntRep" , fsLit "Int8Rep", fsLit "Int16Rep", fsLit "Int32Rep", fsLit "Int64Rep" , fsLit "WordRep" , f...
533
runtimeRepSimpleDataConNames :: [Name] runtimeRepSimpleDataConNames = zipWith3Lazy mk_special_dc_name [ fsLit "LiftedRep", fsLit "UnliftedRep" , fsLit "IntRep" , fsLit "Int8Rep", fsLit "Int16Rep", fsLit "Int32Rep", fsLit "Int64Rep" , fsLit "WordRep" , fsLit "Word8Rep", fsLit "Word16Rep",...
498
runtimeRepSimpleDataConNames = zipWith3Lazy mk_special_dc_name [ fsLit "LiftedRep", fsLit "UnliftedRep" , fsLit "IntRep" , fsLit "Int8Rep", fsLit "Int16Rep", fsLit "Int32Rep", fsLit "Int64Rep" , fsLit "WordRep" , fsLit "Word8Rep", fsLit "Word16Rep", fsLit "Word32Rep", fsLit "Word64Rep" ...
459
true
true
0
7
114
117
58
59
null
null
jonsterling/ETT-Lite
src/TypeCheck.hs
bsd-3-clause
tcArgTele _ Empty = err [DD "Too many arguments provided."]
61
tcArgTele _ Empty = err [DD "Too many arguments provided."]
61
tcArgTele _ Empty = err [DD "Too many arguments provided."]
61
false
false
1
6
11
21
9
12
null
null
benmos/pathtype
System/Path/Internal.hs
bsd-3-clause
- | Remove last extension, and the \".\" preceding it. -- -- >> dropExtension x == fst (splitExtension x) dropExtension :: FilePath ar -> FilePath ar dropExtension = fst . splitExtension
187
dropExtension :: FilePath ar -> FilePath ar dropExtension = fst . splitExtension
80
dropExtension = fst . splitExtension
36
true
true
3
8
31
43
22
21
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/IO/Encoding.hs
bsd-3-clause
(getFileSystemEncoding, setFileSystemEncoding) = mkGlobal initFileSystemEncoding
80
(getFileSystemEncoding, setFileSystemEncoding) = mkGlobal initFileSystemEncoding
80
(getFileSystemEncoding, setFileSystemEncoding) = mkGlobal initFileSystemEncoding
80
false
false
0
5
4
16
8
8
null
null
kazu-yamamoto/http2
Network/HPACK/Huffman/Tree.hs
bsd-3-clause
mark i (F:bs) (Bin Nothing n l r) = Bin (Just i) n (mark (i+1) bs l) r
70
mark i (F:bs) (Bin Nothing n l r) = Bin (Just i) n (mark (i+1) bs l) r
70
mark i (F:bs) (Bin Nothing n l r) = Bin (Just i) n (mark (i+1) bs l) r
70
false
false
0
9
17
64
32
32
null
null
HIPERFIT/futhark
src/Language/Futhark/Interpreter.hs
isc
indexArray :: [Indexing] -> Value -> Maybe Value indexArray (IndexingFix i : is) (ValueArray _ arr) | i >= 0, i < n = indexArray is $ arr ! fromIntegral i | otherwise = Nothing where n = arrayLength arr
224
indexArray :: [Indexing] -> Value -> Maybe Value indexArray (IndexingFix i : is) (ValueArray _ arr) | i >= 0, i < n = indexArray is $ arr ! fromIntegral i | otherwise = Nothing where n = arrayLength arr
224
indexArray (IndexingFix i : is) (ValueArray _ arr) | i >= 0, i < n = indexArray is $ arr ! fromIntegral i | otherwise = Nothing where n = arrayLength arr
175
false
true
1
8
61
98
47
51
null
null
scottgw/language-eiffel
Language/Eiffel/PrettyPrint.hs
bsd-3-clause
procs [] = empty
16
procs [] = empty
16
procs [] = empty
16
false
false
1
5
3
15
5
10
null
null
mortum5/programming
haskell/usefull/parser/errorcheck.hs
mit
extractValue :: ThrowsError a -> a extractValue (Right val) = val
65
extractValue :: ThrowsError a -> a extractValue (Right val) = val
65
extractValue (Right val) = val
30
false
true
0
6
10
31
14
17
null
null
abakst/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector/Generic.hs
bsd-3-clause
force v = new (clone v)
23
force v = new (clone v)
23
force v = new (clone v)
23
false
false
1
7
5
22
8
14
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DeleteTape.hs
mpl-2.0
-- | The Amazon Resource Name (ARN) of the deleted virtual tape. dtrsTapeARN :: Lens' DeleteTapeResponse (Maybe Text) dtrsTapeARN = lens _dtrsTapeARN (\ s a -> s{_dtrsTapeARN = a})
180
dtrsTapeARN :: Lens' DeleteTapeResponse (Maybe Text) dtrsTapeARN = lens _dtrsTapeARN (\ s a -> s{_dtrsTapeARN = a})
115
dtrsTapeARN = lens _dtrsTapeARN (\ s a -> s{_dtrsTapeARN = a})
62
true
true
1
9
28
51
25
26
null
null
getyourguide/fbthrift
thrift/compiler/test/fixtures/namespace/gen-hs/My/Namespacing/Test/HsTestService.hs
apache-2.0
read_Init_result :: (Thrift.Transport t, Thrift.Protocol p) => p t -> IO Init_result read_Init_result iprot = to_Init_result <$> Thrift.readVal iprot (Types.T_STRUCT typemap_Init_result)
186
read_Init_result :: (Thrift.Transport t, Thrift.Protocol p) => p t -> IO Init_result read_Init_result iprot = to_Init_result <$> Thrift.readVal iprot (Types.T_STRUCT typemap_Init_result)
186
read_Init_result iprot = to_Init_result <$> Thrift.readVal iprot (Types.T_STRUCT typemap_Init_result)
101
false
true
0
9
20
62
30
32
null
null
brunjlar/neural
src/Data/FixedSize/Vector.hs
mit
-- | Calculates the /squared/ euclidean distance between two vectors of the same length. -- -- >>> :set -XDataKinds -- >>> sqDiff (cons 1 (cons 2 nil)) (cons 3 (cons 4 nil)) :: Int -- 8 -- sqDiff :: (Num a, KnownNat n) => Vector n a -> Vector n a -> a sqDiff v w = sqNorm (v <-> w)
281
sqDiff :: (Num a, KnownNat n) => Vector n a -> Vector n a -> a sqDiff v w = sqNorm (v <-> w)
92
sqDiff v w = sqNorm (v <-> w)
29
true
true
0
9
60
71
36
35
null
null
databrary/databrary
src/Service/DB.hs
agpl-3.0
dbQuery1 :: (MonadDB c m, PGQuery q a, Show q) => q -> m (Maybe a) dbQuery1 q = do r <- dbQuery q case r of [] -> return Nothing [x] -> return $ Just x _ -> fail $ "pgQuery1 " ++ show q ++ ": too many results"
225
dbQuery1 :: (MonadDB c m, PGQuery q a, Show q) => q -> m (Maybe a) dbQuery1 q = do r <- dbQuery q case r of [] -> return Nothing [x] -> return $ Just x _ -> fail $ "pgQuery1 " ++ show q ++ ": too many results"
225
dbQuery1 q = do r <- dbQuery q case r of [] -> return Nothing [x] -> return $ Just x _ -> fail $ "pgQuery1 " ++ show q ++ ": too many results"
158
false
true
0
13
66
123
57
66
null
null
ssaavedra/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/RBTree0.hs
bsd-3-clause
intersection _ Leaf = Leaf
26
intersection _ Leaf = Leaf
26
intersection _ Leaf = Leaf
26
false
false
0
5
4
11
5
6
null
null
vikraman/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayOptl _ WayDebug = []
28
wayOptl _ WayDebug = []
28
wayOptl _ WayDebug = []
28
false
false
1
6
9
15
6
9
null
null
avieth/diplomacy
Diplomacy/OrderObject.hs
bsd-3-clause
orderObjectEqual :: OrderObject phase order -> OrderObject phase' order' -> Bool orderObjectEqual object1 object2 = case (object1, object2) of (MoveObject pt1, MoveObject pt2) -> pt1 == pt2 (SupportObject subj1 pt1, SupportObject subj2 pt2) -> (subj1, pt1) == (subj2, pt2) (ConvoyObject subj1 pt1, ConvoyObje...
613
orderObjectEqual :: OrderObject phase order -> OrderObject phase' order' -> Bool orderObjectEqual object1 object2 = case (object1, object2) of (MoveObject pt1, MoveObject pt2) -> pt1 == pt2 (SupportObject subj1 pt1, SupportObject subj2 pt2) -> (subj1, pt1) == (subj2, pt2) (ConvoyObject subj1 pt1, ConvoyObje...
613
orderObjectEqual object1 object2 = case (object1, object2) of (MoveObject pt1, MoveObject pt2) -> pt1 == pt2 (SupportObject subj1 pt1, SupportObject subj2 pt2) -> (subj1, pt1) == (subj2, pt2) (ConvoyObject subj1 pt1, ConvoyObject subj2 pt2) -> (subj1, pt1) == (subj2, pt2) (WithdrawObject pt1, WithdrawOb...
532
false
true
9
7
113
199
117
82
null
null
simonmichael/hledger
hledger-lib/Hledger/Data/AccountName.hs
gpl-3.0
expandAccountNames :: [AccountName] -> [AccountName] expandAccountNames = toList . foldMap (S.fromList . expandAccountName)
123
expandAccountNames :: [AccountName] -> [AccountName] expandAccountNames = toList . foldMap (S.fromList . expandAccountName)
123
expandAccountNames = toList . foldMap (S.fromList . expandAccountName)
70
false
true
1
8
12
44
21
23
null
null
luzhuomi/cpp-obs
Language/C/Obfuscate/ASTUtils.hs
apache-2.0
intTy = AST.CIntType N.undefNode
33
intTy = AST.CIntType N.undefNode
33
intTy = AST.CIntType N.undefNode
33
false
false
0
6
4
13
6
7
null
null
punitrathore/haskell-first-principles
src/Chap18.hs
bsd-3-clause
flipType :: (Monad m) => [m a] -> m [a] flipType xs = meh xs id
63
flipType :: (Monad m) => [m a] -> m [a] flipType xs = meh xs id
63
flipType xs = meh xs id
23
false
true
0
8
15
44
22
22
null
null
ducis/reactive-make
pipes-shell-0.1.0/src/Pipes/Shell.hs
gpl-3.0
-- | Like 'pipeCmd' but closes the output end immediately. -- -- Useful for command line tools like @ cat > test.file @ consumerCmdEnv:: MonadSafe m => Maybe [(String,String)] -> String -> Consumer (Maybe BS.ByteString) m () consumerCmdEnv env' cmdStr = pipeCmdEnv env' cmdStr >...
333
consumerCmdEnv:: MonadSafe m => Maybe [(String,String)] -> String -> Consumer (Maybe BS.ByteString) m () consumerCmdEnv env' cmdStr = pipeCmdEnv env' cmdStr >-> void await
213
consumerCmdEnv env' cmdStr = pipeCmdEnv env' cmdStr >-> void await
66
true
true
0
11
88
75
38
37
null
null
danidiaz/haskell-sandbox
existential.hs
mit
casty::AnyComponent -> Maybe (Component Int) casty (AnyComponent c) = cast c
76
casty::AnyComponent -> Maybe (Component Int) casty (AnyComponent c) = cast c
76
casty (AnyComponent c) = cast c
31
false
true
0
9
10
41
18
23
null
null
romanb/aws
Aws/Sqs/Core.hs
bsd-3-clause
printQueueAttribute Policy = "Policy"
37
printQueueAttribute Policy = "Policy"
37
printQueueAttribute Policy = "Policy"
37
false
false
0
4
3
10
4
6
null
null
brendanhay/gogol
gogol-firebasehosting/gen/Network/Google/Resource/FirebaseHosting/Sites/UpdateConfig.hs
mpl-2.0
-- | Required. The site for which to update the SiteConfig, in the format: -- 'sites\/site-name\/config' sucName :: Lens' SitesUpdateConfig Text sucName = lens _sucName (\ s a -> s{_sucName = a})
195
sucName :: Lens' SitesUpdateConfig Text sucName = lens _sucName (\ s a -> s{_sucName = a})
90
sucName = lens _sucName (\ s a -> s{_sucName = a})
50
true
true
0
9
31
41
23
18
null
null
TomMD/cryptol
sbv/Data/SBV/BitVectors/Data.hs
bsd-3-clause
-- | how many arguments does the type take? typeArity :: SBVType -> Int typeArity (SBVType xs) = length xs - 1
110
typeArity :: SBVType -> Int typeArity (SBVType xs) = length xs - 1
66
typeArity (SBVType xs) = length xs - 1
38
true
true
0
7
21
32
16
16
null
null
carliros/ParserXML
src/ParserGenericXML.hs
bsd-3-clause
-- | funcion principal para el parser xml parser :: FilePath -> String -> NTree parser fn inp = runParser fn p inp where p :: Parser NTree p = pSpaces *> pXML <* pSpaces -- | Parser que reconoce un tag normal/especial o texto
240
parser :: FilePath -> String -> NTree parser fn inp = runParser fn p inp where p :: Parser NTree p = pSpaces *> pXML <* pSpaces -- | Parser que reconoce un tag normal/especial o texto
198
parser fn inp = runParser fn p inp where p :: Parser NTree p = pSpaces *> pXML <* pSpaces -- | Parser que reconoce un tag normal/especial o texto
160
true
true
1
6
59
65
30
35
null
null
TomMD/cryptol
sbv/Data/SBV/Provers/CVC4.hs
bsd-3-clause
cvc4ExitCode ec = ec
56
cvc4ExitCode ec = ec
56
cvc4ExitCode ec = ec
56
false
false
0
4
39
9
4
5
null
null
neothemachine/monadiccp
src/Control/CP/FD/FD.hs
bsd-3-clause
getFullColSpec id = do s <- get return $ myFromJust "getFullColSpec" $ Map.lookup id $ fdsColVars s
103
getFullColSpec id = do s <- get return $ myFromJust "getFullColSpec" $ Map.lookup id $ fdsColVars s
103
getFullColSpec id = do s <- get return $ myFromJust "getFullColSpec" $ Map.lookup id $ fdsColVars s
103
false
false
0
10
20
42
18
24
null
null
ribag/ganeti-experiments
src/Ganeti/Constants.hs
gpl-2.0
-- This is 'create and get' cryptoActionCreate :: String cryptoActionCreate = "create"
86
cryptoActionCreate :: String cryptoActionCreate = "create"
58
cryptoActionCreate = "create"
29
true
true
0
4
11
12
7
5
null
null
SimSaladin/haikubot
Tavutus.hs
bsd-3-clause
-- | Tavutus PP. printTavut :: Runo -> String printTavut = f " // " . f " " $ f "-" unTavu where f x g = L.intercalate x . map g -- * Implementation (Finnish)
179
printTavut :: Runo -> String printTavut = f " // " . f " " $ f "-" unTavu where f x g = L.intercalate x . map g -- * Implementation (Finnish)
162
printTavut = f " // " . f " " $ f "-" unTavu where f x g = L.intercalate x . map g -- * Implementation (Finnish)
133
true
true
1
7
57
71
30
41
null
null
mydaum/cabal
Cabal/Distribution/GetOpt.hs
bsd-3-clause
errReq :: String -> String -> OptKind a errReq d optStr = OptErr ("option `" ++ optStr ++ "' requires an argument " ++ d ++ "\n")
129
errReq :: String -> String -> OptKind a errReq d optStr = OptErr ("option `" ++ optStr ++ "' requires an argument " ++ d ++ "\n")
129
errReq d optStr = OptErr ("option `" ++ optStr ++ "' requires an argument " ++ d ++ "\n")
89
false
true
0
10
26
53
25
28
null
null
plow-technologies/onping-data-language
OnPing/DataServer/Language/Parser.hs
bsd-3-clause
p_Term :: Parser (Exp Value) p_Term = fmap (foldl1 EApp) $ many1 $ spaced p_SimpleExp
85
p_Term :: Parser (Exp Value) p_Term = fmap (foldl1 EApp) $ many1 $ spaced p_SimpleExp
85
p_Term = fmap (foldl1 EApp) $ many1 $ spaced p_SimpleExp
56
false
true
0
9
14
40
19
21
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs
bsd-3-clause
gl_OPERAND1_ALPHA :: GLenum gl_OPERAND1_ALPHA = 0x8599
54
gl_OPERAND1_ALPHA :: GLenum gl_OPERAND1_ALPHA = 0x8599
54
gl_OPERAND1_ALPHA = 0x8599
26
false
true
0
4
5
11
6
5
null
null
solatis/haskell-network-anonymous-i2p
test/Network/Anonymous/I2P/ProtocolSpec.hs
mit
mockServer :: ( MonadIO m , MonadMask m) => String -> (NS.Socket -> IO a) -> m ThreadId mockServer port callback = do tid <- liftIO $ forkIO $ NS.listen "*" port (\(lsock, _) -> NS.accept lsock (\(sock, _) -> do ...
536
mockServer :: ( MonadIO m , MonadMask m) => String -> (NS.Socket -> IO a) -> m ThreadId mockServer port callback = do tid <- liftIO $ forkIO $ NS.listen "*" port (\(lsock, _) -> NS.accept lsock (\(sock, _) -> do ...
536
mockServer port callback = do tid <- liftIO $ forkIO $ NS.listen "*" port (\(lsock, _) -> NS.accept lsock (\(sock, _) -> do _ <- callback sock threadDelay 1000000 ...
401
false
true
0
18
289
153
74
79
null
null
mrehayden1/lji
src/LJI/Music.hs
bsd-3-clause
maxPitch = 131
14
maxPitch = 131
14
maxPitch = 131
14
false
false
1
5
2
10
3
7
null
null
moonKimura/conduit-1.0.8
Data/Conduit/Util.hs
mit
-- | Combines two sources. The new source will stop producing once either -- source has been exhausted. -- -- Since 0.3.0 zip :: Monad m => Source m a -> Source m b -> Source m (a, b) zip (ConduitM left0) (ConduitM right0) = ConduitM $ go left0 right0 where go (Leftover left ()) right = go left right go...
1,162
zip :: Monad m => Source m a -> Source m b -> Source m (a, b) zip (ConduitM left0) (ConduitM right0) = ConduitM $ go left0 right0 where go (Leftover left ()) right = go left right go left (Leftover right ()) = go left right go (Done ()) (Done ()) = Done () go (Done ()) (HaveOutput _ close _) = Pi...
1,038
zip (ConduitM left0) (ConduitM right0) = ConduitM $ go left0 right0 where go (Leftover left ()) right = go left right go left (Leftover right ()) = go left right go (Done ()) (Done ()) = Done () go (Done ()) (HaveOutput _ close _) = PipeM (close >> return (Done ())) go (HaveOutput _ close _) ...
976
true
true
8
11
284
594
285
309
null
null
zepto-lang/zepto-js
src/Zepto/Parser.hs
gpl-2.0
hex2dig :: String -> Integer hex2dig x = fst $ head $ readHex x
63
hex2dig :: String -> Integer hex2dig x = fst $ head $ readHex x
63
hex2dig x = fst $ head $ readHex x
34
false
true
0
7
13
34
15
19
null
null
prowdsponsor/mangopay
mangopay/src/Web/MangoPay/Monad.hs
bsd-3-clause
getClientURL :: (Monad m)=> ByteString -- ^ the url path -> MangoPayT m ByteString -- ^ the URL getClientURL path=do cid<- liftM clientIdBS getCreds return $ BS.concat ["/v2/",cid,path] -- | get the url to use for our clientId
252
getClientURL :: (Monad m)=> ByteString -- ^ the url path -> MangoPayT m ByteString getClientURL path=do cid<- liftM clientIdBS getCreds return $ BS.concat ["/v2/",cid,path] -- | get the url to use for our clientId
238
getClientURL path=do cid<- liftM clientIdBS getCreds return $ BS.concat ["/v2/",cid,path] -- | get the url to use for our clientId
147
true
true
0
9
63
68
35
33
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
mpl-2.0
-- | The name. eiName :: Lens' ElasticIp (Maybe Text) eiName = lens _eiName (\s a -> s { _eiName = a })
103
eiName :: Lens' ElasticIp (Maybe Text) eiName = lens _eiName (\s a -> s { _eiName = a })
88
eiName = lens _eiName (\s a -> s { _eiName = a })
49
true
true
0
9
22
46
25
21
null
null
d0kt0r0/estuary
client/src/Estuary/Help/Natural.hs
gpl-3.0
functionRef :: MonadWidget t m => Text -> m () functionRef x = divClass "helpWrapper" $ do switchToReference <- buttonWithClass' x exampleVisible <- toggle True switchToReference referenceVisible <- toggle False switchToReference hideableWidget exampleVisible "exampleText primary-color code-font" $ text (exampl...
425
functionRef :: MonadWidget t m => Text -> m () functionRef x = divClass "helpWrapper" $ do switchToReference <- buttonWithClass' x exampleVisible <- toggle True switchToReference referenceVisible <- toggle False switchToReference hideableWidget exampleVisible "exampleText primary-color code-font" $ text (exampl...
425
functionRef x = divClass "helpWrapper" $ do switchToReference <- buttonWithClass' x exampleVisible <- toggle True switchToReference referenceVisible <- toggle False switchToReference hideableWidget exampleVisible "exampleText primary-color code-font" $ text (exampleText x) hideableWidget referenceVisible "ref...
378
false
true
0
11
61
123
53
70
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/PrettyPrint.hs
mit
-- Puts everything on a line as long as it fits, and the -- rest on individual lines fill1Sep :: Foldable f => f Doc -> Doc fill1Sep xs = go (reverse (toList xs)) where go [] = empty go (x:xs) = group (go xs <!> x)
224
fill1Sep :: Foldable f => f Doc -> Doc fill1Sep xs = go (reverse (toList xs)) where go [] = empty go (x:xs) = group (go xs <!> x)
139
fill1Sep xs = go (reverse (toList xs)) where go [] = empty go (x:xs) = group (go xs <!> x)
100
true
true
1
9
56
85
42
43
null
null
olsner/ghc
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
x86_takeRegRegMoveInstr _ = Nothing
36
x86_takeRegRegMoveInstr _ = Nothing
36
x86_takeRegRegMoveInstr _ = Nothing
36
false
false
0
5
4
9
4
5
null
null
bos/text-icu
tests/Properties.hs
bsd-2-clause
tests :: Test tests = testGroup "Properties" [ testProperty "t_toCaseFold" t_toCaseFold , testProperty "t_toLower" t_toLower , testProperty "t_toUpper" t_toUpper , testProperty "t_charIterator_String" t_charIterator_String , testProperty "t_charIterator_Text" t_charIterator_Text , testProperty "t_charIt...
1,102
tests :: Test tests = testGroup "Properties" [ testProperty "t_toCaseFold" t_toCaseFold , testProperty "t_toLower" t_toLower , testProperty "t_toUpper" t_toUpper , testProperty "t_charIterator_String" t_charIterator_String , testProperty "t_charIterator_Text" t_charIterator_Text , testProperty "t_charIt...
1,102
tests = testGroup "Properties" [ testProperty "t_toCaseFold" t_toCaseFold , testProperty "t_toLower" t_toLower , testProperty "t_toUpper" t_toUpper , testProperty "t_charIterator_String" t_charIterator_String , testProperty "t_charIterator_Text" t_charIterator_Text , testProperty "t_charIterator_Utf8" t...
1,088
false
true
0
7
143
192
94
98
null
null
GaloisInc/halvm-ghc
compiler/deSugar/DsUtils.hs
bsd-3-clause
mkDataConCase var ty alts@(alt1:_) = MatchResult fail_flag mk_case where con1 = alt_pat alt1 tycon = dataConTyCon con1 data_cons = tyConDataCons tycon match_results = map alt_result alts sorted_alts :: [CaseAlt DataCon] sorted_alts = sort_alts alts var_ty = id...
1,988
mkDataConCase var ty alts@(alt1:_) = MatchResult fail_flag mk_case where con1 = alt_pat alt1 tycon = dataConTyCon con1 data_cons = tyConDataCons tycon match_results = map alt_result alts sorted_alts :: [CaseAlt DataCon] sorted_alts = sort_alts alts var_ty = id...
1,988
mkDataConCase var ty alts@(alt1:_) = MatchResult fail_flag mk_case where con1 = alt_pat alt1 tycon = dataConTyCon con1 data_cons = tyConDataCons tycon match_results = map alt_result alts sorted_alts :: [CaseAlt DataCon] sorted_alts = sort_alts alts var_ty = id...
1,988
false
false
18
17
630
568
267
301
null
null
mk12/luminosity
src/Luminosity/Parse.hs
mit
-- | Apply a predicate to a monadic value, and fail with the given string if the -- predicate fails, otherwise keep the same value. -- -- > return 5000 >>= ensure (> 0) "Failed." == return 5000 -- > return (-1) >>= ensure (> 0) "Failed." == fail "Failed." ensure :: Monad m => (a -> Bool) -> String -> a -> m a ensur...
384
ensure :: Monad m => (a -> Bool) -> String -> a -> m a ensure p s x | p x = return x | otherwise = fail s
124
ensure p s x | p x = return x | otherwise = fail s
69
true
true
0
9
102
80
38
42
null
null
phylake/avm3
llvm/passes/abct.hs
mit
abcT1 {- 0x2F -} i u d s m (br, Abc.PushDouble u30) = (br, [PushDouble $ d u30])
80
abcT1 {- 0x2F -} i u d s m (br, Abc.PushDouble u30) = (br, [PushDouble $ d u30])
80
abcT1 {- 0x2F -} i u d s m (br, Abc.PushDouble u30) = (br, [PushDouble $ d u30])
80
false
false
0
8
17
48
25
23
null
null
nevrenato/Hets_Fork
Temporal/ModalCaslToCtl.hs
gpl-2.0
convert (Casl.A (Casl.X phi)) = liftM Ctl.AX (convert' phi)
67
convert (Casl.A (Casl.X phi)) = liftM Ctl.AX (convert' phi)
67
convert (Casl.A (Casl.X phi)) = liftM Ctl.AX (convert' phi)
67
false
false
0
10
16
38
18
20
null
null
mietek/stack
src/Options/Applicative/Builder/Extra.hs
bsd-3-clause
-- | Show an extra help option (e.g. @--docker-help@ shows help for all @--docker*@ args). -- To actually show have that help appear, use 'execExtraHelp' before executing the main parser. extraHelpOption :: String -> String -> String -> Parser (a -> a) extraHelpOption progName fakeName helpName = infoOption (optDes...
766
extraHelpOption :: String -> String -> String -> Parser (a -> a) extraHelpOption progName fakeName helpName = infoOption (optDesc ++ ".") (long helpName <> hidden <> internal) <*> infoOption (optDesc ++ ".") (long fakeName <> help optDesc) where optDesc = concat ["Run '", takeBaseName progName, " --", helpNam...
578
extraHelpOption progName fakeName helpName = infoOption (optDesc ++ ".") (long helpName <> hidden <> internal) <*> infoOption (optDesc ++ ".") (long fakeName <> help optDesc) where optDesc = concat ["Run '", takeBaseName progName, " --", helpName, "' for details"] -- | Display extra help if extea help option...
513
true
true
0
10
130
129
68
61
null
null
mpickering/hackage-server
Distribution/Server/Pages/Template.hs
bsd-3-clause
--TODO: replace all this with external templates -- | Create top-level HTML document by wrapping the Html with boilerplate. hackagePage :: String -> [Html] -> Html hackagePage = hackagePageWithHead []
201
hackagePage :: String -> [Html] -> Html hackagePage = hackagePageWithHead []
76
hackagePage = hackagePageWithHead []
36
true
true
0
7
30
29
16
13
null
null
nwf/wl-pprint-extras
src/Text/PrettyPrint/Free/Internal.hs
bsd-2-clause
-- | The document @(vcat xs)@ concatenates all documents @xs@ -- vertically with @aboveBreak@. If a 'group' undoes the line breaks -- inserted by @vcat@, all documents are directly concatenated. vcat :: Foldable f => f (Doc a e) -> Doc a e vcat = fold aboveBreak
262
vcat :: Foldable f => f (Doc a e) -> Doc a e vcat = fold aboveBreak
67
vcat = fold aboveBreak
22
true
true
0
10
46
49
23
26
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLAYOUT_LEFT :: Int wxLAYOUT_LEFT = 2
38
wxLAYOUT_LEFT :: Int wxLAYOUT_LEFT = 2
38
wxLAYOUT_LEFT = 2
17
false
true
0
4
5
11
6
5
null
null
denkab/FrameworkBenchmarks
frameworks/Haskell/yesod/bench/src/yesod.hs
bsd-3-clause
getUpdatesR :: Int -> Handler Value getUpdatesR cnt = multiRandomHandler randomPair go cnt' where cnt' | cnt < 1 = 1 | cnt > 500 = 500 | otherwise = cnt go = uncurry (intUpdate runMySQL My.toSqlKey)
226
getUpdatesR :: Int -> Handler Value getUpdatesR cnt = multiRandomHandler randomPair go cnt' where cnt' | cnt < 1 = 1 | cnt > 500 = 500 | otherwise = cnt go = uncurry (intUpdate runMySQL My.toSqlKey)
226
getUpdatesR cnt = multiRandomHandler randomPair go cnt' where cnt' | cnt < 1 = 1 | cnt > 500 = 500 | otherwise = cnt go = uncurry (intUpdate runMySQL My.toSqlKey)
190
false
true
0
8
64
86
40
46
null
null
siddhanathan/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
isDroppableDerivedLoc :: CtLoc -> Bool -- Note [Dropping derived constraints] isDroppableDerivedLoc loc = case ctLocOrigin loc of KindEqOrigin {} -> False GivenOrigin {} -> False FunDepOrigin1 {} -> False FunDepOrigin2 {} -> False _ -> True {- Note [Dropping derived c...
2,175
isDroppableDerivedLoc :: CtLoc -> Bool isDroppableDerivedLoc loc = case ctLocOrigin loc of KindEqOrigin {} -> False GivenOrigin {} -> False FunDepOrigin1 {} -> False FunDepOrigin2 {} -> False _ -> True {- Note [Dropping derived constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~...
2,136
isDroppableDerivedLoc loc = case ctLocOrigin loc of KindEqOrigin {} -> False GivenOrigin {} -> False FunDepOrigin1 {} -> False FunDepOrigin2 {} -> False _ -> True {- Note [Dropping derived constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In general we discard deriv...
2,097
true
true
0
8
582
73
37
36
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs
bsd-3-clause
hpcProgram :: Program hpcProgram = (simpleProgram "hpc") { programFindVersion = findProgramVersion "version" $ \str -> case words str of (_ : _ : _ : ver : _) -> ver _ -> "" }
235
hpcProgram :: Program hpcProgram = (simpleProgram "hpc") { programFindVersion = findProgramVersion "version" $ \str -> case words str of (_ : _ : _ : ver : _) -> ver _ -> "" }
235
hpcProgram = (simpleProgram "hpc") { programFindVersion = findProgramVersion "version" $ \str -> case words str of (_ : _ : _ : ver : _) -> ver _ -> "" }
213
false
true
0
16
93
75
39
36
null
null
ml9951/ghc
compiler/utils/StringBuffer.hs
bsd-3-clause
skipBOM :: Handle -> Integer -> Integer -> IO Integer skipBOM h size offset = -- Only skip BOM at the beginning of a file. if size > 0 && offset == 0 then do -- Validate assumption that handle is in binary mode. ASSERTM( hGetEncoding h >>= return . isNothing ) -- Temporarily select utf8 encodi...
688
skipBOM :: Handle -> Integer -> Integer -> IO Integer skipBOM h size offset = -- Only skip BOM at the beginning of a file. if size > 0 && offset == 0 then do -- Validate assumption that handle is in binary mode. ASSERTM( hGetEncoding h >>= return . isNothing ) -- Temporarily select utf8 encodi...
688
skipBOM h size offset = -- Only skip BOM at the beginning of a file. if size > 0 && offset == 0 then do -- Validate assumption that handle is in binary mode. ASSERTM( hGetEncoding h >>= return . isNothing ) -- Temporarily select utf8 encoding with error ignoring, -- to make `hLookAhead` ...
634
false
true
0
13
187
157
76
81
null
null
yobiya/jcc
match.hs
mit
matchTypeWithString _ (Just (JsonNumber t)) (_, "number") = mMatch
76
matchTypeWithString _ (Just (JsonNumber t)) (_, "number") = mMatch
76
matchTypeWithString _ (Just (JsonNumber t)) (_, "number") = mMatch
76
false
false
0
9
18
31
16
15
null
null
GaloisInc/galua
galua-jit/src/Galua/Micro/JIT.hs
mit
cmt :: Doc -> Doc cmt x = "{-" <+> x <+> "-}"
45
cmt :: Doc -> Doc cmt x = "{-" <+> x <+> "-}"
45
cmt x = "{-" <+> x <+> "-}"
27
false
true
4
7
12
34
14
20
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
buildLib, replLib :: Verbosity -> Cabal.Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> IO () buildLib = buildOrReplLib False
231
buildLib, replLib :: Verbosity -> Cabal.Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> IO () buildLib = buildOrReplLib False
231
buildLib = buildOrReplLib False
31
false
true
0
12
78
56
28
28
null
null
apyrgio/snf-ganeti
src/Ganeti/Types.hs
bsd-2-clause
-- FIXME: this should check that 'address' is a valid ip mkIPv6Network :: Monad m => String -> m IPv6Network mkIPv6Network address = return IPv6Network { fromIPv6Network = address }
183
mkIPv6Network :: Monad m => String -> m IPv6Network mkIPv6Network address = return IPv6Network { fromIPv6Network = address }
126
mkIPv6Network address = return IPv6Network { fromIPv6Network = address }
74
true
true
0
8
31
48
22
26
null
null
ssaavedra/liquidhaskell
benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy/Char8.hs
bsd-3-clause
-- | /O(n)/ The 'elemIndices' function extends 'elemIndex', by returning -- the indices of all elements equal to the query element, in ascending order. elemIndices :: Char -> ByteString -> [Int64] elemIndices = L.elemIndices . c2w
230
elemIndices :: Char -> ByteString -> [Int64] elemIndices = L.elemIndices . c2w
78
elemIndices = L.elemIndices . c2w
33
true
true
0
7
35
30
17
13
null
null
fmapfmapfmap/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateUserProfile.hs
mpl-2.0
-- | Creates a value of 'CreateUserProfileResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cuprsIAMUserARN' -- -- * 'cuprsResponseStatus' createUserProfileResponse :: Int -- ^ 'cuprsResponseStatus' -> CreateUserProfil...
490
createUserProfileResponse :: Int -- ^ 'cuprsResponseStatus' -> CreateUserProfileResponse createUserProfileResponse pResponseStatus_ = CreateUserProfileResponse' { _cuprsIAMUserARN = Nothing , _cuprsResponseStatus = pResponseStatus_ }
257
createUserProfileResponse pResponseStatus_ = CreateUserProfileResponse' { _cuprsIAMUserARN = Nothing , _cuprsResponseStatus = pResponseStatus_ }
160
true
true
0
6
82
40
26
14
null
null
eigengrau/hlint
src/Test/Translate.hs
bsd-3-clause
- | Given a set of hints, do all the HintRule hints satisfy QuickCheck testQuickCheck :: FilePath -> [[Setting]] -> IO () testQuickCheck = wrap toQuickCheck
157
testQuickCheck :: FilePath -> [[Setting]] -> IO () testQuickCheck = wrap toQuickCheck
85
testQuickCheck = wrap toQuickCheck
34
true
true
2
10
26
67
33
34
null
null
LukaHorvat/Halt
test/Tests.hs
mit
withParser :: (Show a, Eq a) => Parser a -> String -> a -> Expectation withParser p from to = parseHelper p from `shouldBe` to
126
withParser :: (Show a, Eq a) => Parser a -> String -> a -> Expectation withParser p from to = parseHelper p from `shouldBe` to
126
withParser p from to = parseHelper p from `shouldBe` to
55
false
true
0
8
24
59
30
29
null
null
geophf/1HaskellADay
exercises/HAD/Y2020/M10/D12/Solution.hs
mit
{-- >>> ab2ab <$> decode sample Just [Base "http://www.wikidata.org/entity/Q1031458" "M\ETXrcule\EMti Air Force Base" "LUBM" "Moldova" (Point 28.2125 47.8625)] WHEW! ... so, in that case: >>> loadBases (workingDir ++ file) ... >>> let bases = it -- 2. How many airbases are there? >>> length ...
1,573
byICAO :: [AirBase] -> Map Icao AirBase byICAO = Map.fromList . map (first icao . dup) where dup = id &&& id -- 4. Now: how many bases are there, without duplicates? {-- >>> let mappedBases = byICAO bases >>> Map.size mappedBases 921 >>> take 3 (Map.elems mappedBases) [Base {k = "http://www.wikidata.org/entity/Q...
995
byICAO = Map.fromList . map (first icao . dup) where dup = id &&& id -- 4. Now: how many bases are there, without duplicates? {-- >>> let mappedBases = byICAO bases >>> Map.size mappedBases 921 >>> take 3 (Map.elems mappedBases) [Base {k = "http://www.wikidata.org/entity/Q5372593", val = "Emirau Airport"...
955
true
true
0
9
339
61
34
27
null
null
ryantm/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
genCCall dflags is32Bit (PrimTarget (MO_PopCnt width)) dest_regs@[dst] args@[src] = do sse4_2 <- sse4_2Enabled let platform = targetPlatform dflags if sse4_2 then do code_src <- getAnyReg src src_r <- getNewRegNat size return $ code_src src_r `appOL` ...
1,315
genCCall dflags is32Bit (PrimTarget (MO_PopCnt width)) dest_regs@[dst] args@[src] = do sse4_2 <- sse4_2Enabled let platform = targetPlatform dflags if sse4_2 then do code_src <- getAnyReg src src_r <- getNewRegNat size return $ code_src src_r `appOL` ...
1,315
genCCall dflags is32Bit (PrimTarget (MO_PopCnt width)) dest_regs@[dst] args@[src] = do sse4_2 <- sse4_2Enabled let platform = targetPlatform dflags if sse4_2 then do code_src <- getAnyReg src src_r <- getNewRegNat size return $ code_src src_r `appOL` ...
1,315
false
false
2
20
578
325
156
169
null
null
phi16/Lambia
src/Lambia/Apply.hs
gpl-3.0
decr x (App l r) = App (decr x l) (decr x r)
44
decr x (App l r) = App (decr x l) (decr x r)
44
decr x (App l r) = App (decr x l) (decr x r)
44
false
false
0
7
12
40
19
21
null
null
Philonous/d-bus
src/DBus/Wire.hs
mit
putByteString :: BS.ByteString -> DBusPut () putByteString x = do tell $ BS.byteString x putSize (BS.length x)
118
putByteString :: BS.ByteString -> DBusPut () putByteString x = do tell $ BS.byteString x putSize (BS.length x)
118
putByteString x = do tell $ BS.byteString x putSize (BS.length x)
73
false
true
0
10
24
51
23
28
null
null
nomeata/ghc
compiler/nativeGen/Instruction.hs
bsd-3-clause
-- | No regs read or written to. noUsage :: RegUsage noUsage = RU [] []
72
noUsage :: RegUsage noUsage = RU [] []
39
noUsage = RU [] []
19
true
true
0
6
16
21
11
10
null
null
mzero/plush
src/Plush/Parser/Tokens.hs
apache-2.0
tok_else = keyword "else"
25
tok_else = keyword "else"
25
tok_else = keyword "else"
25
false
false
0
5
3
9
4
5
null
null
JoeyEremondi/haskelm
src/Test/module1.hs
bsd-3-clause
allZero _ _ _ = False
21
allZero _ _ _ = False
21
allZero _ _ _ = False
21
false
false
1
5
5
14
5
9
null
null
kcharter/spdy-base
test/BuildParseTests.hs
bsd-3-clause
prop_buildParsePingID :: PingID -> Bool prop_buildParsePingID = prop_buildParse toBuilder parsePingID
101
prop_buildParsePingID :: PingID -> Bool prop_buildParsePingID = prop_buildParse toBuilder parsePingID
101
prop_buildParsePingID = prop_buildParse toBuilder parsePingID
61
false
true
0
5
9
20
10
10
null
null
betaveros/betahaxx
Data/List/Betahaxx.hs
mit
autoZip :: [a] -> [(a,a)] autoZip = autoZipWith (,)
51
autoZip :: [a] -> [(a,a)] autoZip = autoZipWith (,)
51
autoZip = autoZipWith (,)
25
false
true
0
7
8
33
19
14
null
null
cchalmers/geometry
src/Geometry/BoundingBox.hs
bsd-3-clause
emptyBox :: BoundingBox v n emptyBox = EmptyBox
47
emptyBox :: BoundingBox v n emptyBox = EmptyBox
47
emptyBox = EmptyBox
19
false
true
1
5
7
20
8
12
null
null
psfblair/freepalace
src/FreePalace/Domain/State.hs
apache-2.0
-- TODO Keep track of user count withUserDisconnecting :: Connected -> User.UserRefId -> InboundMessages.PalaceUserCount -> Connected withUserDisconnecting currentState refIdOfUserWhoDisconnected population = let stateWithUserNoLongerInRoom = withUserLeavingRoom currentState refIdOfUserWhoDisconnected User....
631
withUserDisconnecting :: Connected -> User.UserRefId -> InboundMessages.PalaceUserCount -> Connected withUserDisconnecting currentState refIdOfUserWhoDisconnected population = let stateWithUserNoLongerInRoom = withUserLeavingRoom currentState refIdOfUserWhoDisconnected User.UserMap currentUserMap = userMap ...
598
withUserDisconnecting currentState refIdOfUserWhoDisconnected population = let stateWithUserNoLongerInRoom = withUserLeavingRoom currentState refIdOfUserWhoDisconnected User.UserMap currentUserMap = userMap . hostState $ stateWithUserNoLongerInRoom newUserMap = Map.delete refIdOfUserWhoDisconnected ...
497
true
true
0
12
111
109
55
54
null
null
sboosali/simple-plugins
sources/SimplePlugins/Etc.hs
mit
showTypeRep :: TypeRep -> (String, String, String, Fingerprint.Fingerprint) showTypeRep tr = (tyConName tc, tyConModule tc, tyConPackage tc, tyConFingerprint tc) where tc = typeRepTyCon tr -- reloadPlugin :: Show a => Plugin a -> IO () -- reloadPlugin :: proxy plugin -> Plugin a -> IO () -- reloadPlugin _ (Plugin val...
521
showTypeRep :: TypeRep -> (String, String, String, Fingerprint.Fingerprint) showTypeRep tr = (tyConName tc, tyConModule tc, tyConPackage tc, tyConFingerprint tc) where tc = typeRepTyCon tr -- reloadPlugin :: Show a => Plugin a -> IO () -- reloadPlugin :: proxy plugin -> Plugin a -> IO () -- reloadPlugin _ (Plugin val...
521
showTypeRep tr = (tyConName tc, tyConModule tc, tyConPackage tc, tyConFingerprint tc) where tc = typeRepTyCon tr -- reloadPlugin :: Show a => Plugin a -> IO () -- reloadPlugin :: proxy plugin -> Plugin a -> IO () -- reloadPlugin _ (Plugin value) = do -- print value -- a helper from interactive-diagrams to print out...
445
false
true
0
7
89
74
42
32
null
null
Fizzixnerd/xmonad-config
site-haskell/src/XMonad/Hooks/DynamicLog/Status/DZen2/Universal.hs
gpl-3.0
bgText :: String bgText = escape <> "bg"
40
bgText :: String bgText = escape <> "bg"
40
bgText = escape <> "bg"
23
false
true
2
6
7
23
9
14
null
null
Chiel92/ants
AntSkull.hs
gpl-2.0
(&&) expr1 expr2 = And expr1 expr2
34
(&&) expr1 expr2 = And expr1 expr2
34
(&&) expr1 expr2 = And expr1 expr2
34
false
false
0
5
6
18
9
9
null
null
gleachkr/Carnap
Carnap/src/Carnap/Languages/PurePropositional/Logic/BergmannMoorAndNelson.hs
gpl-3.0
parseLogicBookSDPlus :: RuntimeNaturalDeductionConfig PurePropLexicon (Form Bool) -> Parsec String u [LogicBookSDPlus] parseLogicBookSDPlus rtc = try (map SD <$> parseLogicBookSD rtc) <|> parsePlus where parsePlus = do r <- choice (map (try . string) ["MT","HS","DS","Com","Assoc","Impl", "DN", "DeM", "Idem", "Trans...
1,330
parseLogicBookSDPlus :: RuntimeNaturalDeductionConfig PurePropLexicon (Form Bool) -> Parsec String u [LogicBookSDPlus] parseLogicBookSDPlus rtc = try (map SD <$> parseLogicBookSD rtc) <|> parsePlus where parsePlus = do r <- choice (map (try . string) ["MT","HS","DS","Com","Assoc","Impl", "DN", "DeM", "Idem", "Trans...
1,330
parseLogicBookSDPlus rtc = try (map SD <$> parseLogicBookSD rtc) <|> parsePlus where parsePlus = do r <- choice (map (try . string) ["MT","HS","DS","Com","Assoc","Impl", "DN", "DeM", "Idem", "Trans", "Exp", "Dist", "Equiv"]) return $ case r of r | r == "M...
1,211
false
true
0
16
659
415
222
193
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Utils/NubList.hs
bsd-3-clause
-- | Lift a function over lists to a function over NubLists. overNubList :: Ord a => ([a] -> [a]) -> NubList a -> NubList a overNubList f (NubList list) = toNubList . f $ list
175
overNubList :: Ord a => ([a] -> [a]) -> NubList a -> NubList a overNubList f (NubList list) = toNubList . f $ list
114
overNubList f (NubList list) = toNubList . f $ list
51
true
true
0
11
35
70
34
36
null
null
wdanilo/haskell-logger
src/System/Log/Logger/Handler.hs
apache-2.0
addFilter :: Filter l -> Handler m l -> Handler m l addFilter f = filters %~ (f:)
81
addFilter :: Filter l -> Handler m l -> Handler m l addFilter f = filters %~ (f:)
81
addFilter f = filters %~ (f:)
29
false
true
0
7
17
43
21
22
null
null
rfranek/duckling
Duckling/Rules/CS.hs
bsd-3-clause
rules (This Volume) = []
24
rules (This Volume) = []
24
rules (This Volume) = []
24
false
false
0
6
4
18
8
10
null
null
hvr/vector
Data/Vector/Generic/Mutable.hs
bsd-3-clause
copy dst src = BOUNDS_CHECK(check) "copy" "overlapping vectors" (not (dst `overlaps` src)) $ BOUNDS_CHECK(check) "copy" "length mismatch" (length dst == length src) $ unsafeCopy dst src
295
copy dst src = BOUNDS_CHECK(check) "copy" "overlapping vectors" (not (dst `overlaps` src)) $ BOUNDS_CHECK(check) "copy" "length mismatch" (length dst == length src) $ unsafeCopy dst src
295
copy dst src = BOUNDS_CHECK(check) "copy" "overlapping vectors" (not (dst `overlaps` src)) $ BOUNDS_CHECK(check) "copy" "length mismatch" (length dst == length src) $ unsafeCopy dst src
295
false
false
5
9
135
82
38
44
null
null
UBMLtonGroup/timberc
src/Match.hs
bsd-3-clause
matchRhs (RWhere rhs bs) = do e <- matchRhs rhs return (ELet bs e)
110
matchRhs (RWhere rhs bs) = do e <- matchRhs rhs return (ELet bs e)
110
matchRhs (RWhere rhs bs) = do e <- matchRhs rhs return (ELet bs e)
110
false
false
0
9
57
42
18
24
null
null