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
vladimir-ipatov/ganeti
src/Ganeti/HTools/Program/Main.hs
gpl-2.0
-- | Display usage and exit. usage :: String -> IO () usage name = do hPutStrLn stderr $ "Unrecognised personality '" ++ name ++ "'." hPutStrLn stderr "This program must be installed under one of the following\ \ names:" hPutStrLn stderr . unlines $ formatCommands personalities exitErr "Pleas...
430
usage :: String -> IO () usage name = do hPutStrLn stderr $ "Unrecognised personality '" ++ name ++ "'." hPutStrLn stderr "This program must be installed under one of the following\ \ names:" hPutStrLn stderr . unlines $ formatCommands personalities exitErr "Please either rename/symlink the p...
401
usage name = do hPutStrLn stderr $ "Unrecognised personality '" ++ name ++ "'." hPutStrLn stderr "This program must be installed under one of the following\ \ names:" hPutStrLn stderr . unlines $ formatCommands personalities exitErr "Please either rename/symlink the program or set\n\ ...
376
true
true
0
10
99
73
32
41
null
null
andir/ganeti
src/Ganeti/Query/Language.hs
bsd-2-clause
-- | Inner deserialiser for 'Filter'. readFilterArray :: (JSON a) => String -> [JSValue] -> Result (Filter a) readFilterArray op args | op == C.qlangOpAnd = AndFilter <$> mapM readJSON args | op == C.qlangOpOr = OrFilter <$> mapM readJSON args | op == C.qlangOpNot = readFilterArg NotFilter...
1,239
readFilterArray :: (JSON a) => String -> [JSValue] -> Result (Filter a) readFilterArray op args | op == C.qlangOpAnd = AndFilter <$> mapM readJSON args | op == C.qlangOpOr = OrFilter <$> mapM readJSON args | op == C.qlangOpNot = readFilterArg NotFilter args | op == C.qlangOpTrue = re...
1,201
readFilterArray op args | op == C.qlangOpAnd = AndFilter <$> mapM readJSON args | op == C.qlangOpOr = OrFilter <$> mapM readJSON args | op == C.qlangOpNot = readFilterArg NotFilter args | op == C.qlangOpTrue = readFilterField TrueFilter args | op == C.qlangOpEqual = readFil...
1,129
true
true
1
10
306
377
178
199
null
null
andyarvanitis/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
bcc i (OP l fn args) = indent i ++ doOp (creg l ++ " = ") fn args ++ ";\n"
74
bcc i (OP l fn args) = indent i ++ doOp (creg l ++ " = ") fn args ++ ";\n"
74
bcc i (OP l fn args) = indent i ++ doOp (creg l ++ " = ") fn args ++ ";\n"
74
false
false
0
10
20
50
23
27
null
null
rfranek/duckling
Duckling/Volume/GA/Rules.hs
bsd-3-clause
ruleVolLtear :: Rule ruleVolLtear = Rule { name = "<vol> lítear" , pattern = [ dimension Volume , regex "(l(\x00ed|i)t(ea|i)r|l\\.?)" ] , prod = \tokens -> case tokens of (Token Volume vd:_) -> Just . Token Volume $ withUnit TVolume.Litre vd _ -> Nothing }
296
ruleVolLtear :: Rule ruleVolLtear = Rule { name = "<vol> lítear" , pattern = [ dimension Volume , regex "(l(\x00ed|i)t(ea|i)r|l\\.?)" ] , prod = \tokens -> case tokens of (Token Volume vd:_) -> Just . Token Volume $ withUnit TVolume.Litre vd _ -> Nothing }
296
ruleVolLtear = Rule { name = "<vol> lítear" , pattern = [ dimension Volume , regex "(l(\x00ed|i)t(ea|i)r|l\\.?)" ] , prod = \tokens -> case tokens of (Token Volume vd:_) -> Just . Token Volume $ withUnit TVolume.Litre vd _ -> Nothing }
275
false
true
0
14
84
98
51
47
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_LEX_ERRORLIST :: Int wxSTC_LEX_ERRORLIST = 10
51
wxSTC_LEX_ERRORLIST :: Int wxSTC_LEX_ERRORLIST = 10
51
wxSTC_LEX_ERRORLIST = 10
24
false
true
0
4
5
11
6
5
null
null
trskop/data-analysis
src/DataAnalysis/Sortable/Vector.hs
bsd-3-clause
sortBy :: Vector v a => (a -> a -> Ordering) -> VectorSortAlgorithms a -> v a -> v a sortBy cmp params = modify $ \v -> case params of AmericanFlagSort AmericanFlagParams{..} -> AmericanFlag.sortBy cmp isStripeComplete numberOfBuckets radixFunction v HeapSort Bounds{lowerIndex = l, ...
2,718
sortBy :: Vector v a => (a -> a -> Ordering) -> VectorSortAlgorithms a -> v a -> v a sortBy cmp params = modify $ \v -> case params of AmericanFlagSort AmericanFlagParams{..} -> AmericanFlag.sortBy cmp isStripeComplete numberOfBuckets radixFunction v HeapSort Bounds{lowerIndex = l, ...
2,718
sortBy cmp params = modify $ \v -> case params of AmericanFlagSort AmericanFlagParams{..} -> AmericanFlag.sortBy cmp isStripeComplete numberOfBuckets radixFunction v HeapSort Bounds{lowerIndex = l, upperIndex = u} | l < 0, u < 0 -> Heap.sortBy cmp v | u < 0 -> Heap.sortByBounds cmp v...
2,613
false
true
0
13
869
1,173
555
618
null
null
fpco/streaming-commons
Data/Streaming/Zlib/Lowlevel.hs
mit
deflateInit2 :: ZStream' -> Int -> WindowBits -> Int -> Strategy -> IO () deflateInit2 zstream level windowBits memlevel strategy = c_deflateInit2 zstream (fromIntegral level) (wbToInt windowBits) (fromIntegral memlevel) (fromIntegral $ fromEnum strategy)
297
deflateInit2 :: ZStream' -> Int -> WindowBits -> Int -> Strategy -> IO () deflateInit2 zstream level windowBits memlevel strategy = c_deflateInit2 zstream (fromIntegral level) (wbToInt windowBits) (fromIntegral memlevel) (fromIntegral $ fromEnum strategy)
297
deflateInit2 zstream level windowBits memlevel strategy = c_deflateInit2 zstream (fromIntegral level) (wbToInt windowBits) (fromIntegral memlevel) (fromIntegral $ fromEnum strategy)
223
false
true
0
11
74
86
42
44
null
null
vTurbine/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
tidyTopBind :: DynFlags -> UnitId -> Module -> (Integer -> CoreExpr) -> UnfoldEnv -> TidyEnv -> CoreBind -> (TidyEnv, CoreBind) tidyTopBind dflags this_pkg this_mod cvt_integer unfold_env (occ_env,subst1) (NonRec bn...
705
tidyTopBind :: DynFlags -> UnitId -> Module -> (Integer -> CoreExpr) -> UnfoldEnv -> TidyEnv -> CoreBind -> (TidyEnv, CoreBind) tidyTopBind dflags this_pkg this_mod cvt_integer unfold_env (occ_env,subst1) (NonRec bnd...
704
tidyTopBind dflags this_pkg this_mod cvt_integer unfold_env (occ_env,subst1) (NonRec bndr rhs) = (tidy_env2, NonRec bndr' rhs') where Just (name',show_unfold) = lookupVarEnv unfold_env bndr caf_info = hasCafRefs dflags this_pkg this_mod (subst1, cvt_integer) (idArity bndr) rhs (bndr', ...
484
false
true
0
12
219
199
106
93
null
null
nick-orton/euler
src/Euler/Primes.hs
gpl-3.0
-- test the module testModulePrimes = testpfacs && testlgstPfac && testprimes
77
testModulePrimes = testpfacs && testlgstPfac && testprimes
58
testModulePrimes = testpfacs && testlgstPfac && testprimes
58
true
false
1
6
10
19
8
11
null
null
rblaze/haskell-dbus
lib/DBus/Internal/Wire.hs
apache-2.0
marshalAtom (AtomObjectPath x) = marshalObjectPath x
52
marshalAtom (AtomObjectPath x) = marshalObjectPath x
52
marshalAtom (AtomObjectPath x) = marshalObjectPath x
52
false
false
0
7
5
18
8
10
null
null
nevrenato/Hets_Fork
HasCASL/MixAna.hs
gpl-2.0
makeRules :: GlobalAnnos -> (PrecMap, Set.Set Id) -> Set.Set Id -> Set.Set Id -> (TokRules, Rules, Set.Set Id) makeRules ga ps@(p, _) polyIds aIds = let (sIds, ids) = Set.partition isSimpleId aIds ks = Set.fold (Set.union . getKnowns) Set.empty ids rIds = Set.union ids $ Set.intersection s...
695
makeRules :: GlobalAnnos -> (PrecMap, Set.Set Id) -> Set.Set Id -> Set.Set Id -> (TokRules, Rules, Set.Set Id) makeRules ga ps@(p, _) polyIds aIds = let (sIds, ids) = Set.partition isSimpleId aIds ks = Set.fold (Set.union . getKnowns) Set.empty ids rIds = Set.union ids $ Set.intersection s...
695
makeRules ga ps@(p, _) polyIds aIds = let (sIds, ids) = Set.partition isSimpleId aIds ks = Set.fold (Set.union . getKnowns) Set.empty ids rIds = Set.union ids $ Set.intersection sIds $ Set.map simpleIdToId ks m2 = maxWeight p + 2 in ( \ tok -> if isSimpleToken tok && not (Set.member tok ...
574
false
true
0
16
202
282
144
138
null
null
kim/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/ListJobsByPipeline.hs
mpl-2.0
-- | A value that you use to access the second and subsequent pages of results, -- if any. When the jobs in the specified pipeline fit on one page or when -- you've reached the last page of results, the value of 'NextPageToken' is 'null'. ljbprNextPageToken :: Lens' ListJobsByPipelineResponse (Maybe Text) ljbprNextPage...
396
ljbprNextPageToken :: Lens' ListJobsByPipelineResponse (Maybe Text) ljbprNextPageToken = lens _ljbprNextPageToken (\s a -> s { _ljbprNextPageToken = a })
157
ljbprNextPageToken = lens _ljbprNextPageToken (\s a -> s { _ljbprNextPageToken = a })
89
true
true
1
9
68
52
27
25
null
null
oldmanmike/ghc
compiler/main/DynFlags.hs
bsd-3-clause
whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m () whenGeneratingDynamicToo dflags f = ifGeneratingDynamicToo dflags f (return ())
145
whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m () whenGeneratingDynamicToo dflags f = ifGeneratingDynamicToo dflags f (return ())
145
whenGeneratingDynamicToo dflags f = ifGeneratingDynamicToo dflags f (return ())
79
false
true
0
9
20
56
26
30
null
null
aurapm/aura
aura/lib/Aura/Utils.hs
gpl-3.0
traverseEither :: Applicative f => (a -> f (Either b c)) -> [a] -> f ([b], [c]) traverseEither f = fmap partitionEithers . traverse f
133
traverseEither :: Applicative f => (a -> f (Either b c)) -> [a] -> f ([b], [c]) traverseEither f = fmap partitionEithers . traverse f
133
traverseEither f = fmap partitionEithers . traverse f
53
false
true
0
11
24
75
38
37
null
null
sopvop/cabal
Cabal/Distribution/PackageDescription/PrettyPrint.hs
bsd-3-clause
ppConfVar (Flag name) = text "flag" <<>> parens (ppFlagName name)
84
ppConfVar (Flag name) = text "flag" <<>> parens (ppFlagName name)
84
ppConfVar (Flag name) = text "flag" <<>> parens (ppFlagName name)
84
false
false
0
8
28
31
14
17
null
null
ribag/ganeti-experiments
src/Ganeti/Metad/WebServer.hs
gpl-2.0
error404 :: MetaM error404 = do modifyResponse . setResponseStatus 404 $ ByteString.pack "Not found" writeBS $ ByteString.pack "Resource not found"
151
error404 :: MetaM error404 = do modifyResponse . setResponseStatus 404 $ ByteString.pack "Not found" writeBS $ ByteString.pack "Resource not found"
151
error404 = do modifyResponse . setResponseStatus 404 $ ByteString.pack "Not found" writeBS $ ByteString.pack "Resource not found"
133
false
true
0
9
23
42
19
23
null
null
tsahyt/lmrbot
src/Commands/Markov.hs
agpl-3.0
takeUntilN p n x = case break p x of (l,h:r) -> l ++ h : takeUntilN p (pred n) r (l,_) -> l
101
takeUntilN p n x = case break p x of (l,h:r) -> l ++ h : takeUntilN p (pred n) r (l,_) -> l
101
takeUntilN p n x = case break p x of (l,h:r) -> l ++ h : takeUntilN p (pred n) r (l,_) -> l
101
false
false
2
8
33
73
36
37
null
null
treeowl/cassava
Data/Csv/Util.hs
bsd-3-clause
-- | A strict version of 'Data.Functor.<$>' for monads. (<$!>) :: Monad m => (a -> b) -> m a -> m b f <$!> m = do a <- m return $! f a
143
(<$!>) :: Monad m => (a -> b) -> m a -> m b f <$!> m = do a <- m return $! f a
87
f <$!> m = do a <- m return $! f a
43
true
true
0
10
43
65
31
34
null
null
Quid2/model
test/Spec.hs
bsd-3-clause
t :: IO () t = main
19
t :: IO () t = main
19
t = main
8
false
true
1
6
6
20
8
12
null
null
erochest/stat-nlp
src/StatNLP/Text/Utils.hs
apache-2.0
ngrams :: Int -> [a] -> [[a]] ngrams n = filter ((== n) . length) . map (take n) . L.tails
90
ngrams :: Int -> [a] -> [[a]] ngrams n = filter ((== n) . length) . map (take n) . L.tails
90
ngrams n = filter ((== n) . length) . map (take n) . L.tails
60
false
true
0
10
20
64
34
30
null
null
Erdwolf/autotool-bonn
test/src/Extract.hs
gpl-2.0
mWriteFile :: String -> String -> MIO () mWriteFile file cts = do Ctx { write = w, directory = d } <- ask when w $ io $ do createDirectoryIfMissing True d writeFile (d </> file) cts
205
mWriteFile :: String -> String -> MIO () mWriteFile file cts = do Ctx { write = w, directory = d } <- ask when w $ io $ do createDirectoryIfMissing True d writeFile (d </> file) cts
205
mWriteFile file cts = do Ctx { write = w, directory = d } <- ask when w $ io $ do createDirectoryIfMissing True d writeFile (d </> file) cts
164
false
true
0
13
61
93
43
50
null
null
ivan-m/unordered-containers
Data/HashSet.hs
bsd-3-clause
-- | /O(n)/ Return the number of elements in this set. size :: HashSet a -> Int size = H.size . asMap
101
size :: HashSet a -> Int size = H.size . asMap
46
size = H.size . asMap
21
true
true
0
6
21
25
13
12
null
null
Helkafen/haddock
haddock-api/src/Haddock/Utils.hs
bsd-2-clause
-- | Print a message to stdout, if it is not too verbose out :: MonadIO m => Verbosity -- ^ program verbosity -> Verbosity -- ^ message verbosity -> String -> m () out progVerbosity msgVerbosity msg | msgVerbosity <= progVerbosity = liftIO $ putStrLn msg | otherwise = return ()
294
out :: MonadIO m => Verbosity -- ^ program verbosity -> Verbosity -- ^ message verbosity -> String -> m () out progVerbosity msgVerbosity msg | msgVerbosity <= progVerbosity = liftIO $ putStrLn msg | otherwise = return ()
237
out progVerbosity msgVerbosity msg | msgVerbosity <= progVerbosity = liftIO $ putStrLn msg | otherwise = return ()
118
true
true
1
10
67
74
36
38
null
null
mstksg/hledger
hledger-lib/Hledger/Read/Common.hs
gpl-3.0
rightsymbolamountp :: Monad m => JournalParser m Amount rightsymbolamountp = do m <- lift multiplierp (q,prec,mdec,mgrps) <- lift numberp sp <- lift $ many spacenonewline c <- lift commoditysymbolp p <- priceamountp let s = amountstyle{ascommodityside=R, ascommodityspaced=not $ null sp, asprecision=prec, as...
415
rightsymbolamountp :: Monad m => JournalParser m Amount rightsymbolamountp = do m <- lift multiplierp (q,prec,mdec,mgrps) <- lift numberp sp <- lift $ many spacenonewline c <- lift commoditysymbolp p <- priceamountp let s = amountstyle{ascommodityside=R, ascommodityspaced=not $ null sp, asprecision=prec, as...
415
rightsymbolamountp = do m <- lift multiplierp (q,prec,mdec,mgrps) <- lift numberp sp <- lift $ many spacenonewline c <- lift commoditysymbolp p <- priceamountp let s = amountstyle{ascommodityside=R, ascommodityspaced=not $ null sp, asprecision=prec, asdecimalpoint=mdec, asdigitgroups=mgrps} return $ Amoun...
359
false
true
2
13
69
158
78
80
null
null
xmonad/xmonad
src/XMonad/Operations.hs
bsd-3-clause
-- | Given a list of screens, remove all duplicated screens and screens that -- are entirely contained within another. nubScreens :: [Rectangle] -> [Rectangle] nubScreens xs = nub . filter (\x -> not $ any (x `containedIn`) xs) $ xs
232
nubScreens :: [Rectangle] -> [Rectangle] nubScreens xs = nub . filter (\x -> not $ any (x `containedIn`) xs) $ xs
113
nubScreens xs = nub . filter (\x -> not $ any (x `containedIn`) xs) $ xs
72
true
true
0
12
40
60
34
26
null
null
abid-mujtaba/haskell-cas
src/Expr/Mul.hs
apache-2.0
mul x y@(Atom c _ 0) = mul y x
30
mul x y@(Atom c _ 0) = mul y x
30
mul x y@(Atom c _ 0) = mul y x
30
false
false
0
8
9
29
14
15
null
null
CRogers/stack
src/System/Process/Read.hs
bsd-3-clause
envHelper :: EnvOverride -> Maybe [(String, String)] envHelper = Just . eoStringList
84
envHelper :: EnvOverride -> Maybe [(String, String)] envHelper = Just . eoStringList
84
envHelper = Just . eoStringList
31
false
true
1
9
11
38
18
20
null
null
olsner/ghc
utils/genapply/Main.hs
bsd-3-clause
genApply :: RegStatus -> [ArgRep] -> Doc genApply regstatus args = let fun_ret_label = mkApplyRetName args fun_info_label = mkApplyInfoName args all_args_size = sum (map argSize args) (bco_doc, bco_stack) = genMkPAP regstatus "BUILD_PAP" "ENTRY_LBL(stg_BCO)" ["R1"] "FUN" "BCO" ...
6,465
genApply :: RegStatus -> [ArgRep] -> Doc genApply regstatus args = let fun_ret_label = mkApplyRetName args fun_info_label = mkApplyInfoName args all_args_size = sum (map argSize args) (bco_doc, bco_stack) = genMkPAP regstatus "BUILD_PAP" "ENTRY_LBL(stg_BCO)" ["R1"] "FUN" "BCO" ...
6,465
genApply regstatus args = let fun_ret_label = mkApplyRetName args fun_info_label = mkApplyInfoName args all_args_size = sum (map argSize args) (bco_doc, bco_stack) = genMkPAP regstatus "BUILD_PAP" "ENTRY_LBL(stg_BCO)" ["R1"] "FUN" "BCO" True{-stack apply-} False{-args on stack-...
6,424
false
true
0
22
2,389
1,039
549
490
null
null
DigitalBrains1/clash-lt24
LT24/Commands.hs
bsd-2-clause
-- 8.2.12 Sleep Out (page 101) cDISPON = 0x29
60
cDISPON = 0x29
29
cDISPON = 0x29
29
true
false
1
5
23
11
4
7
null
null
ppelleti/hs-hourglass
Data/Hourglass/Diff.hs
bsd-3-clause
durationFlatten :: Duration -> (Seconds, NanoSeconds) durationFlatten (Duration h m s (NanoSeconds ns)) = (toSeconds h + toSeconds m + s + Seconds sacc, NanoSeconds ns') where (sacc, ns') = ns `divMod` 1000000000 -- | Normalize all fields to represent the same value -- with the biggest units possible. -- -- For ...
368
durationFlatten :: Duration -> (Seconds, NanoSeconds) durationFlatten (Duration h m s (NanoSeconds ns)) = (toSeconds h + toSeconds m + s + Seconds sacc, NanoSeconds ns') where (sacc, ns') = ns `divMod` 1000000000 -- | Normalize all fields to represent the same value -- with the biggest units possible. -- -- For ...
368
durationFlatten (Duration h m s (NanoSeconds ns)) = (toSeconds h + toSeconds m + s + Seconds sacc, NanoSeconds ns') where (sacc, ns') = ns `divMod` 1000000000 -- | Normalize all fields to represent the same value -- with the biggest units possible. -- -- For example, 62 minutes is normalized as 1h 2minutes
314
false
true
0
11
66
105
54
51
null
null
tomtitchener/RealSimpleMusic
src/Music/RealSimpleMusic/Music/Data.hs
cc0-1.0
pitchClassToEnhIdx Bff = 9
26
pitchClassToEnhIdx Bff = 9
26
pitchClassToEnhIdx Bff = 9
26
false
false
0
5
3
9
4
5
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Check.hs
bsd-3-clause
get_lit (NPat (L _ (OverLit { ol_val = HsIsString src s })) _ _) = Just (HsStringPrim src (fastStringToByteString s))
144
get_lit (NPat (L _ (OverLit { ol_val = HsIsString src s })) _ _) = Just (HsStringPrim src (fastStringToByteString s))
144
get_lit (NPat (L _ (OverLit { ol_val = HsIsString src s })) _ _) = Just (HsStringPrim src (fastStringToByteString s))
144
false
false
0
14
46
61
30
31
null
null
pbl64k/Net.Gearman.Worker
gearman.hs
bsd-2-clause
serviceList = [ Invocation ("id", ((\str -> (return . BS.pack . id . BS.unpack) str), Nothing)), Invocation ("reverse", ((\str -> (return . BS.pack . reverse . BS.unpack) str), Nothing)) ]
200
serviceList = [ Invocation ("id", ((\str -> (return . BS.pack . id . BS.unpack) str), Nothing)), Invocation ("reverse", ((\str -> (return . BS.pack . reverse . BS.unpack) str), Nothing)) ]
200
serviceList = [ Invocation ("id", ((\str -> (return . BS.pack . id . BS.unpack) str), Nothing)), Invocation ("reverse", ((\str -> (return . BS.pack . reverse . BS.unpack) str), Nothing)) ]
200
false
false
1
17
41
106
57
49
null
null
meteogrid/mime-mail-parser
Network/Mail/Mime/Parser/Internal/Rfc2045.hs
bsd-3-clause
subtype :: Parser ByteString subtype = extension_token <|> iana_token
69
subtype :: Parser ByteString subtype = extension_token <|> iana_token
69
subtype = extension_token <|> iana_token
40
false
true
0
5
8
18
9
9
null
null
mpickering/ghc-exactprint
tests/examples/ghc710/Rules.hs
bsd-3-clause
neg :: Int -> Int neg = negate
30
neg :: Int -> Int neg = negate
30
neg = negate
12
false
true
0
5
7
15
8
7
null
null
keera-studios/hsQt
Qtc/Gui/QScrollArea.hs
bsd-2-clause
setWidgetResizable :: QScrollArea a -> ((Bool)) -> IO () setWidgetResizable x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QScrollArea_setWidgetResizable cobj_x0 (toCBool x1)
178
setWidgetResizable :: QScrollArea a -> ((Bool)) -> IO () setWidgetResizable x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QScrollArea_setWidgetResizable cobj_x0 (toCBool x1)
178
setWidgetResizable x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QScrollArea_setWidgetResizable cobj_x0 (toCBool x1)
121
false
true
0
9
27
64
32
32
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 324818 = 2775
33
getValueFromProduct 324818 = 2775
33
getValueFromProduct 324818 = 2775
33
false
false
0
5
3
9
4
5
null
null
shayan-najd/QHaskell
QHaskell/Solver.hs
gpl-3.0
slv _ ((_ :~: _ ) : _) = fail "Type Error!"
47
slv _ ((_ :~: _ ) : _) = fail "Type Error!"
47
slv _ ((_ :~: _ ) : _) = fail "Type Error!"
47
false
false
1
8
15
31
14
17
null
null
pepincho/Functional-Programming
exercise-2.hs
mit
square' l = map ( \x -> x*x ) l
31
square' l = map ( \x -> x*x ) l
31
square' l = map ( \x -> x*x ) l
31
false
false
1
8
9
30
13
17
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Bare/Expand.hs
bsd-3-clause
expandExpr (PAll xs p) = PAll xs <$> expandExpr p
51
expandExpr (PAll xs p) = PAll xs <$> expandExpr p
51
expandExpr (PAll xs p) = PAll xs <$> expandExpr p
51
false
false
2
6
11
30
12
18
null
null
ony/hledger
hledger-ui/Hledger/UI/UIState.hs
gpl-3.0
-- | Decrement the current depth limit towards 0. If there was no depth limit, -- set it to one less than the maximum account depth. decDepth :: UIState -> UIState decDepth ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts@ReportOpts{..}}}} = ui{aopts=uopts{cliopts_=copts{reportopts_=ropts{depth_...
548
decDepth :: UIState -> UIState decDepth ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts@ReportOpts{..}}}} = ui{aopts=uopts{cliopts_=copts{reportopts_=ropts{depth_=dec depth_}}}} where dec (Just d) = Just $ max 0 (d-1) dec Nothing = Just $ maxDepth ui - 1 -- | Increment the current d...
415
decDepth ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts@ReportOpts{..}}}} = ui{aopts=uopts{cliopts_=copts{reportopts_=ropts{depth_=dec depth_}}}} where dec (Just d) = Just $ max 0 (d-1) dec Nothing = Just $ maxDepth ui - 1 -- | Increment the current depth limit. If this makes it eq...
384
true
true
1
20
91
154
85
69
null
null
mrakgr/futhark
src/Futhark/Representation/SOACS/Simplify.hs
bsd-3-clause
liftIdentityMapping _ _ = cannotSimplify
40
liftIdentityMapping _ _ = cannotSimplify
40
liftIdentityMapping _ _ = cannotSimplify
40
false
false
0
5
4
11
5
6
null
null
Ongy/monky
Monky/Examples/MPD.hs
lgpl-3.0
defaultConvert _ = "Not Playing"
32
defaultConvert _ = "Not Playing"
32
defaultConvert _ = "Not Playing"
32
false
false
0
5
4
9
4
5
null
null
sinelaw/beatbox
src/Main.hs
bsd-3-clause
norm :: (Floating a, Num a, Storable a) => V.Vector a -> a norm = sqrt . normSquared
84
norm :: (Floating a, Num a, Storable a) => V.Vector a -> a norm = sqrt . normSquared
84
norm = sqrt . normSquared
25
false
true
0
8
17
45
23
22
null
null
nuttycom/haskoin
tests/Network/Haskoin/Crypto/Units.hs
unlicense
pub2 :: PubKey pub2 = derivePubKey sec2
40
pub2 :: PubKey pub2 = derivePubKey sec2
40
pub2 = derivePubKey sec2
25
false
true
0
5
7
14
7
7
null
null
yangjueji/hblas
src/Numerical/HBLAS/BLAS/Level1.hs
bsd-3-clause
ddot :: PrimMonad m => NoScalarDotFun Double (PrimState m) m Double ddot = noScalarDotAbstraction "ddot" cblas_ddot_safe cblas_ddot_unsafe
138
ddot :: PrimMonad m => NoScalarDotFun Double (PrimState m) m Double ddot = noScalarDotAbstraction "ddot" cblas_ddot_safe cblas_ddot_unsafe
138
ddot = noScalarDotAbstraction "ddot" cblas_ddot_safe cblas_ddot_unsafe
70
false
true
0
8
16
40
19
21
null
null
mariefarrell/Hets
CSL/ASUtils.hs
gpl-2.0
mkAndAnalyzeOp' :: OperatorState st => Bool -- ^ process binders -> st -> String -> [EXTPARAM] -> [EXPRESSION] -> Range -> Either String EXPRESSION mkAndAnalyzeOp' b st s eps exps rg = case lookupOperator st s (length exps) of Left False | isVar st s -> if null exps &&...
1,435
mkAndAnalyzeOp' :: OperatorState st => Bool -- ^ process binders -> st -> String -> [EXTPARAM] -> [EXPRESSION] -> Range -> Either String EXPRESSION mkAndAnalyzeOp' b st s eps exps rg = case lookupOperator st s (length exps) of Left False | isVar st s -> if null exps &&...
1,435
mkAndAnalyzeOp' b st s eps exps rg = case lookupOperator st s (length exps) of Left False | isVar st s -> if null exps && null eps then Right $ Var Token { tokStr = s, tokPos = rg } else Left "Variable requires no (extended) parameters" |...
1,256
false
true
1
18
516
350
163
187
null
null
olsner/ghc
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
setVirtHp :: VirtualHpOffset -> FCode () setVirtHp new_virtHp = do { hp_usage <- getHpUsage ; setHpUsage (hp_usage {virtHp = new_virtHp}) }
150
setVirtHp :: VirtualHpOffset -> FCode () setVirtHp new_virtHp = do { hp_usage <- getHpUsage ; setHpUsage (hp_usage {virtHp = new_virtHp}) }
150
setVirtHp new_virtHp = do { hp_usage <- getHpUsage ; setHpUsage (hp_usage {virtHp = new_virtHp}) }
109
false
true
0
11
31
55
27
28
null
null
DavidAlphaFox/darcs
harness/Darcs/Test/Patch/Examples/Set1.hs
gpl-2.0
-- ---------------------------------------------------------------------- -- * Check patch test -- ---------------------------------------------------------------------- validPatches = [(quickhunk 4 "a" "b" :>: quickhunk 1 "c" "d" :>: NilFL), (quickhunk 1 "a" "bc" :>: ...
454
validPatches = [(quickhunk 4 "a" "b" :>: quickhunk 1 "c" "d" :>: NilFL), (quickhunk 1 "a" "bc" :>: quickhunk 1 "b" "d" :>: NilFL), (quickhunk 1 "a" "b" :>: quickhunk 1 "b" "d" :>: NilFL)]++testPatches
283
validPatches = [(quickhunk 4 "a" "b" :>: quickhunk 1 "c" "d" :>: NilFL), (quickhunk 1 "a" "bc" :>: quickhunk 1 "b" "d" :>: NilFL), (quickhunk 1 "a" "b" :>: quickhunk 1 "b" "d" :>: NilFL)]++testPatches
283
true
false
0
10
127
97
50
47
null
null
paulp/unison
parser-typechecker/src/Unison/Type.hs
mit
matchExistential _ _ = False
28
matchExistential _ _ = False
28
matchExistential _ _ = False
28
false
false
1
5
4
12
5
7
null
null
triplepointfive/battleship
src/Warships/Types.hs
bsd-3-clause
click :: Pos -> Field -> (Action, Field) click pos = runState (clickOn pos)
75
click :: Pos -> Field -> (Action, Field) click pos = runState (clickOn pos)
75
click pos = runState (clickOn pos)
34
false
true
0
7
13
37
19
18
null
null
goldfirere/glambda
src/Language/Glambda/Unchecked.hs
bsd-3-clause
pretty_exp :: Coloring -> Prec -> UExp -> Doc pretty_exp c _ (UVar n) = prettyVar c n
108
pretty_exp :: Coloring -> Prec -> UExp -> Doc pretty_exp c _ (UVar n) = prettyVar c n
108
pretty_exp c _ (UVar n) = prettyVar c n
62
false
true
0
11
40
46
21
25
null
null
Lupino/dispatch-article
src/Article/Types/MySQL/File.hs
bsd-3-clause
fileEmpty :: File fileEmpty = File { fileID = 0 , fileKey = "" , fileBucket = "" , fileExtra = Null , fileCreatedAt = 0 }
226
fileEmpty :: File fileEmpty = File { fileID = 0 , fileKey = "" , fileBucket = "" , fileExtra = Null , fileCreatedAt = 0 }
226
fileEmpty = File { fileID = 0 , fileKey = "" , fileBucket = "" , fileExtra = Null , fileCreatedAt = 0 }
208
false
true
0
7
131
50
28
22
null
null
benweitzman/Pitch
src/Pitch/Deck.hs
mit
newDeck :: Deck newDeck = [minBound .. ]
40
newDeck :: Deck newDeck = [minBound .. ]
40
newDeck = [minBound .. ]
24
false
true
0
5
7
15
9
6
null
null
vincenthz/hs-foundation
basement/Basement/Types/Ptr.hs
bsd-3-clause
addrPlusCSz :: Addr -> CSize -> Addr addrPlusCSz addr = addrPlusSz addr . sizeOfCSize
85
addrPlusCSz :: Addr -> CSize -> Addr addrPlusCSz addr = addrPlusSz addr . sizeOfCSize
85
addrPlusCSz addr = addrPlusSz addr . sizeOfCSize
48
false
true
0
8
13
35
15
20
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/DocBook.hs
gpl-2.0
parseBlock (CRef x) = return $ plain $ str $ map toUpper x
58
parseBlock (CRef x) = return $ plain $ str $ map toUpper x
58
parseBlock (CRef x) = return $ plain $ str $ map toUpper x
58
false
false
0
7
12
32
15
17
null
null
MateVM/hs-java
JVM/Builder/Instructions.hs
lgpl-3.0
aload_ :: Generator e g => IMM -> g e () aload_ x = i0 (ALOAD_ x)
65
aload_ :: Generator e g => IMM -> g e () aload_ x = i0 (ALOAD_ x)
65
aload_ x = i0 (ALOAD_ x)
24
false
true
0
8
16
43
20
23
null
null
beni55/cryptol
src/Cryptol/ModuleSystem/Name.hs
bsd-3-clause
asPrim _ = Nothing
18
asPrim _ = Nothing
18
asPrim _ = Nothing
18
false
false
0
4
3
10
4
6
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Natural.hs
bsd-3-clause
timesNatural (NatS# x) (NatJ# y) = NatJ# $ timesBigNatWord y x
62
timesNatural (NatS# x) (NatJ# y) = NatJ# $ timesBigNatWord y x
62
timesNatural (NatS# x) (NatJ# y) = NatJ# $ timesBigNatWord y x
62
false
false
0
7
10
32
15
17
null
null
vaibhav276/haskell_cs194_assignments
algebraic_data_types/LogAnalysis.hs
mit
-- don't insert -- root is unknown - invalid scenario - should never occur -- replace with a proper tree insert x (Node _ (Unknown _) _) = (Node Leaf x Leaf)
158
insert x (Node _ (Unknown _) _) = (Node Leaf x Leaf)
52
insert x (Node _ (Unknown _) _) = (Node Leaf x Leaf)
52
true
false
0
8
32
42
21
21
null
null
serokell/importify
test/test-data/base@basic/09-BoolTypeAndConstructorUsed.hs
mit
func :: Bool func = False
25
func :: Bool func = False
25
func = False
12
false
true
0
4
5
11
6
5
null
null
jasonbaker/lang
Lang/Parser.hs
bsd-3-clause
int = P.integer lexer
21
int = P.integer lexer
21
int = P.integer lexer
21
false
false
0
6
3
11
5
6
null
null
mikusp/accelerate-cuda
Data/Array/Accelerate/CUDA/CodeGen.hs
bsd-3-clause
-- Constant methods of floating -- codegenPi :: FloatingType a -> C.Exp codegenPi ty | FloatingDict <- floatingDict ty = codegenFloatingScalar ty pi
148
codegenPi :: FloatingType a -> C.Exp codegenPi ty | FloatingDict <- floatingDict ty = codegenFloatingScalar ty pi
113
codegenPi ty | FloatingDict <- floatingDict ty = codegenFloatingScalar ty pi
76
true
true
0
9
22
43
20
23
null
null
owestphal/LootLanguage
src/Style.hs
bsd-3-clause
(<+) :: Style -> Style -> Style (<+) = mappend
46
(<+) :: Style -> Style -> Style (<+) = mappend
46
(<+) = mappend
14
false
true
0
8
9
30
15
15
null
null
marcellussiegburg/autotool
yesod/Handler/Semester.hs
gpl-2.0
semesterForm :: SchuleId -> Maybe Semester -> Form Semester semesterForm schuleId msemester = do renderBootstrap3 BootstrapBasicForm $ Semester <$> pure schuleId <*> areq textField (bfs MsgSemesterName) (semesterName <$> msemester) <*> (UTCTime <$> areq (jqueryDayField def) (bfsFormControl MsgSem...
925
semesterForm :: SchuleId -> Maybe Semester -> Form Semester semesterForm schuleId msemester = do renderBootstrap3 BootstrapBasicForm $ Semester <$> pure schuleId <*> areq textField (bfs MsgSemesterName) (semesterName <$> msemester) <*> (UTCTime <$> areq (jqueryDayField def) (bfsFormControl MsgSem...
925
semesterForm schuleId msemester = do renderBootstrap3 BootstrapBasicForm $ Semester <$> pure schuleId <*> areq textField (bfs MsgSemesterName) (semesterName <$> msemester) <*> (UTCTime <$> areq (jqueryDayField def) (bfsFormControl MsgSemesterBeginnDatum) (utctDay . semesterVon <$> msemester) ...
865
false
true
0
18
152
268
134
134
null
null
spechub/Hets
HasCASL/Unify.hs
gpl-2.0
-- | substitute generic variables with negative index substGen :: Subst -> Type -> Type substGen m = foldType mapTypeRec { foldTypeName = \ t _ _ n -> if n >= 0 then t else Data.Maybe.fromMaybe t (Map.lookup n m) , foldTypeAbs = \ t v1@(TypeArg _ _ _ _ c _ _) ty p -> if Map.member c m then substGen (Map....
356
substGen :: Subst -> Type -> Type substGen m = foldType mapTypeRec { foldTypeName = \ t _ _ n -> if n >= 0 then t else Data.Maybe.fromMaybe t (Map.lookup n m) , foldTypeAbs = \ t v1@(TypeArg _ _ _ _ c _ _) ty p -> if Map.member c m then substGen (Map.delete c m) t else TypeAbs v1 ty p }
302
substGen m = foldType mapTypeRec { foldTypeName = \ t _ _ n -> if n >= 0 then t else Data.Maybe.fromMaybe t (Map.lookup n m) , foldTypeAbs = \ t v1@(TypeArg _ _ _ _ c _ _) ty p -> if Map.member c m then substGen (Map.delete c m) t else TypeAbs v1 ty p }
268
true
true
0
13
87
154
80
74
null
null
abailly/hsgames
game-server/src/GameServer.hs
apache-2.0
-- |Starts HTTP server on given port. -- -- This server serves static files from @public/@ directory, API calls -- from @api/@ endpoint and also -- exposes a WebSocket-based REPL under `/repl` path. startServer :: LoggerEnv IO -> ServerConfiguration -> IO Server startServer logger ServerConfiguration{serverPort,backen...
1,312
startServer :: LoggerEnv IO -> ServerConfiguration -> IO Server startServer logger ServerConfiguration{serverPort,backends} = do envs <- getStdGen >>= newTVarIO . initialState cnxs <- newTVarIO mempty loggerMiddleware <- runHTTPLog logger let app = loggerMiddleware $ WS.websocketsOr WS.defaultConnec...
1,112
startServer logger ServerConfiguration{serverPort,backends} = do envs <- getStdGen >>= newTVarIO . initialState cnxs <- newTVarIO mempty loggerMiddleware <- runHTTPLog logger let app = loggerMiddleware $ WS.websocketsOr WS.defaultConnectionOptions (handleWS logger cnxs backends) $ runApp...
1,048
true
true
0
16
323
345
170
175
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/LeftistHeap.hs
mit
foldr f e (L _ x a b) = f x (foldr f e (union a b))
51
foldr f e (L _ x a b) = f x (foldr f e (union a b))
51
foldr f e (L _ x a b) = f x (foldr f e (union a b))
51
false
false
0
9
16
48
23
25
null
null
forsyde/forsyde-shallow
src/ForSyDe/Shallow/MoC/Synchronous/Stochastic.hs
bsd-3-clause
selMooreSY :: Int -- ^The seed for the next-state function -> Int -- ^The seed for the output function -> (a -> b -> a) -- ^First alternative for the next-state function -> (a -> b -> a) -- ^Second alternative for the next-state function -> (a -> c) -...
627
selMooreSY :: Int -- ^The seed for the next-state function -> Int -- ^The seed for the output function -> (a -> b -> a) -- ^First alternative for the next-state function -> (a -> b -> a) -- ^Second alternative for the next-state function -> (a -> c) -...
600
selMooreSY _ _ _ _ _ _ _ NullS = NullS
38
true
true
0
13
237
111
61
50
null
null
emwap/feldspar-language
tests/Feldspar/Range/Test.hs
bsd-3-clause
prop_rangeLess2 t r1 r2 = not (isEmpty r1) && not (isEmpty r2) ==> forAll (fromRange r1) $ \x -> forAll (fromRange r2) $ \y -> rangeLess r1 r2 ==> x < y where _ = r1 `rangeTy` t
195
prop_rangeLess2 t r1 r2 = not (isEmpty r1) && not (isEmpty r2) ==> forAll (fromRange r1) $ \x -> forAll (fromRange r2) $ \y -> rangeLess r1 r2 ==> x < y where _ = r1 `rangeTy` t
195
prop_rangeLess2 t r1 r2 = not (isEmpty r1) && not (isEmpty r2) ==> forAll (fromRange r1) $ \x -> forAll (fromRange r2) $ \y -> rangeLess r1 r2 ==> x < y where _ = r1 `rangeTy` t
195
false
false
0
11
55
102
50
52
null
null
afcady/servant-reflex
src/Servant/Common/Req.hs
bsd-3-clause
reqFailure _ = Nothing
44
reqFailure _ = Nothing
44
reqFailure _ = Nothing
44
false
false
0
5
25
9
4
5
null
null
facebookincubator/duckling
Duckling/AmountOfMoney/EN/Rules.hs
bsd-3-clause
ruleADollarCoin :: Rule ruleADollarCoin = Rule { name = "a <dollar coin>" , pattern = [ regex "an?" , Predicate isDollarCoin ] , prod = \tokens -> case tokens of (_: Token AmountOfMoney fd: _) -> Just . Token AmountOfMoney $ fd _ -> Nothing }
288
ruleADollarCoin :: Rule ruleADollarCoin = Rule { name = "a <dollar coin>" , pattern = [ regex "an?" , Predicate isDollarCoin ] , prod = \tokens -> case tokens of (_: Token AmountOfMoney fd: _) -> Just . Token AmountOfMoney $ fd _ -> Nothing }
288
ruleADollarCoin = Rule { name = "a <dollar coin>" , pattern = [ regex "an?" , Predicate isDollarCoin ] , prod = \tokens -> case tokens of (_: Token AmountOfMoney fd: _) -> Just . Token AmountOfMoney $ fd _ -> Nothing }
264
false
true
0
15
91
95
50
45
null
null
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs
mpl-2.0
-- | The maximum allowable length for html values is 2048 characters. hvValues :: Lens' HTMLValues [Text] hvValues = lens _hvValues (\ s a -> s{_hvValues = a}) . _Default . _Coerce
194
hvValues :: Lens' HTMLValues [Text] hvValues = lens _hvValues (\ s a -> s{_hvValues = a}) . _Default . _Coerce
124
hvValues = lens _hvValues (\ s a -> s{_hvValues = a}) . _Default . _Coerce
88
true
true
2
9
45
58
28
30
null
null
mtesseract/ingscale
src/lib/Ingscale.hs
bsd-3-clause
maybeToEither a Nothing = Left a
34
maybeToEither a Nothing = Left a
34
maybeToEither a Nothing = Left a
34
false
false
1
5
7
19
6
13
null
null
dnaq/crypto-sodium
test/Tests/Sodium/Scalarmult/Curve25519.hs
mit
tests :: TestTree tests = $(testGroupGenerator)
47
tests :: TestTree tests = $(testGroupGenerator)
47
tests = $(testGroupGenerator)
29
false
true
0
7
5
22
9
13
null
null
olsner/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprPECategory FamDataConPE = text "Data constructor"
54
pprPECategory FamDataConPE = text "Data constructor"
54
pprPECategory FamDataConPE = text "Data constructor"
54
false
false
0
5
7
12
5
7
null
null
phischu/conf
src/Conf.hs
agpl-3.0
fork :: (Monad m) => ConfT err flag m a -> ConfT err flag m a -> ConfT err flag m a fork branch1 branch2 = wrap (Fork branch1 branch2)
134
fork :: (Monad m) => ConfT err flag m a -> ConfT err flag m a -> ConfT err flag m a fork branch1 branch2 = wrap (Fork branch1 branch2)
134
fork branch1 branch2 = wrap (Fork branch1 branch2)
50
false
true
0
9
29
75
35
40
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
soberly = id
12
soberly = id
12
soberly = id
12
false
false
0
4
2
6
3
3
null
null
drhodes/jade2hdl
src/Jade/Vhdl.hs
bsd-3-clause
mkAllMods modname = "Vhdl.mkAllMods" <? do userModNames <- TopLevel.dependencyOrder modname T.concat <$> mapM mkModule (userModNames ++ [modname]) ------------------------------------------------------------------
218
mkAllMods modname = "Vhdl.mkAllMods" <? do userModNames <- TopLevel.dependencyOrder modname T.concat <$> mapM mkModule (userModNames ++ [modname]) ------------------------------------------------------------------
218
mkAllMods modname = "Vhdl.mkAllMods" <? do userModNames <- TopLevel.dependencyOrder modname T.concat <$> mapM mkModule (userModNames ++ [modname]) ------------------------------------------------------------------
218
false
false
0
12
22
50
24
26
null
null
oldmanmike/vulkan
generate/src/Parse/Utils.hs
bsd-3-clause
-- | Take the right element of either or failA with the error on the Left fromRightA :: IOStateArrow s (Either String a) a fromRightA = ifP isRight (arr $ \(Right x) -> x) (applyA (arr $ \(Left e) -> failA e)) where isRight (Right _) = True isRight (Left _) = False -- | T...
387
fromRightA :: IOStateArrow s (Either String a) a fromRightA = ifP isRight (arr $ \(Right x) -> x) (applyA (arr $ \(Left e) -> failA e)) where isRight (Right _) = True isRight (Left _) = False -- | Take the right element of either or failA with the error on the Left
313
fromRightA = ifP isRight (arr $ \(Right x) -> x) (applyA (arr $ \(Left e) -> failA e)) where isRight (Right _) = True isRight (Left _) = False -- | Take the right element of either or failA with the error on the Left
264
true
true
1
12
116
111
57
54
null
null
gergoerdi/soko-dash
src/SokoDash/Prim.hs
bsd-3-clause
edgesD g = [(v1,v2,w) | v1 <- nodes g, (v2,w) <- g!v1]
54
edgesD g = [(v1,v2,w) | v1 <- nodes g, (v2,w) <- g!v1]
54
edgesD g = [(v1,v2,w) | v1 <- nodes g, (v2,w) <- g!v1]
54
false
false
0
8
11
50
27
23
null
null
karlvoigtland/romkan-hs
NLP/Romkan/Util.hs
bsd-3-clause
kanRomAList :: [(T.Text, T.Text)] kanRomAList = makePairs kunreiHepburnWords
76
kanRomAList :: [(T.Text, T.Text)] kanRomAList = makePairs kunreiHepburnWords
76
kanRomAList = makePairs kunreiHepburnWords
42
false
true
0
7
7
27
15
12
null
null
phadej/reflex
src/Reflex/Spider/Internal.hs
bsd-3-clause
recalculateCoincidenceHeight :: CoincidenceSubscribed a -> IO () recalculateCoincidenceHeight subscribed = do oldHeight <- readIORef $ coincidenceSubscribedHeight subscribed when (oldHeight == invalidHeight) $ do height <- calculateCoincidenceHeight subscribed when (height /= invalidHeight) $ do write...
557
recalculateCoincidenceHeight :: CoincidenceSubscribed a -> IO () recalculateCoincidenceHeight subscribed = do oldHeight <- readIORef $ coincidenceSubscribedHeight subscribed when (oldHeight == invalidHeight) $ do height <- calculateCoincidenceHeight subscribed when (height /= invalidHeight) $ do write...
557
recalculateCoincidenceHeight subscribed = do oldHeight <- readIORef $ coincidenceSubscribedHeight subscribed when (oldHeight == invalidHeight) $ do height <- calculateCoincidenceHeight subscribed when (height /= invalidHeight) $ do writeIORef (coincidenceSubscribedHeight subscribed) height mapM_...
492
false
true
0
16
80
118
53
65
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp ReadOffAddrOp_Int32 = _ILIT(298)
45
tagOf_PrimOp ReadOffAddrOp_Int32 = _ILIT(298)
45
tagOf_PrimOp ReadOffAddrOp_Int32 = _ILIT(298)
45
false
false
0
6
3
16
7
9
null
null
haskoin/haskoin
src/Haskoin/Util/Arbitrary/Transaction.hs
unlicense
-- | Arbitrary 'SigInput' with a 'ScriptOutput' of type 'PayPK'. arbitraryPKSigInput :: Network -> Gen (SigInput, SecKeyI) arbitraryPKSigInput net = arbitraryAnyInput net False
176
arbitraryPKSigInput :: Network -> Gen (SigInput, SecKeyI) arbitraryPKSigInput net = arbitraryAnyInput net False
111
arbitraryPKSigInput net = arbitraryAnyInput net False
53
true
true
0
8
22
37
18
19
null
null
DavidAlphaFox/ghc
utils/haddock/haddock-api/src/Haddock/GhcUtils.hs
bsd-3-clause
filterSigNames p orig@(InlineSig n _) = ifTrueJust (p $ unLoc n) orig
78
filterSigNames p orig@(InlineSig n _) = ifTrueJust (p $ unLoc n) orig
78
filterSigNames p orig@(InlineSig n _) = ifTrueJust (p $ unLoc n) orig
78
false
false
0
8
20
37
18
19
null
null
UCSD-PL/RefScript
src/Language/Rsc/Typecheck/Types.hs
bsd-3-clause
builtinOpId BICtorExit = builtinId "BICtorExit"
53
builtinOpId BICtorExit = builtinId "BICtorExit"
53
builtinOpId BICtorExit = builtinId "BICtorExit"
53
false
false
0
5
10
12
5
7
null
null
dwnusbaum/truth
Truth.hs
bsd-2-clause
xor False True = True
22
xor False True = True
22
xor False True = True
22
false
false
0
5
5
13
5
8
null
null
conal/hermit
examples/fib-stream/Nat.hs
bsd-2-clause
toNat n = Succ (toNat (pred n))
31
toNat n = Succ (toNat (pred n))
31
toNat n = Succ (toNat (pred n))
31
false
false
1
9
6
28
11
17
null
null
tel/saltine
tests/AEAD/AES256GCMProperties.hs
mit
-- | Ciphertext cannot be decrypted with a different nonce cannotDecryptNonceProp :: Key -> Nonce -> Nonce -> Message -> Message -> Property cannotDecryptNonceProp k n1 n2 (Message bs) (Message aad) = n1 /= n2 ==> Nothing == aeadOpen k n2 (aead k n1 bs aad) aad
263
cannotDecryptNonceProp :: Key -> Nonce -> Nonce -> Message -> Message -> Property cannotDecryptNonceProp k n1 n2 (Message bs) (Message aad) = n1 /= n2 ==> Nothing == aeadOpen k n2 (aead k n1 bs aad) aad
204
cannotDecryptNonceProp k n1 n2 (Message bs) (Message aad) = n1 /= n2 ==> Nothing == aeadOpen k n2 (aead k n1 bs aad) aad
122
true
true
0
9
48
88
44
44
null
null
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/Types.hs
mpl-2.0
-- | Amazon SQS queue ARN to which Amazon S3 will publish a message when it -- detects events of specified type. qcQueueArn :: Lens' QueueConfiguration Text qcQueueArn = lens _qcQueueArn (\s a -> s { _qcQueueArn = a })
218
qcQueueArn :: Lens' QueueConfiguration Text qcQueueArn = lens _qcQueueArn (\s a -> s { _qcQueueArn = a })
105
qcQueueArn = lens _qcQueueArn (\s a -> s { _qcQueueArn = a })
61
true
true
0
9
39
41
23
18
null
null
ddssff/lens
src/Control/Lens/Fold.hs
bsd-3-clause
-- | Perform an *UNSAFE* 'head' of a 'Fold' or 'Traversal' assuming that it is there. -- -- >>> Left 4 ^?! _Left -- 4 -- -- >>> "world" ^?! ix 3 -- 'l' -- -- @ -- ('^?!') :: s -> 'Getter' s a -> a -- ('^?!') :: s -> 'Fold' s a -> a -- ('^?!') :: s -> 'Lens'' s a -> a -- ('^?!') :: s -> 'Iso'' s a -...
481
(^?!) :: HasCallStack => s -> Getting (Endo a) s a -> a s ^?! l = foldrOf l const (error "(^?!): empty Fold") s
111
s ^?! l = foldrOf l const (error "(^?!): empty Fold") s
55
true
true
0
11
134
76
44
32
null
null
gspia/reflex-dom-htmlea
exampleTbl/libTbl/MainW2.hs
bsd-3-clause
-- import Reflex.Dom.HTML5.Component.Common.CompEvent -------------------------------------------------------------------------------- mainW ∷ JSM () mainW = mainWidget examples
189
mainW ∷ JSM () mainW = mainWidget examples
42
mainW = mainWidget examples
27
true
true
0
6
23
21
11
10
null
null
parapluu/encore
src/back/CodeGen/CCodeNames.hs
bsd-3-clause
qualifiedToString :: ID.QualifiedName -> String qualifiedToString ID.QName{ID.qnsource = Nothing, ID.qnlocal} = show qnlocal
124
qualifiedToString :: ID.QualifiedName -> String qualifiedToString ID.QName{ID.qnsource = Nothing, ID.qnlocal} = show qnlocal
124
qualifiedToString ID.QName{ID.qnsource = Nothing, ID.qnlocal} = show qnlocal
76
false
true
0
7
12
45
22
23
null
null
apyrgio/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
cvEnodessh :: (String, String, String) cvEnodessh = ("node", Types.cVErrorCodeToRaw CvENODESSH, "SSH-related node error")
129
cvEnodessh :: (String, String, String) cvEnodessh = ("node", Types.cVErrorCodeToRaw CvENODESSH, "SSH-related node error")
129
cvEnodessh = ("node", Types.cVErrorCodeToRaw CvENODESSH, "SSH-related node error")
90
false
true
0
7
20
34
20
14
null
null
monky-hs/monky
Monky/Template.hs
lgpl-3.0
-- Get the transformer name, this is some ugly name mangeling transName :: String -> String transName = concatMap cleanName . ("mkFun" ++) . filter isOk where isOk c = not (isSpace c) && c /= '-' && c /= '>' -- Get the function described by the three-tuple (Alias, C-Name, TypeString)
288
transName :: String -> String transName = concatMap cleanName . ("mkFun" ++) . filter isOk where isOk c = not (isSpace c) && c /= '-' && c /= '>' -- Get the function described by the three-tuple (Alias, C-Name, TypeString)
226
transName = concatMap cleanName . ("mkFun" ++) . filter isOk where isOk c = not (isSpace c) && c /= '-' && c /= '>' -- Get the function described by the three-tuple (Alias, C-Name, TypeString)
196
true
true
1
10
55
81
37
44
null
null
futtetennista/IntroductionToFunctionalProgramming
RWH/src/ch8/GlobRegex.hs
mit
globToRegex :: B.ByteString -> Either ErrorMsg (B.ByteString, Recursive) globToRegex cs = E.either Left (Right . (entireInput *** getAny)) eRegex where entireInput = ('^' `C8.cons`) . (`C8.snoc` '$') eRegex :: Either ErrorMsg (B.ByteString, Any) eRegex = runExcept $ runWriterT (globToRegex'...
324
globToRegex :: B.ByteString -> Either ErrorMsg (B.ByteString, Recursive) globToRegex cs = E.either Left (Right . (entireInput *** getAny)) eRegex where entireInput = ('^' `C8.cons`) . (`C8.snoc` '$') eRegex :: Either ErrorMsg (B.ByteString, Any) eRegex = runExcept $ runWriterT (globToRegex'...
324
globToRegex cs = E.either Left (Right . (entireInput *** getAny)) eRegex where entireInput = ('^' `C8.cons`) . (`C8.snoc` '$') eRegex :: Either ErrorMsg (B.ByteString, Any) eRegex = runExcept $ runWriterT (globToRegex' cs)
251
false
true
0
9
68
120
66
54
null
null
BeautifulDestinations/fb
src/Facebook/Object/Marketing/Types.hs
bsd-3-clause
media_agency r = r `Rec.get` MediaAgency
40
media_agency r = r `Rec.get` MediaAgency
40
media_agency r = r `Rec.get` MediaAgency
40
false
false
1
6
5
21
9
12
null
null
NICTA/seL4
haskell/src/SEL4/Machine/Hardware/ARM/QEmu.hs
bsd-2-clause
timerLimit :: Word timerLimit = 1000000 `div` timerFreq
55
timerLimit :: Word timerLimit = 1000000 `div` timerFreq
55
timerLimit = 1000000 `div` timerFreq
36
false
true
0
6
7
26
12
14
null
null
zhengqm/scheme
src/Evaluator.hs
bsd-3-clause
cons badArgList = throwError $ NumArgs 2 badArgList
51
cons badArgList = throwError $ NumArgs 2 badArgList
51
cons badArgList = throwError $ NumArgs 2 badArgList
51
false
false
0
6
7
18
8
10
null
null