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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nomeata/gipeda | src/ReportTypes.hs | mit | explain :: S.BenchSettings -> BenchValue -> BenchValue -> (String, ChangeType)
explain s@(S.numberType -> S.SmallIntegralNT) (I i1) (I i2) = explainSmallInt s i1 i2 | 164 | explain :: S.BenchSettings -> BenchValue -> BenchValue -> (String, ChangeType)
explain s@(S.numberType -> S.SmallIntegralNT) (I i1) (I i2) = explainSmallInt s i1 i2 | 164 | explain s@(S.numberType -> S.SmallIntegralNT) (I i1) (I i2) = explainSmallInt s i1 i2 | 85 | false | true | 0 | 9 | 22 | 71 | 37 | 34 | null | null |
np/lens | src/Control/Lens/Internal/Zipper.hs | bsd-3-clause | -- | Returns the number of siblings at the current level in the 'zipper'.
--
-- @'teeth' z '>=' 1@
--
-- /NB:/ If the current 'Traversal' targets an infinite number of elements then this may not terminate.
--
-- >>> zipper ("hello","world") & teeth
-- 1
--
-- >>> zipper ("hello","world") & fromWithin both & teeth
-- 2
--
-- >>> zipper ("hello","world") & downward _1 & teeth
-- 1
--
-- >>> zipper ("hello","world") & downward _1 & fromWithin traverse & teeth
-- 5
--
-- >>> zipper ("hello","world") & fromWithin (_1.traverse) & teeth
-- 5
--
-- >>> zipper ("hello","world") & fromWithin (both.traverse) & teeth
-- 10
teeth :: (h :> a) -> Int
teeth (Zipper _ n _ _ rs) = n + 1 + length rs | 689 | teeth :: (h :> a) -> Int
teeth (Zipper _ n _ _ rs) = n + 1 + length rs | 70 | teeth (Zipper _ n _ _ rs) = n + 1 + length rs | 45 | true | true | 0 | 7 | 130 | 73 | 48 | 25 | null | null |
dpieroux/euler | 0147.hs | mit | main = do
putStrLn $ concat ["Euler 137, 3x2: ", show $ euler 3 2]
putStrLn $ concat ["Euler 137, 47x43: ", show $ euler 47 43] | 137 | main = do
putStrLn $ concat ["Euler 137, 3x2: ", show $ euler 3 2]
putStrLn $ concat ["Euler 137, 47x43: ", show $ euler 47 43] | 137 | main = do
putStrLn $ concat ["Euler 137, 3x2: ", show $ euler 3 2]
putStrLn $ concat ["Euler 137, 47x43: ", show $ euler 47 43] | 137 | false | false | 0 | 11 | 36 | 56 | 27 | 29 | null | null |
beni55/fay | src/Fay/Compiler/Desugar.hs | bsd-3-clause | transformBi :: U.Biplate (from a) (to a) => (to a -> to a) -> from a -> from a
transformBi = U.transformBi | 106 | transformBi :: U.Biplate (from a) (to a) => (to a -> to a) -> from a -> from a
transformBi = U.transformBi | 106 | transformBi = U.transformBi | 27 | false | true | 0 | 9 | 21 | 63 | 30 | 33 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxNORMAL :: Int
wxNORMAL = 90 | 29 | wxNORMAL :: Int
wxNORMAL = 90 | 29 | wxNORMAL = 90 | 13 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
quyse/flaw | flaw-math/Flaw/Math/Internal.hs | mit | genSwizzleVariants len = [c : v | c <- vecComponents, v <- genSwizzleVariants $ len - 1] | 88 | genSwizzleVariants len = [c : v | c <- vecComponents, v <- genSwizzleVariants $ len - 1] | 88 | genSwizzleVariants len = [c : v | c <- vecComponents, v <- genSwizzleVariants $ len - 1] | 88 | false | false | 0 | 9 | 16 | 40 | 20 | 20 | null | null |
ComputationWithBoundedResources/jat | src/Jat/PState/Fun.hs | bsd-3-clause | mapValues _ st = st | 37 | mapValues _ st = st | 37 | mapValues _ st = st | 37 | false | false | 0 | 5 | 22 | 11 | 5 | 6 | null | null |
jakubriha/automata | src/Helpers.hs | bsd-3-clause | guard False = Set.empty | 23 | guard False = Set.empty | 23 | guard False = Set.empty | 23 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
chrisbanks/cpiwb | profileMC2.hs | gpl-3.0 | main = do env <- tEnv "models/testGT.cpi"
res <- getArgs
let tps = (read(res!!0),(0,25))
let pi = tProc env "Pi"
mts = processMTS env pi
pi' = wholeProc env pi mts
dpdt = dPdt' env mts pi'
odes = xdot env dpdt
inits = initials env pi' dpdt
ts = timePoints (read(res!!0)) (0,25)
soln = solveODE env pi' dpdt tps
ss = speciesIn env dpdt
trace = timeSeries ts soln ss
let r1 = {-# SCC "f17-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f17
r2 = {-# SCC "f17-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f17
r3 = {-# SCC "f17-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f17
r4 = {-# SCC "f17-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f17
print $ pretty f17
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f18-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f18
r2 = {-# SCC "f18-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f18
r3 = {-# SCC "f18-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f18
r4 = {-# SCC "f18-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f18
print $ pretty f18
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f19-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f19
r2 = {-# SCC "f19-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f19
r3 = {-# SCC "f19-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f19
r4 = {-# SCC "f19-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f19
print $ pretty f19
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f20-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f20
r2 = {-# SCC "f20-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f20
r3 = {-# SCC "f20-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f20
r4 = {-# SCC "f20-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f20
print $ pretty f20
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f21-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f21
r2 = {-# SCC "f21-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f21
r3 = {-# SCC "f21-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f21
r4 = {-# SCC "f21-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f21
print $ pretty f21
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f22-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f22
r2 = {-# SCC "f22-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f22
r3 = {-# SCC "f22-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f22
r4 = {-# SCC "f22-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f22
print $ pretty f22
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f23-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f23
r2 = {-# SCC "f23-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f23
r3 = {-# SCC "f23-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f23
r4 = {-# SCC "f23-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f23
print $ pretty f23
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f24-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f24
r2 = {-# SCC "f24-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f24
r3 = {-# SCC "f24-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f24
r4 = {-# SCC "f24-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f24
print $ pretty f24
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f25-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f25
r2 = {-# SCC "f25-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f25
r3 = {-# SCC "f25-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f25
r4 = {-# SCC "f25-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f25
print $ pretty f25
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f26-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f26
r2 = {-# SCC "f26-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f26
r3 = {-# SCC "f26-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f26
r4 = {-# SCC "f26-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f26
print $ pretty f26
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f27-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f27
r2 = {-# SCC "f27-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f27
r3 = {-# SCC "f27-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f27
r4 = {-# SCC "f27-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f27
print $ pretty f27
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f28-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f28
r2 = {-# SCC "f28-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f28
r3 = {-# SCC "f28-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f28
r4 = {-# SCC "f28-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f28
print $ pretty f28
print r1
print r2
print r3
print r4 | 7,251 | main = do env <- tEnv "models/testGT.cpi"
res <- getArgs
let tps = (read(res!!0),(0,25))
let pi = tProc env "Pi"
mts = processMTS env pi
pi' = wholeProc env pi mts
dpdt = dPdt' env mts pi'
odes = xdot env dpdt
inits = initials env pi' dpdt
ts = timePoints (read(res!!0)) (0,25)
soln = solveODE env pi' dpdt tps
ss = speciesIn env dpdt
trace = timeSeries ts soln ss
let r1 = {-# SCC "f17-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f17
r2 = {-# SCC "f17-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f17
r3 = {-# SCC "f17-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f17
r4 = {-# SCC "f17-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f17
print $ pretty f17
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f18-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f18
r2 = {-# SCC "f18-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f18
r3 = {-# SCC "f18-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f18
r4 = {-# SCC "f18-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f18
print $ pretty f18
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f19-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f19
r2 = {-# SCC "f19-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f19
r3 = {-# SCC "f19-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f19
r4 = {-# SCC "f19-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f19
print $ pretty f19
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f20-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f20
r2 = {-# SCC "f20-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f20
r3 = {-# SCC "f20-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f20
r4 = {-# SCC "f20-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f20
print $ pretty f20
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f21-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f21
r2 = {-# SCC "f21-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f21
r3 = {-# SCC "f21-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f21
r4 = {-# SCC "f21-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f21
print $ pretty f21
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f22-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f22
r2 = {-# SCC "f22-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f22
r3 = {-# SCC "f22-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f22
r4 = {-# SCC "f22-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f22
print $ pretty f22
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f23-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f23
r2 = {-# SCC "f23-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f23
r3 = {-# SCC "f23-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f23
r4 = {-# SCC "f23-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f23
print $ pretty f23
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f24-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f24
r2 = {-# SCC "f24-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f24
r3 = {-# SCC "f24-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f24
r4 = {-# SCC "f24-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f24
print $ pretty f24
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f25-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f25
r2 = {-# SCC "f25-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f25
r3 = {-# SCC "f25-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f25
r4 = {-# SCC "f25-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f25
print $ pretty f25
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f26-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f26
r2 = {-# SCC "f26-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f26
r3 = {-# SCC "f26-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f26
r4 = {-# SCC "f26-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f26
print $ pretty f26
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f27-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f27
r2 = {-# SCC "f27-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f27
r3 = {-# SCC "f27-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f27
r4 = {-# SCC "f27-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f27
print $ pretty f27
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f28-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f28
r2 = {-# SCC "f28-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f28
r3 = {-# SCC "f28-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f28
r4 = {-# SCC "f28-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f28
print $ pretty f28
print r1
print r2
print r3
print r4 | 7,251 | main = do env <- tEnv "models/testGT.cpi"
res <- getArgs
let tps = (read(res!!0),(0,25))
let pi = tProc env "Pi"
mts = processMTS env pi
pi' = wholeProc env pi mts
dpdt = dPdt' env mts pi'
odes = xdot env dpdt
inits = initials env pi' dpdt
ts = timePoints (read(res!!0)) (0,25)
soln = solveODE env pi' dpdt tps
ss = speciesIn env dpdt
trace = timeSeries ts soln ss
let r1 = {-# SCC "f17-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f17
r2 = {-# SCC "f17-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f17
r3 = {-# SCC "f17-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f17
r4 = {-# SCC "f17-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f17
print $ pretty f17
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f18-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f18
r2 = {-# SCC "f18-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f18
r3 = {-# SCC "f18-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f18
r4 = {-# SCC "f18-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f18
print $ pretty f18
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f19-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f19
r2 = {-# SCC "f19-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f19
r3 = {-# SCC "f19-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f19
r4 = {-# SCC "f19-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f19
print $ pretty f19
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f20-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f20
r2 = {-# SCC "f20-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f20
r3 = {-# SCC "f20-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f20
r4 = {-# SCC "f20-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f20
print $ pretty f20
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f21-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f21
r2 = {-# SCC "f21-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f21
r3 = {-# SCC "f21-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f21
r4 = {-# SCC "f21-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f21
print $ pretty f21
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f22-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f22
r2 = {-# SCC "f22-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f22
r3 = {-# SCC "f22-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f22
r4 = {-# SCC "f22-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f22
print $ pretty f22
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f23-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f23
r2 = {-# SCC "f23-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f23
r3 = {-# SCC "f23-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f23
r4 = {-# SCC "f23-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f23
print $ pretty f23
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f24-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f24
r2 = {-# SCC "f24-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f24
r3 = {-# SCC "f24-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f24
r4 = {-# SCC "f24-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f24
print $ pretty f24
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f25-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f25
r2 = {-# SCC "f25-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f25
r3 = {-# SCC "f25-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f25
r4 = {-# SCC "f25-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f25
print $ pretty f25
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f26-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f26
r2 = {-# SCC "f26-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f26
r3 = {-# SCC "f26-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f26
r4 = {-# SCC "f26-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f26
print $ pretty f26
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f27-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f27
r2 = {-# SCC "f27-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f27
r3 = {-# SCC "f27-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f27
r4 = {-# SCC "f27-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f27
print $ pretty f27
print r1
print r2
print r3
print r4
let r1 = {-# SCC "f28-Naive" #-} modelCheck
env solveODE (Just trace) pi tps f28
r2 = {-# SCC "f28-DynProg" #-} modelCheckDP
env solveODE (Just trace) pi tps f28
r3 = {-# SCC "f28-Hybrid" #-} modelCheckHy
env solveODE (Just trace) pi tps f28
r4 = {-# SCC "f28-Hybrid2" #-} modelCheckHy2
env solveODE (Just trace) pi tps f28
print $ pretty f28
print r1
print r2
print r3
print r4 | 7,251 | false | false | 0 | 14 | 3,237 | 1,845 | 875 | 970 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- * V2beta1HorizontalPodAutoscalerList
-- | 'v2beta1HorizontalPodAutoscalerListApiVersion' Lens
v2beta1HorizontalPodAutoscalerListApiVersionL :: Lens_' V2beta1HorizontalPodAutoscalerList (Maybe Text)
v2beta1HorizontalPodAutoscalerListApiVersionL f V2beta1HorizontalPodAutoscalerList{..} = (\v2beta1HorizontalPodAutoscalerListApiVersion -> V2beta1HorizontalPodAutoscalerList { v2beta1HorizontalPodAutoscalerListApiVersion, ..} ) <$> f v2beta1HorizontalPodAutoscalerListApiVersion | 480 | v2beta1HorizontalPodAutoscalerListApiVersionL :: Lens_' V2beta1HorizontalPodAutoscalerList (Maybe Text)
v2beta1HorizontalPodAutoscalerListApiVersionL f V2beta1HorizontalPodAutoscalerList{..} = (\v2beta1HorizontalPodAutoscalerListApiVersion -> V2beta1HorizontalPodAutoscalerList { v2beta1HorizontalPodAutoscalerListApiVersion, ..} ) <$> f v2beta1HorizontalPodAutoscalerListApiVersion | 382 | v2beta1HorizontalPodAutoscalerListApiVersionL f V2beta1HorizontalPodAutoscalerList{..} = (\v2beta1HorizontalPodAutoscalerListApiVersion -> V2beta1HorizontalPodAutoscalerList { v2beta1HorizontalPodAutoscalerListApiVersion, ..} ) <$> f v2beta1HorizontalPodAutoscalerListApiVersion | 278 | true | true | 0 | 8 | 27 | 58 | 31 | 27 | null | null |
contivero/hasmin | src/Hasmin/Types/Declaration.hs | bsd-3-clause | attemptMerge :: [Declaration] -> [Declaration] -> Declaration
-> Declaration -> PropertyInfo
-> (Maybe Declaration, [Declaration])
attemptMerge newDs ds dec laterDec pinfo =
case merge dec laterDec of
-- Put the merged result back on the list; see if any other
-- property also conflicts
Just m -> (Nothing, m : delete dec (delete laterDec newDs))
-- Couldn't merge, just keep analyzing
Nothing -> solveClashes' newDs ds dec pinfo
-- TODO: make it such that the order of parameters doesn't matter
-- First declaration = shorthand | 590 | attemptMerge :: [Declaration] -> [Declaration] -> Declaration
-> Declaration -> PropertyInfo
-> (Maybe Declaration, [Declaration])
attemptMerge newDs ds dec laterDec pinfo =
case merge dec laterDec of
-- Put the merged result back on the list; see if any other
-- property also conflicts
Just m -> (Nothing, m : delete dec (delete laterDec newDs))
-- Couldn't merge, just keep analyzing
Nothing -> solveClashes' newDs ds dec pinfo
-- TODO: make it such that the order of parameters doesn't matter
-- First declaration = shorthand | 590 | attemptMerge newDs ds dec laterDec pinfo =
case merge dec laterDec of
-- Put the merged result back on the list; see if any other
-- property also conflicts
Just m -> (Nothing, m : delete dec (delete laterDec newDs))
-- Couldn't merge, just keep analyzing
Nothing -> solveClashes' newDs ds dec pinfo
-- TODO: make it such that the order of parameters doesn't matter
-- First declaration = shorthand | 433 | false | true | 3 | 11 | 145 | 118 | 64 | 54 | null | null |
bixuanzju/fcore | lib/Inliner.hs | bsd-2-clause | inliner (BLam n t1) = BLam n (inliner . t1) | 43 | inliner (BLam n t1) = BLam n (inliner . t1) | 43 | inliner (BLam n t1) = BLam n (inliner . t1) | 43 | false | false | 0 | 7 | 9 | 29 | 14 | 15 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCast_QStyleOptionButton :: Object a -> IO (QStyleOptionButton ())
qCast_QStyleOptionButton _qobj
= return (objectCast _qobj) | 127 | qCast_QStyleOptionButton :: Object a -> IO (QStyleOptionButton ())
qCast_QStyleOptionButton _qobj
= return (objectCast _qobj) | 127 | qCast_QStyleOptionButton _qobj
= return (objectCast _qobj) | 60 | false | true | 0 | 9 | 15 | 41 | 19 | 22 | null | null |
danr/hipspec | tfp1/tests/Filter.hs | gpl-3.0 | filter2 p (x `Cons` xs) = filter2 p xs | 38 | filter2 p (x `Cons` xs) = filter2 p xs | 38 | filter2 p (x `Cons` xs) = filter2 p xs | 38 | false | false | 0 | 7 | 8 | 25 | 13 | 12 | null | null |
justanotherdot/advent-linguist | 2016/Haskell/AdventOfCode/src/Day07.hs | mit | transformInput :: String -> [[(Integer, String)]]
transformInput = map (zip [(1 :: Integer)..] . splitOneOf "[]") . lines | 121 | transformInput :: String -> [[(Integer, String)]]
transformInput = map (zip [(1 :: Integer)..] . splitOneOf "[]") . lines | 121 | transformInput = map (zip [(1 :: Integer)..] . splitOneOf "[]") . lines | 71 | false | true | 0 | 10 | 17 | 63 | 32 | 31 | null | null |
wouwouwou/module_8 | src/main/haskell/series1/exercise6.hs | apache-2.0 | mytake (x:xs) n = x : mytake xs (n-1) | 37 | mytake (x:xs) n = x : mytake xs (n-1) | 37 | mytake (x:xs) n = x : mytake xs (n-1) | 37 | false | false | 0 | 8 | 8 | 34 | 17 | 17 | null | null |
sboosali/wagon-challenge | sources/Wagon/First.hs | mit | fLatencySummary = (Pair <$> fAnyRowSummary <*> fNumericRowSummary) | 69 | fLatencySummary = (Pair <$> fAnyRowSummary <*> fNumericRowSummary) | 69 | fLatencySummary = (Pair <$> fAnyRowSummary <*> fNumericRowSummary) | 69 | false | false | 0 | 7 | 9 | 17 | 9 | 8 | null | null |
raichoo/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | upairTy = sNS (sUN "UPair") ["Builtins"] | 43 | upairTy = sNS (sUN "UPair") ["Builtins"] | 43 | upairTy = sNS (sUN "UPair") ["Builtins"] | 43 | false | false | 0 | 7 | 8 | 20 | 10 | 10 | null | null |
ruiting/opencog | opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban/Syntax.hs | agpl-3.0 | _COI :: SyntaxReader (State Atom)
_COI = instanceOf .< concept <$> withSeed (selmaho "COI") | 91 | _COI :: SyntaxReader (State Atom)
_COI = instanceOf .< concept <$> withSeed (selmaho "COI") | 91 | _COI = instanceOf .< concept <$> withSeed (selmaho "COI") | 57 | false | true | 6 | 7 | 13 | 46 | 19 | 27 | null | null |
kumasento/accelerate | Data/Array/Accelerate/Interpreter.hs | bsd-3-clause | evalGt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = uncurry (>) | 91 | evalGt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = uncurry (>) | 91 | evalGt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = uncurry (>) | 91 | false | false | 0 | 9 | 29 | 33 | 15 | 18 | null | null |
bgamari/pandoc | src/Text/Pandoc/Readers/Org.hs | gpl-2.0 | many1TillNOrLessNewlines :: Int
-> OrgParser Char
-> OrgParser a
-> OrgParser String
many1TillNOrLessNewlines n p end = try $
nMoreLines (Just n) mempty >>= oneOrMore
where
nMoreLines Nothing cs = return cs
nMoreLines (Just 0) cs = try $ (cs ++) <$> finalLine
nMoreLines k cs = try $ (final k cs <|> rest k cs)
>>= uncurry nMoreLines
final _ cs = (\x -> (Nothing, cs ++ x)) <$> try finalLine
rest m cs = (\x -> (minus1 <$> m, cs ++ x ++ "\n")) <$> try (manyTill p P.newline)
finalLine = try $ manyTill p end
minus1 k = k - 1
oneOrMore cs = guard (not $ null cs) *> return cs
-- Org allows customization of the way it reads emphasis. We use the defaults
-- here (see, e.g., the Emacs Lisp variable `org-emphasis-regexp-components`
-- for details).
-- | Chars allowed to occur before emphasis (spaces and newlines are ok, too) | 977 | many1TillNOrLessNewlines :: Int
-> OrgParser Char
-> OrgParser a
-> OrgParser String
many1TillNOrLessNewlines n p end = try $
nMoreLines (Just n) mempty >>= oneOrMore
where
nMoreLines Nothing cs = return cs
nMoreLines (Just 0) cs = try $ (cs ++) <$> finalLine
nMoreLines k cs = try $ (final k cs <|> rest k cs)
>>= uncurry nMoreLines
final _ cs = (\x -> (Nothing, cs ++ x)) <$> try finalLine
rest m cs = (\x -> (minus1 <$> m, cs ++ x ++ "\n")) <$> try (manyTill p P.newline)
finalLine = try $ manyTill p end
minus1 k = k - 1
oneOrMore cs = guard (not $ null cs) *> return cs
-- Org allows customization of the way it reads emphasis. We use the defaults
-- here (see, e.g., the Emacs Lisp variable `org-emphasis-regexp-components`
-- for details).
-- | Chars allowed to occur before emphasis (spaces and newlines are ok, too) | 977 | many1TillNOrLessNewlines n p end = try $
nMoreLines (Just n) mempty >>= oneOrMore
where
nMoreLines Nothing cs = return cs
nMoreLines (Just 0) cs = try $ (cs ++) <$> finalLine
nMoreLines k cs = try $ (final k cs <|> rest k cs)
>>= uncurry nMoreLines
final _ cs = (\x -> (Nothing, cs ++ x)) <$> try finalLine
rest m cs = (\x -> (minus1 <$> m, cs ++ x ++ "\n")) <$> try (manyTill p P.newline)
finalLine = try $ manyTill p end
minus1 k = k - 1
oneOrMore cs = guard (not $ null cs) *> return cs
-- Org allows customization of the way it reads emphasis. We use the defaults
-- here (see, e.g., the Emacs Lisp variable `org-emphasis-regexp-components`
-- for details).
-- | Chars allowed to occur before emphasis (spaces and newlines are ok, too) | 817 | false | true | 7 | 16 | 307 | 287 | 144 | 143 | null | null |
da-x/Algorithm-W-Step-By-Step | Lamdu/Infer/Internal/Scope.hs | gpl-3.0 | skolemScopeIntersection :: SkolemScope -> SkolemScope -> SkolemScope
skolemScopeIntersection (SkolemScope a) (SkolemScope b) =
SkolemScope (a `TV.intersection` b) | 166 | skolemScopeIntersection :: SkolemScope -> SkolemScope -> SkolemScope
skolemScopeIntersection (SkolemScope a) (SkolemScope b) =
SkolemScope (a `TV.intersection` b) | 166 | skolemScopeIntersection (SkolemScope a) (SkolemScope b) =
SkolemScope (a `TV.intersection` b) | 97 | false | true | 0 | 7 | 20 | 50 | 26 | 24 | null | null |
kim/amazonka | amazonka-ecs/gen/Network/AWS/ECS/Types.hs | mpl-2.0 | -- | 'ServiceEvent' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'seCreatedAt' @::@ 'Maybe' 'UTCTime'
--
-- * 'seId' @::@ 'Maybe' 'Text'
--
-- * 'seMessage' @::@ 'Maybe' 'Text'
--
serviceEvent :: ServiceEvent
serviceEvent = ServiceEvent
{ _seId = Nothing
, _seCreatedAt = Nothing
, _seMessage = Nothing
} | 367 | serviceEvent :: ServiceEvent
serviceEvent = ServiceEvent
{ _seId = Nothing
, _seCreatedAt = Nothing
, _seMessage = Nothing
} | 149 | serviceEvent = ServiceEvent
{ _seId = Nothing
, _seCreatedAt = Nothing
, _seMessage = Nothing
} | 120 | true | true | 0 | 6 | 78 | 41 | 29 | 12 | null | null |
mikusp/accelerate-cuda | Data/Array/Accelerate/CUDA/Array/Prim.hs | bsd-3-clause | -- Copy data from an Accelerate array into the associated device array
--
pokeArray
:: forall e a. (ArrayElt e, ArrayPtrs e ~ Ptr a, DevicePtrs e ~ CUDA.DevicePtr a, Typeable a, Typeable e, Storable a)
=> Context
-> MemoryTable
-> ArrayData e
-> Int
-> IO ()
pokeArray !ctx !mt !ad !n =
devicePtrsOfArrayData ctx mt ad >>= \dst ->
transfer "pokeArray: " (n * sizeOf (undefined :: a)) $
CUDA.pokeArray n (ptrsOfArrayData ad) dst | 463 | pokeArray
:: forall e a. (ArrayElt e, ArrayPtrs e ~ Ptr a, DevicePtrs e ~ CUDA.DevicePtr a, Typeable a, Typeable e, Storable a)
=> Context
-> MemoryTable
-> ArrayData e
-> Int
-> IO ()
pokeArray !ctx !mt !ad !n =
devicePtrsOfArrayData ctx mt ad >>= \dst ->
transfer "pokeArray: " (n * sizeOf (undefined :: a)) $
CUDA.pokeArray n (ptrsOfArrayData ad) dst | 389 | pokeArray !ctx !mt !ad !n =
devicePtrsOfArrayData ctx mt ad >>= \dst ->
transfer "pokeArray: " (n * sizeOf (undefined :: a)) $
CUDA.pokeArray n (ptrsOfArrayData ad) dst | 180 | true | true | 2 | 15 | 111 | 184 | 88 | 96 | null | null |
jwiegley/ghc-release | compiler/llvmGen/LlvmCodeGen/Data.hs | gpl-3.0 | genStaticLit (CmmHighStackMark)
= panic "genStaticLit: CmmHighStackMark unsupported!" | 89 | genStaticLit (CmmHighStackMark)
= panic "genStaticLit: CmmHighStackMark unsupported!" | 89 | genStaticLit (CmmHighStackMark)
= panic "genStaticLit: CmmHighStackMark unsupported!" | 89 | false | false | 0 | 6 | 10 | 15 | 7 | 8 | null | null |
justinethier/husk-scheme | hs-src/Language/Scheme/Types.hs | mit | eqvList _ _ = throwError $ Default "Unexpected error in eqvList" | 64 | eqvList _ _ = throwError $ Default "Unexpected error in eqvList" | 64 | eqvList _ _ = throwError $ Default "Unexpected error in eqvList" | 64 | false | false | 0 | 6 | 10 | 18 | 8 | 10 | null | null |
caiorss/Functional-Programming | haskell/rwh/ch14/State.hs | unlicense | ut :: s -> State s ()
put s = State (\ _ -> ((), s))
| 53 | put :: s -> State s ()
put s = State (\ _ -> ((), s)) | 53 | put s = State (\ _ -> ((), s)) | 30 | false | true | 0 | 9 | 16 | 44 | 23 | 21 | null | null |
fpco/cabal | Cabal/Distribution/Simple/Register.hs | bsd-3-clause | generateRegistrationInfo :: Verbosity
-> PackageDescription
-> Library
-> LocalBuildInfo
-> ComponentLocalBuildInfo
-> Bool
-> FilePath
-> IO InstalledPackageInfo
generateRegistrationInfo verbosity pkg lib lbi clbi inplace distPref = do
--TODO: eliminate pwd!
pwd <- getCurrentDirectory
--TODO: the method of setting the InstalledPackageId is compiler specific
-- this aspect should be delegated to a per-compiler helper.
let comp = compiler lbi
ipid <-
case compilerFlavor comp of
GHC | compilerVersion comp >= Version [6,11] [] -> do
s <- GHC.libAbiHash verbosity pkg lbi lib clbi
return (InstalledPackageId (display (packageId pkg) ++ '-':s))
_other -> do
return (InstalledPackageId (display (packageId pkg)))
let installedPkgInfo
| inplace = inplaceInstalledPackageInfo pwd distPref
pkg lib lbi clbi
| otherwise = absoluteInstalledPackageInfo
pkg lib lbi clbi
return installedPkgInfo{ IPI.installedPackageId = ipid }
-- | Create an empty package DB at the specified location. | 1,296 | generateRegistrationInfo :: Verbosity
-> PackageDescription
-> Library
-> LocalBuildInfo
-> ComponentLocalBuildInfo
-> Bool
-> FilePath
-> IO InstalledPackageInfo
generateRegistrationInfo verbosity pkg lib lbi clbi inplace distPref = do
--TODO: eliminate pwd!
pwd <- getCurrentDirectory
--TODO: the method of setting the InstalledPackageId is compiler specific
-- this aspect should be delegated to a per-compiler helper.
let comp = compiler lbi
ipid <-
case compilerFlavor comp of
GHC | compilerVersion comp >= Version [6,11] [] -> do
s <- GHC.libAbiHash verbosity pkg lbi lib clbi
return (InstalledPackageId (display (packageId pkg) ++ '-':s))
_other -> do
return (InstalledPackageId (display (packageId pkg)))
let installedPkgInfo
| inplace = inplaceInstalledPackageInfo pwd distPref
pkg lib lbi clbi
| otherwise = absoluteInstalledPackageInfo
pkg lib lbi clbi
return installedPkgInfo{ IPI.installedPackageId = ipid }
-- | Create an empty package DB at the specified location. | 1,296 | generateRegistrationInfo verbosity pkg lib lbi clbi inplace distPref = do
--TODO: eliminate pwd!
pwd <- getCurrentDirectory
--TODO: the method of setting the InstalledPackageId is compiler specific
-- this aspect should be delegated to a per-compiler helper.
let comp = compiler lbi
ipid <-
case compilerFlavor comp of
GHC | compilerVersion comp >= Version [6,11] [] -> do
s <- GHC.libAbiHash verbosity pkg lbi lib clbi
return (InstalledPackageId (display (packageId pkg) ++ '-':s))
_other -> do
return (InstalledPackageId (display (packageId pkg)))
let installedPkgInfo
| inplace = inplaceInstalledPackageInfo pwd distPref
pkg lib lbi clbi
| otherwise = absoluteInstalledPackageInfo
pkg lib lbi clbi
return installedPkgInfo{ IPI.installedPackageId = ipid }
-- | Create an empty package DB at the specified location. | 958 | false | true | 0 | 22 | 451 | 270 | 127 | 143 | null | null |
juodaspaulius/clafer | src/Language/Clafer/Intermediate/Desugarer.hs | mit | -- (fragments x >>= mDecls)
-- | desugars enumeration to abstract and global singleton features
desugarEnums :: Declaration -> [Declaration]
desugarEnums (EnumDecl (Span p1 p2) id' enumids) = absEnum : map mkEnum enumids
where
p2' = case enumids of
-- the abstract enum clafer should end before the first literal begins
((EnumIdIdent (Span (Pos y' x') _) _):_) -> Pos y' (x'-3) -- cutting the ' = '
[] -> p2 -- should never happen - cannot have enum without any literals. Return the original end pos.
oneToOne pos' = (CardInterval noSpan $
NCard noSpan (PosInteger (pos', "1")) (ExIntegerNum noSpan $ PosInteger (pos', "1")))
absEnum = let
s1 = Span p1 p2'
in
ElementDecl s1 $
Subclafer s1 $
Clafer s1 (Abstract s1) (GCardEmpty s1) id' (SuperEmpty s1) (ReferenceEmpty s1) (CardEmpty s1) (InitEmpty s1) (ElementsList s1 [])
mkEnum (EnumIdIdent s2 eId) = -- each concrete clafer must fit within the original span of the literal
ElementDecl s2 $
Subclafer s2 $
Clafer s2 (AbstractEmpty s2) (GCardEmpty s2) eId ((SuperSome s2) (ClaferId s2 $ Path s2 [ModIdIdent s2 id'])) (ReferenceEmpty s2) (oneToOne (0, 0)) (InitEmpty s2) (ElementsList s2 []) | 1,266 | desugarEnums :: Declaration -> [Declaration]
desugarEnums (EnumDecl (Span p1 p2) id' enumids) = absEnum : map mkEnum enumids
where
p2' = case enumids of
-- the abstract enum clafer should end before the first literal begins
((EnumIdIdent (Span (Pos y' x') _) _):_) -> Pos y' (x'-3) -- cutting the ' = '
[] -> p2 -- should never happen - cannot have enum without any literals. Return the original end pos.
oneToOne pos' = (CardInterval noSpan $
NCard noSpan (PosInteger (pos', "1")) (ExIntegerNum noSpan $ PosInteger (pos', "1")))
absEnum = let
s1 = Span p1 p2'
in
ElementDecl s1 $
Subclafer s1 $
Clafer s1 (Abstract s1) (GCardEmpty s1) id' (SuperEmpty s1) (ReferenceEmpty s1) (CardEmpty s1) (InitEmpty s1) (ElementsList s1 [])
mkEnum (EnumIdIdent s2 eId) = -- each concrete clafer must fit within the original span of the literal
ElementDecl s2 $
Subclafer s2 $
Clafer s2 (AbstractEmpty s2) (GCardEmpty s2) eId ((SuperSome s2) (ClaferId s2 $ Path s2 [ModIdIdent s2 id'])) (ReferenceEmpty s2) (oneToOne (0, 0)) (InitEmpty s2) (ElementsList s2 []) | 1,169 | desugarEnums (EnumDecl (Span p1 p2) id' enumids) = absEnum : map mkEnum enumids
where
p2' = case enumids of
-- the abstract enum clafer should end before the first literal begins
((EnumIdIdent (Span (Pos y' x') _) _):_) -> Pos y' (x'-3) -- cutting the ' = '
[] -> p2 -- should never happen - cannot have enum without any literals. Return the original end pos.
oneToOne pos' = (CardInterval noSpan $
NCard noSpan (PosInteger (pos', "1")) (ExIntegerNum noSpan $ PosInteger (pos', "1")))
absEnum = let
s1 = Span p1 p2'
in
ElementDecl s1 $
Subclafer s1 $
Clafer s1 (Abstract s1) (GCardEmpty s1) id' (SuperEmpty s1) (ReferenceEmpty s1) (CardEmpty s1) (InitEmpty s1) (ElementsList s1 [])
mkEnum (EnumIdIdent s2 eId) = -- each concrete clafer must fit within the original span of the literal
ElementDecl s2 $
Subclafer s2 $
Clafer s2 (AbstractEmpty s2) (GCardEmpty s2) eId ((SuperSome s2) (ClaferId s2 $ Path s2 [ModIdIdent s2 id'])) (ReferenceEmpty s2) (oneToOne (0, 0)) (InitEmpty s2) (ElementsList s2 []) | 1,124 | true | true | 11 | 15 | 312 | 431 | 207 | 224 | null | null |
BartAdv/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | pprintErr' i (NoRewriting tm) = text "rewrite did not change type" <+> annTm tm (pprintTerm i (delab i tm)) | 107 | pprintErr' i (NoRewriting tm) = text "rewrite did not change type" <+> annTm tm (pprintTerm i (delab i tm)) | 107 | pprintErr' i (NoRewriting tm) = text "rewrite did not change type" <+> annTm tm (pprintTerm i (delab i tm)) | 107 | false | false | 0 | 10 | 18 | 45 | 21 | 24 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | [Output Only] Type of resource. Always compute#backendService for
-- backend services.
bsKind :: Lens' BackendService Text
bsKind = lens _bsKind (\ s a -> s{_bsKind = a}) | 175 | bsKind :: Lens' BackendService Text
bsKind = lens _bsKind (\ s a -> s{_bsKind = a}) | 83 | bsKind = lens _bsKind (\ s a -> s{_bsKind = a}) | 47 | true | true | 0 | 9 | 28 | 48 | 24 | 24 | null | null |
yuvallanger/threepenny-gui | samples/GameThing.hs | bsd-3-clause | loadImages :: [String] -> UI ([Element], Event ())
loadImages urls = do
images <- mapM (\url -> UI.img # set UI.src url) urls
e <- accumE 0 $ (+1) <$ (unions $ map (domEvent "load") images)
return (images, () <$ filterE (== length images) e) | 258 | loadImages :: [String] -> UI ([Element], Event ())
loadImages urls = do
images <- mapM (\url -> UI.img # set UI.src url) urls
e <- accumE 0 $ (+1) <$ (unions $ map (domEvent "load") images)
return (images, () <$ filterE (== length images) e) | 258 | loadImages urls = do
images <- mapM (\url -> UI.img # set UI.src url) urls
e <- accumE 0 $ (+1) <$ (unions $ map (domEvent "load") images)
return (images, () <$ filterE (== length images) e) | 207 | false | true | 0 | 14 | 61 | 146 | 72 | 74 | null | null |
DronovIlya/filemanager-hs | src/Files/Utils.hs | gpl-2.0 | -- |Gets the contente variable. Returns Nothing if the constructor is of `Unknown`.
getFreeVar :: File a ->
Maybe a
getFreeVar (Directory _ d) = Just d | 173 | getFreeVar :: File a ->
Maybe a
getFreeVar (Directory _ d) = Just d | 89 | getFreeVar (Directory _ d) = Just d | 42 | true | true | 0 | 7 | 48 | 36 | 17 | 19 | null | null |
spechub/Hets | CSL/ReduceInterpreter.hs | gpl-2.0 | printEvaluation :: EXPRESSION -> String
printEvaluation e = exportExp e ++ ";" | 78 | printEvaluation :: EXPRESSION -> String
printEvaluation e = exportExp e ++ ";" | 78 | printEvaluation e = exportExp e ++ ";" | 38 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
nevrenato/Hets_Fork | utils/DtdToHaskell-src/pre-1.22/TypeDef.hs | gpl-2.0 | derives :: Doc
derives = text "deriving" <+> parens (commaList (map text ["Eq","Show"])) | 88 | derives :: Doc
derives = text "deriving" <+> parens (commaList (map text ["Eq","Show"])) | 88 | derives = text "deriving" <+> parens (commaList (map text ["Eq","Show"])) | 73 | false | true | 0 | 11 | 12 | 41 | 21 | 20 | null | null |
micknelso/language-c | src/Language/CFamily/Token.hs | bsd-3-clause | posLenOfTok (TokDouble pos ) = pos | 48 | posLenOfTok (TokDouble pos ) = pos | 48 | posLenOfTok (TokDouble pos ) = pos | 48 | false | false | 0 | 7 | 19 | 15 | 7 | 8 | null | null |
spechub/Hets | ExtModal/Parse_AS.hs | gpl-2.0 | nKey :: AParser st Token
nKey = asKey nominalS <|> asKey (nominalS ++ sS) | 73 | nKey :: AParser st Token
nKey = asKey nominalS <|> asKey (nominalS ++ sS) | 73 | nKey = asKey nominalS <|> asKey (nominalS ++ sS) | 48 | false | true | 0 | 8 | 13 | 33 | 16 | 17 | null | null |
bergey/diagrams-opengl | src/Graphics/Rendering/Util.hs | bsd-3-clause | mvp :: MVP
mvp = Field | 26 | mvp :: MVP
mvp = Field | 26 | mvp = Field | 15 | false | true | 0 | 6 | 9 | 18 | 7 | 11 | null | null |
brendanhay/gogol | gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs | mpl-2.0 | -- | The ad units returned in the list response.
llaurAdUnits :: Lens' ListLinkedAdUnitsResponse [AdUnit]
llaurAdUnits
= lens _llaurAdUnits (\ s a -> s{_llaurAdUnits = a})
. _Default
. _Coerce | 206 | llaurAdUnits :: Lens' ListLinkedAdUnitsResponse [AdUnit]
llaurAdUnits
= lens _llaurAdUnits (\ s a -> s{_llaurAdUnits = a})
. _Default
. _Coerce | 157 | llaurAdUnits
= lens _llaurAdUnits (\ s a -> s{_llaurAdUnits = a})
. _Default
. _Coerce | 100 | true | true | 2 | 9 | 43 | 57 | 28 | 29 | null | null |
ffwng/tagfs | Benchmark.hs | gpl-3.0 | benchmark :: String -> IO a -> IO ()
benchmark name io = do
putStrLn $ "Starting " ++ name ++ "…"
start <- getCPUTime
_ <- io
end <- getCPUTime
let t = fromInteger (end - start) / (1000000000000 :: Double)
putStrLn $ name ++ " done in " ++ show t ++ " seconds." | 267 | benchmark :: String -> IO a -> IO ()
benchmark name io = do
putStrLn $ "Starting " ++ name ++ "…"
start <- getCPUTime
_ <- io
end <- getCPUTime
let t = fromInteger (end - start) / (1000000000000 :: Double)
putStrLn $ name ++ " done in " ++ show t ++ " seconds." | 267 | benchmark name io = do
putStrLn $ "Starting " ++ name ++ "…"
start <- getCPUTime
_ <- io
end <- getCPUTime
let t = fromInteger (end - start) / (1000000000000 :: Double)
putStrLn $ name ++ " done in " ++ show t ++ " seconds." | 230 | false | true | 0 | 13 | 61 | 119 | 56 | 63 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1DeleteOptionsPreconditions' Lens
v1DeleteOptionsPreconditionsL :: Lens_' V1DeleteOptions (Maybe V1Preconditions)
v1DeleteOptionsPreconditionsL f V1DeleteOptions{..} = (\v1DeleteOptionsPreconditions -> V1DeleteOptions { v1DeleteOptionsPreconditions, ..} ) <$> f v1DeleteOptionsPreconditions | 297 | v1DeleteOptionsPreconditionsL :: Lens_' V1DeleteOptions (Maybe V1Preconditions)
v1DeleteOptionsPreconditionsL f V1DeleteOptions{..} = (\v1DeleteOptionsPreconditions -> V1DeleteOptions { v1DeleteOptionsPreconditions, ..} ) <$> f v1DeleteOptionsPreconditions | 256 | v1DeleteOptionsPreconditionsL f V1DeleteOptions{..} = (\v1DeleteOptionsPreconditions -> V1DeleteOptions { v1DeleteOptionsPreconditions, ..} ) <$> f v1DeleteOptionsPreconditions | 176 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Analytics advanced segment.
mdqSegment :: Lens' McfDataQuery (Maybe Text)
mdqSegment
= lens _mdqSegment (\ s a -> s{_mdqSegment = a}) | 140 | mdqSegment :: Lens' McfDataQuery (Maybe Text)
mdqSegment
= lens _mdqSegment (\ s a -> s{_mdqSegment = a}) | 107 | mdqSegment
= lens _mdqSegment (\ s a -> s{_mdqSegment = a}) | 61 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
benb/MetAl | src/Phylo/Alignment/Test.hs | gpl-3.0 | reapplySeq' [] [] = [] | 22 | reapplySeq' [] [] = [] | 22 | reapplySeq' [] [] = [] | 22 | false | false | 1 | 6 | 4 | 20 | 8 | 12 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/Attr.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/Attr.ownerElement Mozilla Attr.ownerElement documentation>
getOwnerElementUnchecked :: (MonadDOM m) => Attr -> m Element
getOwnerElementUnchecked self
= liftDOM ((self ^. js "ownerElement") >>= fromJSValUnchecked) | 271 | getOwnerElementUnchecked :: (MonadDOM m) => Attr -> m Element
getOwnerElementUnchecked self
= liftDOM ((self ^. js "ownerElement") >>= fromJSValUnchecked) | 156 | getOwnerElementUnchecked self
= liftDOM ((self ^. js "ownerElement") >>= fromJSValUnchecked) | 94 | true | true | 0 | 10 | 27 | 56 | 27 | 29 | null | null |
expipiplus1/vulkan | generate-new/src/Render/Names.hs | bsd-3-clause | withRenderedNames
:: HasRenderParams r => Spec t -> Sem (Input RenderedNames ': r) a -> Sem r a
withRenderedNames spec a = do
rns <- specRenderedNames spec
runInputConst rns a | 181 | withRenderedNames
:: HasRenderParams r => Spec t -> Sem (Input RenderedNames ': r) a -> Sem r a
withRenderedNames spec a = do
rns <- specRenderedNames spec
runInputConst rns a | 181 | withRenderedNames spec a = do
rns <- specRenderedNames spec
runInputConst rns a | 83 | false | true | 0 | 11 | 35 | 78 | 34 | 44 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_LAYOUT_LINEAR_CPU_CACHED_INTEL :: GLenum
gl_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2 | 81 | gl_LAYOUT_LINEAR_CPU_CACHED_INTEL :: GLenum
gl_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2 | 81 | gl_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2 | 37 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
spechub/Hets | Syntax/AS_Library.der.hs | gpl-2.0 | getSpecDef :: LIB_ITEM -> [SPEC]
getSpecDef li = case li of
Spec_defn _ _ as _ -> [item as]
View_defn _ _ (View_type s1 s2 _) _ _ -> [item s1, item s2]
Entail_defn _ (Entail_type s1 s2 _) _ -> getOms s1 ++ getOms s2
Equiv_defn _ (Equiv_type s1 s2 _) as _ ->
getOms s1 ++ getOms s2 ++ getOms as
Align_defn _ _ (View_type s1 s2 _) _ _ _ -> [item s1, item s2]
Module_defn _ (Module_type s1 s2 _) _ _ -> [item s1, item s2]
_ -> [] | 444 | getSpecDef :: LIB_ITEM -> [SPEC]
getSpecDef li = case li of
Spec_defn _ _ as _ -> [item as]
View_defn _ _ (View_type s1 s2 _) _ _ -> [item s1, item s2]
Entail_defn _ (Entail_type s1 s2 _) _ -> getOms s1 ++ getOms s2
Equiv_defn _ (Equiv_type s1 s2 _) as _ ->
getOms s1 ++ getOms s2 ++ getOms as
Align_defn _ _ (View_type s1 s2 _) _ _ _ -> [item s1, item s2]
Module_defn _ (Module_type s1 s2 _) _ _ -> [item s1, item s2]
_ -> [] | 444 | getSpecDef li = case li of
Spec_defn _ _ as _ -> [item as]
View_defn _ _ (View_type s1 s2 _) _ _ -> [item s1, item s2]
Entail_defn _ (Entail_type s1 s2 _) _ -> getOms s1 ++ getOms s2
Equiv_defn _ (Equiv_type s1 s2 _) as _ ->
getOms s1 ++ getOms s2 ++ getOms as
Align_defn _ _ (View_type s1 s2 _) _ _ _ -> [item s1, item s2]
Module_defn _ (Module_type s1 s2 _) _ _ -> [item s1, item s2]
_ -> [] | 411 | false | true | 0 | 10 | 111 | 246 | 118 | 128 | null | null |
dolio/vector | Data/Vector/Generic/Mutable.hs | bsd-3-clause | transformR f v = fillR v (f (mstreamR v)) | 41 | transformR f v = fillR v (f (mstreamR v)) | 41 | transformR f v = fillR v (f (mstreamR v)) | 41 | false | false | 0 | 9 | 8 | 28 | 13 | 15 | null | null |
ihc/futhark | src/Futhark/CodeGen/SetDefaultSpace.hs | isc | setBodySpace space (Write dest dest_offset bt dest_space vol e) =
Write dest (setCountSpace space dest_offset) bt (setSpace space dest_space)
vol (setExpSpace space e) | 171 | setBodySpace space (Write dest dest_offset bt dest_space vol e) =
Write dest (setCountSpace space dest_offset) bt (setSpace space dest_space)
vol (setExpSpace space e) | 171 | setBodySpace space (Write dest dest_offset bt dest_space vol e) =
Write dest (setCountSpace space dest_offset) bt (setSpace space dest_space)
vol (setExpSpace space e) | 171 | false | false | 0 | 7 | 26 | 66 | 31 | 35 | null | null |
shlevy/ghc | compiler/codeGen/StgCmmLayout.hs | bsd-3-clause | getArgRepsAmodes :: [StgArg] -> FCode [(ArgRep, Maybe CmmExpr)]
getArgRepsAmodes = mapM getArgRepAmode
where getArgRepAmode arg
| V <- rep = return (V, Nothing)
| otherwise = do expr <- getArgAmode (NonVoid arg)
return (rep, Just expr)
where rep = toArgRep (argPrimRep arg) | 337 | getArgRepsAmodes :: [StgArg] -> FCode [(ArgRep, Maybe CmmExpr)]
getArgRepsAmodes = mapM getArgRepAmode
where getArgRepAmode arg
| V <- rep = return (V, Nothing)
| otherwise = do expr <- getArgAmode (NonVoid arg)
return (rep, Just expr)
where rep = toArgRep (argPrimRep arg) | 337 | getArgRepsAmodes = mapM getArgRepAmode
where getArgRepAmode arg
| V <- rep = return (V, Nothing)
| otherwise = do expr <- getArgAmode (NonVoid arg)
return (rep, Just expr)
where rep = toArgRep (argPrimRep arg) | 273 | false | true | 0 | 11 | 105 | 121 | 59 | 62 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qSplitterListFromPtrList :: [Ptr (TQSplitter a)] -> IO [QSplitter a]
qSplitterListFromPtrList p
= objectListFromPtrList qtc_QSplitter_getFinalizer p | 150 | qSplitterListFromPtrList :: [Ptr (TQSplitter a)] -> IO [QSplitter a]
qSplitterListFromPtrList p
= objectListFromPtrList qtc_QSplitter_getFinalizer p | 150 | qSplitterListFromPtrList p
= objectListFromPtrList qtc_QSplitter_getFinalizer p | 81 | false | true | 0 | 9 | 16 | 44 | 21 | 23 | null | null |
vinnymac/glot-www | Util/Api.hs | mit | updateUser :: String -> Text -> Text -> IO ()
updateUser url adminToken userToken = do
let payload = encode $ object ["token" .= userToken]
_ <- httpPut url (Just adminToken) payload
return () | 204 | updateUser :: String -> Text -> Text -> IO ()
updateUser url adminToken userToken = do
let payload = encode $ object ["token" .= userToken]
_ <- httpPut url (Just adminToken) payload
return () | 204 | updateUser url adminToken userToken = do
let payload = encode $ object ["token" .= userToken]
_ <- httpPut url (Just adminToken) payload
return () | 158 | false | true | 0 | 13 | 45 | 86 | 40 | 46 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER :: Int
wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER = 0x00000008 | 101 | wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER :: Int
wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER = 0x00000008 | 101 | wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER = 0x00000008 | 53 | false | true | 0 | 4 | 13 | 11 | 6 | 5 | null | null |
frantisekfarka/ghc-dsi | compiler/cmm/CLabel.hs | bsd-3-clause | toEntryLbl l = pprPanic "toEntryLbl" (ppr l) | 44 | toEntryLbl l = pprPanic "toEntryLbl" (ppr l) | 44 | toEntryLbl l = pprPanic "toEntryLbl" (ppr l) | 44 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
ekmett/data-lens | Data/Lens/Lazy.hs | bsd-3-clause | Lens f != b = StateT $ \a -> case f a of
StoreT (Identity h) _ -> let c = h $! b in
return (b, c) | 103 | Lens f != b = StateT $ \a -> case f a of
StoreT (Identity h) _ -> let c = h $! b in
return (b, c) | 103 | Lens f != b = StateT $ \a -> case f a of
StoreT (Identity h) _ -> let c = h $! b in
return (b, c) | 103 | false | false | 5 | 13 | 33 | 76 | 35 | 41 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | nvMasterip :: String
nvMasterip = "master-ip" | 45 | nvMasterip :: String
nvMasterip = "master-ip" | 45 | nvMasterip = "master-ip" | 24 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
nickspinale/dotfiles | config/xmonad/xmonad.hs | mit | base2 = "#eee8d5" | 19 | base2 = "#eee8d5" | 19 | base2 = "#eee8d5" | 19 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
ivendrov/frabjous2 | src/Frabjous/Compiler/Syntax.hs | mit | addInitial initials program = if Map.null (initial program)
then program { initial = Map.fromList initials }
else error "initial state specified twice" | 211 | addInitial initials program = if Map.null (initial program)
then program { initial = Map.fromList initials }
else error "initial state specified twice" | 211 | addInitial initials program = if Map.null (initial program)
then program { initial = Map.fromList initials }
else error "initial state specified twice" | 211 | false | false | 1 | 9 | 81 | 50 | 23 | 27 | null | null |
dorchard/ypnos | experiments/Dot.hs | bsd-2-clause | dotp :: Vector Float -> Vector Float -> Acc (Scalar Float)
dotp xs ys = let xs' = use xs
ys' = use ys
in
fold (+) 0 (zipWith (*) xs' ys') | 181 | dotp :: Vector Float -> Vector Float -> Acc (Scalar Float)
dotp xs ys = let xs' = use xs
ys' = use ys
in
fold (+) 0 (zipWith (*) xs' ys') | 181 | dotp xs ys = let xs' = use xs
ys' = use ys
in
fold (+) 0 (zipWith (*) xs' ys') | 122 | false | true | 0 | 9 | 75 | 82 | 40 | 42 | null | null |
gatlin/tubes | Tubes/Util.hs | gpl-3.0 | -- | Evaluates and extracts a pure value from a monadic one.
sequence :: Monad m => Tube (m a) a m r
sequence = mapM id | 119 | sequence :: Monad m => Tube (m a) a m r
sequence = mapM id | 58 | sequence = mapM id | 18 | true | true | 0 | 8 | 26 | 37 | 18 | 19 | null | null |
v0lkan/learning-haskell | session-003/019-max-recursive.hs | mit | maximum2 (x:xs) = max x (maximum2 xs) | 37 | maximum2 (x:xs) = max x (maximum2 xs) | 37 | maximum2 (x:xs) = max x (maximum2 xs) | 37 | false | false | 0 | 6 | 6 | 29 | 13 | 16 | null | null |
gnn/Hets | RDF/StaticAnalysis.hs | gpl-2.0 | createAxioms :: TurtleDocument -> [Axiom]
createAxioms doc = map simpleTripleToAxiom $ snd $ expandTripleList 1
$ triplesOfDocument $ resolveDocument doc | 189 | createAxioms :: TurtleDocument -> [Axiom]
createAxioms doc = map simpleTripleToAxiom $ snd $ expandTripleList 1
$ triplesOfDocument $ resolveDocument doc | 189 | createAxioms doc = map simpleTripleToAxiom $ snd $ expandTripleList 1
$ triplesOfDocument $ resolveDocument doc | 147 | false | true | 0 | 9 | 55 | 51 | 23 | 28 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 36998113 = 1808 | 35 | getValueFromProduct 36998113 = 1808 | 35 | getValueFromProduct 36998113 = 1808 | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
agrafix/Spock | Spock/src/Web/Spock/Internal/SessionManager.hs | bsd-3-clause | loadSessionImpl ::
SessionCfg conn sess st ->
SessionStoreInstance (Session conn sess st) ->
SessionId ->
IO (Maybe (Session conn sess st))
loadSessionImpl sessCfg sessionRef@(SessionStoreInstance store) sid =
do
mSess <- ss_runTx store $ ss_loadSession store sid
now <- getCurrentTime
case mSess of
Just sess ->
do
sessWithPossibleExpansion <-
if sc_sessionExpandTTL sessCfg
then do
let expandedSession =
sess
{ sess_validUntil =
addUTCTime (sc_sessionTTL sessCfg) now
}
ss_runTx store $ ss_storeSession store expandedSession
return expandedSession
else return sess
if sess_validUntil sessWithPossibleExpansion > now
then return $ Just sessWithPossibleExpansion
else do
deleteSessionImpl sessionRef sid
return Nothing
Nothing ->
return Nothing | 1,052 | loadSessionImpl ::
SessionCfg conn sess st ->
SessionStoreInstance (Session conn sess st) ->
SessionId ->
IO (Maybe (Session conn sess st))
loadSessionImpl sessCfg sessionRef@(SessionStoreInstance store) sid =
do
mSess <- ss_runTx store $ ss_loadSession store sid
now <- getCurrentTime
case mSess of
Just sess ->
do
sessWithPossibleExpansion <-
if sc_sessionExpandTTL sessCfg
then do
let expandedSession =
sess
{ sess_validUntil =
addUTCTime (sc_sessionTTL sessCfg) now
}
ss_runTx store $ ss_storeSession store expandedSession
return expandedSession
else return sess
if sess_validUntil sessWithPossibleExpansion > now
then return $ Just sessWithPossibleExpansion
else do
deleteSessionImpl sessionRef sid
return Nothing
Nothing ->
return Nothing | 1,052 | loadSessionImpl sessCfg sessionRef@(SessionStoreInstance store) sid =
do
mSess <- ss_runTx store $ ss_loadSession store sid
now <- getCurrentTime
case mSess of
Just sess ->
do
sessWithPossibleExpansion <-
if sc_sessionExpandTTL sessCfg
then do
let expandedSession =
sess
{ sess_validUntil =
addUTCTime (sc_sessionTTL sessCfg) now
}
ss_runTx store $ ss_storeSession store expandedSession
return expandedSession
else return sess
if sess_validUntil sessWithPossibleExpansion > now
then return $ Just sessWithPossibleExpansion
else do
deleteSessionImpl sessionRef sid
return Nothing
Nothing ->
return Nothing | 904 | false | true | 0 | 23 | 404 | 238 | 109 | 129 | null | null |
spechub/Hets | GUI/GtkUtils.hs | gpl-2.0 | -- | Progress/Pulse bar window
progressBarAux :: Bool -- ^ Percent or pulse
-> String -- ^ Title
-> String -- ^ Description
-> IO (Double -> String -> IO (), IO ())
progressBarAux isProgress title description = do
builder <- getGTKBuilder Utils.get
-- get window
window <- builderGetObject builder castToWindow "ProgressBar"
-- get progress bar
bar <- builderGetObject builder castToProgressBar "pbProgress"
windowSetTitle window title
progressBarSetText bar description
progressBarSetPulseStep bar 0.05
windowSetPosition window WinPosCenter
windowSetTypeHint window WindowTypeHintUtility
exit <- if isProgress then return (widgetDestroy window) else do
h <- timeoutAdd (do
progressBarPulse bar
return True
) 75
return (timeoutRemove h >> widgetDestroy window)
widgetShow window
let update p d = do
progressBarSetText bar d
when isProgress $ progressBarSetFraction bar p
return (update, exit) | 1,058 | progressBarAux :: Bool -- ^ Percent or pulse
-> String -- ^ Title
-> String -- ^ Description
-> IO (Double -> String -> IO (), IO ())
progressBarAux isProgress title description = do
builder <- getGTKBuilder Utils.get
-- get window
window <- builderGetObject builder castToWindow "ProgressBar"
-- get progress bar
bar <- builderGetObject builder castToProgressBar "pbProgress"
windowSetTitle window title
progressBarSetText bar description
progressBarSetPulseStep bar 0.05
windowSetPosition window WinPosCenter
windowSetTypeHint window WindowTypeHintUtility
exit <- if isProgress then return (widgetDestroy window) else do
h <- timeoutAdd (do
progressBarPulse bar
return True
) 75
return (timeoutRemove h >> widgetDestroy window)
widgetShow window
let update p d = do
progressBarSetText bar d
when isProgress $ progressBarSetFraction bar p
return (update, exit) | 1,027 | progressBarAux isProgress title description = do
builder <- getGTKBuilder Utils.get
-- get window
window <- builderGetObject builder castToWindow "ProgressBar"
-- get progress bar
bar <- builderGetObject builder castToProgressBar "pbProgress"
windowSetTitle window title
progressBarSetText bar description
progressBarSetPulseStep bar 0.05
windowSetPosition window WinPosCenter
windowSetTypeHint window WindowTypeHintUtility
exit <- if isProgress then return (widgetDestroy window) else do
h <- timeoutAdd (do
progressBarPulse bar
return True
) 75
return (timeoutRemove h >> widgetDestroy window)
widgetShow window
let update p d = do
progressBarSetText bar d
when isProgress $ progressBarSetFraction bar p
return (update, exit) | 848 | true | true | 0 | 17 | 288 | 273 | 121 | 152 | null | null |
csrhodes/pandoc | src/Text/Pandoc/Readers/HTML.hs | gpl-2.0 | eSwitch :: Monoid a => (Inlines -> a) -> TagParser a -> TagParser a
eSwitch constructor parser = try $ do
guardEnabled Ext_epub_html_exts
pSatisfy (~== TagOpen "switch" [])
cases <- getFirst . mconcat <$>
manyTill (First <$> (eCase <* skipMany pBlank) )
(lookAhead $ try $ pSatisfy (~== TagOpen "default" []))
skipMany pBlank
fallback <- pInTags "default" (skipMany pBlank *> parser <* skipMany pBlank)
skipMany pBlank
pSatisfy (~== TagClose "switch")
return $ maybe fallback constructor cases | 535 | eSwitch :: Monoid a => (Inlines -> a) -> TagParser a -> TagParser a
eSwitch constructor parser = try $ do
guardEnabled Ext_epub_html_exts
pSatisfy (~== TagOpen "switch" [])
cases <- getFirst . mconcat <$>
manyTill (First <$> (eCase <* skipMany pBlank) )
(lookAhead $ try $ pSatisfy (~== TagOpen "default" []))
skipMany pBlank
fallback <- pInTags "default" (skipMany pBlank *> parser <* skipMany pBlank)
skipMany pBlank
pSatisfy (~== TagClose "switch")
return $ maybe fallback constructor cases | 535 | eSwitch constructor parser = try $ do
guardEnabled Ext_epub_html_exts
pSatisfy (~== TagOpen "switch" [])
cases <- getFirst . mconcat <$>
manyTill (First <$> (eCase <* skipMany pBlank) )
(lookAhead $ try $ pSatisfy (~== TagOpen "default" []))
skipMany pBlank
fallback <- pInTags "default" (skipMany pBlank *> parser <* skipMany pBlank)
skipMany pBlank
pSatisfy (~== TagClose "switch")
return $ maybe fallback constructor cases | 467 | false | true | 0 | 17 | 117 | 206 | 94 | 112 | null | null |
bos/statistics | Statistics/Types.hs | bsd-2-clause | -- | Create confidence level from probability α or probability that
-- confidence interval does not contain true value of estimate. Will
-- throw exception if parameter is out of [0,1] range
--
-- >>> mkCLFromSignificance 0.05 -- same as cl95
-- mkCLFromSignificance 0.05
mkCLFromSignificance :: (Ord a, Num a) => a -> CL a
mkCLFromSignificance = fromMaybe (error errMkCL) . mkCLFromSignificanceE | 403 | mkCLFromSignificance :: (Ord a, Num a) => a -> CL a
mkCLFromSignificance = fromMaybe (error errMkCL) . mkCLFromSignificanceE | 124 | mkCLFromSignificance = fromMaybe (error errMkCL) . mkCLFromSignificanceE | 72 | true | true | 0 | 8 | 68 | 52 | 29 | 23 | null | null |
timtian090/Playground | Haskell/words/src/Data.hs | mit | grid :: [String]
grid =
[ "__C________R___"
, "__SI________U__"
, "__HASKELL____B_"
, "__A__A_____S__Y"
, "__R___B___C____"
, "__PHP____H_____"
, "____S_LREP_____"
, "____I__M_Y__L__"
, "____L_E__T_O___"
, "_________HB____"
, "_________O_____"
, "________CN_____"
] | 317 | grid :: [String]
grid =
[ "__C________R___"
, "__SI________U__"
, "__HASKELL____B_"
, "__A__A_____S__Y"
, "__R___B___C____"
, "__PHP____H_____"
, "____S_LREP_____"
, "____I__M_Y__L__"
, "____L_E__T_O___"
, "_________HB____"
, "_________O_____"
, "________CN_____"
] | 317 | grid =
[ "__C________R___"
, "__SI________U__"
, "__HASKELL____B_"
, "__A__A_____S__Y"
, "__R___B___C____"
, "__PHP____H_____"
, "____S_LREP_____"
, "____I__M_Y__L__"
, "____L_E__T_O___"
, "_________HB____"
, "_________O_____"
, "________CN_____"
] | 300 | false | true | 0 | 7 | 81 | 57 | 33 | 24 | null | null |
demhydraz/waffle | src/Pretty.hs | bsd-3-clause | block :: Pretty a => Int -> a -> PrettyP
block st ac
= do x <- gets indent
put $ PState (x + st)
pprint ac
put $ PState x | 144 | block :: Pretty a => Int -> a -> PrettyP
block st ac
= do x <- gets indent
put $ PState (x + st)
pprint ac
put $ PState x | 144 | block st ac
= do x <- gets indent
put $ PState (x + st)
pprint ac
put $ PState x | 103 | false | true | 0 | 11 | 53 | 80 | 34 | 46 | null | null |
HIPERFIT/futhark | src/Futhark/Pass/ExtractKernels/DistributeNests.hs | isc | maybeDistributeStm (Let pat aux (Op (Screma w arrs form))) acc
| Just (reds, map_lam) <- isRedomapSOAC form,
lambdaContainsParallelism map_lam = do
(mapstm, redstm) <-
redomapToMapAndReduce pat (w, reds, map_lam, arrs)
distributeMapBodyStms acc $ oneStm mapstm {stmAux = aux} <> oneStm redstm
-- if the reduction can be distributed by itself, we will turn it into a
-- segmented reduce.
--
-- If the reduction cannot be distributed by itself, it will be
-- sequentialised in the default case for this function. | 530 | maybeDistributeStm (Let pat aux (Op (Screma w arrs form))) acc
| Just (reds, map_lam) <- isRedomapSOAC form,
lambdaContainsParallelism map_lam = do
(mapstm, redstm) <-
redomapToMapAndReduce pat (w, reds, map_lam, arrs)
distributeMapBodyStms acc $ oneStm mapstm {stmAux = aux} <> oneStm redstm
-- if the reduction can be distributed by itself, we will turn it into a
-- segmented reduce.
--
-- If the reduction cannot be distributed by itself, it will be
-- sequentialised in the default case for this function. | 530 | maybeDistributeStm (Let pat aux (Op (Screma w arrs form))) acc
| Just (reds, map_lam) <- isRedomapSOAC form,
lambdaContainsParallelism map_lam = do
(mapstm, redstm) <-
redomapToMapAndReduce pat (w, reds, map_lam, arrs)
distributeMapBodyStms acc $ oneStm mapstm {stmAux = aux} <> oneStm redstm
-- if the reduction can be distributed by itself, we will turn it into a
-- segmented reduce.
--
-- If the reduction cannot be distributed by itself, it will be
-- sequentialised in the default case for this function. | 530 | false | false | 0 | 13 | 100 | 134 | 67 | 67 | null | null |
haskell/haddock | haddock-api/src/Haddock/Utils.hs | bsd-2-clause | parseVerbosity "2" = Right Silent | 33 | parseVerbosity "2" = Right Silent | 33 | parseVerbosity "2" = Right Silent | 33 | false | false | 0 | 5 | 4 | 13 | 5 | 8 | null | null |
atsukotakahashi/wi | src/library/Yi/Editor.hs | gpl-2.0 | nextWinE :: EditorM ()
nextWinE = windowsA %= PL.next | 53 | nextWinE :: EditorM ()
nextWinE = windowsA %= PL.next | 53 | nextWinE = windowsA %= PL.next | 30 | false | true | 0 | 6 | 8 | 22 | 11 | 11 | null | null |
danplubell/tzworld-api | library/Data/TZworld/Api.hs | mit | isPointInPoly::(Latitude,Longitude)->TZPoly->Bool
isPointInPoly t p = pnpoly t (tzpolycoords p) | 95 | isPointInPoly::(Latitude,Longitude)->TZPoly->Bool
isPointInPoly t p = pnpoly t (tzpolycoords p) | 95 | isPointInPoly t p = pnpoly t (tzpolycoords p) | 45 | false | true | 0 | 7 | 8 | 41 | 21 | 20 | null | null |
forste/haReFork | refactorer/RefacIntroPattern.hs | bsd-3-clause | introPats pnt t
= applyTP (full_tdTP (idTP `adhocTP` inDec)) t
where
inDec (dec@(Dec (HsFunBind s matches))::HsDeclP)
| findPNT pnt matches && inMatch pnt matches
= do
-- we need to find the type of the variable in question,
-- and also the implementation of the type. If the type
-- is defined outside of the project, we must error!
let match@(HsMatch loc name pats rhs ds) = getMatch pnt matches
typeSig = getTypeSig (pNTtoPN name) t
(typeOfPat, position) = findPatAndType 0 pnt (flatternType typeSig) pats
constrsOfData = findTypeAndConstrs 0 pnt (flatternType typeSig) pats
-- check that argument position is a variable in all defining
-- equations...
if checkVariableEquation matches position
then do
let newMatches = concatMap (createMatches dec (declToName dec) name pats (position+1) constrsOfData) matches
update dec (Dec (HsFunBind s (newMatches++matches))) dec
else do
return dec
inDec x = return x
typToPNT (Typ (HsTyCon x)) = x
typToPNT x = error "Please select a variable with a type constructor!"
checkVariableEquation [] _ = True
checkVariableEquation ((HsMatch _ _ pats _ _):ms) position
| checkPats (pats !! position) = checkVariableEquation ms position
| otherwise = error "Pattern argument must be a variable in all defining equations!"
checkPats (Pat (HsPIrrPat p)) = checkPats p
checkPats (Pat (HsPParen p)) = checkPats p
checkPats (Pat (HsPId (HsVar x))) = True
checkPats _ = False
createMatches (Dec (HsFunBind loc environment)) funName name pats position constrs match
= let (before, after) = break (==match) environment
newMatches = createMatches2 position (length pats) match constrs
in newMatches
where
createMatches2 _ _ _ [] = []
createMatches2 position arity m@(HsMatch _ _ pats rhs ds) ((ConInfo (PN n _) a _):cs)
= let newPats = replace position pats (createPat pnt n a (pats !! (position-1)) (map pNtoName (hsPNs pats ++ hsPNs ds)))
in (HsMatch loc0 name newPats rhs ds) : createMatches2 position arity m cs
where
myReplicate 0 _ _ = []
myReplicate arity names index
= let newName = mkNewName "a" names index
in (nameToPat newName) : (myReplicate (arity-1) (names ++ [newName]) (index+1))
-- ==========================================================================
-- end of introPattern
-- ==========================================================================
-- ==========================================================================
-- introduce sub pattern
-- ========================================================================== | 3,210 | introPats pnt t
= applyTP (full_tdTP (idTP `adhocTP` inDec)) t
where
inDec (dec@(Dec (HsFunBind s matches))::HsDeclP)
| findPNT pnt matches && inMatch pnt matches
= do
-- we need to find the type of the variable in question,
-- and also the implementation of the type. If the type
-- is defined outside of the project, we must error!
let match@(HsMatch loc name pats rhs ds) = getMatch pnt matches
typeSig = getTypeSig (pNTtoPN name) t
(typeOfPat, position) = findPatAndType 0 pnt (flatternType typeSig) pats
constrsOfData = findTypeAndConstrs 0 pnt (flatternType typeSig) pats
-- check that argument position is a variable in all defining
-- equations...
if checkVariableEquation matches position
then do
let newMatches = concatMap (createMatches dec (declToName dec) name pats (position+1) constrsOfData) matches
update dec (Dec (HsFunBind s (newMatches++matches))) dec
else do
return dec
inDec x = return x
typToPNT (Typ (HsTyCon x)) = x
typToPNT x = error "Please select a variable with a type constructor!"
checkVariableEquation [] _ = True
checkVariableEquation ((HsMatch _ _ pats _ _):ms) position
| checkPats (pats !! position) = checkVariableEquation ms position
| otherwise = error "Pattern argument must be a variable in all defining equations!"
checkPats (Pat (HsPIrrPat p)) = checkPats p
checkPats (Pat (HsPParen p)) = checkPats p
checkPats (Pat (HsPId (HsVar x))) = True
checkPats _ = False
createMatches (Dec (HsFunBind loc environment)) funName name pats position constrs match
= let (before, after) = break (==match) environment
newMatches = createMatches2 position (length pats) match constrs
in newMatches
where
createMatches2 _ _ _ [] = []
createMatches2 position arity m@(HsMatch _ _ pats rhs ds) ((ConInfo (PN n _) a _):cs)
= let newPats = replace position pats (createPat pnt n a (pats !! (position-1)) (map pNtoName (hsPNs pats ++ hsPNs ds)))
in (HsMatch loc0 name newPats rhs ds) : createMatches2 position arity m cs
where
myReplicate 0 _ _ = []
myReplicate arity names index
= let newName = mkNewName "a" names index
in (nameToPat newName) : (myReplicate (arity-1) (names ++ [newName]) (index+1))
-- ==========================================================================
-- end of introPattern
-- ==========================================================================
-- ==========================================================================
-- introduce sub pattern
-- ========================================================================== | 3,210 | introPats pnt t
= applyTP (full_tdTP (idTP `adhocTP` inDec)) t
where
inDec (dec@(Dec (HsFunBind s matches))::HsDeclP)
| findPNT pnt matches && inMatch pnt matches
= do
-- we need to find the type of the variable in question,
-- and also the implementation of the type. If the type
-- is defined outside of the project, we must error!
let match@(HsMatch loc name pats rhs ds) = getMatch pnt matches
typeSig = getTypeSig (pNTtoPN name) t
(typeOfPat, position) = findPatAndType 0 pnt (flatternType typeSig) pats
constrsOfData = findTypeAndConstrs 0 pnt (flatternType typeSig) pats
-- check that argument position is a variable in all defining
-- equations...
if checkVariableEquation matches position
then do
let newMatches = concatMap (createMatches dec (declToName dec) name pats (position+1) constrsOfData) matches
update dec (Dec (HsFunBind s (newMatches++matches))) dec
else do
return dec
inDec x = return x
typToPNT (Typ (HsTyCon x)) = x
typToPNT x = error "Please select a variable with a type constructor!"
checkVariableEquation [] _ = True
checkVariableEquation ((HsMatch _ _ pats _ _):ms) position
| checkPats (pats !! position) = checkVariableEquation ms position
| otherwise = error "Pattern argument must be a variable in all defining equations!"
checkPats (Pat (HsPIrrPat p)) = checkPats p
checkPats (Pat (HsPParen p)) = checkPats p
checkPats (Pat (HsPId (HsVar x))) = True
checkPats _ = False
createMatches (Dec (HsFunBind loc environment)) funName name pats position constrs match
= let (before, after) = break (==match) environment
newMatches = createMatches2 position (length pats) match constrs
in newMatches
where
createMatches2 _ _ _ [] = []
createMatches2 position arity m@(HsMatch _ _ pats rhs ds) ((ConInfo (PN n _) a _):cs)
= let newPats = replace position pats (createPat pnt n a (pats !! (position-1)) (map pNtoName (hsPNs pats ++ hsPNs ds)))
in (HsMatch loc0 name newPats rhs ds) : createMatches2 position arity m cs
where
myReplicate 0 _ _ = []
myReplicate arity names index
= let newName = mkNewName "a" names index
in (nameToPat newName) : (myReplicate (arity-1) (names ++ [newName]) (index+1))
-- ==========================================================================
-- end of introPattern
-- ==========================================================================
-- ==========================================================================
-- introduce sub pattern
-- ========================================================================== | 3,210 | false | false | 0 | 18 | 1,078 | 827 | 413 | 414 | null | null |
timtylin/scholdoc-texmath | src/Text/TeXMath/Readers/TeX.hs | gpl-2.0 | umlaut 'U' = "Ü" | 16 | umlaut 'U' = "Ü" | 16 | umlaut 'U' = "Ü" | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
diffusionkinetics/open | dampf/lib/Dampf/Internal/Env.hs | mit | resolveObject :: HashMap Text Value -> IO (HashMap Text Value)
resolveObject m = fmap HM.fromList . forM kvs $ \(k, v) -> do
rk <- resolveString k
rv <- resolveEnvVars v
return (rk, rv)
where
kvs = HM.toList m | 228 | resolveObject :: HashMap Text Value -> IO (HashMap Text Value)
resolveObject m = fmap HM.fromList . forM kvs $ \(k, v) -> do
rk <- resolveString k
rv <- resolveEnvVars v
return (rk, rv)
where
kvs = HM.toList m | 228 | resolveObject m = fmap HM.fromList . forM kvs $ \(k, v) -> do
rk <- resolveString k
rv <- resolveEnvVars v
return (rk, rv)
where
kvs = HM.toList m | 165 | false | true | 1 | 10 | 57 | 114 | 51 | 63 | null | null |
DavidAlphaFox/yesod | yesod-core/Yesod/Core/Handler.hs | mit | -- | Get the master site application argument.
getYesod :: MonadHandler m => m (HandlerSite m)
getYesod = rheSite `liftM` askHandlerEnv | 135 | getYesod :: MonadHandler m => m (HandlerSite m)
getYesod = rheSite `liftM` askHandlerEnv | 88 | getYesod = rheSite `liftM` askHandlerEnv | 40 | true | true | 0 | 8 | 20 | 34 | 18 | 16 | null | null |
adamse/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | latexStripTrailingWhitespace (DocParagraph p) =
latexStripTrailingWhitespace p | 80 | latexStripTrailingWhitespace (DocParagraph p) =
latexStripTrailingWhitespace p | 80 | latexStripTrailingWhitespace (DocParagraph p) =
latexStripTrailingWhitespace p | 80 | false | false | 0 | 7 | 7 | 18 | 8 | 10 | null | null |
ababkin/hs-aws-sns | tests/Main.hs | mit | defaultTopicName :: T.Text
defaultTopicName = "test-topic" | 58 | defaultTopicName :: T.Text
defaultTopicName = "test-topic" | 58 | defaultTopicName = "test-topic" | 31 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
neosam/esge | src/Esge/Run.hs | bsd-3-clause | defaultMods :: [IngameMod]
defaultMods = [] | 43 | defaultMods :: [IngameMod]
defaultMods = [] | 43 | defaultMods = [] | 16 | false | true | 0 | 5 | 5 | 16 | 9 | 7 | null | null |
mattias-lundell/timber-llvm | src/Common.hs | bsd-3-clause | deleteName n (p:rn) = let (b,rn') = deleteName n rn
in (b,p:rn') | 111 | deleteName n (p:rn) = let (b,rn') = deleteName n rn
in (b,p:rn') | 111 | deleteName n (p:rn) = let (b,rn') = deleteName n rn
in (b,p:rn') | 111 | false | false | 0 | 9 | 58 | 51 | 26 | 25 | null | null |
sumitsahrawat/plot-gtk-ui | lib/Graphics/Rendering/Plot/Gtk/UI/PlotWindow.hs | gpl-2.0 | --------------------------------------------------------------------------------
updateCanvas :: ([Double] -> Double -> Double)
-> DrawingArea
-> IORef FigureSettings
-> [Adjustment]
-> IO ()
updateCanvas g canvas iofset adjs = do
s@(w, h) <- widgetGetSize canvas
drw <- widgetGetDrawWindow canvas
fig <- figurePlot g iofset adjs
box <- regionRectangle $ Rectangle 0 0 w h
drawWindowBeginPaintRegion drw box
catch (renderWithDrawable drw (render fig s))
(\(SomeException _) -> do
fset <- readIORef iofset
renderWithDrawable drw (errorFig fset s))
drawWindowEndPaint drw
-------------------------------------------------------------------------------- | 771 | updateCanvas :: ([Double] -> Double -> Double)
-> DrawingArea
-> IORef FigureSettings
-> [Adjustment]
-> IO ()
updateCanvas g canvas iofset adjs = do
s@(w, h) <- widgetGetSize canvas
drw <- widgetGetDrawWindow canvas
fig <- figurePlot g iofset adjs
box <- regionRectangle $ Rectangle 0 0 w h
drawWindowBeginPaintRegion drw box
catch (renderWithDrawable drw (render fig s))
(\(SomeException _) -> do
fset <- readIORef iofset
renderWithDrawable drw (errorFig fset s))
drawWindowEndPaint drw
-------------------------------------------------------------------------------- | 689 | updateCanvas g canvas iofset adjs = do
s@(w, h) <- widgetGetSize canvas
drw <- widgetGetDrawWindow canvas
fig <- figurePlot g iofset adjs
box <- regionRectangle $ Rectangle 0 0 w h
drawWindowBeginPaintRegion drw box
catch (renderWithDrawable drw (render fig s))
(\(SomeException _) -> do
fset <- readIORef iofset
renderWithDrawable drw (errorFig fset s))
drawWindowEndPaint drw
-------------------------------------------------------------------------------- | 526 | true | true | 0 | 14 | 194 | 204 | 97 | 107 | null | null |
LukeHoersten/io-streams | test/System/IO/Streams/Tests/Vector.hs | bsd-3-clause | testToMutableVector :: Test
testToMutableVector = testCase "vector/toMutableVector" $ do
is <- S.fromList [1::Int,2,3]
toMutableVector is
>>= V.unsafeFreeze
>>= assertEqual "toMutableVector" (V.fromList [1,2,3]) | 235 | testToMutableVector :: Test
testToMutableVector = testCase "vector/toMutableVector" $ do
is <- S.fromList [1::Int,2,3]
toMutableVector is
>>= V.unsafeFreeze
>>= assertEqual "toMutableVector" (V.fromList [1,2,3]) | 235 | testToMutableVector = testCase "vector/toMutableVector" $ do
is <- S.fromList [1::Int,2,3]
toMutableVector is
>>= V.unsafeFreeze
>>= assertEqual "toMutableVector" (V.fromList [1,2,3]) | 207 | false | true | 0 | 12 | 45 | 80 | 41 | 39 | null | null |
sajith/cis194 | hw11/AMore.hs | mit | parseExprs :: Parser [SExpr]
parseExprs = parseParens $ oneOrMore parseSExpr | 76 | parseExprs :: Parser [SExpr]
parseExprs = parseParens $ oneOrMore parseSExpr | 76 | parseExprs = parseParens $ oneOrMore parseSExpr | 47 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
travitch/llvm-analysis | src/LLVM/Analysis/CFG/Internal.hs | bsd-3-clause | basicBlockSuccessors :: (HasCFG cfgLike) => cfgLike -> BasicBlock -> [BasicBlock]
basicBlockSuccessors cfgLike bb = case cfgBody cfg of
GMany _ lm _ -> fromMaybe [] $ do
blbl <- basicBlockToLabel cfg bb
blk <- mapLookup blbl lm
return $ mapMaybe (labelToBasicBlock cfg) (successors blk)
where
cfg = getCFG cfgLike | 333 | basicBlockSuccessors :: (HasCFG cfgLike) => cfgLike -> BasicBlock -> [BasicBlock]
basicBlockSuccessors cfgLike bb = case cfgBody cfg of
GMany _ lm _ -> fromMaybe [] $ do
blbl <- basicBlockToLabel cfg bb
blk <- mapLookup blbl lm
return $ mapMaybe (labelToBasicBlock cfg) (successors blk)
where
cfg = getCFG cfgLike | 333 | basicBlockSuccessors cfgLike bb = case cfgBody cfg of
GMany _ lm _ -> fromMaybe [] $ do
blbl <- basicBlockToLabel cfg bb
blk <- mapLookup blbl lm
return $ mapMaybe (labelToBasicBlock cfg) (successors blk)
where
cfg = getCFG cfgLike | 251 | false | true | 1 | 14 | 68 | 132 | 59 | 73 | null | null |
KommuSoft/dep-software | Dep.Ui.Utils.Boxes.hs | gpl-3.0 | spacer a n o is = charFillTpl a ' ' dm
where s = maximum $ map (orDim2 o) is
dm = orSet2 o s (n,n) | 112 | spacer a n o is = charFillTpl a ' ' dm
where s = maximum $ map (orDim2 o) is
dm = orSet2 o s (n,n) | 112 | spacer a n o is = charFillTpl a ' ' dm
where s = maximum $ map (orDim2 o) is
dm = orSet2 o s (n,n) | 112 | false | false | 0 | 10 | 39 | 62 | 31 | 31 | null | null |
ian-ross/ggp | GGP/Utils.hs | bsd-3-clause | -- | Is a given state a terminal state?
isTerminal :: Database -> State -> Bool
isTerminal db st = not $ null $ query (db |+| st) [gdlq|terminal|] | 146 | isTerminal :: Database -> State -> Bool
isTerminal db st = not $ null $ query (db |+| st) [gdlq|terminal|] | 106 | isTerminal db st = not $ null $ query (db |+| st) [gdlq|terminal|] | 66 | true | true | 2 | 8 | 28 | 55 | 28 | 27 | null | null |
michaelt/lens-simple | examples/Pong.hs | bsd-3-clause | windowWidth = 800 | 21 | windowWidth = 800 | 21 | windowWidth = 800 | 21 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
massudaw/mtk | filters/attitude/Sensor/Razor9DOF.hs | bsd-3-clause | selectIMU = "select timestamp,accx,accy,accz,gyrox,gyroy,gyroz,magx,magy,magz from imuLog order by timestamp" | 110 | selectIMU = "select timestamp,accx,accy,accz,gyrox,gyroy,gyroz,magx,magy,magz from imuLog order by timestamp" | 110 | selectIMU = "select timestamp,accx,accy,accz,gyrox,gyroy,gyroz,magx,magy,magz from imuLog order by timestamp" | 110 | false | false | 0 | 4 | 9 | 6 | 3 | 3 | null | null |
markus1189/xmonad-contrib-710 | XMonad/Layout/HintedGrid.hs | bsd-3-clause | arrange :: Double -> Bool -> Rectangle -> [Window] -> X [(Window, Rectangle)]
arrange aspectRatio mirror (Rectangle rx ry rw rh) wins = do
proto <- mapM mkAdjust wins
let
adjs = map (\f -> twist . f . twist) proto
rs = arrange' aspectRatio (twist (rw, rh)) adjs
rs' = map (\(Rectangle x y w h) -> uncurry (uncurry Rectangle (twist (x, y))) (twist (w, h))) rs
return . zip wins . map (\r -> r{ rect_x = rect_x r + rx, rect_y = rect_y r + ry }) $ rs'
where
twist
| mirror = \(a, b) -> (b, a)
| otherwise = id | 566 | arrange :: Double -> Bool -> Rectangle -> [Window] -> X [(Window, Rectangle)]
arrange aspectRatio mirror (Rectangle rx ry rw rh) wins = do
proto <- mapM mkAdjust wins
let
adjs = map (\f -> twist . f . twist) proto
rs = arrange' aspectRatio (twist (rw, rh)) adjs
rs' = map (\(Rectangle x y w h) -> uncurry (uncurry Rectangle (twist (x, y))) (twist (w, h))) rs
return . zip wins . map (\r -> r{ rect_x = rect_x r + rx, rect_y = rect_y r + ry }) $ rs'
where
twist
| mirror = \(a, b) -> (b, a)
| otherwise = id | 566 | arrange aspectRatio mirror (Rectangle rx ry rw rh) wins = do
proto <- mapM mkAdjust wins
let
adjs = map (\f -> twist . f . twist) proto
rs = arrange' aspectRatio (twist (rw, rh)) adjs
rs' = map (\(Rectangle x y w h) -> uncurry (uncurry Rectangle (twist (x, y))) (twist (w, h))) rs
return . zip wins . map (\r -> r{ rect_x = rect_x r + rx, rect_y = rect_y r + ry }) $ rs'
where
twist
| mirror = \(a, b) -> (b, a)
| otherwise = id | 488 | false | true | 2 | 18 | 165 | 295 | 153 | 142 | null | null |
meiersi/blaze-builder | benchmarks/Throughput/BlazePutMonad.hs | bsd-3-clause | ------------------------------------------------------------------------
-- | /O(1)./ Write a single native machine word. The word is
-- written in host order, host endian form, for the machine you're on.
-- On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine,
-- 4 bytes. Values written this way are not portable to
-- different endian or word sized machines, without conversion.
--
putWordhost :: Word -> Put
putWordhost = tell . B.fromWordhost | 480 | putWordhost :: Word -> Put
putWordhost = tell . B.fromWordhost | 78 | putWordhost = tell . B.fromWordhost | 43 | true | true | 1 | 7 | 91 | 36 | 19 | 17 | null | null |
sopvop/cabal | Cabal/Distribution/GetOpt.hs | bsd-3-clause | errAmbig :: [OptDescr a] -> String -> OptKind a
errAmbig ods optStr = OptErr (usageInfo header ods)
where header = "option `" ++ optStr ++ "' is ambiguous; could be one of:" | 176 | errAmbig :: [OptDescr a] -> String -> OptKind a
errAmbig ods optStr = OptErr (usageInfo header ods)
where header = "option `" ++ optStr ++ "' is ambiguous; could be one of:" | 176 | errAmbig ods optStr = OptErr (usageInfo header ods)
where header = "option `" ++ optStr ++ "' is ambiguous; could be one of:" | 128 | false | true | 0 | 7 | 34 | 60 | 29 | 31 | null | null |
sdiehl/ghc | compiler/utils/Pretty.hs | bsd-3-clause | lbrace = char '{' | 17 | lbrace = char '{' | 17 | lbrace = char '{' | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
informatikr/scrypt | src/Crypto/Scrypt.hs | bsd-3-clause | -- |Equivalent to @encryptPass defaultParams@.
--
encryptPass' :: Salt -> Pass -> EncryptedPass
encryptPass' = encryptPass defaultParams | 136 | encryptPass' :: Salt -> Pass -> EncryptedPass
encryptPass' = encryptPass defaultParams | 86 | encryptPass' = encryptPass defaultParams | 40 | true | true | 0 | 8 | 16 | 30 | 14 | 16 | null | null |
twopoint718/haifa | src/Record.hs | gpl-2.0 | getRecord _ = C_Record | 22 | getRecord _ = C_Record | 22 | getRecord _ = C_Record | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
lynnard/reflex-cocos2d | src/Reflex/Cocos2d/Misc/Chipmunk.hs | mit | elasticity :: (MonadIO m, ShapePtr a s) => Attrib' s m Float
elasticity = liftStateVarToFloat $ H.elasticity . toShape | 118 | elasticity :: (MonadIO m, ShapePtr a s) => Attrib' s m Float
elasticity = liftStateVarToFloat $ H.elasticity . toShape | 118 | elasticity = liftStateVarToFloat $ H.elasticity . toShape | 57 | false | true | 0 | 7 | 18 | 45 | 23 | 22 | null | null |
wavewave/lhc-analysis-collection | exe/evchainRunXQLD_2sg.hs | gpl-3.0 | sup = [1000002,-1000002] | 24 | sup = [1000002,-1000002] | 24 | sup = [1000002,-1000002] | 24 | false | false | 1 | 6 | 2 | 17 | 8 | 9 | null | null |
joashc/cryptodiner | network/DcServerIO.hs | gpl-3.0 | reportResult (Left a) = print a | 31 | reportResult (Left a) = print a | 31 | reportResult (Left a) = print a | 31 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
thsutton/aeson-diff | lib/Data/Aeson/Diff.hs | bsd-2-clause | -- | Apply an 'Operation' to a 'Value'.
applyOperation
:: Operation
-> Value
-> Result Value
applyOperation op json = case op of
Add path v' -> applyAdd path v' json
Rem path -> applyRem path json
Rep path v' -> applyRep path v' json
Tst path v -> applyTst path v json
Cpy path from -> applyCpy path from json
Mov path from -> do
v' <- get from json
applyRem from json >>= applyAdd path v'
-- | Apply an 'Add' operation to a document.
--
-- http://tools.ietf.org/html/rfc6902#section-4.1
--
-- - An empty 'Path' replaces the document.
-- - A single 'OKey' inserts or replaces the corresponding member in an object.
-- - A single 'AKey' inserts at the corresponding location.
-- - Longer 'Paths' traverse if they can and fail otherwise. | 804 | applyOperation
:: Operation
-> Value
-> Result Value
applyOperation op json = case op of
Add path v' -> applyAdd path v' json
Rem path -> applyRem path json
Rep path v' -> applyRep path v' json
Tst path v -> applyTst path v json
Cpy path from -> applyCpy path from json
Mov path from -> do
v' <- get from json
applyRem from json >>= applyAdd path v'
-- | Apply an 'Add' operation to a document.
--
-- http://tools.ietf.org/html/rfc6902#section-4.1
--
-- - An empty 'Path' replaces the document.
-- - A single 'OKey' inserts or replaces the corresponding member in an object.
-- - A single 'AKey' inserts at the corresponding location.
-- - Longer 'Paths' traverse if they can and fail otherwise. | 764 | applyOperation op json = case op of
Add path v' -> applyAdd path v' json
Rem path -> applyRem path json
Rep path v' -> applyRep path v' json
Tst path v -> applyTst path v json
Cpy path from -> applyCpy path from json
Mov path from -> do
v' <- get from json
applyRem from json >>= applyAdd path v'
-- | Apply an 'Add' operation to a document.
--
-- http://tools.ietf.org/html/rfc6902#section-4.1
--
-- - An empty 'Path' replaces the document.
-- - A single 'OKey' inserts or replaces the corresponding member in an object.
-- - A single 'AKey' inserts at the corresponding location.
-- - Longer 'Paths' traverse if they can and fail otherwise. | 699 | true | true | 9 | 8 | 202 | 153 | 79 | 74 | null | null |
massysett/cartel | cartel/tests/Cartel/Generators.hs | bsd-3-clause | chooseDefault :: Random a => Gen a
chooseDefault = do
g <- getStdGen
let (r, g') = random g
setStdGen g'
return r | 121 | chooseDefault :: Random a => Gen a
chooseDefault = do
g <- getStdGen
let (r, g') = random g
setStdGen g'
return r | 121 | chooseDefault = do
g <- getStdGen
let (r, g') = random g
setStdGen g'
return r | 86 | false | true | 0 | 11 | 30 | 65 | 27 | 38 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.