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
urbanslug/ghc
testsuite/tests/rename/should_compile/timing003.hs
bsd-3-clause
a384 = []
9
a384 = []
9
a384 = []
9
false
false
1
6
2
12
4
8
null
null
julienschmaltz/madl
src/Parser/ASTTranslator.hs
mit
toMFStruct :: Types.MFunction -> Types.MFunctionStruct toMFStruct mfunction = case mfunction of Types.MFDisj (Types.XChoice "" (Left f )) -> f Types.MFDisj (Types.XChoice "" (Right f)) -> Types.XConcat . Hash.singleton "" $ Right f Types.MFDisj f -> Types.XConcat . Hash.singleton "" $ Left f Types.MFStruct f -> f Types.MFVal f -> Types.XConcat . Hash.singleton "" $ Right f Types.MFBool _ -> fatal 557 $ "MFBool can not interpreted as MFStruct" -------------------------------------------------------------------------------- -- Translate a parsed Network to a NetworkSpecification -------------------------------------------------------------------------------- -- | Get the name of a networkprimitive
732
toMFStruct :: Types.MFunction -> Types.MFunctionStruct toMFStruct mfunction = case mfunction of Types.MFDisj (Types.XChoice "" (Left f )) -> f Types.MFDisj (Types.XChoice "" (Right f)) -> Types.XConcat . Hash.singleton "" $ Right f Types.MFDisj f -> Types.XConcat . Hash.singleton "" $ Left f Types.MFStruct f -> f Types.MFVal f -> Types.XConcat . Hash.singleton "" $ Right f Types.MFBool _ -> fatal 557 $ "MFBool can not interpreted as MFStruct" -------------------------------------------------------------------------------- -- Translate a parsed Network to a NetworkSpecification -------------------------------------------------------------------------------- -- | Get the name of a networkprimitive
732
toMFStruct mfunction = case mfunction of Types.MFDisj (Types.XChoice "" (Left f )) -> f Types.MFDisj (Types.XChoice "" (Right f)) -> Types.XConcat . Hash.singleton "" $ Right f Types.MFDisj f -> Types.XConcat . Hash.singleton "" $ Left f Types.MFStruct f -> f Types.MFVal f -> Types.XConcat . Hash.singleton "" $ Right f Types.MFBool _ -> fatal 557 $ "MFBool can not interpreted as MFStruct" -------------------------------------------------------------------------------- -- Translate a parsed Network to a NetworkSpecification -------------------------------------------------------------------------------- -- | Get the name of a networkprimitive
677
false
true
10
10
113
191
92
99
null
null
robx/puzzle-draw
src/Draw/Grid.hs
mit
cageParams :: Config -> CageParams cageParams cfg = case _cfgDevice cfg of Screen -> CageParams (4 / 40) (4 / 40) onepix (4 * onepix) Print -> let -- input parameters lwidth = 1.25 * onepix steps = 10 gapSteps = 2 dashFactor = 3 step = 1 / steps cap = lwidth on = dashFactor * step / (dashFactor + 1) - cap off = step / (dashFactor + 1) + cap offset = step * gapSteps / 2 in CageParams on off lwidth offset
491
cageParams :: Config -> CageParams cageParams cfg = case _cfgDevice cfg of Screen -> CageParams (4 / 40) (4 / 40) onepix (4 * onepix) Print -> let -- input parameters lwidth = 1.25 * onepix steps = 10 gapSteps = 2 dashFactor = 3 step = 1 / steps cap = lwidth on = dashFactor * step / (dashFactor + 1) - cap off = step / (dashFactor + 1) + cap offset = step * gapSteps / 2 in CageParams on off lwidth offset
491
cageParams cfg = case _cfgDevice cfg of Screen -> CageParams (4 / 40) (4 / 40) onepix (4 * onepix) Print -> let -- input parameters lwidth = 1.25 * onepix steps = 10 gapSteps = 2 dashFactor = 3 step = 1 / steps cap = lwidth on = dashFactor * step / (dashFactor + 1) - cap off = step / (dashFactor + 1) + cap offset = step * gapSteps / 2 in CageParams on off lwidth offset
456
false
true
2
13
170
180
94
86
null
null
Noeda/caramia
src/Graphics/Caramia/Render/Internal.hs
mit
stencilOpToConstant DecreaseAndWrap = GL_DECR_WRAP
50
stencilOpToConstant DecreaseAndWrap = GL_DECR_WRAP
50
stencilOpToConstant DecreaseAndWrap = GL_DECR_WRAP
50
false
false
0
5
3
9
4
5
null
null
chriseidhof/persist
src/Data/Persist/Backend/Interface.hs
bsd-3-clause
dbValueAsInt _ = Nothing
35
dbValueAsInt _ = Nothing
35
dbValueAsInt _ = Nothing
35
false
false
0
5
14
9
4
5
null
null
eijian/deeplearning
CNN/Layer.hs
bsd-3-clause
reverseLayer :: Layer -> Layer reverseLayer (ActLayer f) = reverseActFunc f
83
reverseLayer :: Layer -> Layer reverseLayer (ActLayer f) = reverseActFunc f
83
reverseLayer (ActLayer f) = reverseActFunc f
52
false
true
0
7
18
27
13
14
null
null
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell
src/ATP/Util/List.hs
gpl-3.0
-- Generate small ints ints :: Int -> Gen Int ints n = Q.choose (0, n)
71
ints :: Int -> Gen Int ints n = Q.choose (0, n)
47
ints n = Q.choose (0, n)
24
true
true
0
6
16
33
17
16
null
null
felixsch/ircbot
src/Network/IRC.hs
gpl-2.0
defaultIrcLogger :: Bool -> Maybe Handle -> IrcLogger st defaultIrcLogger verbose hdl ext msg = do date <- formatTime defaultTimeLocale rfc822DateFormat <$> liftIO getCurrentTime when (isJust hdl) $ liftIO $ hPutStrLn (fromJust hdl) $ format date ext (T.unpack msg) when verbose $ liftIO $ putStrLn $ format date ext (T.unpack msg) where format date (Just mo) m = "[" ++ date ++ "][" ++ T.unpack mo ++ "] " ++ m format date Nothing m = "[" ++ date ++ "] " ++ m
496
defaultIrcLogger :: Bool -> Maybe Handle -> IrcLogger st defaultIrcLogger verbose hdl ext msg = do date <- formatTime defaultTimeLocale rfc822DateFormat <$> liftIO getCurrentTime when (isJust hdl) $ liftIO $ hPutStrLn (fromJust hdl) $ format date ext (T.unpack msg) when verbose $ liftIO $ putStrLn $ format date ext (T.unpack msg) where format date (Just mo) m = "[" ++ date ++ "][" ++ T.unpack mo ++ "] " ++ m format date Nothing m = "[" ++ date ++ "] " ++ m
496
defaultIrcLogger verbose hdl ext msg = do date <- formatTime defaultTimeLocale rfc822DateFormat <$> liftIO getCurrentTime when (isJust hdl) $ liftIO $ hPutStrLn (fromJust hdl) $ format date ext (T.unpack msg) when verbose $ liftIO $ putStrLn $ format date ext (T.unpack msg) where format date (Just mo) m = "[" ++ date ++ "][" ++ T.unpack mo ++ "] " ++ m format date Nothing m = "[" ++ date ++ "] " ++ m
439
false
true
0
12
119
203
95
108
null
null
jaapweel/piffle
src/CIr.hs
gpl-2.0
tUnop UNeg = C.Bnot
23
tUnop UNeg = C.Bnot
23
tUnop UNeg = C.Bnot
23
false
false
1
6
7
15
5
10
null
null
AndrasKovacs/trie-vector
benchmarks/Benchmarks.hs
mit
100 = randix 100
19
r100 = randix 100
19
r100 = randix 100
19
false
false
1
4
6
12
4
8
null
null
adamschoenemann/asa-analysis
test/Anal/ConstPropSpec.hs
bsd-3-clause
testAnalysis (nm, progstr) = do it ("should work for " ++ nm) $ do let ep = parse program ("program" ++ nm) progstr ep `shouldSatisfy` isRight let Right p = ep let result = analyzeProg constProp p (evaluate . force) result -- putStrLn $ nm ++ ":" -- pprintAnalysis constProp p return ()
320
testAnalysis (nm, progstr) = do it ("should work for " ++ nm) $ do let ep = parse program ("program" ++ nm) progstr ep `shouldSatisfy` isRight let Right p = ep let result = analyzeProg constProp p (evaluate . force) result -- putStrLn $ nm ++ ":" -- pprintAnalysis constProp p return ()
320
testAnalysis (nm, progstr) = do it ("should work for " ++ nm) $ do let ep = parse program ("program" ++ nm) progstr ep `shouldSatisfy` isRight let Right p = ep let result = analyzeProg constProp p (evaluate . force) result -- putStrLn $ nm ++ ":" -- pprintAnalysis constProp p return ()
320
false
false
2
10
86
103
54
49
null
null
artuuge/IHaskell
src/IHaskell/Eval/Lint.hs
mit
hlintSettings :: MVar (ParseFlags, [Classify], Hint) hlintSettings = unsafePerformIO newEmptyMVar
97
hlintSettings :: MVar (ParseFlags, [Classify], Hint) hlintSettings = unsafePerformIO newEmptyMVar
97
hlintSettings = unsafePerformIO newEmptyMVar
44
false
true
0
7
9
29
16
13
null
null
shayan-najd/HsParser
U/UniqFM.hs
gpl-3.0
allUFM :: (elt -> Bool) -> UniqFM elt -> Bool allUFM p (UFM m) = M.fold ((&&) . p) True m
89
allUFM :: (elt -> Bool) -> UniqFM elt -> Bool allUFM p (UFM m) = M.fold ((&&) . p) True m
89
allUFM p (UFM m) = M.fold ((&&) . p) True m
43
false
true
0
7
20
58
30
28
null
null
martijnbastiaan/sprockell
src/DemoMultipleSprockells.hs
mit
main = runDebug debugEndProg 3 prog >> putChar '\n'
51
main = runDebug debugEndProg 3 prog >> putChar '\n'
51
main = runDebug debugEndProg 3 prog >> putChar '\n'
51
false
false
1
6
8
24
9
15
null
null
siddhanathan/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
mkModBreaks :: DynFlags -> Int -> [MixEntry_] -> IO ModBreaks mkModBreaks dflags count entries = do breakArray <- newBreakArray dflags $ length entries let locsTicks = listArray (0,count-1) [ span | (span,_,_,_) <- entries ] varsTicks = listArray (0,count-1) [ vars | (_,_,vars,_) <- entries ] declsTicks= listArray (0,count-1) [ decls | (_,decls,_,_) <- entries ] modBreaks = emptyModBreaks { modBreaks_flags = breakArray , modBreaks_locs = locsTicks , modBreaks_vars = varsTicks , modBreaks_decls = declsTicks } -- return modBreaks
688
mkModBreaks :: DynFlags -> Int -> [MixEntry_] -> IO ModBreaks mkModBreaks dflags count entries = do breakArray <- newBreakArray dflags $ length entries let locsTicks = listArray (0,count-1) [ span | (span,_,_,_) <- entries ] varsTicks = listArray (0,count-1) [ vars | (_,_,vars,_) <- entries ] declsTicks= listArray (0,count-1) [ decls | (_,decls,_,_) <- entries ] modBreaks = emptyModBreaks { modBreaks_flags = breakArray , modBreaks_locs = locsTicks , modBreaks_vars = varsTicks , modBreaks_decls = declsTicks } -- return modBreaks
688
mkModBreaks dflags count entries = do breakArray <- newBreakArray dflags $ length entries let locsTicks = listArray (0,count-1) [ span | (span,_,_,_) <- entries ] varsTicks = listArray (0,count-1) [ vars | (_,_,vars,_) <- entries ] declsTicks= listArray (0,count-1) [ decls | (_,decls,_,_) <- entries ] modBreaks = emptyModBreaks { modBreaks_flags = breakArray , modBreaks_locs = locsTicks , modBreaks_vars = varsTicks , modBreaks_decls = declsTicks } -- return modBreaks
626
false
true
0
14
233
224
124
100
null
null
martin-kolinek/AgentH
src/City.hs
mit
secondCity = City {cityName = "SecondCity", cityWidth = 500, cityHeight = 500, startPoint = (250, 250), cityColor = navy}
121
secondCity = City {cityName = "SecondCity", cityWidth = 500, cityHeight = 500, startPoint = (250, 250), cityColor = navy}
121
secondCity = City {cityName = "SecondCity", cityWidth = 500, cityHeight = 500, startPoint = (250, 250), cityColor = navy}
121
false
false
1
8
18
51
29
22
null
null
mindreader/iron-tracker
Weight.hs
bsd-3-clause
inputReps :: Int-> App Reps inputReps 0 = liftIO . prompt $ "New reps:"
71
inputReps :: Int-> App Reps inputReps 0 = liftIO . prompt $ "New reps:"
71
inputReps 0 = liftIO . prompt $ "New reps:"
43
false
true
0
6
13
29
14
15
null
null
zachsully/hakaru
haskell/Language/Hakaru/Sample.hs
bsd-3-clause
evaluateArrayOp (Reduce _) = \(e1 :* e2 :* e3 :* End) env -> case ( evaluate e1 env , evaluate e2 env , evaluate e3 env) of (f, a, VArray v) -> V.foldl' (lam2 f) a v _ -> error "evaluateArrayOp: the impossible happened"
264
evaluateArrayOp (Reduce _) = \(e1 :* e2 :* e3 :* End) env -> case ( evaluate e1 env , evaluate e2 env , evaluate e3 env) of (f, a, VArray v) -> V.foldl' (lam2 f) a v _ -> error "evaluateArrayOp: the impossible happened"
264
evaluateArrayOp (Reduce _) = \(e1 :* e2 :* e3 :* End) env -> case ( evaluate e1 env , evaluate e2 env , evaluate e3 env) of (f, a, VArray v) -> V.foldl' (lam2 f) a v _ -> error "evaluateArrayOp: the impossible happened"
264
false
false
3
9
88
108
54
54
null
null
jml/hazard
lib/Hazard/Routes.hs
apache-2.0
-- | Page for a single game. game :: Path '[Int] game = "game" <//> var
71
game :: Path '[Int] game = "game" <//> var
42
game = "game" <//> var
22
true
true
2
8
15
31
14
17
null
null
maltem/zlib-enum
test.hs
mit
prop_unconsumed :: WindowBits -> [ByteString] -> Property prop_unconsumed win xs = monadicIO $ do ys <- Q.run $ compressDecompressWith unconsumed win xs assert (B.concat xs == ys) -- | Check if mapping the identity function doesn't affect anything
252
prop_unconsumed :: WindowBits -> [ByteString] -> Property prop_unconsumed win xs = monadicIO $ do ys <- Q.run $ compressDecompressWith unconsumed win xs assert (B.concat xs == ys) -- | Check if mapping the identity function doesn't affect anything
252
prop_unconsumed win xs = monadicIO $ do ys <- Q.run $ compressDecompressWith unconsumed win xs assert (B.concat xs == ys) -- | Check if mapping the identity function doesn't affect anything
194
false
true
0
12
42
70
34
36
null
null
LeifW/rdf4h
testsuite/tests/W3C/TurtleTest.hs
bsd-3-clause
mfEntryToTest (TestTurtleNegativeEval nm _ _ act) = do rdf <- parseFile testParser (nodeURI act) :: IO (Either ParseFailure TriplesGraph) return $ testCase (T.unpack nm) $ TU.assert $ isNotParsed rdf
203
mfEntryToTest (TestTurtleNegativeEval nm _ _ act) = do rdf <- parseFile testParser (nodeURI act) :: IO (Either ParseFailure TriplesGraph) return $ testCase (T.unpack nm) $ TU.assert $ isNotParsed rdf
203
mfEntryToTest (TestTurtleNegativeEval nm _ _ act) = do rdf <- parseFile testParser (nodeURI act) :: IO (Either ParseFailure TriplesGraph) return $ testCase (T.unpack nm) $ TU.assert $ isNotParsed rdf
203
false
false
0
13
32
84
39
45
null
null
jeroennoels/exact-real
src/Ternary/Core/Digit.hs
mit
allT2 = [M2, M1, O0, P1, P2]
28
allT2 = [M2, M1, O0, P1, P2]
28
allT2 = [M2, M1, O0, P1, P2]
28
false
false
0
5
6
21
13
8
null
null
frantisekfarka/ghc-dsi
testsuite/tests/safeHaskell/safeLanguage/SafeLang13.hs
bsd-3-clause
main = do let h = H "Hello World" g = G 1 -- Just h' = (cast h) :: Maybe G Just p' = (cast p) :: Maybe G Just px = (cast $ incrG p') :: Maybe P putStrLn $ show h putStrLn $ show g -- putStrLn $ show h' putStrLn $ showP p putStrLn $ show p' putStrLn $ showP px
317
main = do let h = H "Hello World" g = G 1 -- Just h' = (cast h) :: Maybe G Just p' = (cast p) :: Maybe G Just px = (cast $ incrG p') :: Maybe P putStrLn $ show h putStrLn $ show g -- putStrLn $ show h' putStrLn $ showP p putStrLn $ show p' putStrLn $ showP px
317
main = do let h = H "Hello World" g = G 1 -- Just h' = (cast h) :: Maybe G Just p' = (cast p) :: Maybe G Just px = (cast $ incrG p') :: Maybe P putStrLn $ show h putStrLn $ show g -- putStrLn $ show h' putStrLn $ showP p putStrLn $ show p' putStrLn $ showP px
317
false
false
0
12
122
124
56
68
null
null
nightscape/platform
node/tests/Unison/Test/BlockStore/FileBlockStore.hs
mit
tests :: TestTree tests = withResource setup (Directory.removeDirectoryRecursive . path) (testGroup "FileBlockStore" . makeCases . store . unsafePerformIO)
157
tests :: TestTree tests = withResource setup (Directory.removeDirectoryRecursive . path) (testGroup "FileBlockStore" . makeCases . store . unsafePerformIO)
157
tests = withResource setup (Directory.removeDirectoryRecursive . path) (testGroup "FileBlockStore" . makeCases . store . unsafePerformIO)
139
false
true
0
9
19
46
23
23
null
null
cchalmers/geometry
src/Geometry/Transform.hs
bsd-3-clause
-- | Conjugate one transformation by another. @conjugate t1 t2@ is the -- transformation which performs first @t1@, then @t2@, then the -- inverse of @t1@. conjugate :: (Additive v, Foldable v, Num n) => Transformation v n -> Transformation v n -> Transformation v n conjugate t1 t2 = inv t1 <> t2 <> t1
317
conjugate :: (Additive v, Foldable v, Num n) => Transformation v n -> Transformation v n -> Transformation v n conjugate t1 t2 = inv t1 <> t2 <> t1
157
conjugate t1 t2 = inv t1 <> t2 <> t1
36
true
true
0
9
69
79
38
41
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_08/wyas/app/Eval.hs
mit
eqv [(Number arg1), (Number arg2)] = return $ Bool $ arg1 == arg2
73
eqv [(Number arg1), (Number arg2)] = return $ Bool $ arg1 == arg2
73
eqv [(Number arg1), (Number arg2)] = return $ Bool $ arg1 == arg2
73
false
false
0
7
20
40
20
20
null
null
robeverest/accelerate
Data/Array/Accelerate/Smart.hs
bsd-3-clause
mkCos :: (Elt t, IsFloating t) => Exp t -> Exp t mkCos x = Exp $ PrimCos floatingType `PrimApp` x
97
mkCos :: (Elt t, IsFloating t) => Exp t -> Exp t mkCos x = Exp $ PrimCos floatingType `PrimApp` x
97
mkCos x = Exp $ PrimCos floatingType `PrimApp` x
48
false
true
0
7
20
52
26
26
null
null
snoyberg/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprLit i (IntegerL x) = parensIf (i > noPrec && x < 0) (integer x)
69
pprLit i (IntegerL x) = parensIf (i > noPrec && x < 0) (integer x)
69
pprLit i (IntegerL x) = parensIf (i > noPrec && x < 0) (integer x)
69
false
false
0
9
17
43
21
22
null
null
tmcdonell/accelerate-ray
Vec3.hs
bsd-3-clause
-- | Clamp a vectors components to some minimum and maximum values. -- clamp :: Exp Vec3 -> Exp Float -> Exp Float -> Exp Vec3 clamp v minVal maxVal = makeVec3 (go x) (go y) (go z) where XYZ x y z = unlift v go u = minVal `max` u `min` maxVal -- | Clip a vector's components to some maximum value. --
323
clamp :: Exp Vec3 -> Exp Float -> Exp Float -> Exp Vec3 clamp v minVal maxVal = makeVec3 (go x) (go y) (go z) where XYZ x y z = unlift v go u = minVal `max` u `min` maxVal -- | Clip a vector's components to some maximum value. --
252
clamp v minVal maxVal = makeVec3 (go x) (go y) (go z) where XYZ x y z = unlift v go u = minVal `max` u `min` maxVal -- | Clip a vector's components to some maximum value. --
196
true
true
2
9
87
126
57
69
null
null
nickolasacosta/pf-tools
src/Pf/Crafting.hs
gpl-3.0
craftCheck :: PreviousProgress -> Roll -> CraftDuration -> CraftResult craftCheck pp (Roll r) d | dc (item pp) <= r = CraftSuccess $ increaseProgress pp (Roll r) d | dc (item pp) - r >= 5 = CraftFailureByFiveOrMore pp | dc (item pp) > r = CraftFailure pp | otherwise = CraftFailure pp
292
craftCheck :: PreviousProgress -> Roll -> CraftDuration -> CraftResult craftCheck pp (Roll r) d | dc (item pp) <= r = CraftSuccess $ increaseProgress pp (Roll r) d | dc (item pp) - r >= 5 = CraftFailureByFiveOrMore pp | dc (item pp) > r = CraftFailure pp | otherwise = CraftFailure pp
292
craftCheck pp (Roll r) d | dc (item pp) <= r = CraftSuccess $ increaseProgress pp (Roll r) d | dc (item pp) - r >= 5 = CraftFailureByFiveOrMore pp | dc (item pp) > r = CraftFailure pp | otherwise = CraftFailure pp
221
false
true
1
12
60
140
65
75
null
null
ghcjs/ghcjs
src/Gen2/RtsTypes.hs
mit
---------------------------------------------------------- -- | run the action with no stack info resetSlots :: G a -> G a resetSlots m = do s <- getSlots d <- use stackDepth setSlots [] a <- m setSlots s stackDepth .= d return a -- | run the action with current stack info, but don't let modifications propagate
328
resetSlots :: G a -> G a resetSlots m = do s <- getSlots d <- use stackDepth setSlots [] a <- m setSlots s stackDepth .= d return a -- | run the action with current stack info, but don't let modifications propagate
229
resetSlots m = do s <- getSlots d <- use stackDepth setSlots [] a <- m setSlots s stackDepth .= d return a -- | run the action with current stack info, but don't let modifications propagate
204
true
true
0
8
69
78
34
44
null
null
Airtnp/Freshman_Simple_Haskell_Lib
Intro/hello-world.hs
mit
scanr_alt :: (a -> b -> b) -> b -> [a] -> [b] scanr_alt f b (x:xs) = f x (head ys) : ys where ys = scanr_alt f b xs {- Ch7 Typeclass -} -- Constraints (=>) 也是 Mapping (->),但是其参数是一个包含了 Show instance 实现的 record
233
scanr_alt :: (a -> b -> b) -> b -> [a] -> [b] scanr_alt f b (x:xs) = f x (head ys) : ys where ys = scanr_alt f b xs {- Ch7 Typeclass -} -- Constraints (=>) 也是 Mapping (->),但是其参数是一个包含了 Show instance 实现的 record
233
scanr_alt f b (x:xs) = f x (head ys) : ys where ys = scanr_alt f b xs {- Ch7 Typeclass -} -- Constraints (=>) 也是 Mapping (->),但是其参数是一个包含了 Show instance 实现的 record
187
false
true
1
8
69
96
46
50
null
null
zaxtax/hakaru
haskell/Tests/RoundTrip.hs
bsd-3-clause
expr2 :: (ABT Term abt) => abt '[] ('HReal ':-> 'HReal ':-> 'HProb) expr2 = lam $ \x1 -> lam $ \x2 -> (lam $ \x3 -> lam $ \x4 -> lam $ \x5 -> (lam $ \x6 -> zero + one * (lam $ \x7 -> (lam $ \x8 -> zero + exp (((negate x4) - x3) * (x4 - x3) / fromProb ((fromRational 2) * exp (log one * (fromRational 2)))) / one / exp (log ((fromRational 2) * pi) * half) * (lam $ \x9 -> x9 `app` unit) `app` x8) `app` (lam $ \_ -> (lam $ \x9 -> (lam $ \x10 -> x10 `app` x4) `app` (lam $ \_ -> (lam $ \x11 -> (lam $ \x12 -> x12 `app` unit) `app` (lam $ \x12 -> (lam $ \x13 -> (lam $ \x14 -> x14 `app` x4) `app` (lam $ \_ -> (lam $ \x15 -> x15 `app` pair x4 x12) `app` x13)) `app` x11)) `app` x9)) `app` x7)) `app` x6) `app` (lam $ \x6 -> (lam $ \x7 -> x7 `app` (x6 `unpair` \_ x9 -> x9)) `app` x5) ) `app` x1 `app` x2 `app` (lam $ \_ -> one)
1,550
expr2 :: (ABT Term abt) => abt '[] ('HReal ':-> 'HReal ':-> 'HProb) expr2 = lam $ \x1 -> lam $ \x2 -> (lam $ \x3 -> lam $ \x4 -> lam $ \x5 -> (lam $ \x6 -> zero + one * (lam $ \x7 -> (lam $ \x8 -> zero + exp (((negate x4) - x3) * (x4 - x3) / fromProb ((fromRational 2) * exp (log one * (fromRational 2)))) / one / exp (log ((fromRational 2) * pi) * half) * (lam $ \x9 -> x9 `app` unit) `app` x8) `app` (lam $ \_ -> (lam $ \x9 -> (lam $ \x10 -> x10 `app` x4) `app` (lam $ \_ -> (lam $ \x11 -> (lam $ \x12 -> x12 `app` unit) `app` (lam $ \x12 -> (lam $ \x13 -> (lam $ \x14 -> x14 `app` x4) `app` (lam $ \_ -> (lam $ \x15 -> x15 `app` pair x4 x12) `app` x13)) `app` x11)) `app` x9)) `app` x7)) `app` x6) `app` (lam $ \x6 -> (lam $ \x7 -> x7 `app` (x6 `unpair` \_ x9 -> x9)) `app` x5) ) `app` x1 `app` x2 `app` (lam $ \_ -> one)
1,550
expr2 = lam $ \x1 -> lam $ \x2 -> (lam $ \x3 -> lam $ \x4 -> lam $ \x5 -> (lam $ \x6 -> zero + one * (lam $ \x7 -> (lam $ \x8 -> zero + exp (((negate x4) - x3) * (x4 - x3) / fromProb ((fromRational 2) * exp (log one * (fromRational 2)))) / one / exp (log ((fromRational 2) * pi) * half) * (lam $ \x9 -> x9 `app` unit) `app` x8) `app` (lam $ \_ -> (lam $ \x9 -> (lam $ \x10 -> x10 `app` x4) `app` (lam $ \_ -> (lam $ \x11 -> (lam $ \x12 -> x12 `app` unit) `app` (lam $ \x12 -> (lam $ \x13 -> (lam $ \x14 -> x14 `app` x4) `app` (lam $ \_ -> (lam $ \x15 -> x15 `app` pair x4 x12) `app` x13)) `app` x11)) `app` x9)) `app` x7)) `app` x6) `app` (lam $ \x6 -> (lam $ \x7 -> x7 `app` (x6 `unpair` \_ x9 -> x9)) `app` x5) ) `app` x1 `app` x2 `app` (lam $ \_ -> one)
1,482
false
true
7
55
921
587
335
252
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/System/Posix/Internals.hs
bsd-3-clause
c_pipe :: Ptr CInt -> IO CInt c_pipe = error "c_pipe not implemented"
69
c_pipe :: Ptr CInt -> IO CInt c_pipe = error "c_pipe not implemented"
69
c_pipe = error "c_pipe not implemented"
39
false
true
0
6
12
24
11
13
null
null
HaskellCNOrg/snap-web
src/Models/Internal/Exception.hs
bsd-3-clause
showUE :: UserException -> T.Text showUE (PasswordTooShort x) = T.pack $ "Password too short, at least " ++ show x
114
showUE :: UserException -> T.Text showUE (PasswordTooShort x) = T.pack $ "Password too short, at least " ++ show x
114
showUE (PasswordTooShort x) = T.pack $ "Password too short, at least " ++ show x
80
false
true
0
9
19
44
20
24
null
null
kazu-yamamoto/http-types
Network/HTTP/Types/Header.hs
bsd-3-clause
hContentLength = "Content-Length"
35
hContentLength = "Content-Length"
35
hContentLength = "Content-Length"
35
false
false
1
5
4
10
3
7
null
null
gxtaillon/spot
src/lib/Language/SPO/Parser/PrimaryParser.hs
gpl-3.0
funcCallInternal :: PParser (T.Text, [ExprArithmetic]) funcCallInternal = do pos <- getPosition (var, expr) <- try $ do var <- identifier expr <- parens $ commaSep exprArithmetic return $ (var, expr) forceDefined pos var isFunc $ "E: unknown function `" ++ T.unpack var ++ "`" return $ (var, expr)
337
funcCallInternal :: PParser (T.Text, [ExprArithmetic]) funcCallInternal = do pos <- getPosition (var, expr) <- try $ do var <- identifier expr <- parens $ commaSep exprArithmetic return $ (var, expr) forceDefined pos var isFunc $ "E: unknown function `" ++ T.unpack var ++ "`" return $ (var, expr)
337
funcCallInternal = do pos <- getPosition (var, expr) <- try $ do var <- identifier expr <- parens $ commaSep exprArithmetic return $ (var, expr) forceDefined pos var isFunc $ "E: unknown function `" ++ T.unpack var ++ "`" return $ (var, expr)
282
false
true
0
13
87
129
62
67
null
null
telser/numerals
src-test/Text/Numeral/Language/LTZ/TestData.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Test data -------------------------------------------------------------------------------- {- Sources: http://www.languagesandnumbers.com/how-to-count-in-luxembourgish/en/ltz/ -} cardinals ∷ (Num i) ⇒ TestData i cardinals = [ ( "default" , defaultInflection , [ (0, "null") , (1, "eent") , (2, "zwee") , (3, "dräi") , (4, "véier") , (5, "fënnef") , (6, "sechs") , (7, "siwen") , (8, "aacht") , (9, "néng") , (10, "zéng") , (11, "elef") , (12, "zwielef") , (13, "dräizéng") , (14, "véierzéng") , (15, "fofzéng") , (16, "siechzéng") , (17, "siwwenzéng") , (18, "uechtzéng") , (19, "nonzéng") , (20, "zwanzeg") , (21, "eenanzwanzeg") , (22, "zweeanzwanzeg") , (23, "dräianzwanzeg") , (24, "véieranzwanzeg") , (25, "fënnefanzwanzeg") , (26, "sechsanzwanzeg") , (27, "siwenanzwanzeg") , (28, "aachtanzwanzeg") , (29, "nénganzwanzeg") , (30, "drësseg") , (31, "eenandrësseg") , (32, "zweeandrësseg") , (33, "dräiandrësseg") , (34, "véierandrësseg") , (35, "fënnefandrësseg") , (36, "sechsandrësseg") , (37, "siwenandrësseg") , (38, "aachtandrësseg") , (39, "néngandrësseg") , (40, "véierzeg") , (41, "eenanvéierzeg") , (42, "zweeanvéierzeg") , (43, "dräianvéierzeg") , (44, "véieranvéierzeg") , (45, "fënnefanvéierzeg") , (46, "sechsanvéierzeg") , (47, "siwenanvéierzeg") , (48, "aachtanvéierzeg") , (49, "nénganvéierzeg") , (50, "fofzeg") , (51, "eenanfofzeg") , (52, "zweeanfofzeg") , (53, "dräianfofzeg") , (54, "véieranfofzeg") , (55, "fënnefanfofzeg") , (56, "sechsanfofzeg") , (57, "siwenanfofzeg") , (58, "aachtanfofzeg") , (59, "nénganfofzeg") , (60, "sechzeg") , (61, "eenansechzeg") , (62, "zweeansechzeg") , (63, "dräiansechzeg") , (64, "véieransechzeg") , (65, "fënnefansechzeg") , (66, "sechsansechzeg") , (67, "siwenansechzeg") , (68, "aachtansechzeg") , (69, "néngansechzeg") , (70, "siwwenzeg") , (71, "eenansiwwenzeg") , (72, "zweeansiwwenzeg") , (73, "dräiansiwwenzeg") , (74, "véieransiwwenzeg") , (75, "fënnefansiwwenzeg") , (76, "sechsansiwwenzeg") , (77, "siwenansiwwenzeg") , (78, "aachtansiwwenzeg") , (79, "néngansiwwenzeg") , (80, "achtzeg") , (81, "eenanachtzeg") , (82, "zweeanachtzeg") , (83, "dräianachtzeg") , (84, "véieranachtzeg") , (85, "fënnefanachtzeg") , (86, "sechsanachtzeg") , (87, "siwenanachtzeg") , (88, "aachtanachtzeg") , (89, "nénganachtzeg") , (90, "nonzeg") , (91, "eenannonzeg") , (92, "zweeannonzeg") , (93, "dräiannonzeg") , (94, "véierannonzeg") , (95, "fënnefannonzeg") , (96, "sechsannonzeg") , (97, "siwenannonzeg") , (98, "aachtannonzeg") , (99, "néngannonzeg") , (100, "honnert") , (101, "honnerteent") , (102, "honnertzwee") , (103, "honnertdräi") , (104, "honnertvéier") , (105, "honnertfënnef") , (106, "honnertsechs") , (107, "honnertsiwen") , (108, "honnertaacht") , (109, "honnertnéng") , (110, "honnertzéng") , (123, "honnertdräianzwanzeg") , (200, "zweehonnert") , (300, "dräihonnert") , (321, "dräihonnerteenanzwanzeg") , (400, "véierhonnert") , (500, "fënnefhonnert") , (600, "sechshonnert") , (700, "siwenhonnert") , (800, "aachthonnert") , (900, "nénghonnert") , (909, "nénghonnertnéng") , (990, "nénghonnertnonzeg") , (999, "nénghonnertnéngannonzeg") , (1000, "dausend") , (1001, "dausendeent") , (1008, "dausendaacht") , (1234, "dausendzweehonnertvéierandrësseg") , (2000, "zweedausend") , (3000, "dräidausend") , (4000, "véierdausend") , (4321, "véierdausenddräihonnerteenanzwanzeg") , (5000, "fënnefdausend") , (6000, "sechsdausend") , (7000, "siwendausend") , (8000, "aachtdausend") , (9000, "néngdausend") , (10000, "zéngdausend") , (12345, "zwielefdausenddräihonnertfënnefanvéierzeg") , (20000, "zwanzegdausend") , (30000, "drëssegdausend") , (40000, "véierzegdausend") , (50000, "fofzegdausend") , (54321, "véieranfofzegdausenddräihonnerteenanzwanzeg") , (60000, "sechzegdausend") , (70000, "siwwenzegdausend") , (80000, "achtzegdausend") , (90000, "nonzegdausend") , (100000, "honnertdausend") , (123456, "honnertdräianzwanzegdausendvéierhonnertsechsanfofzeg") , (200000, "zweehonnertdausend") , (300000, "dräihonnertdausend") , (400000, "véierhonnertdausend") , (500000, "fënnefhonnertdausend") , (600000, "sechshonnertdausend") , (654321, "sechshonnertvéieranfofzegdausenddräihonnerteenanzwanzeg") , (700000, "siwenhonnertdausend") , (800000, "aachthonnertdausend") , (900000, "nénghonnertdausend") , (1000000, "eng Millioun") , (1000001, "eng Millioun eent") , (1234567, "eng Millioun zweehonnertvéierandrëssegdausendfënnefhonnertsiwenansechzeg") , (2000000, "zwou Milliounen") , (3000000, "dräi Milliounen") , (4000000, "véier Milliounen") , (5000000, "fënnef Milliounen") , (6000000, "sechs Milliounen") , (7000000, "siwen Milliounen") , (7654321, "siwen Milliounen sechshonnertvéieranfofzegdausenddräihonnerteenanzwanzeg") , (8000000, "aacht Milliounen") , (9000000, "néng Milliounen") , (1000000000, "eng Milliard") , (1000000001, "eng Milliard eent") , (2000000000, "zwou Milliarden") , (3000000000, "dräi Milliarden") , (4000000000, "véier Milliarden") , (5000000000, "fënnef Milliarden") , (6000000000, "sechs Milliarden") , (7000000000, "siwen Milliarden") , (8000000000, "aacht Milliarden") , (9000000000, "néng Milliarden") , (1000000000000, "eng Billion") , (1000000000001, "eng Billion eent") , (2000000000000, "zwou Billionen") , (3000000000000, "dräi Billionen") , (4000000000000, "véier Billionen") , (5000000000000, "fënnef Billionen") , (6000000000000, "sechs Billionen") , (7000000000000, "siwen Billionen") , (8000000000000, "aacht Billionen") , (9000000000000, "néng Billionen") , (1000000000000000, "eng Billiard") , (1000000000000001, "eng Billiard eent") , (2000000000000000, "zwou Billiarden") , (3000000000000000, "dräi Billiarden") , (4000000000000000, "véier Billiarden") , (5000000000000000, "fënnef Billiarden") , (6000000000000000, "sechs Billiarden") , (7000000000000000, "siwen Billiarden") , (8000000000000000, "aacht Billiarden") , (9000000000000000, "néng Billiarden") ] ) ]
7,194
cardinals ∷ (Num i) ⇒ TestData i cardinals = [ ( "default" , defaultInflection , [ (0, "null") , (1, "eent") , (2, "zwee") , (3, "dräi") , (4, "véier") , (5, "fënnef") , (6, "sechs") , (7, "siwen") , (8, "aacht") , (9, "néng") , (10, "zéng") , (11, "elef") , (12, "zwielef") , (13, "dräizéng") , (14, "véierzéng") , (15, "fofzéng") , (16, "siechzéng") , (17, "siwwenzéng") , (18, "uechtzéng") , (19, "nonzéng") , (20, "zwanzeg") , (21, "eenanzwanzeg") , (22, "zweeanzwanzeg") , (23, "dräianzwanzeg") , (24, "véieranzwanzeg") , (25, "fënnefanzwanzeg") , (26, "sechsanzwanzeg") , (27, "siwenanzwanzeg") , (28, "aachtanzwanzeg") , (29, "nénganzwanzeg") , (30, "drësseg") , (31, "eenandrësseg") , (32, "zweeandrësseg") , (33, "dräiandrësseg") , (34, "véierandrësseg") , (35, "fënnefandrësseg") , (36, "sechsandrësseg") , (37, "siwenandrësseg") , (38, "aachtandrësseg") , (39, "néngandrësseg") , (40, "véierzeg") , (41, "eenanvéierzeg") , (42, "zweeanvéierzeg") , (43, "dräianvéierzeg") , (44, "véieranvéierzeg") , (45, "fënnefanvéierzeg") , (46, "sechsanvéierzeg") , (47, "siwenanvéierzeg") , (48, "aachtanvéierzeg") , (49, "nénganvéierzeg") , (50, "fofzeg") , (51, "eenanfofzeg") , (52, "zweeanfofzeg") , (53, "dräianfofzeg") , (54, "véieranfofzeg") , (55, "fënnefanfofzeg") , (56, "sechsanfofzeg") , (57, "siwenanfofzeg") , (58, "aachtanfofzeg") , (59, "nénganfofzeg") , (60, "sechzeg") , (61, "eenansechzeg") , (62, "zweeansechzeg") , (63, "dräiansechzeg") , (64, "véieransechzeg") , (65, "fënnefansechzeg") , (66, "sechsansechzeg") , (67, "siwenansechzeg") , (68, "aachtansechzeg") , (69, "néngansechzeg") , (70, "siwwenzeg") , (71, "eenansiwwenzeg") , (72, "zweeansiwwenzeg") , (73, "dräiansiwwenzeg") , (74, "véieransiwwenzeg") , (75, "fënnefansiwwenzeg") , (76, "sechsansiwwenzeg") , (77, "siwenansiwwenzeg") , (78, "aachtansiwwenzeg") , (79, "néngansiwwenzeg") , (80, "achtzeg") , (81, "eenanachtzeg") , (82, "zweeanachtzeg") , (83, "dräianachtzeg") , (84, "véieranachtzeg") , (85, "fënnefanachtzeg") , (86, "sechsanachtzeg") , (87, "siwenanachtzeg") , (88, "aachtanachtzeg") , (89, "nénganachtzeg") , (90, "nonzeg") , (91, "eenannonzeg") , (92, "zweeannonzeg") , (93, "dräiannonzeg") , (94, "véierannonzeg") , (95, "fënnefannonzeg") , (96, "sechsannonzeg") , (97, "siwenannonzeg") , (98, "aachtannonzeg") , (99, "néngannonzeg") , (100, "honnert") , (101, "honnerteent") , (102, "honnertzwee") , (103, "honnertdräi") , (104, "honnertvéier") , (105, "honnertfënnef") , (106, "honnertsechs") , (107, "honnertsiwen") , (108, "honnertaacht") , (109, "honnertnéng") , (110, "honnertzéng") , (123, "honnertdräianzwanzeg") , (200, "zweehonnert") , (300, "dräihonnert") , (321, "dräihonnerteenanzwanzeg") , (400, "véierhonnert") , (500, "fënnefhonnert") , (600, "sechshonnert") , (700, "siwenhonnert") , (800, "aachthonnert") , (900, "nénghonnert") , (909, "nénghonnertnéng") , (990, "nénghonnertnonzeg") , (999, "nénghonnertnéngannonzeg") , (1000, "dausend") , (1001, "dausendeent") , (1008, "dausendaacht") , (1234, "dausendzweehonnertvéierandrësseg") , (2000, "zweedausend") , (3000, "dräidausend") , (4000, "véierdausend") , (4321, "véierdausenddräihonnerteenanzwanzeg") , (5000, "fënnefdausend") , (6000, "sechsdausend") , (7000, "siwendausend") , (8000, "aachtdausend") , (9000, "néngdausend") , (10000, "zéngdausend") , (12345, "zwielefdausenddräihonnertfënnefanvéierzeg") , (20000, "zwanzegdausend") , (30000, "drëssegdausend") , (40000, "véierzegdausend") , (50000, "fofzegdausend") , (54321, "véieranfofzegdausenddräihonnerteenanzwanzeg") , (60000, "sechzegdausend") , (70000, "siwwenzegdausend") , (80000, "achtzegdausend") , (90000, "nonzegdausend") , (100000, "honnertdausend") , (123456, "honnertdräianzwanzegdausendvéierhonnertsechsanfofzeg") , (200000, "zweehonnertdausend") , (300000, "dräihonnertdausend") , (400000, "véierhonnertdausend") , (500000, "fënnefhonnertdausend") , (600000, "sechshonnertdausend") , (654321, "sechshonnertvéieranfofzegdausenddräihonnerteenanzwanzeg") , (700000, "siwenhonnertdausend") , (800000, "aachthonnertdausend") , (900000, "nénghonnertdausend") , (1000000, "eng Millioun") , (1000001, "eng Millioun eent") , (1234567, "eng Millioun zweehonnertvéierandrëssegdausendfënnefhonnertsiwenansechzeg") , (2000000, "zwou Milliounen") , (3000000, "dräi Milliounen") , (4000000, "véier Milliounen") , (5000000, "fënnef Milliounen") , (6000000, "sechs Milliounen") , (7000000, "siwen Milliounen") , (7654321, "siwen Milliounen sechshonnertvéieranfofzegdausenddräihonnerteenanzwanzeg") , (8000000, "aacht Milliounen") , (9000000, "néng Milliounen") , (1000000000, "eng Milliard") , (1000000001, "eng Milliard eent") , (2000000000, "zwou Milliarden") , (3000000000, "dräi Milliarden") , (4000000000, "véier Milliarden") , (5000000000, "fënnef Milliarden") , (6000000000, "sechs Milliarden") , (7000000000, "siwen Milliarden") , (8000000000, "aacht Milliarden") , (9000000000, "néng Milliarden") , (1000000000000, "eng Billion") , (1000000000001, "eng Billion eent") , (2000000000000, "zwou Billionen") , (3000000000000, "dräi Billionen") , (4000000000000, "véier Billionen") , (5000000000000, "fënnef Billionen") , (6000000000000, "sechs Billionen") , (7000000000000, "siwen Billionen") , (8000000000000, "aacht Billionen") , (9000000000000, "néng Billionen") , (1000000000000000, "eng Billiard") , (1000000000000001, "eng Billiard eent") , (2000000000000000, "zwou Billiarden") , (3000000000000000, "dräi Billiarden") , (4000000000000000, "véier Billiarden") , (5000000000000000, "fënnef Billiarden") , (6000000000000000, "sechs Billiarden") , (7000000000000000, "siwen Billiarden") , (8000000000000000, "aacht Billiarden") , (9000000000000000, "néng Billiarden") ] ) ]
6,927
cardinals = [ ( "default" , defaultInflection , [ (0, "null") , (1, "eent") , (2, "zwee") , (3, "dräi") , (4, "véier") , (5, "fënnef") , (6, "sechs") , (7, "siwen") , (8, "aacht") , (9, "néng") , (10, "zéng") , (11, "elef") , (12, "zwielef") , (13, "dräizéng") , (14, "véierzéng") , (15, "fofzéng") , (16, "siechzéng") , (17, "siwwenzéng") , (18, "uechtzéng") , (19, "nonzéng") , (20, "zwanzeg") , (21, "eenanzwanzeg") , (22, "zweeanzwanzeg") , (23, "dräianzwanzeg") , (24, "véieranzwanzeg") , (25, "fënnefanzwanzeg") , (26, "sechsanzwanzeg") , (27, "siwenanzwanzeg") , (28, "aachtanzwanzeg") , (29, "nénganzwanzeg") , (30, "drësseg") , (31, "eenandrësseg") , (32, "zweeandrësseg") , (33, "dräiandrësseg") , (34, "véierandrësseg") , (35, "fënnefandrësseg") , (36, "sechsandrësseg") , (37, "siwenandrësseg") , (38, "aachtandrësseg") , (39, "néngandrësseg") , (40, "véierzeg") , (41, "eenanvéierzeg") , (42, "zweeanvéierzeg") , (43, "dräianvéierzeg") , (44, "véieranvéierzeg") , (45, "fënnefanvéierzeg") , (46, "sechsanvéierzeg") , (47, "siwenanvéierzeg") , (48, "aachtanvéierzeg") , (49, "nénganvéierzeg") , (50, "fofzeg") , (51, "eenanfofzeg") , (52, "zweeanfofzeg") , (53, "dräianfofzeg") , (54, "véieranfofzeg") , (55, "fënnefanfofzeg") , (56, "sechsanfofzeg") , (57, "siwenanfofzeg") , (58, "aachtanfofzeg") , (59, "nénganfofzeg") , (60, "sechzeg") , (61, "eenansechzeg") , (62, "zweeansechzeg") , (63, "dräiansechzeg") , (64, "véieransechzeg") , (65, "fënnefansechzeg") , (66, "sechsansechzeg") , (67, "siwenansechzeg") , (68, "aachtansechzeg") , (69, "néngansechzeg") , (70, "siwwenzeg") , (71, "eenansiwwenzeg") , (72, "zweeansiwwenzeg") , (73, "dräiansiwwenzeg") , (74, "véieransiwwenzeg") , (75, "fënnefansiwwenzeg") , (76, "sechsansiwwenzeg") , (77, "siwenansiwwenzeg") , (78, "aachtansiwwenzeg") , (79, "néngansiwwenzeg") , (80, "achtzeg") , (81, "eenanachtzeg") , (82, "zweeanachtzeg") , (83, "dräianachtzeg") , (84, "véieranachtzeg") , (85, "fënnefanachtzeg") , (86, "sechsanachtzeg") , (87, "siwenanachtzeg") , (88, "aachtanachtzeg") , (89, "nénganachtzeg") , (90, "nonzeg") , (91, "eenannonzeg") , (92, "zweeannonzeg") , (93, "dräiannonzeg") , (94, "véierannonzeg") , (95, "fënnefannonzeg") , (96, "sechsannonzeg") , (97, "siwenannonzeg") , (98, "aachtannonzeg") , (99, "néngannonzeg") , (100, "honnert") , (101, "honnerteent") , (102, "honnertzwee") , (103, "honnertdräi") , (104, "honnertvéier") , (105, "honnertfënnef") , (106, "honnertsechs") , (107, "honnertsiwen") , (108, "honnertaacht") , (109, "honnertnéng") , (110, "honnertzéng") , (123, "honnertdräianzwanzeg") , (200, "zweehonnert") , (300, "dräihonnert") , (321, "dräihonnerteenanzwanzeg") , (400, "véierhonnert") , (500, "fënnefhonnert") , (600, "sechshonnert") , (700, "siwenhonnert") , (800, "aachthonnert") , (900, "nénghonnert") , (909, "nénghonnertnéng") , (990, "nénghonnertnonzeg") , (999, "nénghonnertnéngannonzeg") , (1000, "dausend") , (1001, "dausendeent") , (1008, "dausendaacht") , (1234, "dausendzweehonnertvéierandrësseg") , (2000, "zweedausend") , (3000, "dräidausend") , (4000, "véierdausend") , (4321, "véierdausenddräihonnerteenanzwanzeg") , (5000, "fënnefdausend") , (6000, "sechsdausend") , (7000, "siwendausend") , (8000, "aachtdausend") , (9000, "néngdausend") , (10000, "zéngdausend") , (12345, "zwielefdausenddräihonnertfënnefanvéierzeg") , (20000, "zwanzegdausend") , (30000, "drëssegdausend") , (40000, "véierzegdausend") , (50000, "fofzegdausend") , (54321, "véieranfofzegdausenddräihonnerteenanzwanzeg") , (60000, "sechzegdausend") , (70000, "siwwenzegdausend") , (80000, "achtzegdausend") , (90000, "nonzegdausend") , (100000, "honnertdausend") , (123456, "honnertdräianzwanzegdausendvéierhonnertsechsanfofzeg") , (200000, "zweehonnertdausend") , (300000, "dräihonnertdausend") , (400000, "véierhonnertdausend") , (500000, "fënnefhonnertdausend") , (600000, "sechshonnertdausend") , (654321, "sechshonnertvéieranfofzegdausenddräihonnerteenanzwanzeg") , (700000, "siwenhonnertdausend") , (800000, "aachthonnertdausend") , (900000, "nénghonnertdausend") , (1000000, "eng Millioun") , (1000001, "eng Millioun eent") , (1234567, "eng Millioun zweehonnertvéierandrëssegdausendfënnefhonnertsiwenansechzeg") , (2000000, "zwou Milliounen") , (3000000, "dräi Milliounen") , (4000000, "véier Milliounen") , (5000000, "fënnef Milliounen") , (6000000, "sechs Milliounen") , (7000000, "siwen Milliounen") , (7654321, "siwen Milliounen sechshonnertvéieranfofzegdausenddräihonnerteenanzwanzeg") , (8000000, "aacht Milliounen") , (9000000, "néng Milliounen") , (1000000000, "eng Milliard") , (1000000001, "eng Milliard eent") , (2000000000, "zwou Milliarden") , (3000000000, "dräi Milliarden") , (4000000000, "véier Milliarden") , (5000000000, "fënnef Milliarden") , (6000000000, "sechs Milliarden") , (7000000000, "siwen Milliarden") , (8000000000, "aacht Milliarden") , (9000000000, "néng Milliarden") , (1000000000000, "eng Billion") , (1000000000001, "eng Billion eent") , (2000000000000, "zwou Billionen") , (3000000000000, "dräi Billionen") , (4000000000000, "véier Billionen") , (5000000000000, "fënnef Billionen") , (6000000000000, "sechs Billionen") , (7000000000000, "siwen Billionen") , (8000000000000, "aacht Billionen") , (9000000000000, "néng Billionen") , (1000000000000000, "eng Billiard") , (1000000000000001, "eng Billiard eent") , (2000000000000000, "zwou Billiarden") , (3000000000000000, "dräi Billiarden") , (4000000000000000, "véier Billiarden") , (5000000000000000, "fënnef Billiarden") , (6000000000000000, "sechs Billiarden") , (7000000000000000, "siwen Billiarden") , (8000000000000000, "aacht Billiarden") , (9000000000000000, "néng Billiarden") ] ) ]
6,894
true
true
0
8
1,903
1,848
1,230
618
null
null
jabaraster/jabara-yesod-util
src/Jabara/Yesod/Util.hs
mit
tc :: ToJSON a => a -> Content tc = toContent . encode
54
tc :: ToJSON a => a -> Content tc = toContent . encode
54
tc = toContent . encode
23
false
true
0
8
12
33
14
19
null
null
rel-eng/jdec
src/JDec/Class/Transform/Resolve.hs
bsd-3-clause
resolveInterfaceMethodNameAndType :: M.Map ConstantPoolIndex ConstantPoolEntry -- ^ Constant pool -> ConstantPoolIndex -- ^ Index -> ResultT [String] InterfaceMethodNameAndType -- ^ Interface method name and type or error list resolveInterfaceMethodNameAndType pool idx = case M.lookup idx pool of Just x -> case x of NameAndTypeConstantPoolEntry nameIdx descriptorIdx -> InterfaceMethodNameAndType <$> resolveUTF8Constant pool nameIdx <*> resolveUTF8Constant pool descriptorIdx _ -> Incorrect [ "The pool entry at the index " ++ (prettyPrint idx) ++ " is not a name and type entry" ] Nothing -> Incorrect [ "The index " ++ (prettyPrint idx) ++ " is not in the constant pool" ] -- | Get field ref from constant pool by index
761
resolveInterfaceMethodNameAndType :: M.Map ConstantPoolIndex ConstantPoolEntry -- ^ Constant pool -> ConstantPoolIndex -- ^ Index -> ResultT [String] InterfaceMethodNameAndType resolveInterfaceMethodNameAndType pool idx = case M.lookup idx pool of Just x -> case x of NameAndTypeConstantPoolEntry nameIdx descriptorIdx -> InterfaceMethodNameAndType <$> resolveUTF8Constant pool nameIdx <*> resolveUTF8Constant pool descriptorIdx _ -> Incorrect [ "The pool entry at the index " ++ (prettyPrint idx) ++ " is not a name and type entry" ] Nothing -> Incorrect [ "The index " ++ (prettyPrint idx) ++ " is not in the constant pool" ] -- | Get field ref from constant pool by index
711
resolveInterfaceMethodNameAndType pool idx = case M.lookup idx pool of Just x -> case x of NameAndTypeConstantPoolEntry nameIdx descriptorIdx -> InterfaceMethodNameAndType <$> resolveUTF8Constant pool nameIdx <*> resolveUTF8Constant pool descriptorIdx _ -> Incorrect [ "The pool entry at the index " ++ (prettyPrint idx) ++ " is not a name and type entry" ] Nothing -> Incorrect [ "The index " ++ (prettyPrint idx) ++ " is not in the constant pool" ] -- | Get field ref from constant pool by index
530
true
true
0
16
145
149
73
76
null
null
coghex/abridgefaraway
src/GLUtil/Font.hs
bsd-3-clause
findLetter DCFONT 'A' = (32, 8)
33
findLetter DCFONT 'A' = (32, 8)
33
findLetter DCFONT 'A' = (32, 8)
33
false
false
0
5
7
19
9
10
null
null
ozataman/si18n
test/test.hs
bsd-3-clause
i18n :: IO I18nData i18n = loadI18nFile "test/en.csv"
53
i18n :: IO I18nData i18n = loadI18nFile "test/en.csv"
53
i18n = loadI18nFile "test/en.csv"
33
false
true
0
5
7
17
8
9
null
null
kubkon/gnuplot
src/Graphics/Gnuplot/MultiPlot/Insets.hs
bsd-3-clause
title :: String -> T -> T title str mp = mp {title_ = Just str}
67
title :: String -> T -> T title str mp = mp {title_ = Just str}
67
title str mp = mp {title_ = Just str}
41
false
true
0
8
19
44
20
24
null
null
mmailhot/Dumblisp
Dumblisp/Types.hs
mit
showVal (List contents) = "(" ++ unwordsList contents ++ ")"
60
showVal (List contents) = "(" ++ unwordsList contents ++ ")"
60
showVal (List contents) = "(" ++ unwordsList contents ++ ")"
60
false
false
0
7
9
26
12
14
null
null
FunctionalThinking/ninety-nine
src/Exercises.hs
mit
hValue (HBranch _ n _) = n
26
hValue (HBranch _ n _) = n
26
hValue (HBranch _ n _) = n
26
false
false
0
6
6
20
9
11
null
null
da-x/buildsome
src/Lib/Makefile/Parser.hs
gpl-2.0
horizSpaces1 :: Monad m => ParserG u m () horizSpaces1 = P.skipMany1 horizSpace
79
horizSpaces1 :: Monad m => ParserG u m () horizSpaces1 = P.skipMany1 horizSpace
79
horizSpaces1 = P.skipMany1 horizSpace
37
false
true
0
7
12
32
15
17
null
null
mcschroeder/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc ppr_tySyn maybeInst t argsDoc rhs = text "type" <+> maybeInst <+> ppr t <+> argsDoc <+> text "=" <+> ppr rhs
157
ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc ppr_tySyn maybeInst t argsDoc rhs = text "type" <+> maybeInst <+> ppr t <+> argsDoc <+> text "=" <+> ppr rhs
157
ppr_tySyn maybeInst t argsDoc rhs = text "type" <+> maybeInst <+> ppr t <+> argsDoc <+> text "=" <+> ppr rhs
110
false
true
0
10
33
68
32
36
null
null
tphyahoo/haskoin
haskoin-core/Network/Haskoin/Constants.hs
unlicense
-- | Use this if you want to change constants to something other than Testnet3. networkRef :: IORef Network networkRef = unsafePerformIO $ newIORef prodnet
155
networkRef :: IORef Network networkRef = unsafePerformIO $ newIORef prodnet
75
networkRef = unsafePerformIO $ newIORef prodnet
47
true
true
0
6
24
27
12
15
null
null
olsner/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
zapTCvSubst :: TCvSubst -> TCvSubst zapTCvSubst (TCvSubst in_scope _ _) = TCvSubst in_scope emptyVarEnv emptyVarEnv
115
zapTCvSubst :: TCvSubst -> TCvSubst zapTCvSubst (TCvSubst in_scope _ _) = TCvSubst in_scope emptyVarEnv emptyVarEnv
115
zapTCvSubst (TCvSubst in_scope _ _) = TCvSubst in_scope emptyVarEnv emptyVarEnv
79
false
true
0
7
14
35
17
18
null
null
jasonzoladz/persistent
persistent-postgresql/Database/Persist/Postgresql.hs
mit
refName :: DBName -> DBName -> DBName refName (DBName table) (DBName column) = DBName $ T.concat [table, "_", column, "_fkey"]
130
refName :: DBName -> DBName -> DBName refName (DBName table) (DBName column) = DBName $ T.concat [table, "_", column, "_fkey"]
130
refName (DBName table) (DBName column) = DBName $ T.concat [table, "_", column, "_fkey"]
92
false
true
2
10
23
63
31
32
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
consPatP = mkConsPat <$> locLowerIdP <*> colon <*> locLowerIdP
63
consPatP = mkConsPat <$> locLowerIdP <*> colon <*> locLowerIdP
63
consPatP = mkConsPat <$> locLowerIdP <*> colon <*> locLowerIdP
63
false
false
0
7
9
18
9
9
null
null
leepike/copilot-core
src/Copilot/Core/Random/Gen.hs
bsd-3-clause
elements :: [a] -> Gen a elements [] = impossible "elements" "copilot-core"
75
elements :: [a] -> Gen a elements [] = impossible "elements" "copilot-core"
75
elements [] = impossible "elements" "copilot-core"
50
false
true
0
6
11
31
15
16
null
null
ucla-pls/wiretap-tools
src/Wiretap/Analysis/HBL/Z3.hs
gpl-3.0
mkLIASolver :: Integer -> (UE -> HBL UE UE) -> IO (Z3HBLSolver UE UE) mkLIASolver timeout f = do events <- newIORef IM.empty vars <- newIORef IM.empty return $ Z3HBLSolver { z3sToAST = fromAtom events vars , z3sLogic = Just Z3.QF_LIA , z3sTimeout = timeout } where fromAtom eref vref env at = case at of Order a b -> do a' <- evar a b' <- evar b Base.mkLt ctx a' b' Concur a b -> do a' <- evar a b' <- evar b Base.mkEq ctx a' b' Symbol s -> svar s where ctx = envContext env slv = envSolver env evar = remember eref $ \_ -> do Base.mkFreshRealVar ctx "O" svar :: UE -> IO AST svar = remember' vref $ \ue -> do let hbl = (f ue) symbol <- Base.mkFreshBoolVar ctx "S" return ( symbol , do ast <- toZ3 ctx (fromAtom eref vref env) hbl imp <- Base.mkImplies ctx symbol ast Base.solverAssertCnstr ctx slv imp return () )
1,163
mkLIASolver :: Integer -> (UE -> HBL UE UE) -> IO (Z3HBLSolver UE UE) mkLIASolver timeout f = do events <- newIORef IM.empty vars <- newIORef IM.empty return $ Z3HBLSolver { z3sToAST = fromAtom events vars , z3sLogic = Just Z3.QF_LIA , z3sTimeout = timeout } where fromAtom eref vref env at = case at of Order a b -> do a' <- evar a b' <- evar b Base.mkLt ctx a' b' Concur a b -> do a' <- evar a b' <- evar b Base.mkEq ctx a' b' Symbol s -> svar s where ctx = envContext env slv = envSolver env evar = remember eref $ \_ -> do Base.mkFreshRealVar ctx "O" svar :: UE -> IO AST svar = remember' vref $ \ue -> do let hbl = (f ue) symbol <- Base.mkFreshBoolVar ctx "S" return ( symbol , do ast <- toZ3 ctx (fromAtom eref vref env) hbl imp <- Base.mkImplies ctx symbol ast Base.solverAssertCnstr ctx slv imp return () )
1,163
mkLIASolver timeout f = do events <- newIORef IM.empty vars <- newIORef IM.empty return $ Z3HBLSolver { z3sToAST = fromAtom events vars , z3sLogic = Just Z3.QF_LIA , z3sTimeout = timeout } where fromAtom eref vref env at = case at of Order a b -> do a' <- evar a b' <- evar b Base.mkLt ctx a' b' Concur a b -> do a' <- evar a b' <- evar b Base.mkEq ctx a' b' Symbol s -> svar s where ctx = envContext env slv = envSolver env evar = remember eref $ \_ -> do Base.mkFreshRealVar ctx "O" svar :: UE -> IO AST svar = remember' vref $ \ue -> do let hbl = (f ue) symbol <- Base.mkFreshBoolVar ctx "S" return ( symbol , do ast <- toZ3 ctx (fromAtom eref vref env) hbl imp <- Base.mkImplies ctx symbol ast Base.solverAssertCnstr ctx slv imp return () )
1,093
false
true
0
18
514
401
186
215
null
null
bitemyapp/lackey
library/Lackey/Internal/PathSegment.hs
mit
isPathMatrix :: PathSegment -> Bool isPathMatrix (PathMatrix _) = True
70
isPathMatrix :: PathSegment -> Bool isPathMatrix (PathMatrix _) = True
70
isPathMatrix (PathMatrix _) = True
34
false
true
0
7
9
24
12
12
null
null
mightymoose/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector/Mutable.hs
bsd-3-clause
unsafeInit = G.unsafeInit
25
unsafeInit = G.unsafeInit
25
unsafeInit = G.unsafeInit
25
false
false
0
5
2
8
4
4
null
null
include4eto/fractal-generation
test.hs
gpl-3.0
ico = do x <- pesho 10 putStrLn $ gosho x
61
ico = do x <- pesho 10 putStrLn $ gosho x
61
ico = do x <- pesho 10 putStrLn $ gosho x
61
false
false
1
9
30
30
11
19
null
null
adz/real_world_haskell
edx-fp1/lab3.hs
mit
-- =================================== -- Ex. 3 - 4 -- =================================== -- complete the following line with the correct type signature for this function squares :: Integer -> [Integer] squares n = [x * x | x <- [ 1..n ]]
241
squares :: Integer -> [Integer] squares n = [x * x | x <- [ 1..n ]]
67
squares n = [x * x | x <- [ 1..n ]]
35
true
true
0
9
40
51
27
24
null
null
csabahruska/quake3
game/Monads.hs
bsd-3-clause
addVisuals :: MonadWriter Collected_Objects m => [Visual] -> m () addVisuals visuals = tell ([], visuals, [])
109
addVisuals :: MonadWriter Collected_Objects m => [Visual] -> m () addVisuals visuals = tell ([], visuals, [])
109
addVisuals visuals = tell ([], visuals, [])
43
false
true
0
8
16
51
26
25
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/Command.hs
gpl-3.0
liftOptDescr :: (b -> a) -> (a -> (b -> b)) -> OptDescr a -> OptDescr b liftOptDescr get' set' (ChoiceOpt opts) = ChoiceOpt [ (d, ff, liftSet get' set' set , (get . get')) | (d, ff, set, get) <- opts]
218
liftOptDescr :: (b -> a) -> (a -> (b -> b)) -> OptDescr a -> OptDescr b liftOptDescr get' set' (ChoiceOpt opts) = ChoiceOpt [ (d, ff, liftSet get' set' set , (get . get')) | (d, ff, set, get) <- opts]
218
liftOptDescr get' set' (ChoiceOpt opts) = ChoiceOpt [ (d, ff, liftSet get' set' set , (get . get')) | (d, ff, set, get) <- opts]
146
false
true
0
10
59
115
62
53
null
null
dmuneras/LambdaMethods
src/FuncionesInterfaz.hs
gpl-2.0
textpparcial = "Este método es una variante de la Eliminación Gaussiana,\n" ++ "por lo que también trabaja con la matriz aumentada. El Pivoteo\n" ++ "Parcial surge como respuesta al error de redondeo (propagación)\n" ++ "que es característico en la Eliminación Gaussiana debido a la gran\n " ++ "cantidad de operaciones requeridas para obtener un resultado. Para\n" ++ "disminuir este error se pretende hacer los\n denominadores de los\n"++ "multiplicadores (Es decir, los elementos de la diagonal) lo más grande\n" ++ "posible para que al hallar los multiplicadores sean menores o iguales a 1\n" ++ "y garantizar que al despejar no se tengan divisiones por cero o cercanas a\n " ++ "cero. Esto se logra buscando el mayor elemento de columna k, en la etapa k,\n" ++ "y mover la fila que lo contenga hacia la fila pivote, esto" ++ "es llamado\n pivoteo parcial."
1,291
textpparcial = "Este método es una variante de la Eliminación Gaussiana,\n" ++ "por lo que también trabaja con la matriz aumentada. El Pivoteo\n" ++ "Parcial surge como respuesta al error de redondeo (propagación)\n" ++ "que es característico en la Eliminación Gaussiana debido a la gran\n " ++ "cantidad de operaciones requeridas para obtener un resultado. Para\n" ++ "disminuir este error se pretende hacer los\n denominadores de los\n"++ "multiplicadores (Es decir, los elementos de la diagonal) lo más grande\n" ++ "posible para que al hallar los multiplicadores sean menores o iguales a 1\n" ++ "y garantizar que al despejar no se tengan divisiones por cero o cercanas a\n " ++ "cero. Esto se logra buscando el mayor elemento de columna k, en la etapa k,\n" ++ "y mover la fila que lo contenga hacia la fila pivote, esto" ++ "es llamado\n pivoteo parcial."
1,291
textpparcial = "Este método es una variante de la Eliminación Gaussiana,\n" ++ "por lo que también trabaja con la matriz aumentada. El Pivoteo\n" ++ "Parcial surge como respuesta al error de redondeo (propagación)\n" ++ "que es característico en la Eliminación Gaussiana debido a la gran\n " ++ "cantidad de operaciones requeridas para obtener un resultado. Para\n" ++ "disminuir este error se pretende hacer los\n denominadores de los\n"++ "multiplicadores (Es decir, los elementos de la diagonal) lo más grande\n" ++ "posible para que al hallar los multiplicadores sean menores o iguales a 1\n" ++ "y garantizar que al despejar no se tengan divisiones por cero o cercanas a\n " ++ "cero. Esto se logra buscando el mayor elemento de columna k, en la etapa k,\n" ++ "y mover la fila que lo contenga hacia la fila pivote, esto" ++ "es llamado\n pivoteo parcial."
1,291
false
false
1
15
571
54
25
29
null
null
afcowie/pipes-http
tests/VersionsBenchmark.hs
bsd-3-clause
main :: IO () main = do GHC.Conc.setNumCapabilities 4 x' <- S.readFile "tests/example2.txt" defaultMain [bench "baseline" (Baseline.series x'), bench "experiment" (Current.series x')] putStrLn "Complete."
238
main :: IO () main = do GHC.Conc.setNumCapabilities 4 x' <- S.readFile "tests/example2.txt" defaultMain [bench "baseline" (Baseline.series x'), bench "experiment" (Current.series x')] putStrLn "Complete."
238
main = do GHC.Conc.setNumCapabilities 4 x' <- S.readFile "tests/example2.txt" defaultMain [bench "baseline" (Baseline.series x'), bench "experiment" (Current.series x')] putStrLn "Complete."
224
false
true
0
12
57
81
37
44
null
null
twittner/redis-io
src/Database/Redis/IO/Client.hs
mpl-2.0
-- | Just like 'getLazy', but executes the 'Connection' buffer in a Redis -- transaction. getTransaction :: Connection -> Resp -> (Resp -> Result a) -> IO (a, IO ()) getTransaction h x g = do r <- newIORef (throw $ RedisError "missing response") C.request x r h a <- unsafeInterleaveIO $ do C.transaction h either throwIO return =<< g <$> readIORef r return (a, a `seq` return ())
413
getTransaction :: Connection -> Resp -> (Resp -> Result a) -> IO (a, IO ()) getTransaction h x g = do r <- newIORef (throw $ RedisError "missing response") C.request x r h a <- unsafeInterleaveIO $ do C.transaction h either throwIO return =<< g <$> readIORef r return (a, a `seq` return ())
323
getTransaction h x g = do r <- newIORef (throw $ RedisError "missing response") C.request x r h a <- unsafeInterleaveIO $ do C.transaction h either throwIO return =<< g <$> readIORef r return (a, a `seq` return ())
247
true
true
0
13
101
154
72
82
null
null
headprogrammingczar/cabal
Cabal/Distribution/Simple/PreProcess.hs
bsd-3-clause
-- |Standard preprocessors with possible extra C sources: c2hs, hsc2hs. knownExtrasHandlers :: [ PreProcessorExtras ] knownExtrasHandlers = [ ppC2hsExtras, ppHsc2hsExtras ]
172
knownExtrasHandlers :: [ PreProcessorExtras ] knownExtrasHandlers = [ ppC2hsExtras, ppHsc2hsExtras ]
100
knownExtrasHandlers = [ ppC2hsExtras, ppHsc2hsExtras ]
54
true
true
0
5
20
21
13
8
null
null
Athas/afterburner-pascal
src/Afterburner/Parser.hs
mit
actuals :: Parser [Expression] actuals = parens (expression `sepBy1` comma) <|> pure []
87
actuals :: Parser [Expression] actuals = parens (expression `sepBy1` comma) <|> pure []
87
actuals = parens (expression `sepBy1` comma) <|> pure []
56
false
true
0
7
12
43
21
22
null
null
stu-smith/rendering-in-haskell
src/experiment08/Material.hs
mit
sumBrdfs :: [BRDF] -> BRDF sumBrdfs !brdfs incomingLight incomingVector outgoingVector surfaceNormal wp = sumLights $ map apply brdfs where apply f = f incomingLight incomingVector outgoingVector surfaceNormal wp
222
sumBrdfs :: [BRDF] -> BRDF sumBrdfs !brdfs incomingLight incomingVector outgoingVector surfaceNormal wp = sumLights $ map apply brdfs where apply f = f incomingLight incomingVector outgoingVector surfaceNormal wp
222
sumBrdfs !brdfs incomingLight incomingVector outgoingVector surfaceNormal wp = sumLights $ map apply brdfs where apply f = f incomingLight incomingVector outgoingVector surfaceNormal wp
195
false
true
0
6
37
63
30
33
null
null
wujf/yesod
yesod-bin/Build.hs
mit
isNewerThan :: FilePath -> FilePath -> IO Bool isNewerThan f1 f2 = do (_, mod1) <- getFileStatus' f1 (_, mod2) <- getFileStatus' f2 return (mod1 > mod2)
158
isNewerThan :: FilePath -> FilePath -> IO Bool isNewerThan f1 f2 = do (_, mod1) <- getFileStatus' f1 (_, mod2) <- getFileStatus' f2 return (mod1 > mod2)
158
isNewerThan f1 f2 = do (_, mod1) <- getFileStatus' f1 (_, mod2) <- getFileStatus' f2 return (mod1 > mod2)
111
false
true
0
10
32
77
36
41
null
null
rudymatela/leancheck
src/Test/LeanCheck/Utils/TypeBinding.hs
bsd-3-clause
-- | Deprecated. Use 'word4'. uint4 :: UInt4 uint4 = undefinedOf "uint4"
73
uint4 :: UInt4 uint4 = undefinedOf "uint4"
42
uint4 = undefinedOf "uint4"
27
true
true
0
5
12
15
8
7
null
null
Purview/purview
src/Graphics/Forensics/Algorithms/Interpolate.hs
gpl-3.0
interpolate2D :: forall e. RealFrac e => Source r1 e => DIM2 -> Array r1 DIM2 e -> Array D DIM2 e interpolate2D newSh !array = Repa.traverse array (const newSh) traverseFunc where (Z :. x :. y) = extent array (Z :. x' :. y') = newSh sx :: e = (realToFrac x) / (realToFrac x') sy :: e = (realToFrac y) / (realToFrac y') {-# INLINE traverseFunc #-} traverseFunc :: (DIM2 -> e) -> DIM2 -> e traverseFunc get (Z :. ix :. iy) = (1 - frac_y) * ((1 - frac_x) * p1 + frac_x * p2) + frac_y * ((1 - frac_x) * p3 + frac_x * p4) where fx :: Int = floor $ sx * (realToFrac ix) fy :: Int = floor $ sy * (realToFrac iy) cx :: Int = if (fx + 1 >= x) then fx else fx + 1 cy :: Int = if (fy + 1 >= y) then fy else fy + 1 frac_x :: e = (realToFrac x * realToFrac sx) - realToFrac fx frac_y :: e = (realToFrac y * realToFrac sy) - realToFrac fy p1 = get (Z :. fx :. fy) p2 = get (Z :. cx :. fy) p3 = get (Z :. fx :. cy) p4 = get (Z :. cx :. cy)
1,072
interpolate2D :: forall e. RealFrac e => Source r1 e => DIM2 -> Array r1 DIM2 e -> Array D DIM2 e interpolate2D newSh !array = Repa.traverse array (const newSh) traverseFunc where (Z :. x :. y) = extent array (Z :. x' :. y') = newSh sx :: e = (realToFrac x) / (realToFrac x') sy :: e = (realToFrac y) / (realToFrac y') {-# INLINE traverseFunc #-} traverseFunc :: (DIM2 -> e) -> DIM2 -> e traverseFunc get (Z :. ix :. iy) = (1 - frac_y) * ((1 - frac_x) * p1 + frac_x * p2) + frac_y * ((1 - frac_x) * p3 + frac_x * p4) where fx :: Int = floor $ sx * (realToFrac ix) fy :: Int = floor $ sy * (realToFrac iy) cx :: Int = if (fx + 1 >= x) then fx else fx + 1 cy :: Int = if (fy + 1 >= y) then fy else fy + 1 frac_x :: e = (realToFrac x * realToFrac sx) - realToFrac fx frac_y :: e = (realToFrac y * realToFrac sy) - realToFrac fy p1 = get (Z :. fx :. fy) p2 = get (Z :. cx :. fy) p3 = get (Z :. fx :. cy) p4 = get (Z :. cx :. cy)
1,072
interpolate2D newSh !array = Repa.traverse array (const newSh) traverseFunc where (Z :. x :. y) = extent array (Z :. x' :. y') = newSh sx :: e = (realToFrac x) / (realToFrac x') sy :: e = (realToFrac y) / (realToFrac y') {-# INLINE traverseFunc #-} traverseFunc :: (DIM2 -> e) -> DIM2 -> e traverseFunc get (Z :. ix :. iy) = (1 - frac_y) * ((1 - frac_x) * p1 + frac_x * p2) + frac_y * ((1 - frac_x) * p3 + frac_x * p4) where fx :: Int = floor $ sx * (realToFrac ix) fy :: Int = floor $ sy * (realToFrac iy) cx :: Int = if (fx + 1 >= x) then fx else fx + 1 cy :: Int = if (fy + 1 >= y) then fy else fy + 1 frac_x :: e = (realToFrac x * realToFrac sx) - realToFrac fx frac_y :: e = (realToFrac y * realToFrac sy) - realToFrac fy p1 = get (Z :. fx :. fy) p2 = get (Z :. cx :. fy) p3 = get (Z :. fx :. cy) p4 = get (Z :. cx :. cy)
957
false
true
0
13
367
524
267
257
null
null
gianlucagiorgolo/lambek-monad
LatexMain.hs
mit
nubByShortest :: Eq a => (a -> Int) -> (a -> a -> Bool) -> [a] -> [a] nubByShortest len eq l = aux l [] where aux [] acc = acc aux (a : as) acc = case find (eq a) acc of Nothing -> aux as (a : acc) Just a' -> case len a < len a' of False -> aux as acc True -> aux as (a : delete a' acc)
418
nubByShortest :: Eq a => (a -> Int) -> (a -> a -> Bool) -> [a] -> [a] nubByShortest len eq l = aux l [] where aux [] acc = acc aux (a : as) acc = case find (eq a) acc of Nothing -> aux as (a : acc) Just a' -> case len a < len a' of False -> aux as acc True -> aux as (a : delete a' acc)
418
nubByShortest len eq l = aux l [] where aux [] acc = acc aux (a : as) acc = case find (eq a) acc of Nothing -> aux as (a : acc) Just a' -> case len a < len a' of False -> aux as acc True -> aux as (a : delete a' acc)
297
false
true
0
16
206
189
93
96
null
null
ghorn/conceptual-design
Atmosphere/Atmosphere.hs
bsd-3-clause
-- mult deg K to get deg R _PSF2NSM = 47.880258
47
_PSF2NSM = 47.880258
20
_PSF2NSM = 47.880258
20
true
false
0
4
10
7
4
3
null
null
amccausl/Swish
Swish/HaskellRDF/VarBindingTest.hs
lgpl-2.1
-- 3 jcompce = findComposition [vbm3,vbm4,vbm9] ["c","e"]
58
jcompce = findComposition [vbm3,vbm4,vbm9] ["c","e"]
52
jcompce = findComposition [vbm3,vbm4,vbm9] ["c","e"]
52
true
false
0
6
7
27
16
11
null
null
seereason/process-extras
src/System/Process/Run.hs
mit
lazy :: RunM text char m => m () lazy = modify (\x -> x { _lazy = True})
72
lazy :: RunM text char m => m () lazy = modify (\x -> x { _lazy = True})
72
lazy = modify (\x -> x { _lazy = True})
39
false
true
0
9
18
52
25
27
null
null
locaweb/leela
src/warpdrive/src/Leela/Network/Protocol.hs
apache-2.0
encodeRValue (KAttr g a (Just v)) = "k-attr" : asLazyByteString g : asLazyByteString a : encodeValue v
212
encodeRValue (KAttr g a (Just v)) = "k-attr" : asLazyByteString g : asLazyByteString a : encodeValue v
212
encodeRValue (KAttr g a (Just v)) = "k-attr" : asLazyByteString g : asLazyByteString a : encodeValue v
212
false
false
0
9
126
46
21
25
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Utils.hs
gpl-3.0
restrictCons :: [Name] -> [LConDecl Name] -> [LConDecl Name] restrictCons names decls = [ L p d | L p (Just d) <- map (fmap keep) decls ] where keep d | unLoc (con_name d) `elem` names = case con_details d of PrefixCon _ -> Just d RecCon fields | all field_avail fields -> Just d | otherwise -> Just (d { con_details = PrefixCon (field_types fields) }) -- if we have *all* the field names available, then -- keep the record declaration. Otherwise degrade to -- a constructor declaration. This isn't quite right, but -- it's the best we can do. InfixCon _ _ -> Just d where field_avail (ConDeclField n _ _) = unLoc n `elem` names field_types flds = [ t | ConDeclField _ t _ <- flds ] keep _ = Nothing
824
restrictCons :: [Name] -> [LConDecl Name] -> [LConDecl Name] restrictCons names decls = [ L p d | L p (Just d) <- map (fmap keep) decls ] where keep d | unLoc (con_name d) `elem` names = case con_details d of PrefixCon _ -> Just d RecCon fields | all field_avail fields -> Just d | otherwise -> Just (d { con_details = PrefixCon (field_types fields) }) -- if we have *all* the field names available, then -- keep the record declaration. Otherwise degrade to -- a constructor declaration. This isn't quite right, but -- it's the best we can do. InfixCon _ _ -> Just d where field_avail (ConDeclField n _ _) = unLoc n `elem` names field_types flds = [ t | ConDeclField _ t _ <- flds ] keep _ = Nothing
824
restrictCons names decls = [ L p d | L p (Just d) <- map (fmap keep) decls ] where keep d | unLoc (con_name d) `elem` names = case con_details d of PrefixCon _ -> Just d RecCon fields | all field_avail fields -> Just d | otherwise -> Just (d { con_details = PrefixCon (field_types fields) }) -- if we have *all* the field names available, then -- keep the record declaration. Otherwise degrade to -- a constructor declaration. This isn't quite right, but -- it's the best we can do. InfixCon _ _ -> Just d where field_avail (ConDeclField n _ _) = unLoc n `elem` names field_types flds = [ t | ConDeclField _ t _ <- flds ] keep _ = Nothing
763
false
true
0
16
260
264
128
136
null
null
ulricha/dsh
src/Database/DSH/Tests/ComprehensionTests.hs
bsd-3-clause
prop_njg7 :: (BackendVector b, VectorLang v) => ([Integer], [Integer], [Integer]) -> DSHProperty (v TExpr TExpr) b prop_njg7 = makePropEq (\(Q.view -> (xs, ys, zs)) -> C.njg7 xs ys zs) (\(xs, ys, zs) -> njg7 xs ys zs)
240
prop_njg7 :: (BackendVector b, VectorLang v) => ([Integer], [Integer], [Integer]) -> DSHProperty (v TExpr TExpr) b prop_njg7 = makePropEq (\(Q.view -> (xs, ys, zs)) -> C.njg7 xs ys zs) (\(xs, ys, zs) -> njg7 xs ys zs)
240
prop_njg7 = makePropEq (\(Q.view -> (xs, ys, zs)) -> C.njg7 xs ys zs) (\(xs, ys, zs) -> njg7 xs ys zs)
125
false
true
0
10
59
125
70
55
null
null
bagl/takusen-oracle
Database/Test/Enumerator.hs
bsd-3-clause
sqlDropTest = "drop table " ++ testTable
40
sqlDropTest = "drop table " ++ testTable
40
sqlDropTest = "drop table " ++ testTable
40
false
false
1
5
6
13
5
8
null
null
portnov/dates
Data/Dates.hs
bsd-3-clause
lookupS ∷ String → [(String,a)] → Maybe a lookupS _ [] = Nothing
64
lookupS ∷ String → [(String,a)] → Maybe a lookupS _ [] = Nothing
64
lookupS _ [] = Nothing
22
false
true
0
8
12
38
20
18
null
null
Sgoettschkes/learning
haskell/ProjectEuler/tests/Problems/Problem020Spec.hs
mit
spec :: Spec spec = describe "Problem 20" $ it "Should evaluate to 648" $ p20 `shouldBe` 648
104
spec :: Spec spec = describe "Problem 20" $ it "Should evaluate to 648" $ p20 `shouldBe` 648
104
spec = describe "Problem 20" $ it "Should evaluate to 648" $ p20 `shouldBe` 648
91
false
true
0
8
29
31
16
15
null
null
sgillespie/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
-- Native word signless ops translateOp :: DynFlags -> PrimOp -> Maybe MachOp translateOp dflags IntAddOp = Just (mo_wordAdd dflags)
139
translateOp :: DynFlags -> PrimOp -> Maybe MachOp translateOp dflags IntAddOp = Just (mo_wordAdd dflags)
110
translateOp dflags IntAddOp = Just (mo_wordAdd dflags)
60
true
true
0
7
26
37
18
19
null
null
davmre/matrizer
src/Matrizer/RewriteRules.hs
gpl-2.0
groupTranspose tbl (Branch2 MProduct (Branch1 MTranspose a) b) = let Right (Matrix _ _ props) = treeMatrix b tbl in if Symmetric `elem` props then Just (Branch1 MTranspose (Branch2 MProduct b a)) else Nothing
269
groupTranspose tbl (Branch2 MProduct (Branch1 MTranspose a) b) = let Right (Matrix _ _ props) = treeMatrix b tbl in if Symmetric `elem` props then Just (Branch1 MTranspose (Branch2 MProduct b a)) else Nothing
269
groupTranspose tbl (Branch2 MProduct (Branch1 MTranspose a) b) = let Right (Matrix _ _ props) = treeMatrix b tbl in if Symmetric `elem` props then Just (Branch1 MTranspose (Branch2 MProduct b a)) else Nothing
269
false
false
0
12
94
94
46
48
null
null
noteed/syntactical
tests/ghc-fixity.hs
bsd-3-clause
b6 = B
6
b6 = B
6
b6 = B
6
false
false
1
5
2
10
3
7
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x1E4F' = "\x006F\x0303\x0308"
45
decomposeChar '\x1E4F' = "\x006F\x0303\x0308"
45
decomposeChar '\x1E4F' = "\x006F\x0303\x0308"
45
false
false
1
5
3
13
4
9
null
null
phischu/fragnix
builtins/base/GHC.IO.Encoding.Failure.hs
bsd-3-clause
codingFailureModeSuffix IgnoreCodingFailure = "//IGNORE"
63
codingFailureModeSuffix IgnoreCodingFailure = "//IGNORE"
63
codingFailureModeSuffix IgnoreCodingFailure = "//IGNORE"
63
false
false
0
5
10
9
4
5
null
null
da-x/buildsome
src/Buildsome/Print.hs
gpl-2.0
fromBytestring8 :: IsString str => ByteString -> str fromBytestring8 = fromString . BS8.unpack
94
fromBytestring8 :: IsString str => ByteString -> str fromBytestring8 = fromString . BS8.unpack
94
fromBytestring8 = fromString . BS8.unpack
41
false
true
0
6
12
28
14
14
null
null
hanshoglund/reenact
src/Control/Reactive/Midi.hs
bsd-3-clause
midiSources :: Reactive [MidiSource] midiSources = eventToReactive (pollE $ threadDelay 1 >> Midi.sources >>= return . Just)
133
midiSources :: Reactive [MidiSource] midiSources = eventToReactive (pollE $ threadDelay 1 >> Midi.sources >>= return . Just)
133
midiSources = eventToReactive (pollE $ threadDelay 1 >> Midi.sources >>= return . Just)
96
false
true
0
11
25
50
23
27
null
null
yunomu/nicodicbot
src/Main.hs
bsd-3-clause
curl :: URL -> IO (InputStream ByteString) curl url = Http.get url $ \_ i -> return i
85
curl :: URL -> IO (InputStream ByteString) curl url = Http.get url $ \_ i -> return i
85
curl url = Http.get url $ \_ i -> return i
42
false
true
0
8
17
46
22
24
null
null
li-zhirui/EoplLangs
src/InferredLang/Parser.hs
bsd-3-clause
lexeme :: Parser a -> Parser a lexeme = L.lexeme spaceConsumer
62
lexeme :: Parser a -> Parser a lexeme = L.lexeme spaceConsumer
62
lexeme = L.lexeme spaceConsumer
31
false
true
0
7
10
31
13
18
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F14.hs
bsd-3-clause
ptr_glGetnUniformi64vARB :: FunPtr (GLuint -> GLint -> GLsizei -> Ptr GLint64 -> IO ()) ptr_glGetnUniformi64vARB = unsafePerformIO $ getCommand "glGetnUniformi64vARB"
166
ptr_glGetnUniformi64vARB :: FunPtr (GLuint -> GLint -> GLsizei -> Ptr GLint64 -> IO ()) ptr_glGetnUniformi64vARB = unsafePerformIO $ getCommand "glGetnUniformi64vARB"
166
ptr_glGetnUniformi64vARB = unsafePerformIO $ getCommand "glGetnUniformi64vARB"
78
false
true
0
12
19
48
23
25
null
null
Blaisorblade/pts
src-lib/PTS/Syntax/Names.hs
bsd-3-clause
envToNamesMap :: [(Name, a)] -> NamesMap envToNamesMap = Map.fromListWith max . map (\(name, _) -> (rawName name, getIdx name))
127
envToNamesMap :: [(Name, a)] -> NamesMap envToNamesMap = Map.fromListWith max . map (\(name, _) -> (rawName name, getIdx name))
127
envToNamesMap = Map.fromListWith max . map (\(name, _) -> (rawName name, getIdx name))
86
false
true
0
10
18
62
34
28
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/Trombone.hs
bsd-3-clause
note13 :: Note note13 = Note (Pitch 174.614 41 "f3") 14 (Range (NoteRange (NoteRangeAmplitude 9254.54 53 0.42) (NoteRangeHarmonicFreq 1 174.61)) (NoteRange (NoteRangeAmplitude 698.45 4 5761.0) (NoteRangeHarmonicFreq 57 9952.99))) [Harmonic 1 (-1.906) 3216.48 ,Harmonic 2 (-0.655) 2638.34 ,Harmonic 3 4.9e-2 4659.38 ,Harmonic 4 1.207 5761.0 ,Harmonic 5 1.469 3922.44 ,Harmonic 6 2.222 4009.56 ,Harmonic 7 2.916 2862.21 ,Harmonic 8 (-2.694) 2149.96 ,Harmonic 9 (-2.182) 1440.54 ,Harmonic 10 (-1.298) 882.5 ,Harmonic 11 (-0.429) 580.01 ,Harmonic 12 0.346 430.4 ,Harmonic 13 1.325 331.55 ,Harmonic 14 2.091 233.57 ,Harmonic 15 2.858 175.09 ,Harmonic 16 (-2.615) 128.38 ,Harmonic 17 (-1.7) 73.07 ,Harmonic 18 (-0.909) 63.35 ,Harmonic 19 (-5.4e-2) 44.33 ,Harmonic 20 0.901 29.62 ,Harmonic 21 1.842 22.53 ,Harmonic 22 2.722 17.38 ,Harmonic 23 (-2.696) 13.52 ,Harmonic 24 (-1.821) 9.82 ,Harmonic 25 (-0.24) 6.23 ,Harmonic 26 1.014 8.18 ,Harmonic 27 2.416 5.39 ,Harmonic 28 (-2.314) 3.56 ,Harmonic 29 (-1.945) 0.96 ,Harmonic 30 0.529 1.66 ,Harmonic 31 1.898 3.7 ,Harmonic 32 (-2.978) 3.9 ,Harmonic 33 (-1.659) 4.63 ,Harmonic 34 0.617 3.91 ,Harmonic 35 2.462 5.1 ,Harmonic 36 (-2.594) 3.07 ,Harmonic 37 (-1.396) 3.8 ,Harmonic 38 6.6e-2 3.25 ,Harmonic 39 1.532 2.46 ,Harmonic 40 2.281 2.9 ,Harmonic 41 (-2.567) 2.85 ,Harmonic 42 (-1.08) 0.89 ,Harmonic 43 (-2.941) 0.54 ,Harmonic 44 2.886 3.29 ,Harmonic 45 (-2.28) 2.51 ,Harmonic 46 (-1.969) 1.64 ,Harmonic 47 1.137 1.17 ,Harmonic 48 1.72 1.15 ,Harmonic 49 (-3.045) 5.21 ,Harmonic 50 (-2.47) 6.96 ,Harmonic 51 (-1.262) 4.72 ,Harmonic 52 0.414 1.86 ,Harmonic 53 (-2.54) 0.42 ,Harmonic 54 (-1.224) 1.67 ,Harmonic 55 0.745 2.47 ,Harmonic 56 2.19 4.54 ,Harmonic 57 (-2.94) 5.47]
2,016
note13 :: Note note13 = Note (Pitch 174.614 41 "f3") 14 (Range (NoteRange (NoteRangeAmplitude 9254.54 53 0.42) (NoteRangeHarmonicFreq 1 174.61)) (NoteRange (NoteRangeAmplitude 698.45 4 5761.0) (NoteRangeHarmonicFreq 57 9952.99))) [Harmonic 1 (-1.906) 3216.48 ,Harmonic 2 (-0.655) 2638.34 ,Harmonic 3 4.9e-2 4659.38 ,Harmonic 4 1.207 5761.0 ,Harmonic 5 1.469 3922.44 ,Harmonic 6 2.222 4009.56 ,Harmonic 7 2.916 2862.21 ,Harmonic 8 (-2.694) 2149.96 ,Harmonic 9 (-2.182) 1440.54 ,Harmonic 10 (-1.298) 882.5 ,Harmonic 11 (-0.429) 580.01 ,Harmonic 12 0.346 430.4 ,Harmonic 13 1.325 331.55 ,Harmonic 14 2.091 233.57 ,Harmonic 15 2.858 175.09 ,Harmonic 16 (-2.615) 128.38 ,Harmonic 17 (-1.7) 73.07 ,Harmonic 18 (-0.909) 63.35 ,Harmonic 19 (-5.4e-2) 44.33 ,Harmonic 20 0.901 29.62 ,Harmonic 21 1.842 22.53 ,Harmonic 22 2.722 17.38 ,Harmonic 23 (-2.696) 13.52 ,Harmonic 24 (-1.821) 9.82 ,Harmonic 25 (-0.24) 6.23 ,Harmonic 26 1.014 8.18 ,Harmonic 27 2.416 5.39 ,Harmonic 28 (-2.314) 3.56 ,Harmonic 29 (-1.945) 0.96 ,Harmonic 30 0.529 1.66 ,Harmonic 31 1.898 3.7 ,Harmonic 32 (-2.978) 3.9 ,Harmonic 33 (-1.659) 4.63 ,Harmonic 34 0.617 3.91 ,Harmonic 35 2.462 5.1 ,Harmonic 36 (-2.594) 3.07 ,Harmonic 37 (-1.396) 3.8 ,Harmonic 38 6.6e-2 3.25 ,Harmonic 39 1.532 2.46 ,Harmonic 40 2.281 2.9 ,Harmonic 41 (-2.567) 2.85 ,Harmonic 42 (-1.08) 0.89 ,Harmonic 43 (-2.941) 0.54 ,Harmonic 44 2.886 3.29 ,Harmonic 45 (-2.28) 2.51 ,Harmonic 46 (-1.969) 1.64 ,Harmonic 47 1.137 1.17 ,Harmonic 48 1.72 1.15 ,Harmonic 49 (-3.045) 5.21 ,Harmonic 50 (-2.47) 6.96 ,Harmonic 51 (-1.262) 4.72 ,Harmonic 52 0.414 1.86 ,Harmonic 53 (-2.54) 0.42 ,Harmonic 54 (-1.224) 1.67 ,Harmonic 55 0.745 2.47 ,Harmonic 56 2.19 4.54 ,Harmonic 57 (-2.94) 5.47]
2,016
note13 = Note (Pitch 174.614 41 "f3") 14 (Range (NoteRange (NoteRangeAmplitude 9254.54 53 0.42) (NoteRangeHarmonicFreq 1 174.61)) (NoteRange (NoteRangeAmplitude 698.45 4 5761.0) (NoteRangeHarmonicFreq 57 9952.99))) [Harmonic 1 (-1.906) 3216.48 ,Harmonic 2 (-0.655) 2638.34 ,Harmonic 3 4.9e-2 4659.38 ,Harmonic 4 1.207 5761.0 ,Harmonic 5 1.469 3922.44 ,Harmonic 6 2.222 4009.56 ,Harmonic 7 2.916 2862.21 ,Harmonic 8 (-2.694) 2149.96 ,Harmonic 9 (-2.182) 1440.54 ,Harmonic 10 (-1.298) 882.5 ,Harmonic 11 (-0.429) 580.01 ,Harmonic 12 0.346 430.4 ,Harmonic 13 1.325 331.55 ,Harmonic 14 2.091 233.57 ,Harmonic 15 2.858 175.09 ,Harmonic 16 (-2.615) 128.38 ,Harmonic 17 (-1.7) 73.07 ,Harmonic 18 (-0.909) 63.35 ,Harmonic 19 (-5.4e-2) 44.33 ,Harmonic 20 0.901 29.62 ,Harmonic 21 1.842 22.53 ,Harmonic 22 2.722 17.38 ,Harmonic 23 (-2.696) 13.52 ,Harmonic 24 (-1.821) 9.82 ,Harmonic 25 (-0.24) 6.23 ,Harmonic 26 1.014 8.18 ,Harmonic 27 2.416 5.39 ,Harmonic 28 (-2.314) 3.56 ,Harmonic 29 (-1.945) 0.96 ,Harmonic 30 0.529 1.66 ,Harmonic 31 1.898 3.7 ,Harmonic 32 (-2.978) 3.9 ,Harmonic 33 (-1.659) 4.63 ,Harmonic 34 0.617 3.91 ,Harmonic 35 2.462 5.1 ,Harmonic 36 (-2.594) 3.07 ,Harmonic 37 (-1.396) 3.8 ,Harmonic 38 6.6e-2 3.25 ,Harmonic 39 1.532 2.46 ,Harmonic 40 2.281 2.9 ,Harmonic 41 (-2.567) 2.85 ,Harmonic 42 (-1.08) 0.89 ,Harmonic 43 (-2.941) 0.54 ,Harmonic 44 2.886 3.29 ,Harmonic 45 (-2.28) 2.51 ,Harmonic 46 (-1.969) 1.64 ,Harmonic 47 1.137 1.17 ,Harmonic 48 1.72 1.15 ,Harmonic 49 (-3.045) 5.21 ,Harmonic 50 (-2.47) 6.96 ,Harmonic 51 (-1.262) 4.72 ,Harmonic 52 0.414 1.86 ,Harmonic 53 (-2.54) 0.42 ,Harmonic 54 (-1.224) 1.67 ,Harmonic 55 0.745 2.47 ,Harmonic 56 2.19 4.54 ,Harmonic 57 (-2.94) 5.47]
2,001
false
true
0
10
559
813
420
393
null
null
garetxe/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
infoCommand :: CommandUI InfoFlags infoCommand = CommandUI { commandName = "info", commandSynopsis = "Display detailed information about a particular package.", commandDescription = Just $ \_ -> wrapText $ "If there is a sandbox in the current directory and " ++ "config:ignore-sandbox is False, use the sandbox package database. " ++ "Otherwise, use the package database specified with --package-db. " ++ "If not specified, use the user package database.\n", commandNotes = Nothing, commandUsage = usageAlternatives "info" ["[FLAGS] PACKAGES"], commandDefaultFlags = defaultInfoFlags, commandOptions = \_ -> [ optionVerbosity infoVerbosity (\v flags -> flags { infoVerbosity = v }) , option "" ["package-db"] ( "Append the given package database to the list of package" ++ " databases used (to satisfy dependencies and register into)." ++ " May be a specific file, 'global' or 'user'. The initial list" ++ " is ['global'], ['global', 'user'], or ['global', $sandbox]," ++ " depending on context. Use 'clear' to reset the list to empty." ++ " See the user guide for details.") infoPackageDBs (\v flags -> flags { infoPackageDBs = v }) (reqArg' "DB" readPackageDbList showPackageDbList) ] }
1,392
infoCommand :: CommandUI InfoFlags infoCommand = CommandUI { commandName = "info", commandSynopsis = "Display detailed information about a particular package.", commandDescription = Just $ \_ -> wrapText $ "If there is a sandbox in the current directory and " ++ "config:ignore-sandbox is False, use the sandbox package database. " ++ "Otherwise, use the package database specified with --package-db. " ++ "If not specified, use the user package database.\n", commandNotes = Nothing, commandUsage = usageAlternatives "info" ["[FLAGS] PACKAGES"], commandDefaultFlags = defaultInfoFlags, commandOptions = \_ -> [ optionVerbosity infoVerbosity (\v flags -> flags { infoVerbosity = v }) , option "" ["package-db"] ( "Append the given package database to the list of package" ++ " databases used (to satisfy dependencies and register into)." ++ " May be a specific file, 'global' or 'user'. The initial list" ++ " is ['global'], ['global', 'user'], or ['global', $sandbox]," ++ " depending on context. Use 'clear' to reset the list to empty." ++ " See the user guide for details.") infoPackageDBs (\v flags -> flags { infoPackageDBs = v }) (reqArg' "DB" readPackageDbList showPackageDbList) ] }
1,392
infoCommand = CommandUI { commandName = "info", commandSynopsis = "Display detailed information about a particular package.", commandDescription = Just $ \_ -> wrapText $ "If there is a sandbox in the current directory and " ++ "config:ignore-sandbox is False, use the sandbox package database. " ++ "Otherwise, use the package database specified with --package-db. " ++ "If not specified, use the user package database.\n", commandNotes = Nothing, commandUsage = usageAlternatives "info" ["[FLAGS] PACKAGES"], commandDefaultFlags = defaultInfoFlags, commandOptions = \_ -> [ optionVerbosity infoVerbosity (\v flags -> flags { infoVerbosity = v }) , option "" ["package-db"] ( "Append the given package database to the list of package" ++ " databases used (to satisfy dependencies and register into)." ++ " May be a specific file, 'global' or 'user'. The initial list" ++ " is ['global'], ['global', 'user'], or ['global', $sandbox]," ++ " depending on context. Use 'clear' to reset the list to empty." ++ " See the user guide for details.") infoPackageDBs (\v flags -> flags { infoPackageDBs = v }) (reqArg' "DB" readPackageDbList showPackageDbList) ] }
1,356
false
true
1
16
382
196
109
87
null
null
ambiata/mafia
test/Test/Mafia/Tripping.hs
bsd-3-clause
trippingWith :: (Applicative f, Show (f a)) => (f a -> f a -> Property) -> (a -> b) -> (b -> f a) -> a -> Property trippingWith prop to fro a = let tripped = (fro . to) a purea = pure a in counterexample (show tripped <> " /= " <> show purea) (prop tripped purea)
280
trippingWith :: (Applicative f, Show (f a)) => (f a -> f a -> Property) -> (a -> b) -> (b -> f a) -> a -> Property trippingWith prop to fro a = let tripped = (fro . to) a purea = pure a in counterexample (show tripped <> " /= " <> show purea) (prop tripped purea)
280
trippingWith prop to fro a = let tripped = (fro . to) a purea = pure a in counterexample (show tripped <> " /= " <> show purea) (prop tripped purea)
165
false
true
0
12
75
157
75
82
null
null
alanz/Blobs
src/Graphics/Blobs/Document.hs
lgpl-2.1
getSelection doc = docSelection doc
46
getSelection doc = docSelection doc
46
getSelection doc = docSelection doc
46
false
false
0
5
15
12
5
7
null
null
ardfard/dagang
test/TestImport.hs
mit
createUser :: Text -> YesodExample App (Entity User) createUser ident = runDB $ do user <- insertEntity User { userIdent = ident , userPassword = Nothing } _ <- insert Email { emailEmail = ident , emailUserId = Just $ entityKey user , emailVerkey = Nothing } return user
338
createUser :: Text -> YesodExample App (Entity User) createUser ident = runDB $ do user <- insertEntity User { userIdent = ident , userPassword = Nothing } _ <- insert Email { emailEmail = ident , emailUserId = Just $ entityKey user , emailVerkey = Nothing } return user
338
createUser ident = runDB $ do user <- insertEntity User { userIdent = ident , userPassword = Nothing } _ <- insert Email { emailEmail = ident , emailUserId = Just $ entityKey user , emailVerkey = Nothing } return user
285
false
true
0
13
116
100
51
49
null
null
pacak/sqroll
src/Database/Sqroll/Flexible.hs
bsd-3-clause
selectPeek LtExp{} s n = peekResult s n
39
selectPeek LtExp{} s n = peekResult s n
39
selectPeek LtExp{} s n = peekResult s n
39
false
false
0
6
7
22
10
12
null
null
siddhanathan/ghc
libraries/base/Data/OldList.hs
bsd-3-clause
dropLength :: [a] -> [b] -> [b] dropLength [] y = y
51
dropLength :: [a] -> [b] -> [b] dropLength [] y = y
51
dropLength [] y = y
19
false
true
0
7
11
35
19
16
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/testing/2019-11-oskar-wickstrom-tt-and-fixing-bugs-with-property-based-testing/src/Lib.hs
unlicense
validateSignup :: SignupForm -> Validation (NonEmpty SignupError) Signup validateSignup (SignupForm n a) = Signup <$> validateName n <*> validateAge a
157
validateSignup :: SignupForm -> Validation (NonEmpty SignupError) Signup validateSignup (SignupForm n a) = Signup <$> validateName n <*> validateAge a
157
validateSignup (SignupForm n a) = Signup <$> validateName n <*> validateAge a
84
false
true
5
8
26
55
26
29
null
null
tangboyun/bio-seq-embl
src/Bio/Seq/EMBL/Parser/Internal.hs
bsd-3-clause
parseOG :: Parser ByteString parseOG = do mkHeader "OG" *> takeWhile1 (/= '\n') <* endOfLine
98
parseOG :: Parser ByteString parseOG = do mkHeader "OG" *> takeWhile1 (/= '\n') <* endOfLine
98
parseOG = do mkHeader "OG" *> takeWhile1 (/= '\n') <* endOfLine
69
false
true
0
10
20
35
17
18
null
null
brinchj/bloomfilter
Data/BloomFilter.hs
bsd-3-clause
constructB :: (a -> [Hash]) -> UArray Int Hash -> Bloom a constructB hash array = B hash shift mask array where assc = assocs array numElems = length assc numBytes = numElems * (2 ^ logBytesInHash) trueBits = numElems `shiftL` logBitsInHash shift = logPower2 trueBits mask = trueBits - 1
339
constructB :: (a -> [Hash]) -> UArray Int Hash -> Bloom a constructB hash array = B hash shift mask array where assc = assocs array numElems = length assc numBytes = numElems * (2 ^ logBytesInHash) trueBits = numElems `shiftL` logBitsInHash shift = logPower2 trueBits mask = trueBits - 1
339
constructB hash array = B hash shift mask array where assc = assocs array numElems = length assc numBytes = numElems * (2 ^ logBytesInHash) trueBits = numElems `shiftL` logBitsInHash shift = logPower2 trueBits mask = trueBits - 1
259
false
true
7
9
102
141
61
80
null
null
technogeeky/d-A
include/containers-0.5.0.0/Data/IntMap/Strict.hs
gpl-3.0
-- | /O(n*min(n,W))/. Build a map from a list of key\/value pairs with a combining function. See also fromAscListWithKey'. -- -- > fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")] -- > fromListWith (++) [] == empty fromListWithKey :: (Key -> a -> a -> a) -> [(Key,a)] -> IntMap a fromListWithKey f xs = foldlStrict ins empty xs where ins t (k,x) = insertWithKey f k x t -- | /O(n)/. Build a map from a list of key\/value pairs where -- the keys are in ascending order. -- -- > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] -- > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]
688
fromListWithKey :: (Key -> a -> a -> a) -> [(Key,a)] -> IntMap a fromListWithKey f xs = foldlStrict ins empty xs where ins t (k,x) = insertWithKey f k x t -- | /O(n)/. Build a map from a list of key\/value pairs where -- the keys are in ascending order. -- -- > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] -- > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]
421
fromListWithKey f xs = foldlStrict ins empty xs where ins t (k,x) = insertWithKey f k x t -- | /O(n)/. Build a map from a list of key\/value pairs where -- the keys are in ascending order. -- -- > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] -- > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]
356
true
true
0
9
136
95
53
42
null
null