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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Laar/CodeGenerating | src/Code/Generating/Utils/Imports.hs | bsd-3-clause | -----------------------------------------------------------------------
-- | Checks that an `ImportDecl` is 'simple', thus it's not imported
-- with a specific source or package name.
isSimpleImportDecl :: ImportDecl -> Bool
isSimpleImportDecl i = not (importSrc i) && isNothing (importPkg i) | 293 | isSimpleImportDecl :: ImportDecl -> Bool
isSimpleImportDecl i = not (importSrc i) && isNothing (importPkg i) | 108 | isSimpleImportDecl i = not (importSrc i) && isNothing (importPkg i) | 67 | true | true | 0 | 8 | 36 | 43 | 22 | 21 | null | null |
spechub/Hets | SoftFOL/Sign.hs | gpl-2.0 | typedVarTerm :: SPIdentifier -- ^ Variable symbol: v
-> SPIdentifier -- ^ Sort symbol: s
-> SPTerm -- ^ Term: s(v)
typedVarTerm spVar spSort = compTerm (spSym spSort) [simpTerm (spSym spVar)] | 217 | typedVarTerm :: SPIdentifier -- ^ Variable symbol: v
-> SPIdentifier -- ^ Sort symbol: s
-> SPTerm
typedVarTerm spVar spSort = compTerm (spSym spSort) [simpTerm (spSym spVar)] | 201 | typedVarTerm spVar spSort = compTerm (spSym spSort) [simpTerm (spSym spVar)] | 76 | true | true | 0 | 9 | 56 | 50 | 26 | 24 | null | null |
DougBurke/swish | tests/RDFRulesetTest.hs | lgpl-2.1 | testStringEq :: String -> String -> String -> Test
testStringEq = testCompare "testStringEq:" | 93 | testStringEq :: String -> String -> String -> Test
testStringEq = testCompare "testStringEq:" | 93 | testStringEq = testCompare "testStringEq:" | 42 | false | true | 0 | 9 | 12 | 32 | 14 | 18 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | lightfootedly = id | 18 | lightfootedly = id | 18 | lightfootedly = id | 18 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
iblumenfeld/saw-core | src/Verifier/SAW/Rewriter.hs | bsd-3-clause | ruleOfTerms :: Termlike t => t -> t -> RewriteRule t
ruleOfTerms l r = RewriteRule { ctxt = [], lhs = l, rhs = r } | 114 | ruleOfTerms :: Termlike t => t -> t -> RewriteRule t
ruleOfTerms l r = RewriteRule { ctxt = [], lhs = l, rhs = r } | 114 | ruleOfTerms l r = RewriteRule { ctxt = [], lhs = l, rhs = r } | 61 | false | true | 0 | 8 | 26 | 56 | 30 | 26 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/Data/Data.hs | bsd-3-clause | sumDataType :: DataType
sumDataType = mkDataType "Data.Monoid.Sum" [sumConstr] | 78 | sumDataType :: DataType
sumDataType = mkDataType "Data.Monoid.Sum" [sumConstr] | 78 | sumDataType = mkDataType "Data.Monoid.Sum" [sumConstr] | 54 | false | true | 0 | 6 | 7 | 25 | 11 | 14 | null | null |
GaloisInc/halvm-ghc | compiler/utils/UniqFM.hs | bsd-3-clause | -- Arguments of combining function of M.insertWith and addToUFM_C are flipped.
addToUFM_C f (UFM m) k v =
UFM (M.insertWith (flip f) (getKey $ getUnique k) v m) | 162 | addToUFM_C f (UFM m) k v =
UFM (M.insertWith (flip f) (getKey $ getUnique k) v m) | 83 | addToUFM_C f (UFM m) k v =
UFM (M.insertWith (flip f) (getKey $ getUnique k) v m) | 83 | true | false | 0 | 10 | 29 | 55 | 27 | 28 | null | null |
iu-parfunc/tslogger | src/System/Log/TSLogger.hs | bsd-3-clause | logStrLn :: Logger -> Int -> String -> IO ()
logStrLn l i s = logOn l (StrMsg i s) | 82 | logStrLn :: Logger -> Int -> String -> IO ()
logStrLn l i s = logOn l (StrMsg i s) | 82 | logStrLn l i s = logOn l (StrMsg i s) | 37 | false | true | 0 | 9 | 19 | 48 | 23 | 25 | null | null |
mightymoose/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Generic/New.nocpp.hs | bsd-3-clause | transform :: Vector v a =>
(forall m. Monad m => MStream m a -> MStream m a) -> New v a -> New v a
{- INLINE [1] transform #-}
transform f (New poing) = New $ do zog <- poing -- LIQUID: issue #202
let fef = liquidAssume (0 <= liquid_mvLen zog) zog -- LIQUID: issue #202
MVector.transform f fef -- LIQUID: issue #202
-- (New p) -- New (MVector.transform f =<< p)
--
{-@ liquid_mvLen :: x:a -> {v:Int | v = (mvLen x)} @-} | 630 | transform :: Vector v a =>
(forall m. Monad m => MStream m a -> MStream m a) -> New v a -> New v a
transform f (New poing) = New $ do zog <- poing -- LIQUID: issue #202
let fef = liquidAssume (0 <= liquid_mvLen zog) zog -- LIQUID: issue #202
MVector.transform f fef -- LIQUID: issue #202
-- (New p) -- New (MVector.transform f =<< p)
--
{-@ liquid_mvLen :: x:a -> {v:Int | v = (mvLen x)} @-} | 602 | transform f (New poing) = New $ do zog <- poing -- LIQUID: issue #202
let fef = liquidAssume (0 <= liquid_mvLen zog) zog -- LIQUID: issue #202
MVector.transform f fef -- LIQUID: issue #202
-- (New p) -- New (MVector.transform f =<< p)
--
{-@ liquid_mvLen :: x:a -> {v:Int | v = (mvLen x)} @-} | 495 | true | true | 0 | 14 | 298 | 130 | 64 | 66 | null | null |
sdiehl/ghc | libraries/base/GHC/List.hs | bsd-3-clause | filter :: (a -> Bool) -> [a] -> [a]
filter _pred [] = [] | 59 | filter :: (a -> Bool) -> [a] -> [a]
filter _pred [] = [] | 59 | filter _pred [] = [] | 23 | false | true | 0 | 7 | 16 | 46 | 23 | 23 | null | null |
johanneshilden/dyckword | src/Math/DyckWord/Binary.hs | bsd-3-clause | toText :: DyckWord -> Text
toText = _text | 41 | toText :: DyckWord -> Text
toText = _text | 41 | toText = _text | 14 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
TheBizzle/SimServer-Haskell | src/Main.hs | bsd-3-clause | main :: IO ()
main = quickHttpServe site | 40 | main :: IO ()
main = quickHttpServe site | 40 | main = quickHttpServe site | 26 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
ksaveljev/hake-2 | src/Game/Monsters/MMutant.hs | bsd-3-clause | mutantMovePain2 :: MMoveT
mutantMovePain2 = MMoveT "mutantMovePain2" framePain201 framePain206 mutantFramesPain2 (Just mutantRun) | 129 | mutantMovePain2 :: MMoveT
mutantMovePain2 = MMoveT "mutantMovePain2" framePain201 framePain206 mutantFramesPain2 (Just mutantRun) | 129 | mutantMovePain2 = MMoveT "mutantMovePain2" framePain201 framePain206 mutantFramesPain2 (Just mutantRun) | 103 | false | true | 0 | 7 | 11 | 28 | 14 | 14 | null | null |
pascal-knodel/haskell-craft | _/links/E'4''6.hs | mit | fourPics4 :: Picture -> Picture
fourPics4 pic
= top `above` bottom
where
top, bottom :: Picture
top = pic `beside` ( invertColour ( flipV pic ) )
bottom = flipV top | 184 | fourPics4 :: Picture -> Picture
fourPics4 pic
= top `above` bottom
where
top, bottom :: Picture
top = pic `beside` ( invertColour ( flipV pic ) )
bottom = flipV top | 184 | fourPics4 pic
= top `above` bottom
where
top, bottom :: Picture
top = pic `beside` ( invertColour ( flipV pic ) )
bottom = flipV top | 152 | false | true | 0 | 9 | 50 | 65 | 36 | 29 | null | null |
bitemyapp/amqp | Network/AMQP.hs | bsd-3-clause | unbindExchange :: Channel -> Text -> Text -> Text -> IO ()
unbindExchange chan destinationName sourceName routingKey =
unbindExchange' chan destinationName sourceName routingKey (FieldTable M.empty) | 200 | unbindExchange :: Channel -> Text -> Text -> Text -> IO ()
unbindExchange chan destinationName sourceName routingKey =
unbindExchange' chan destinationName sourceName routingKey (FieldTable M.empty) | 200 | unbindExchange chan destinationName sourceName routingKey =
unbindExchange' chan destinationName sourceName routingKey (FieldTable M.empty) | 141 | false | true | 0 | 10 | 26 | 60 | 29 | 31 | null | null |
mchakravarty/hoas-conv | DeBruijn.hs | bsd-3-clause | intp (Lam body) val = intp body . (val `Push`) | 50 | intp (Lam body) val = intp body . (val `Push`) | 50 | intp (Lam body) val = intp body . (val `Push`) | 50 | false | false | 0 | 7 | 13 | 30 | 16 | 14 | null | null |
pparkkin/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp IndexOffAddrOp_WideChar = Just $ addrIndexOp jint mempty | 65 | simpleOp IndexOffAddrOp_WideChar = Just $ addrIndexOp jint mempty | 65 | simpleOp IndexOffAddrOp_WideChar = Just $ addrIndexOp jint mempty | 65 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
jonahkagan/zero | src/Atbash.hs | mit | buildTable :: Alphabet c -> Table c c
buildTable alpha = zip cs (reverse cs) where cs = chars alpha | 99 | buildTable :: Alphabet c -> Table c c
buildTable alpha = zip cs (reverse cs) where cs = chars alpha | 99 | buildTable alpha = zip cs (reverse cs) where cs = chars alpha | 61 | false | true | 0 | 7 | 19 | 47 | 22 | 25 | null | null |
GaloisInc/pads-haskell | Examples/Regression.hs | bsd-3-clause | (t55,pt55,ppt55,result55) = (t,pt,ppt,result)
where
t = "newtype Void = Void ()"
pt = testParsePadsDecls t
ppt = case pt of Left e -> show e ; Right r -> pretty 150 (ppDeclList r)
result = t == ppt | 227 | (t55,pt55,ppt55,result55) = (t,pt,ppt,result)
where
t = "newtype Void = Void ()"
pt = testParsePadsDecls t
ppt = case pt of Left e -> show e ; Right r -> pretty 150 (ppDeclList r)
result = t == ppt | 227 | (t55,pt55,ppt55,result55) = (t,pt,ppt,result)
where
t = "newtype Void = Void ()"
pt = testParsePadsDecls t
ppt = case pt of Left e -> show e ; Right r -> pretty 150 (ppDeclList r)
result = t == ppt | 227 | false | false | 3 | 11 | 67 | 95 | 50 | 45 | null | null |
sdiehl/ghc | compiler/types/Type.hs | bsd-3-clause | -- | Like 'mkForAllTys', but assumes all variables are dependent and
-- 'Inferred', a common case
mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
mkTyCoInvForAllTys tvs ty = foldr mkTyCoInvForAllTy ty tvs | 204 | mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
mkTyCoInvForAllTys tvs ty = foldr mkTyCoInvForAllTy ty tvs | 106 | mkTyCoInvForAllTys tvs ty = foldr mkTyCoInvForAllTy ty tvs | 58 | true | true | 0 | 6 | 30 | 36 | 19 | 17 | null | null |
DavidAlphaFox/ghc | compiler/simplCore/CSE.hs | bsd-3-clause | cseExpr env (App f a) = App (cseExpr env f) (tryForCSE env a) | 74 | cseExpr env (App f a) = App (cseExpr env f) (tryForCSE env a) | 74 | cseExpr env (App f a) = App (cseExpr env f) (tryForCSE env a) | 74 | false | false | 0 | 7 | 25 | 42 | 19 | 23 | null | null |
thalerjonathan/phd | coding/libraries/chimera/src/FRP/Chimera/Simulation/SeqIteration.hs | gpl-3.0 | insertIntoMap :: [AgentIn s m e] -> AgentInMap s m e -> AgentInMap s m e
insertIntoMap ais insMap = foldr (\ain acc -> Map.insert (aiId ain) ain acc) insMap ais | 160 | insertIntoMap :: [AgentIn s m e] -> AgentInMap s m e -> AgentInMap s m e
insertIntoMap ais insMap = foldr (\ain acc -> Map.insert (aiId ain) ain acc) insMap ais | 160 | insertIntoMap ais insMap = foldr (\ain acc -> Map.insert (aiId ain) ain acc) insMap ais | 87 | false | true | 0 | 10 | 30 | 85 | 40 | 45 | null | null |
travitch/dalvik | src/Dalvik/SSA/Types.hs | bsd-3-clause | -- | The last non-phi instruction in the block.
--
-- There is always a final non-phi instruction because we insert
-- explicit control flow transfers as necessary. However, the
-- returned instruction may not be a typical terminator instruction in
-- some cases. See Note [Non-Empty Blocks] in Dalvik.SSA for details.
basicBlockTerminator :: BasicBlock -> Instruction
basicBlockTerminator bb = insns V.! (len - 1)
where
insns = _basicBlockInstructions bb
len = V.length insns
-- | Split the instructions in the 'BasicBlock' into phi nodes and the
-- rest. | 569 | basicBlockTerminator :: BasicBlock -> Instruction
basicBlockTerminator bb = insns V.! (len - 1)
where
insns = _basicBlockInstructions bb
len = V.length insns
-- | Split the instructions in the 'BasicBlock' into phi nodes and the
-- rest. | 248 | basicBlockTerminator bb = insns V.! (len - 1)
where
insns = _basicBlockInstructions bb
len = V.length insns
-- | Split the instructions in the 'BasicBlock' into phi nodes and the
-- rest. | 198 | true | true | 0 | 7 | 101 | 60 | 34 | 26 | null | null |
sushantmahajan/programs | haskell-work/haskell/parser_.hs | cc0-1.0 | (<*>)::Parser s a->Parser s b->Parser s (a,b)
(p1 <*> p2) xs = [(xs2,(v1,v2))|(xs1,v1)<-p1 xs,(xs2,v2)<-p2 xs1] | 111 | (<*>)::Parser s a->Parser s b->Parser s (a,b)
(p1 <*> p2) xs = [(xs2,(v1,v2))|(xs1,v1)<-p1 xs,(xs2,v2)<-p2 xs1] | 111 | (<*>)::Parser s a->Parser s b->Parser s (a,b)
(p1 <*> p2) xs = [(xs2,(v1,v2))|(xs1,v1)<-p1 xs,(xs2,v2)<-p2 xs1] | 111 | false | false | 0 | 10 | 14 | 107 | 56 | 51 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/FrenchHornMuted.hs | bsd-3-clause | note6 :: Note
note6 = Note
(Pitch 103.826 32 "g#2")
7
(Range
(NoteRange
(NoteRangeAmplitude 6852.51 66 0.17)
(NoteRangeHarmonicFreq 1 103.82))
(NoteRange
(NoteRangeAmplitude 1038.26 10 4502.0)
(NoteRangeHarmonicFreq 95 9863.46)))
[Harmonic 1 (-2.879) 133.02
,Harmonic 2 2.04 1153.44
,Harmonic 3 (-2.083) 1939.32
,Harmonic 4 0.411 2171.04
,Harmonic 5 2.388 2055.01
,Harmonic 6 (-1.599) 1806.77
,Harmonic 7 0.71 1947.78
,Harmonic 8 3.029 499.95
,Harmonic 9 0.471 3135.63
,Harmonic 10 2.205 4502.0
,Harmonic 11 (-2.355) 3815.74
,Harmonic 12 (-0.246) 4346.54
,Harmonic 13 1.721 3661.25
,Harmonic 14 (-2.668) 2855.68
,Harmonic 15 (-0.655) 2215.28
,Harmonic 16 1.143 1259.01
,Harmonic 17 (-2.209) 1265.84
,Harmonic 18 4.6e-2 1304.56
,Harmonic 19 1.881 1361.65
,Harmonic 20 (-2.466) 845.37
,Harmonic 21 (-0.316) 587.78
,Harmonic 22 2.115 532.62
,Harmonic 23 (-2.059) 396.2
,Harmonic 24 7.5e-2 366.02
,Harmonic 25 2.367 230.76
,Harmonic 26 (-1.707) 222.23
,Harmonic 27 1.097 59.61
,Harmonic 28 (-2.82) 127.3
,Harmonic 29 (-0.785) 130.38
,Harmonic 30 1.47 87.97
,Harmonic 31 (-2.664) 77.62
,Harmonic 32 (-0.52) 54.83
,Harmonic 33 2.179 31.64
,Harmonic 34 (-1.608) 32.35
,Harmonic 35 0.596 30.97
,Harmonic 36 (-3.083) 31.55
,Harmonic 37 (-0.998) 32.28
,Harmonic 38 1.355 32.84
,Harmonic 39 (-2.969) 34.35
,Harmonic 40 (-0.503) 23.78
,Harmonic 41 1.807 19.02
,Harmonic 42 (-1.873) 17.94
,Harmonic 43 0.153 18.76
,Harmonic 44 2.553 13.84
,Harmonic 45 (-1.373) 17.01
,Harmonic 46 0.979 14.46
,Harmonic 47 2.801 12.45
,Harmonic 48 (-1.259) 9.53
,Harmonic 49 0.862 10.47
,Harmonic 50 (-3.098) 11.57
,Harmonic 51 (-1.149) 10.1
,Harmonic 52 1.087 9.43
,Harmonic 53 (-3.074) 4.75
,Harmonic 54 (-0.701) 5.46
,Harmonic 55 1.517 4.93
,Harmonic 56 (-2.492) 4.57
,Harmonic 57 (-0.13) 3.97
,Harmonic 58 2.199 3.86
,Harmonic 59 (-1.803) 1.3
,Harmonic 60 1.458 1.28
,Harmonic 61 (-2.948) 2.09
,Harmonic 62 (-0.4) 1.76
,Harmonic 63 1.945 0.69
,Harmonic 64 (-2.394) 0.94
,Harmonic 65 (-0.648) 0.81
,Harmonic 66 (-2.023) 0.17
,Harmonic 67 (-1.8e-2) 0.63
,Harmonic 68 2.942 0.2
,Harmonic 69 (-2.696) 0.87
,Harmonic 70 (-3.111) 0.7
,Harmonic 71 2.815 0.7
,Harmonic 72 (-0.187) 1.02
,Harmonic 73 0.441 0.79
,Harmonic 74 (-2.418) 0.76
,Harmonic 75 6.0e-3 0.38
,Harmonic 76 (-2.33) 0.85
,Harmonic 77 0.674 1.18
,Harmonic 78 (-2.032) 1.03
,Harmonic 79 2.095 0.25
,Harmonic 80 (-2.689) 1.3
,Harmonic 81 (-0.617) 0.66
,Harmonic 82 1.05 0.8
,Harmonic 83 (-2.045) 0.3
,Harmonic 84 (-0.531) 1.25
,Harmonic 85 0.785 0.63
,Harmonic 86 (-2.125) 0.32
,Harmonic 87 (-1.3e-2) 0.93
,Harmonic 88 2.634 0.99
,Harmonic 89 (-1.681) 0.77
,Harmonic 90 (-2.897) 0.76
,Harmonic 91 (-0.868) 0.73
,Harmonic 92 2.14 1.06
,Harmonic 93 3.11 1.1
,Harmonic 94 3.5e-2 1.19
,Harmonic 95 1.614 0.93] | 3,190 | note6 :: Note
note6 = Note
(Pitch 103.826 32 "g#2")
7
(Range
(NoteRange
(NoteRangeAmplitude 6852.51 66 0.17)
(NoteRangeHarmonicFreq 1 103.82))
(NoteRange
(NoteRangeAmplitude 1038.26 10 4502.0)
(NoteRangeHarmonicFreq 95 9863.46)))
[Harmonic 1 (-2.879) 133.02
,Harmonic 2 2.04 1153.44
,Harmonic 3 (-2.083) 1939.32
,Harmonic 4 0.411 2171.04
,Harmonic 5 2.388 2055.01
,Harmonic 6 (-1.599) 1806.77
,Harmonic 7 0.71 1947.78
,Harmonic 8 3.029 499.95
,Harmonic 9 0.471 3135.63
,Harmonic 10 2.205 4502.0
,Harmonic 11 (-2.355) 3815.74
,Harmonic 12 (-0.246) 4346.54
,Harmonic 13 1.721 3661.25
,Harmonic 14 (-2.668) 2855.68
,Harmonic 15 (-0.655) 2215.28
,Harmonic 16 1.143 1259.01
,Harmonic 17 (-2.209) 1265.84
,Harmonic 18 4.6e-2 1304.56
,Harmonic 19 1.881 1361.65
,Harmonic 20 (-2.466) 845.37
,Harmonic 21 (-0.316) 587.78
,Harmonic 22 2.115 532.62
,Harmonic 23 (-2.059) 396.2
,Harmonic 24 7.5e-2 366.02
,Harmonic 25 2.367 230.76
,Harmonic 26 (-1.707) 222.23
,Harmonic 27 1.097 59.61
,Harmonic 28 (-2.82) 127.3
,Harmonic 29 (-0.785) 130.38
,Harmonic 30 1.47 87.97
,Harmonic 31 (-2.664) 77.62
,Harmonic 32 (-0.52) 54.83
,Harmonic 33 2.179 31.64
,Harmonic 34 (-1.608) 32.35
,Harmonic 35 0.596 30.97
,Harmonic 36 (-3.083) 31.55
,Harmonic 37 (-0.998) 32.28
,Harmonic 38 1.355 32.84
,Harmonic 39 (-2.969) 34.35
,Harmonic 40 (-0.503) 23.78
,Harmonic 41 1.807 19.02
,Harmonic 42 (-1.873) 17.94
,Harmonic 43 0.153 18.76
,Harmonic 44 2.553 13.84
,Harmonic 45 (-1.373) 17.01
,Harmonic 46 0.979 14.46
,Harmonic 47 2.801 12.45
,Harmonic 48 (-1.259) 9.53
,Harmonic 49 0.862 10.47
,Harmonic 50 (-3.098) 11.57
,Harmonic 51 (-1.149) 10.1
,Harmonic 52 1.087 9.43
,Harmonic 53 (-3.074) 4.75
,Harmonic 54 (-0.701) 5.46
,Harmonic 55 1.517 4.93
,Harmonic 56 (-2.492) 4.57
,Harmonic 57 (-0.13) 3.97
,Harmonic 58 2.199 3.86
,Harmonic 59 (-1.803) 1.3
,Harmonic 60 1.458 1.28
,Harmonic 61 (-2.948) 2.09
,Harmonic 62 (-0.4) 1.76
,Harmonic 63 1.945 0.69
,Harmonic 64 (-2.394) 0.94
,Harmonic 65 (-0.648) 0.81
,Harmonic 66 (-2.023) 0.17
,Harmonic 67 (-1.8e-2) 0.63
,Harmonic 68 2.942 0.2
,Harmonic 69 (-2.696) 0.87
,Harmonic 70 (-3.111) 0.7
,Harmonic 71 2.815 0.7
,Harmonic 72 (-0.187) 1.02
,Harmonic 73 0.441 0.79
,Harmonic 74 (-2.418) 0.76
,Harmonic 75 6.0e-3 0.38
,Harmonic 76 (-2.33) 0.85
,Harmonic 77 0.674 1.18
,Harmonic 78 (-2.032) 1.03
,Harmonic 79 2.095 0.25
,Harmonic 80 (-2.689) 1.3
,Harmonic 81 (-0.617) 0.66
,Harmonic 82 1.05 0.8
,Harmonic 83 (-2.045) 0.3
,Harmonic 84 (-0.531) 1.25
,Harmonic 85 0.785 0.63
,Harmonic 86 (-2.125) 0.32
,Harmonic 87 (-1.3e-2) 0.93
,Harmonic 88 2.634 0.99
,Harmonic 89 (-1.681) 0.77
,Harmonic 90 (-2.897) 0.76
,Harmonic 91 (-0.868) 0.73
,Harmonic 92 2.14 1.06
,Harmonic 93 3.11 1.1
,Harmonic 94 3.5e-2 1.19
,Harmonic 95 1.614 0.93] | 3,190 | note6 = Note
(Pitch 103.826 32 "g#2")
7
(Range
(NoteRange
(NoteRangeAmplitude 6852.51 66 0.17)
(NoteRangeHarmonicFreq 1 103.82))
(NoteRange
(NoteRangeAmplitude 1038.26 10 4502.0)
(NoteRangeHarmonicFreq 95 9863.46)))
[Harmonic 1 (-2.879) 133.02
,Harmonic 2 2.04 1153.44
,Harmonic 3 (-2.083) 1939.32
,Harmonic 4 0.411 2171.04
,Harmonic 5 2.388 2055.01
,Harmonic 6 (-1.599) 1806.77
,Harmonic 7 0.71 1947.78
,Harmonic 8 3.029 499.95
,Harmonic 9 0.471 3135.63
,Harmonic 10 2.205 4502.0
,Harmonic 11 (-2.355) 3815.74
,Harmonic 12 (-0.246) 4346.54
,Harmonic 13 1.721 3661.25
,Harmonic 14 (-2.668) 2855.68
,Harmonic 15 (-0.655) 2215.28
,Harmonic 16 1.143 1259.01
,Harmonic 17 (-2.209) 1265.84
,Harmonic 18 4.6e-2 1304.56
,Harmonic 19 1.881 1361.65
,Harmonic 20 (-2.466) 845.37
,Harmonic 21 (-0.316) 587.78
,Harmonic 22 2.115 532.62
,Harmonic 23 (-2.059) 396.2
,Harmonic 24 7.5e-2 366.02
,Harmonic 25 2.367 230.76
,Harmonic 26 (-1.707) 222.23
,Harmonic 27 1.097 59.61
,Harmonic 28 (-2.82) 127.3
,Harmonic 29 (-0.785) 130.38
,Harmonic 30 1.47 87.97
,Harmonic 31 (-2.664) 77.62
,Harmonic 32 (-0.52) 54.83
,Harmonic 33 2.179 31.64
,Harmonic 34 (-1.608) 32.35
,Harmonic 35 0.596 30.97
,Harmonic 36 (-3.083) 31.55
,Harmonic 37 (-0.998) 32.28
,Harmonic 38 1.355 32.84
,Harmonic 39 (-2.969) 34.35
,Harmonic 40 (-0.503) 23.78
,Harmonic 41 1.807 19.02
,Harmonic 42 (-1.873) 17.94
,Harmonic 43 0.153 18.76
,Harmonic 44 2.553 13.84
,Harmonic 45 (-1.373) 17.01
,Harmonic 46 0.979 14.46
,Harmonic 47 2.801 12.45
,Harmonic 48 (-1.259) 9.53
,Harmonic 49 0.862 10.47
,Harmonic 50 (-3.098) 11.57
,Harmonic 51 (-1.149) 10.1
,Harmonic 52 1.087 9.43
,Harmonic 53 (-3.074) 4.75
,Harmonic 54 (-0.701) 5.46
,Harmonic 55 1.517 4.93
,Harmonic 56 (-2.492) 4.57
,Harmonic 57 (-0.13) 3.97
,Harmonic 58 2.199 3.86
,Harmonic 59 (-1.803) 1.3
,Harmonic 60 1.458 1.28
,Harmonic 61 (-2.948) 2.09
,Harmonic 62 (-0.4) 1.76
,Harmonic 63 1.945 0.69
,Harmonic 64 (-2.394) 0.94
,Harmonic 65 (-0.648) 0.81
,Harmonic 66 (-2.023) 0.17
,Harmonic 67 (-1.8e-2) 0.63
,Harmonic 68 2.942 0.2
,Harmonic 69 (-2.696) 0.87
,Harmonic 70 (-3.111) 0.7
,Harmonic 71 2.815 0.7
,Harmonic 72 (-0.187) 1.02
,Harmonic 73 0.441 0.79
,Harmonic 74 (-2.418) 0.76
,Harmonic 75 6.0e-3 0.38
,Harmonic 76 (-2.33) 0.85
,Harmonic 77 0.674 1.18
,Harmonic 78 (-2.032) 1.03
,Harmonic 79 2.095 0.25
,Harmonic 80 (-2.689) 1.3
,Harmonic 81 (-0.617) 0.66
,Harmonic 82 1.05 0.8
,Harmonic 83 (-2.045) 0.3
,Harmonic 84 (-0.531) 1.25
,Harmonic 85 0.785 0.63
,Harmonic 86 (-2.125) 0.32
,Harmonic 87 (-1.3e-2) 0.93
,Harmonic 88 2.634 0.99
,Harmonic 89 (-1.681) 0.77
,Harmonic 90 (-2.897) 0.76
,Harmonic 91 (-0.868) 0.73
,Harmonic 92 2.14 1.06
,Harmonic 93 3.11 1.1
,Harmonic 94 3.5e-2 1.19
,Harmonic 95 1.614 0.93] | 3,176 | false | true | 0 | 10 | 863 | 1,303 | 676 | 627 | null | null |
edgarklerks/document-indexer | Config.hs | bsd-2-clause | dbl :: Parser ConfigType
dbl = fmap D $ minus <*> fmap read (mappend <$> some digit <*> ((:) <$> char '.' <*> some digit)) | 122 | dbl :: Parser ConfigType
dbl = fmap D $ minus <*> fmap read (mappend <$> some digit <*> ((:) <$> char '.' <*> some digit)) | 122 | dbl = fmap D $ minus <*> fmap read (mappend <$> some digit <*> ((:) <$> char '.' <*> some digit)) | 97 | false | true | 5 | 11 | 24 | 74 | 34 | 40 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-programming-from-first-principles-master/src/ReaderPractice.hs | mit | x2 :: Maybe (Integer, Integer)
x2 = liftA2 (,) ys zs | 52 | x2 :: Maybe (Integer, Integer)
x2 = liftA2 (,) ys zs | 52 | x2 = liftA2 (,) ys zs | 21 | false | true | 0 | 7 | 10 | 38 | 17 | 21 | null | null |
y-kamiya/parallel-concurrent-haskell | src/Server/Kvs3/KvsMaster.hs | gpl-2.0 | getKey (ReqOp (Set k _) _) = k | 30 | getKey (ReqOp (Set k _) _) = k | 30 | getKey (ReqOp (Set k _) _) = k | 30 | false | false | 0 | 9 | 7 | 25 | 12 | 13 | null | null |
mathk/arm-isa | Arm/Internal/Type.hs | mit | showImmediate w False = printf "#-%d" w | 39 | showImmediate w False = printf "#-%d" w | 39 | showImmediate w False = printf "#-%d" w | 39 | false | false | 0 | 5 | 6 | 16 | 7 | 9 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Schema/Parse.hs | gpl-3.0 | particle :: (String->String->QName) -> XsdParser Particle
particle q = optional (fmap Left (choiceOrSeq q) `onFail` fmap Right (group_ q)) | 138 | particle :: (String->String->QName) -> XsdParser Particle
particle q = optional (fmap Left (choiceOrSeq q) `onFail` fmap Right (group_ q)) | 138 | particle q = optional (fmap Left (choiceOrSeq q) `onFail` fmap Right (group_ q)) | 80 | false | true | 0 | 10 | 18 | 70 | 34 | 36 | null | null |
Enzo-Liu/cis194 | src/Intro01.hs | bsd-3-clause | lastDigit :: Integer -> Integer
lastDigit = (`mod` 10) | 54 | lastDigit :: Integer -> Integer
lastDigit = (`mod` 10) | 54 | lastDigit = (`mod` 10) | 22 | false | true | 0 | 5 | 8 | 21 | 13 | 8 | null | null |
cyclohexanamine/haskbot | src/Bot/Scripting/Core.hs | bsd-3-clause | whoisTempReplies = GlobalKey [] "whoisTempReplies" :: GlobalKey [(String, User)] | 80 | whoisTempReplies = GlobalKey [] "whoisTempReplies" :: GlobalKey [(String, User)] | 80 | whoisTempReplies = GlobalKey [] "whoisTempReplies" :: GlobalKey [(String, User)] | 80 | false | false | 0 | 7 | 8 | 28 | 15 | 13 | null | null |
jwiegley/ghc-release | libraries/Cabal/cabal-install/Distribution/Client/InstallPlan.hs | gpl-3.0 | -- | Build an installation plan from a valid set of resolved packages.
--
new :: Platform -> CompilerId -> PackageIndex PlanPackage
-> Either [PlanProblem] InstallPlan
new platform compiler index =
case problems platform compiler index of
[] -> Right InstallPlan {
planIndex = index,
planGraph = graph,
planGraphRev = Graph.transposeG graph,
planPkgOf = vertexToPkgId,
planVertexOf = fromMaybe noSuchPkgId . pkgIdToVertex,
planPlatform = platform,
planCompiler = compiler
}
where (graph, vertexToPkgId, pkgIdToVertex) =
PackageIndex.dependencyGraph index
noSuchPkgId = internalError "package is not in the graph"
probs -> Left probs | 781 | new :: Platform -> CompilerId -> PackageIndex PlanPackage
-> Either [PlanProblem] InstallPlan
new platform compiler index =
case problems platform compiler index of
[] -> Right InstallPlan {
planIndex = index,
planGraph = graph,
planGraphRev = Graph.transposeG graph,
planPkgOf = vertexToPkgId,
planVertexOf = fromMaybe noSuchPkgId . pkgIdToVertex,
planPlatform = platform,
planCompiler = compiler
}
where (graph, vertexToPkgId, pkgIdToVertex) =
PackageIndex.dependencyGraph index
noSuchPkgId = internalError "package is not in the graph"
probs -> Left probs | 707 | new platform compiler index =
case problems platform compiler index of
[] -> Right InstallPlan {
planIndex = index,
planGraph = graph,
planGraphRev = Graph.transposeG graph,
planPkgOf = vertexToPkgId,
planVertexOf = fromMaybe noSuchPkgId . pkgIdToVertex,
planPlatform = platform,
planCompiler = compiler
}
where (graph, vertexToPkgId, pkgIdToVertex) =
PackageIndex.dependencyGraph index
noSuchPkgId = internalError "package is not in the graph"
probs -> Left probs | 609 | true | true | 0 | 12 | 236 | 164 | 87 | 77 | null | null |
hypermania/QuantumComputer | Parser.hs | gpl-2.0 | (<++>) :: ReadP [a] -> ReadP [a] -> ReadP [a]
p1 <++> p2 = (++) <$> p1 <*> p2 | 77 | (<++>) :: ReadP [a] -> ReadP [a] -> ReadP [a]
p1 <++> p2 = (++) <$> p1 <*> p2 | 77 | p1 <++> p2 = (++) <$> p1 <*> p2 | 31 | false | true | 0 | 10 | 18 | 55 | 29 | 26 | null | null |
nishiuramakoto/logiku | Handler/LogicTTest.hs | gpl-3.0 | defaultResume :: Int -> Handler Html
defaultResume klabel = do
cont_html <- defaultLayout [whamlet|Continue|]
not_found_html <- defaultLayout [whamlet|Not Found|]
resume klabel cont_html not_found_html | 208 | defaultResume :: Int -> Handler Html
defaultResume klabel = do
cont_html <- defaultLayout [whamlet|Continue|]
not_found_html <- defaultLayout [whamlet|Not Found|]
resume klabel cont_html not_found_html | 208 | defaultResume klabel = do
cont_html <- defaultLayout [whamlet|Continue|]
not_found_html <- defaultLayout [whamlet|Not Found|]
resume klabel cont_html not_found_html | 170 | false | true | 0 | 9 | 29 | 63 | 31 | 32 | null | null |
mightymoose/liquidhaskell | docs/slides/BOS14/hs/end/01_Elements.hs | bsd-3-clause | -----------------------------------------------------------------------------
-- | 2. Checking for duplicates (xmonad) ------------------------------------
-----------------------------------------------------------------------------
-- | Is a list free of duplicates?
{-@ measure nodups :: [a] -> Prop
nodups ([]) = true
nodups (x:xs) = (not (Set_mem x (elems xs)) && nodups xs)
@-}
-- | Weeding out duplicates.
{-@ nub :: xs:_ -> {v:_ | nodups v && EqElts v xs} @-}
nub xs = go xs []
where
go (x:xs) l
| x `elem` l = go xs l
| otherwise = go xs (x:l)
go [] l = l
{-@ elem :: x:_ -> ys:_ -> {v:Bool | Prop v <=> Set_mem x (elems ys)} @-} | 711 | nub xs = go xs []
where
go (x:xs) l
| x `elem` l = go xs l
| otherwise = go xs (x:l)
go [] l = l
{-@ elem :: x:_ -> ys:_ -> {v:Bool | Prop v <=> Set_mem x (elems ys)} @-} | 220 | nub xs = go xs []
where
go (x:xs) l
| x `elem` l = go xs l
| otherwise = go xs (x:l)
go [] l = l
{-@ elem :: x:_ -> ys:_ -> {v:Bool | Prop v <=> Set_mem x (elems ys)} @-} | 220 | true | false | 0 | 8 | 178 | 94 | 49 | 45 | null | null |
bagl/takusen-oracle | Database/Oracle/Enumerator.hs | bsd-3-clause | repareCommand :: QueryString -> PreparationA Session PreparedStmtObj
prepareCommand (QueryString sqltext) =
prepareStmt' 0 sqltext FreeManually CommandType
| 158 | prepareCommand :: QueryString -> PreparationA Session PreparedStmtObj
prepareCommand (QueryString sqltext) =
prepareStmt' 0 sqltext FreeManually CommandType | 158 | prepareCommand (QueryString sqltext) =
prepareStmt' 0 sqltext FreeManually CommandType | 88 | false | true | 0 | 9 | 18 | 45 | 19 | 26 | null | null |
frasertweedale/hs-jose | src/Crypto/JOSE/JWA/JWK.hs | apache-2.0 | verify JWA.JWS.PS512 (RSAKeyMaterial k) = fmap pure . verifyPSS SHA512 k | 72 | verify JWA.JWS.PS512 (RSAKeyMaterial k) = fmap pure . verifyPSS SHA512 k | 72 | verify JWA.JWS.PS512 (RSAKeyMaterial k) = fmap pure . verifyPSS SHA512 k | 72 | false | false | 0 | 6 | 10 | 34 | 15 | 19 | null | null |
alexander-at-github/eta | compiler/ETA/Core/CoreArity.hs | bsd-3-clause | -- There is always an explicit lambda
-- to justify the [OneShot], or the Arity
vanillaArityType :: ArityType
vanillaArityType = ATop [] | 142 | vanillaArityType :: ArityType
vanillaArityType = ATop [] | 56 | vanillaArityType = ATop [] | 26 | true | true | 0 | 6 | 27 | 18 | 10 | 8 | null | null |
Sgoettschkes/learning | haskell/ProjectEuler/src/Problems/Problem009.hs | mit | p9 :: Int
p9 = product . head $ [[a, b, c] | a <- [1..1000], b <- [2..1000], c <- [1000 - a - b], b > a, a^2 + b^2 == c^2] | 122 | p9 :: Int
p9 = product . head $ [[a, b, c] | a <- [1..1000], b <- [2..1000], c <- [1000 - a - b], b > a, a^2 + b^2 == c^2] | 122 | p9 = product . head $ [[a, b, c] | a <- [1..1000], b <- [2..1000], c <- [1000 - a - b], b > a, a^2 + b^2 == c^2] | 112 | false | true | 0 | 12 | 33 | 108 | 58 | 50 | null | null |
facebookincubator/duckling | Duckling/Rules/EL.hs | bsd-3-clause | langRules (Seal Email) = [] | 27 | langRules (Seal Email) = [] | 27 | langRules (Seal Email) = [] | 27 | false | false | 0 | 7 | 4 | 17 | 8 | 9 | null | null |
TeensyPass/teensy_pass_haskell | Cli.hs | gpl-2.0 | editParser = EditOptions <$> passNameParser | 43 | editParser = EditOptions <$> passNameParser | 43 | editParser = EditOptions <$> passNameParser | 43 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
little-schemer/MyModule | Utility.hs | mit | ----------------------------------------
-- 回文数関連
-----------------------------------------
--
-- 整数を反転させる
--
-- ex : reverseInt 123 => 321
--
reverseInt :: Integral a => a -> a
reverseInt = listToDex . reverse . dexToList | 225 | reverseInt :: Integral a => a -> a
reverseInt = listToDex . reverse . dexToList | 79 | reverseInt = listToDex . reverse . dexToList | 44 | true | true | 0 | 6 | 33 | 38 | 23 | 15 | null | null |
jaalonso/I1M-Cod-Temas | src/Tema_12/Analizador.hs | gpl-2.0 | -- espacio analiza si comienza con espacios en blanco. Por ejemplo,
-- analiza espacio " a b c" == [((),"a b c")]
espacio :: Analizador ()
espacio = varios (sat isSpace) >*> \_ ->
resultado () | 210 | espacio :: Analizador ()
espacio = varios (sat isSpace) >*> \_ ->
resultado () | 88 | espacio = varios (sat isSpace) >*> \_ ->
resultado () | 63 | true | true | 0 | 8 | 53 | 41 | 21 | 20 | null | null |
cfredric/arithmoi | test-suite/Math/NumberTheory/Powers/CubesTests.hs | mit | -- | Check that 'integerCubeRoot'' returns the largest integer @m@ with @m^3 <= n@.
integerCubeRoot'Property :: Integral a => NonNegative a -> Bool
integerCubeRoot'Property (NonNegative n) = m ^ 3 <= n && (m + 1) ^ 3 /= n && (m + 1) ^ 2 >= n `div` (m + 1)
where
m = integerCubeRoot' n
-- | Check that the number 'isCube' iff its 'integerCubeRoot' is exact. | 363 | integerCubeRoot'Property :: Integral a => NonNegative a -> Bool
integerCubeRoot'Property (NonNegative n) = m ^ 3 <= n && (m + 1) ^ 3 /= n && (m + 1) ^ 2 >= n `div` (m + 1)
where
m = integerCubeRoot' n
-- | Check that the number 'isCube' iff its 'integerCubeRoot' is exact. | 279 | integerCubeRoot'Property (NonNegative n) = m ^ 3 <= n && (m + 1) ^ 3 /= n && (m + 1) ^ 2 >= n `div` (m + 1)
where
m = integerCubeRoot' n
-- | Check that the number 'isCube' iff its 'integerCubeRoot' is exact. | 215 | true | true | 0 | 13 | 75 | 106 | 55 | 51 | null | null |
pharpend/azulit | lib/Application.hs | agpl-3.0 | ---------------------------------------------
-- Functions for use in development with GHCi
---------------------------------------------
-- | Run a handler
handler :: Handler a -> IO a
handler h = getAppSettings >>= makeFoundation >>= flip unsafeHandler h | 257 | handler :: Handler a -> IO a
handler h = getAppSettings >>= makeFoundation >>= flip unsafeHandler h | 99 | handler h = getAppSettings >>= makeFoundation >>= flip unsafeHandler h | 70 | true | true | 2 | 7 | 32 | 47 | 23 | 24 | null | null |
bjin/montg-reduce | Test.hs | bsd-3-clause | prop_int64 :: Integer -> Bool
prop_int64 n = n <= 0 || (2 ^ n) `modP` (10^9+7 :: Int64) == fromInteger ((2 ^ n) `mod` (10^9+7)) | 127 | prop_int64 :: Integer -> Bool
prop_int64 n = n <= 0 || (2 ^ n) `modP` (10^9+7 :: Int64) == fromInteger ((2 ^ n) `mod` (10^9+7)) | 127 | prop_int64 n = n <= 0 || (2 ^ n) `modP` (10^9+7 :: Int64) == fromInteger ((2 ^ n) `mod` (10^9+7)) | 97 | false | true | 0 | 11 | 25 | 90 | 49 | 41 | null | null |
edsko/hackage-server | Distribution/Server/Framework/BackupRestore.hs | bsd-3-clause | abstractRestoreBackup :: (st -> IO ()) -> RestoreBackup st -> AbstractRestoreBackup
abstractRestoreBackup putSt = go
where
go RestoreBackup {..} = AbstractRestoreBackup {
abstractRestoreEntry = \store entry ->
liftM go <$> (runRestore store $ restoreEntry entry)
, abstractRestoreFinalize = \store ->
liftM putSt <$> (runRestore store $ restoreFinalize)
} | 404 | abstractRestoreBackup :: (st -> IO ()) -> RestoreBackup st -> AbstractRestoreBackup
abstractRestoreBackup putSt = go
where
go RestoreBackup {..} = AbstractRestoreBackup {
abstractRestoreEntry = \store entry ->
liftM go <$> (runRestore store $ restoreEntry entry)
, abstractRestoreFinalize = \store ->
liftM putSt <$> (runRestore store $ restoreFinalize)
} | 404 | abstractRestoreBackup putSt = go
where
go RestoreBackup {..} = AbstractRestoreBackup {
abstractRestoreEntry = \store entry ->
liftM go <$> (runRestore store $ restoreEntry entry)
, abstractRestoreFinalize = \store ->
liftM putSt <$> (runRestore store $ restoreFinalize)
} | 320 | false | true | 1 | 12 | 96 | 128 | 61 | 67 | null | null |
keera-studios/hsQt | examples/sliders.hs | bsd-2-clause | setVal :: QSlider () -> LCDRange -> Int -> IO ()
setVal _qsl _this _val
= do
setValue _qsl _val
performGC | 115 | setVal :: QSlider () -> LCDRange -> Int -> IO ()
setVal _qsl _this _val
= do
setValue _qsl _val
performGC | 115 | setVal _qsl _this _val
= do
setValue _qsl _val
performGC | 66 | false | true | 0 | 9 | 30 | 51 | 23 | 28 | null | null |
bordaigorl/jamesbound | src/Language/PiCalc/Infix.hs | gpl-2.0 | n !: l = Out n l | 16 | n !: l = Out n l | 16 | n !: l = Out n l | 16 | false | false | 3 | 5 | 6 | 21 | 7 | 14 | null | null |
rootzlevel/hledger-add | tests/ConfigParserSpec.hs | bsd-3-clause | syntaxTests :: Spec
syntaxTests = do
context "given whitespace" whitespaceTests
context "given escaped strings" escapingTests
context "given bare strings" bareStringTests
optionNameTests | 194 | syntaxTests :: Spec
syntaxTests = do
context "given whitespace" whitespaceTests
context "given escaped strings" escapingTests
context "given bare strings" bareStringTests
optionNameTests | 194 | syntaxTests = do
context "given whitespace" whitespaceTests
context "given escaped strings" escapingTests
context "given bare strings" bareStringTests
optionNameTests | 174 | false | true | 0 | 7 | 28 | 45 | 17 | 28 | null | null |
Noeda/adeonbot | terminal-emulator/src/Terminal/Screen.hs | mit | intensify Cyan = BrightCyan | 27 | intensify Cyan = BrightCyan | 27 | intensify Cyan = BrightCyan | 27 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs | gpl-2.0 | -- SUBSCRIPT MINUS
switch '=' 's' = '\x208C' | 44 | switch '=' 's' = '\x208C' | 25 | switch '=' 's' = '\x208C' | 25 | true | false | 0 | 5 | 7 | 12 | 6 | 6 | null | null |
mstksg/hledger | hledger/Hledger/Cli/Info.hs | gpl-3.0 | infomode = (defCommandMode $ ["info"] ++ aliases) {
modeHelp = "show any of the hledger manuals with info" `withAliases` aliases
,modeGroupFlags = Group {
groupUnnamed = []
,groupHidden = []
,groupNamed = []
}
}
where aliases = []
-- | Try to use info to view the selected manual. | 304 | infomode = (defCommandMode $ ["info"] ++ aliases) {
modeHelp = "show any of the hledger manuals with info" `withAliases` aliases
,modeGroupFlags = Group {
groupUnnamed = []
,groupHidden = []
,groupNamed = []
}
}
where aliases = []
-- | Try to use info to view the selected manual. | 304 | infomode = (defCommandMode $ ["info"] ++ aliases) {
modeHelp = "show any of the hledger manuals with info" `withAliases` aliases
,modeGroupFlags = Group {
groupUnnamed = []
,groupHidden = []
,groupNamed = []
}
}
where aliases = []
-- | Try to use info to view the selected manual. | 304 | false | false | 0 | 9 | 73 | 77 | 46 | 31 | null | null |
masashi-y/dynet.hs | src/DyNet/Core.hs | bsd-3-clause | {-|
@
initialize' argv == initialize argv False
@
-}
initialize' :: [String] -> IO [String]
initialize' argv = initialize argv False | 136 | initialize' :: [String] -> IO [String]
initialize' argv = initialize argv False | 79 | initialize' argv = initialize argv False | 40 | true | true | 0 | 7 | 25 | 36 | 18 | 18 | null | null |
rueshyna/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Delete.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
pzcdUploadProtocol :: Lens' ProjectsZonesClustersDelete (Maybe Text)
pzcdUploadProtocol
= lens _pzcdUploadProtocol
(\ s a -> s{_pzcdUploadProtocol = a}) | 222 | pzcdUploadProtocol :: Lens' ProjectsZonesClustersDelete (Maybe Text)
pzcdUploadProtocol
= lens _pzcdUploadProtocol
(\ s a -> s{_pzcdUploadProtocol = a}) | 160 | pzcdUploadProtocol
= lens _pzcdUploadProtocol
(\ s a -> s{_pzcdUploadProtocol = a}) | 91 | true | true | 0 | 8 | 33 | 49 | 25 | 24 | null | null |
MicheleCastrovilli/Euphs | Bots/MusicBot/Types.hs | bsd-3-clause | pqAdd :: MConfig -> QueuedItem -> Queued -> Queued
pqAdd mc item sq = let l = sequenceMemory mc in
SQ.take l $ item SQ.<| sq | 143 | pqAdd :: MConfig -> QueuedItem -> Queued -> Queued
pqAdd mc item sq = let l = sequenceMemory mc in
SQ.take l $ item SQ.<| sq | 143 | pqAdd mc item sq = let l = sequenceMemory mc in
SQ.take l $ item SQ.<| sq | 92 | false | true | 0 | 10 | 44 | 65 | 29 | 36 | null | null |
rueshyna/gogol | gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs | mpl-2.0 | -- | If true, backend will do sanity check(including duplicate email and
-- federated id) when uploading account.
irpuarSanityCheck :: Lens' IdentitytoolkitRelyingPartyUploadAccountRequest (Maybe Bool)
irpuarSanityCheck
= lens _irpuarSanityCheck
(\ s a -> s{_irpuarSanityCheck = a}) | 290 | irpuarSanityCheck :: Lens' IdentitytoolkitRelyingPartyUploadAccountRequest (Maybe Bool)
irpuarSanityCheck
= lens _irpuarSanityCheck
(\ s a -> s{_irpuarSanityCheck = a}) | 176 | irpuarSanityCheck
= lens _irpuarSanityCheck
(\ s a -> s{_irpuarSanityCheck = a}) | 88 | true | true | 1 | 9 | 42 | 52 | 26 | 26 | null | null |
jlamothe/sortable-test | Daily/Tests/Process.hs | gpl-3.0 | statTest :: Stats -> Stats -> (String, Stats -> Double) -> Test
statTest expected actual (label, f) =
TestLabel label $
TestCase $ assertBool errMsg $
isClose expectedVal actualVal
where
errMsg = "expected: " ++ show expectedVal ++ " got: " ++ show actualVal
expectedVal = f expected
actualVal = f actual | 324 | statTest :: Stats -> Stats -> (String, Stats -> Double) -> Test
statTest expected actual (label, f) =
TestLabel label $
TestCase $ assertBool errMsg $
isClose expectedVal actualVal
where
errMsg = "expected: " ++ show expectedVal ++ " got: " ++ show actualVal
expectedVal = f expected
actualVal = f actual | 324 | statTest expected actual (label, f) =
TestLabel label $
TestCase $ assertBool errMsg $
isClose expectedVal actualVal
where
errMsg = "expected: " ++ show expectedVal ++ " got: " ++ show actualVal
expectedVal = f expected
actualVal = f actual | 260 | false | true | 7 | 10 | 71 | 129 | 56 | 73 | null | null |
LeifW/xmonad-extras | XMonad/Actions/Volume.hs | bsd-3-clause | modifyMuteChannels = modify getMuteChannels setMuteChannels | 63 | modifyMuteChannels = modify getMuteChannels setMuteChannels | 63 | modifyMuteChannels = modify getMuteChannels setMuteChannels | 63 | false | false | 0 | 5 | 8 | 11 | 5 | 6 | null | null |
kmcallister/clogparse | Data/IRC/CLog/Parse.hs | bsd-3-clause | -- | @'Config'@ value suitable for parsing @#haskell@ logs on Linux.
haskellConfig :: Config
haskellConfig = Config
{ timeZone = "America/Los_Angeles"
, zoneInfo = "/usr/share/zoneinfo" } | 191 | haskellConfig :: Config
haskellConfig = Config
{ timeZone = "America/Los_Angeles"
, zoneInfo = "/usr/share/zoneinfo" } | 122 | haskellConfig = Config
{ timeZone = "America/Los_Angeles"
, zoneInfo = "/usr/share/zoneinfo" } | 98 | true | true | 0 | 7 | 29 | 36 | 18 | 18 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpOutOfLine CloneMutableArrayOp = True | 42 | primOpOutOfLine CloneMutableArrayOp = True | 42 | primOpOutOfLine CloneMutableArrayOp = True | 42 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
databrary/databrary | src/Model/Format.hs | agpl-3.0 | -- | Is this an Audio or Video format
formatIsAV :: Format -> Bool
formatIsAV fmat = formatIsVideo fmat || formatIsAudio fmat | 125 | formatIsAV :: Format -> Bool
formatIsAV fmat = formatIsVideo fmat || formatIsAudio fmat | 87 | formatIsAV fmat = formatIsVideo fmat || formatIsAudio fmat | 58 | true | true | 0 | 6 | 21 | 29 | 14 | 15 | null | null |
luke-clifton/memorable-bits | test/Main.hs | bsd-2-clause | testPat = padHex @112 (words8 .- words10) | 41 | testPat = padHex @112 (words8 .- words10) | 41 | testPat = padHex @112 (words8 .- words10) | 41 | false | false | 0 | 7 | 6 | 20 | 10 | 10 | null | null |
ony/hledger | hledger-lib/Hledger/Utils/Parse.hs | gpl-3.0 | fromparse :: (Show t, Show e) => Either (ParseError t e) a -> a
fromparse = either parseerror id | 96 | fromparse :: (Show t, Show e) => Either (ParseError t e) a -> a
fromparse = either parseerror id | 96 | fromparse = either parseerror id | 32 | false | true | 0 | 10 | 18 | 54 | 25 | 29 | null | null |
xenomachina/nonogram-solver | nonogram.hs | gpl-2.0 | allPlacements (x:xs) len =
do
start <- slicePlacements x len
rest <- allPlacements xs (len - (length start) - 1)
return $ take len $ start ++ [False] ++ rest
-- Tests if the known parts of a solution are compatible with a tentative
-- solution. | 259 | allPlacements (x:xs) len =
do
start <- slicePlacements x len
rest <- allPlacements xs (len - (length start) - 1)
return $ take len $ start ++ [False] ++ rest
-- Tests if the known parts of a solution are compatible with a tentative
-- solution. | 259 | allPlacements (x:xs) len =
do
start <- slicePlacements x len
rest <- allPlacements xs (len - (length start) - 1)
return $ take len $ start ++ [False] ++ rest
-- Tests if the known parts of a solution are compatible with a tentative
-- solution. | 259 | false | false | 1 | 13 | 60 | 91 | 42 | 49 | null | null |
gafiatulin/codewars | src/4 kyu/TotalIncreasingOrDecreasingNumbers.hs | mit | totalIncDec 1 = 10 | 18 | totalIncDec 1 = 10 | 18 | totalIncDec 1 = 10 | 18 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
keithodulaigh/Hets | Common/Lexer.hs | gpl-2.0 | getPos :: GenParser tok st Pos
getPos = fmap fromSourcePos getPosition | 70 | getPos :: GenParser tok st Pos
getPos = fmap fromSourcePos getPosition | 70 | getPos = fmap fromSourcePos getPosition | 39 | false | true | 1 | 5 | 10 | 27 | 11 | 16 | null | null |
myShoggoth/shakespeare | Text/Hamlet/Parse.hs | mit | d3ContentVar (DerefBranch (DerefIdent (Ident "d3InitData")) (DerefString s)) = (ContentD3Var (DerefBranch (DerefIdent (Ident "d3InitData")) (DerefString s))) | 183 | d3ContentVar (DerefBranch (DerefIdent (Ident "d3InitData")) (DerefString s)) = (ContentD3Var (DerefBranch (DerefIdent (Ident "d3InitData")) (DerefString s))) | 183 | d3ContentVar (DerefBranch (DerefIdent (Ident "d3InitData")) (DerefString s)) = (ContentD3Var (DerefBranch (DerefIdent (Ident "d3InitData")) (DerefString s))) | 183 | false | false | 0 | 12 | 40 | 67 | 33 | 34 | null | null |
mgold/package.elm-lang.org | src/backend/Routes.hs | bsd-3-clause | filesForUpload :: Map.Map BS.ByteString FilePath
filesForUpload =
Map.fromList
[ ("documentation", documentationPath)
, ("description", Path.description)
, ("readme", "README.md")
] | 191 | filesForUpload :: Map.Map BS.ByteString FilePath
filesForUpload =
Map.fromList
[ ("documentation", documentationPath)
, ("description", Path.description)
, ("readme", "README.md")
] | 191 | filesForUpload =
Map.fromList
[ ("documentation", documentationPath)
, ("description", Path.description)
, ("readme", "README.md")
] | 142 | false | true | 1 | 8 | 27 | 59 | 31 | 28 | null | null |
rwbarton/rw | Crawl/Explore.hs | bsd-3-clause | stairDirection DNGN_EXIT_HELL = GoUp | 36 | stairDirection DNGN_EXIT_HELL = GoUp | 36 | stairDirection DNGN_EXIT_HELL = GoUp | 36 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
melrief/tetris | src/Tetris/Game.hs | apache-2.0 | step :: (Functor m,Monad m) => GameState m StepResult
step = do
isOver <- use gameOver
if isOver
-- avoid further operations if game over and return directly GameOver
then return GameOver
else do
curr <- use currBlock
case curr of
Nothing -> do
nextShape <- nextRandomShape
assign currBlock (Just $ initPosAndDir nextShape)
return $ NewShape nextShape
Just _ -> Move `fmap` tryToMoveCurrBlock Down | 471 | step :: (Functor m,Monad m) => GameState m StepResult
step = do
isOver <- use gameOver
if isOver
-- avoid further operations if game over and return directly GameOver
then return GameOver
else do
curr <- use currBlock
case curr of
Nothing -> do
nextShape <- nextRandomShape
assign currBlock (Just $ initPosAndDir nextShape)
return $ NewShape nextShape
Just _ -> Move `fmap` tryToMoveCurrBlock Down | 471 | step = do
isOver <- use gameOver
if isOver
-- avoid further operations if game over and return directly GameOver
then return GameOver
else do
curr <- use currBlock
case curr of
Nothing -> do
nextShape <- nextRandomShape
assign currBlock (Just $ initPosAndDir nextShape)
return $ NewShape nextShape
Just _ -> Move `fmap` tryToMoveCurrBlock Down | 417 | false | true | 0 | 19 | 137 | 138 | 63 | 75 | null | null |
rimmington/kruger | src/Main.hs | agpl-3.0 | main :: IO ()
main = do
dbUrl <- getEnv "DATABASE_URL"
port <- read <$> getEnv "PORT"
runNoLoggingT $ withPostgresqlPool (pack dbUrl) 15 $ \pool -> NoLoggingT $ do
runSqlPool (runMigration migrateAll) pool
let conf = ServerConfig { port = port }
runWithConfig conf $ app $ flip runSqlPersistMPool pool . runOp | 346 | main :: IO ()
main = do
dbUrl <- getEnv "DATABASE_URL"
port <- read <$> getEnv "PORT"
runNoLoggingT $ withPostgresqlPool (pack dbUrl) 15 $ \pool -> NoLoggingT $ do
runSqlPool (runMigration migrateAll) pool
let conf = ServerConfig { port = port }
runWithConfig conf $ app $ flip runSqlPersistMPool pool . runOp | 346 | main = do
dbUrl <- getEnv "DATABASE_URL"
port <- read <$> getEnv "PORT"
runNoLoggingT $ withPostgresqlPool (pack dbUrl) 15 $ \pool -> NoLoggingT $ do
runSqlPool (runMigration migrateAll) pool
let conf = ServerConfig { port = port }
runWithConfig conf $ app $ flip runSqlPersistMPool pool . runOp | 332 | false | true | 0 | 16 | 88 | 125 | 58 | 67 | null | null |
kyren/hsgb | lib/Gameboy/Assembler.hs | unlicense | rlc :: Parsec String st Instruction
rlc = instruction1Arg "RLC" regularArg >>= encode
where
encode (RegisterArg r) = return $ RLC_R r
encode (AddressArg AtHL) = return RLC_ATHL
encode _ = fail "Invalid RLC instruction" | 232 | rlc :: Parsec String st Instruction
rlc = instruction1Arg "RLC" regularArg >>= encode
where
encode (RegisterArg r) = return $ RLC_R r
encode (AddressArg AtHL) = return RLC_ATHL
encode _ = fail "Invalid RLC instruction" | 232 | rlc = instruction1Arg "RLC" regularArg >>= encode
where
encode (RegisterArg r) = return $ RLC_R r
encode (AddressArg AtHL) = return RLC_ATHL
encode _ = fail "Invalid RLC instruction" | 196 | false | true | 2 | 8 | 48 | 76 | 37 | 39 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | osVariantsFile :: String
osVariantsFile = "variants.list" | 57 | osVariantsFile :: String
osVariantsFile = "variants.list" | 57 | osVariantsFile = "variants.list" | 32 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
fpco/cabal | cabal-install/Distribution/Client/Sandbox.hs | bsd-3-clause | withSandboxPackageInfo :: Verbosity -> ConfigFlags -> GlobalFlags
-> Compiler -> Platform -> ProgramConfiguration
-> FilePath
-> (SandboxPackageInfo -> IO ())
-> IO ()
withSandboxPackageInfo verbosity configFlags globalFlags
comp platform conf sandboxDir cont = do
-- List all add-source deps.
indexFile <- tryGetIndexFilePath' globalFlags
buildTreeRefs <- Index.listBuildTreeRefs verbosity
Index.DontListIgnored Index.OnlyLinks indexFile
let allAddSourceDepsSet = S.fromList buildTreeRefs
-- List all packages installed in the sandbox.
installedPkgIndex <- getInstalledPackagesInSandbox verbosity
configFlags comp conf
-- Get the package descriptions for all add-source deps.
depsCabalFiles <- mapM findPackageDesc buildTreeRefs
depsPkgDescs <- mapM (readPackageDescription verbosity) depsCabalFiles
let depsMap = M.fromList (zip buildTreeRefs depsPkgDescs)
isInstalled pkgid = not . null
. InstalledPackageIndex.lookupSourcePackageId installedPkgIndex $ pkgid
installedDepsMap = M.filter (isInstalled . packageId) depsMap
-- Get the package ids of modified (and installed) add-source deps.
modifiedAddSourceDeps <- listModifiedDeps verbosity sandboxDir
(compilerId comp) platform installedDepsMap
-- 'fromJust' here is safe because 'modifiedAddSourceDeps' are guaranteed to
-- be a subset of the keys of 'depsMap'.
let modifiedDeps = [ (modDepPath, fromJust $ M.lookup modDepPath depsMap)
| modDepPath <- modifiedAddSourceDeps ]
modifiedDepsMap = M.fromList modifiedDeps
assert (all (`S.member` allAddSourceDepsSet) modifiedAddSourceDeps) (return ())
if (null modifiedDeps)
then info verbosity $ "Found no modified add-source deps."
else notice verbosity $ "Some add-source dependencies have been modified. "
++ "They will be reinstalled..."
-- Get the package ids of the remaining add-source deps (some are possibly not
-- installed).
let otherDeps = M.assocs (depsMap `M.difference` modifiedDepsMap)
-- Finally, assemble a 'SandboxPackageInfo'.
cont $ SandboxPackageInfo (map toSourcePackage modifiedDeps)
(map toSourcePackage otherDeps) installedPkgIndex allAddSourceDepsSet
where
toSourcePackage (path, pkgDesc) = SourcePackage
(packageId pkgDesc) pkgDesc (LocalUnpackedPackage path) Nothing
-- | Same as 'withSandboxPackageInfo' if we're inside a sandbox and a no-op
-- otherwise. | 2,686 | withSandboxPackageInfo :: Verbosity -> ConfigFlags -> GlobalFlags
-> Compiler -> Platform -> ProgramConfiguration
-> FilePath
-> (SandboxPackageInfo -> IO ())
-> IO ()
withSandboxPackageInfo verbosity configFlags globalFlags
comp platform conf sandboxDir cont = do
-- List all add-source deps.
indexFile <- tryGetIndexFilePath' globalFlags
buildTreeRefs <- Index.listBuildTreeRefs verbosity
Index.DontListIgnored Index.OnlyLinks indexFile
let allAddSourceDepsSet = S.fromList buildTreeRefs
-- List all packages installed in the sandbox.
installedPkgIndex <- getInstalledPackagesInSandbox verbosity
configFlags comp conf
-- Get the package descriptions for all add-source deps.
depsCabalFiles <- mapM findPackageDesc buildTreeRefs
depsPkgDescs <- mapM (readPackageDescription verbosity) depsCabalFiles
let depsMap = M.fromList (zip buildTreeRefs depsPkgDescs)
isInstalled pkgid = not . null
. InstalledPackageIndex.lookupSourcePackageId installedPkgIndex $ pkgid
installedDepsMap = M.filter (isInstalled . packageId) depsMap
-- Get the package ids of modified (and installed) add-source deps.
modifiedAddSourceDeps <- listModifiedDeps verbosity sandboxDir
(compilerId comp) platform installedDepsMap
-- 'fromJust' here is safe because 'modifiedAddSourceDeps' are guaranteed to
-- be a subset of the keys of 'depsMap'.
let modifiedDeps = [ (modDepPath, fromJust $ M.lookup modDepPath depsMap)
| modDepPath <- modifiedAddSourceDeps ]
modifiedDepsMap = M.fromList modifiedDeps
assert (all (`S.member` allAddSourceDepsSet) modifiedAddSourceDeps) (return ())
if (null modifiedDeps)
then info verbosity $ "Found no modified add-source deps."
else notice verbosity $ "Some add-source dependencies have been modified. "
++ "They will be reinstalled..."
-- Get the package ids of the remaining add-source deps (some are possibly not
-- installed).
let otherDeps = M.assocs (depsMap `M.difference` modifiedDepsMap)
-- Finally, assemble a 'SandboxPackageInfo'.
cont $ SandboxPackageInfo (map toSourcePackage modifiedDeps)
(map toSourcePackage otherDeps) installedPkgIndex allAddSourceDepsSet
where
toSourcePackage (path, pkgDesc) = SourcePackage
(packageId pkgDesc) pkgDesc (LocalUnpackedPackage path) Nothing
-- | Same as 'withSandboxPackageInfo' if we're inside a sandbox and a no-op
-- otherwise. | 2,686 | withSandboxPackageInfo verbosity configFlags globalFlags
comp platform conf sandboxDir cont = do
-- List all add-source deps.
indexFile <- tryGetIndexFilePath' globalFlags
buildTreeRefs <- Index.listBuildTreeRefs verbosity
Index.DontListIgnored Index.OnlyLinks indexFile
let allAddSourceDepsSet = S.fromList buildTreeRefs
-- List all packages installed in the sandbox.
installedPkgIndex <- getInstalledPackagesInSandbox verbosity
configFlags comp conf
-- Get the package descriptions for all add-source deps.
depsCabalFiles <- mapM findPackageDesc buildTreeRefs
depsPkgDescs <- mapM (readPackageDescription verbosity) depsCabalFiles
let depsMap = M.fromList (zip buildTreeRefs depsPkgDescs)
isInstalled pkgid = not . null
. InstalledPackageIndex.lookupSourcePackageId installedPkgIndex $ pkgid
installedDepsMap = M.filter (isInstalled . packageId) depsMap
-- Get the package ids of modified (and installed) add-source deps.
modifiedAddSourceDeps <- listModifiedDeps verbosity sandboxDir
(compilerId comp) platform installedDepsMap
-- 'fromJust' here is safe because 'modifiedAddSourceDeps' are guaranteed to
-- be a subset of the keys of 'depsMap'.
let modifiedDeps = [ (modDepPath, fromJust $ M.lookup modDepPath depsMap)
| modDepPath <- modifiedAddSourceDeps ]
modifiedDepsMap = M.fromList modifiedDeps
assert (all (`S.member` allAddSourceDepsSet) modifiedAddSourceDeps) (return ())
if (null modifiedDeps)
then info verbosity $ "Found no modified add-source deps."
else notice verbosity $ "Some add-source dependencies have been modified. "
++ "They will be reinstalled..."
-- Get the package ids of the remaining add-source deps (some are possibly not
-- installed).
let otherDeps = M.assocs (depsMap `M.difference` modifiedDepsMap)
-- Finally, assemble a 'SandboxPackageInfo'.
cont $ SandboxPackageInfo (map toSourcePackage modifiedDeps)
(map toSourcePackage otherDeps) installedPkgIndex allAddSourceDepsSet
where
toSourcePackage (path, pkgDesc) = SourcePackage
(packageId pkgDesc) pkgDesc (LocalUnpackedPackage path) Nothing
-- | Same as 'withSandboxPackageInfo' if we're inside a sandbox and a no-op
-- otherwise. | 2,414 | false | true | 0 | 16 | 672 | 478 | 237 | 241 | null | null |
sdiehl/ghc | compiler/GHC/Hs/Expr.hs | bsd-3-clause | pprMatchContextNoun (StmtCtxt ctxt) = text "pattern binding in"
$$ pprAStmtContext ctxt | 125 | pprMatchContextNoun (StmtCtxt ctxt) = text "pattern binding in"
$$ pprAStmtContext ctxt | 125 | pprMatchContextNoun (StmtCtxt ctxt) = text "pattern binding in"
$$ pprAStmtContext ctxt | 125 | false | false | 0 | 7 | 48 | 25 | 11 | 14 | null | null |
haskell-tinc/hpack | test/Hpack/LicenseSpec.hs | mit | cabal :: String -> Cabal.License
cabal = fromJust . simpleParsec | 64 | cabal :: String -> Cabal.License
cabal = fromJust . simpleParsec | 64 | cabal = fromJust . simpleParsec | 31 | false | true | 1 | 8 | 9 | 29 | 12 | 17 | null | null |
GaloisInc/stack | src/Stack/Types/Config.hs | bsd-3-clause | getMinimalEnvOverride :: (MonadReader env m, HasConfig env, MonadIO m) => m EnvOverride
getMinimalEnvOverride = do
config <- asks getConfig
liftIO $ configEnvOverride config EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
} | 356 | getMinimalEnvOverride :: (MonadReader env m, HasConfig env, MonadIO m) => m EnvOverride
getMinimalEnvOverride = do
config <- asks getConfig
liftIO $ configEnvOverride config EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
} | 356 | getMinimalEnvOverride = do
config <- asks getConfig
liftIO $ configEnvOverride config EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
} | 268 | false | true | 0 | 11 | 124 | 85 | 42 | 43 | null | null |
ayachigin/DeepLearningFromScratch | src/Layere.hs | bsd-3-clause | affineF :: (Matrix, Matrix, Matrix) ->
( Array D DIM2 Double,
(Matrix, Matrix, Matrix))
affineF (w, b, x) = ((mmultS x w) +^ b, (w, b, x)) | 161 | affineF :: (Matrix, Matrix, Matrix) ->
( Array D DIM2 Double,
(Matrix, Matrix, Matrix))
affineF (w, b, x) = ((mmultS x w) +^ b, (w, b, x)) | 161 | affineF (w, b, x) = ((mmultS x w) +^ b, (w, b, x)) | 50 | false | true | 0 | 8 | 49 | 85 | 50 | 35 | null | null |
jgm/texmath | src/Text/TeXMath/Writers/OMML.hs | gpl-2.0 | str :: [Element] -> T.Text -> Element
str [] s = mnode "r" [ mnode "t" $ T.unpack s ] | 88 | str :: [Element] -> T.Text -> Element
str [] s = mnode "r" [ mnode "t" $ T.unpack s ] | 88 | str [] s = mnode "r" [ mnode "t" $ T.unpack s ] | 50 | false | true | 0 | 9 | 22 | 56 | 26 | 30 | null | null |
TheBB/hess | src/Game/BoardMask.hs | mit | shiftSW = (.&!. (fileH .|. rank8)) . (`shiftR` 7) | 49 | shiftSW = (.&!. (fileH .|. rank8)) . (`shiftR` 7) | 49 | shiftSW = (.&!. (fileH .|. rank8)) . (`shiftR` 7) | 49 | false | false | 1 | 8 | 8 | 31 | 17 | 14 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Logging/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ListLogEntriesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'llerNextPageToken'
--
-- * 'llerEntries'
listLogEntriesResponse
:: ListLogEntriesResponse
listLogEntriesResponse =
ListLogEntriesResponse' {_llerNextPageToken = Nothing, _llerEntries = Nothing} | 382 | listLogEntriesResponse
:: ListLogEntriesResponse
listLogEntriesResponse =
ListLogEntriesResponse' {_llerNextPageToken = Nothing, _llerEntries = Nothing} | 158 | listLogEntriesResponse =
ListLogEntriesResponse' {_llerNextPageToken = Nothing, _llerEntries = Nothing} | 105 | true | true | 1 | 7 | 55 | 36 | 22 | 14 | null | null |
DavidAlphaFox/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | ---------------------------------
-- SPECIALISATION
-- See Note [Specialisations and RULES in IdInfo] in IdInfo.lhs
idSpecialisation :: Id -> SpecInfo
idSpecialisation id = specInfo (idInfo id) | 203 | idSpecialisation :: Id -> SpecInfo
idSpecialisation id = specInfo (idInfo id) | 77 | idSpecialisation id = specInfo (idInfo id) | 42 | true | true | 0 | 7 | 33 | 30 | 16 | 14 | null | null |
ags/hs-moz | src/Moz/Auth.hs | mit | expires :: UTCTime -> BS.ByteString
expires = C8.pack . show . toSeconds . addUTCTime 300 | 89 | expires :: UTCTime -> BS.ByteString
expires = C8.pack . show . toSeconds . addUTCTime 300 | 89 | expires = C8.pack . show . toSeconds . addUTCTime 300 | 53 | false | true | 3 | 8 | 14 | 44 | 18 | 26 | null | null |
brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/ProjectRosalind/Lcsm/DirectToSetFull.hs | mit | substringsForLength :: Int -> Int
substringsForLength n = (n * (n + 1)) `div` 2 | 79 | substringsForLength :: Int -> Int
substringsForLength n = (n * (n + 1)) `div` 2 | 79 | substringsForLength n = (n * (n + 1)) `div` 2 | 45 | false | true | 0 | 9 | 14 | 38 | 21 | 17 | null | null |
igrep/office-climate | src/Main.hs | bsd-3-clause | cdThisDirectory :: IO ()
cdThisDirectory = setCurrentDirectory $(location >>= stringE . takeDirectory . loc_filename) | 117 | cdThisDirectory :: IO ()
cdThisDirectory = setCurrentDirectory $(location >>= stringE . takeDirectory . loc_filename) | 117 | cdThisDirectory = setCurrentDirectory $(location >>= stringE . takeDirectory . loc_filename) | 92 | false | true | 0 | 10 | 13 | 35 | 17 | 18 | null | null |
hallettj/locutoria | Network/Mail/Locutoria/Cli/Widgets.hs | bsd-3-clause | messageListItem :: Bool -> Message -> Widget
messageListItem _ msg =
border $ hLimit 100 $
txt (author <> " — " <> date)
<=>
hBorder
<=>
messageContent 80 msg
where
author = either (const "(unknown author)") id $ fmap showAddress $ msgFrom msg
date = msg^.msgDateRelative | 309 | messageListItem :: Bool -> Message -> Widget
messageListItem _ msg =
border $ hLimit 100 $
txt (author <> " — " <> date)
<=>
hBorder
<=>
messageContent 80 msg
where
author = either (const "(unknown author)") id $ fmap showAddress $ msgFrom msg
date = msg^.msgDateRelative | 309 | messageListItem _ msg =
border $ hLimit 100 $
txt (author <> " — " <> date)
<=>
hBorder
<=>
messageContent 80 msg
where
author = either (const "(unknown author)") id $ fmap showAddress $ msgFrom msg
date = msg^.msgDateRelative | 264 | false | true | 12 | 9 | 84 | 126 | 53 | 73 | null | null |
IreneKnapp/direct-sqlite | Database/SQLite3/Direct.hs | mit | packUtf8Array :: IO a -> (Utf8 -> IO a) -> Int -> Ptr CString -> IO [a]
packUtf8Array onNull onUtf8 count base =
peekArray count base >>= mapM (join . packUtf8 onNull onUtf8) | 178 | packUtf8Array :: IO a -> (Utf8 -> IO a) -> Int -> Ptr CString -> IO [a]
packUtf8Array onNull onUtf8 count base =
peekArray count base >>= mapM (join . packUtf8 onNull onUtf8) | 178 | packUtf8Array onNull onUtf8 count base =
peekArray count base >>= mapM (join . packUtf8 onNull onUtf8) | 106 | false | true | 0 | 10 | 36 | 82 | 39 | 43 | null | null |
christiaanb/ghc | compiler/deSugar/Check.hs | bsd-3-clause | get_used_lits' :: [(EqnNo, EquationInfo)] -> [HsLit]
get_used_lits' [] = [] | 75 | get_used_lits' :: [(EqnNo, EquationInfo)] -> [HsLit]
get_used_lits' [] = [] | 75 | get_used_lits' [] = [] | 22 | false | true | 0 | 7 | 9 | 34 | 19 | 15 | null | null |
chadbrewbaker/combinat | Math/Combinat/Partitions/NonCrossing.hs | bsd-3-clause | | Warning: This function assumes the standard ordering!
_isNonCrossingUnsafe :: [[Int]] -> Bool
_isNonCrossingUnsafe zzs =
case _nonCrossingPartitionToDyckPathMaybe zzs of
Nothing -> False
Just dyck -> case dyckPathToNonCrossingPartitionMaybe dyck of
Nothing -> False
Just (NonCrossing yys) -> yys == zzs
-- | Convert to standard form: entries decreasing in each block
-- and blocks listed in increasing order of their first entries.
| 488 | _isNonCrossingUnsafe :: [[Int]] -> Bool
_isNonCrossingUnsafe zzs =
case _nonCrossingPartitionToDyckPathMaybe zzs of
Nothing -> False
Just dyck -> case dyckPathToNonCrossingPartitionMaybe dyck of
Nothing -> False
Just (NonCrossing yys) -> yys == zzs
-- | Convert to standard form: entries decreasing in each block
-- and blocks listed in increasing order of their first entries. | 427 | _isNonCrossingUnsafe zzs =
case _nonCrossingPartitionToDyckPathMaybe zzs of
Nothing -> False
Just dyck -> case dyckPathToNonCrossingPartitionMaybe dyck of
Nothing -> False
Just (NonCrossing yys) -> yys == zzs
-- | Convert to standard form: entries decreasing in each block
-- and blocks listed in increasing order of their first entries. | 387 | true | true | 4 | 10 | 115 | 105 | 50 | 55 | null | null |
rahulmutt/ghcvm | libraries/eta-meta/Language/Eta/Meta/Ppr.hs | bsd-3-clause | pprExp i (LamE ps e) = parensIf (i > noPrec) $ char '\\' <> hsep (map (pprPat appPrec) ps)
<+> text "->" <+> ppr e | 157 | pprExp i (LamE ps e) = parensIf (i > noPrec) $ char '\\' <> hsep (map (pprPat appPrec) ps)
<+> text "->" <+> ppr e | 157 | pprExp i (LamE ps e) = parensIf (i > noPrec) $ char '\\' <> hsep (map (pprPat appPrec) ps)
<+> text "->" <+> ppr e | 157 | false | false | 8 | 8 | 67 | 78 | 33 | 45 | null | null |
shlevy/ghc | compiler/prelude/THNames.hs | bsd-3-clause | thTc = mk_known_key_name OccName.tcName thSyn | 49 | thTc = mk_known_key_name OccName.tcName thSyn | 49 | thTc = mk_known_key_name OccName.tcName thSyn | 49 | false | false | 0 | 6 | 8 | 13 | 6 | 7 | null | null |
szehk/Haskell-Carbonara-Library | src/Data/Carbonara/Maybe.hs | bsd-3-clause | (^*^) :: (Show a, Show b) => a -> b -> Maybe Double
(^*^) x y = calcMaybeString (*) x y | 87 | (^*^) :: (Show a, Show b) => a -> b -> Maybe Double
(^*^) x y = calcMaybeString (*) x y | 87 | (^*^) x y = calcMaybeString (*) x y | 35 | false | true | 0 | 8 | 20 | 59 | 31 | 28 | null | null |
clarkcb/xsearch | haskell/hssearch/src/HsSearch/SearchFile.hs | mit | isSearchableFile :: SearchFile -> Bool
isSearchableFile sf = isSearchableFileType (searchFileType sf) | 101 | isSearchableFile :: SearchFile -> Bool
isSearchableFile sf = isSearchableFileType (searchFileType sf) | 101 | isSearchableFile sf = isSearchableFileType (searchFileType sf) | 62 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
yogeshsajanikar/stl | snaplet-stl/src/Snap/Snaplet/STL/View.hs | mit | stlDefaultPolicy :: UploadPolicy
stlDefaultPolicy = setMaximumFormInputSize (maxMb * megaByte) defaultUploadPolicy | 114 | stlDefaultPolicy :: UploadPolicy
stlDefaultPolicy = setMaximumFormInputSize (maxMb * megaByte) defaultUploadPolicy | 114 | stlDefaultPolicy = setMaximumFormInputSize (maxMb * megaByte) defaultUploadPolicy | 81 | false | true | 0 | 7 | 9 | 23 | 12 | 11 | null | null |
martin-kolinek/stack | src/Stack/PackageIndex.hs | bsd-3-clause | requireIndex :: (StackMiniM env m, HasConfig env) => PackageIndex -> m ()
requireIndex index = do
tarFile <- configPackageIndex $ indexName index
exists <- doesFileExist tarFile
unless exists $ updateIndex index
-- | Update all of the package indices | 263 | requireIndex :: (StackMiniM env m, HasConfig env) => PackageIndex -> m ()
requireIndex index = do
tarFile <- configPackageIndex $ indexName index
exists <- doesFileExist tarFile
unless exists $ updateIndex index
-- | Update all of the package indices | 263 | requireIndex index = do
tarFile <- configPackageIndex $ indexName index
exists <- doesFileExist tarFile
unless exists $ updateIndex index
-- | Update all of the package indices | 189 | false | true | 0 | 9 | 51 | 78 | 36 | 42 | null | null |
jdimond/diplomarbeit | lib/Search/Dictionary.hs | bsd-3-clause | emptyWordMap :: WordMap
emptyWordMap = WordMap H.empty (Token 0) | 64 | emptyWordMap :: WordMap
emptyWordMap = WordMap H.empty (Token 0) | 64 | emptyWordMap = WordMap H.empty (Token 0) | 40 | false | true | 0 | 7 | 8 | 24 | 12 | 12 | null | null |
corngood/cabal | cabal-install/Distribution/Client/Dependency/Modular/Preference.hs | bsd-3-clause | -- | Generic abstraction for strategies that just rearrange the package order.
-- Only packages that match the given predicate are reordered.
packageOrderFor :: (PN -> Bool) -> (PN -> I -> I -> Ordering) -> Tree a -> Tree a
packageOrderFor p cmp' = trav go
where
go (PChoiceF v@(Q _ pn) r cs)
| p pn = PChoiceF v r (P.sortByKeys (flip (cmp pn)) cs)
| otherwise = PChoiceF v r cs
go x = x
cmp :: PN -> POption -> POption -> Ordering
cmp pn (POption i _) (POption i' _) = cmp' pn i i'
-- | Prefer to link packages whenever possible | 659 | packageOrderFor :: (PN -> Bool) -> (PN -> I -> I -> Ordering) -> Tree a -> Tree a
packageOrderFor p cmp' = trav go
where
go (PChoiceF v@(Q _ pn) r cs)
| p pn = PChoiceF v r (P.sortByKeys (flip (cmp pn)) cs)
| otherwise = PChoiceF v r cs
go x = x
cmp :: PN -> POption -> POption -> Ordering
cmp pn (POption i _) (POption i' _) = cmp' pn i i'
-- | Prefer to link packages whenever possible | 517 | packageOrderFor p cmp' = trav go
where
go (PChoiceF v@(Q _ pn) r cs)
| p pn = PChoiceF v r (P.sortByKeys (flip (cmp pn)) cs)
| otherwise = PChoiceF v r cs
go x = x
cmp :: PN -> POption -> POption -> Ordering
cmp pn (POption i _) (POption i' _) = cmp' pn i i'
-- | Prefer to link packages whenever possible | 435 | true | true | 1 | 12 | 237 | 206 | 102 | 104 | null | null |
DATX02-17-26/DATX02-17-26 | libsrc/Class/Product/Uncons.hs | gpl-2.0 | unconsF :: (HFlatten p c, UnconsL p e) => [e] -> Maybe (c, [e])
unconsF = unconsL >=> pure . first hflatten | 107 | unconsF :: (HFlatten p c, UnconsL p e) => [e] -> Maybe (c, [e])
unconsF = unconsL >=> pure . first hflatten | 107 | unconsF = unconsL >=> pure . first hflatten | 43 | false | true | 0 | 9 | 21 | 60 | 32 | 28 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.