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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
feuerbach/traverse-with-class
|
Data/Generics/Traversable/Zipper.hs
|
mit
|
right (Zipper h (CtxtCons l (RightCons h' r) c)) =
Just (Zipper h' (CtxtCons (LeftCons l h) r c))
| 99
|
right (Zipper h (CtxtCons l (RightCons h' r) c)) =
Just (Zipper h' (CtxtCons (LeftCons l h) r c))
| 99
|
right (Zipper h (CtxtCons l (RightCons h' r) c)) =
Just (Zipper h' (CtxtCons (LeftCons l h) r c))
| 99
| false
| false
| 0
| 11
| 20
| 64
| 31
| 33
| null | null |
dcreager/cabal
|
Distribution/Simple/Setup.hs
|
bsd-3-clause
|
fromFlag :: Flag a -> a
fromFlag (Flag x) = x
| 45
|
fromFlag :: Flag a -> a
fromFlag (Flag x) = x
| 45
|
fromFlag (Flag x) = x
| 21
| false
| true
| 0
| 6
| 10
| 31
| 14
| 17
| null | null |
brendanhay/gogol
|
gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs
|
mpl-2.0
|
-- | A UTF-8 encoded string value. When \`exclude_from_indexes\` is false (it
-- is indexed) , may have at most 1500 bytes. Otherwise, may be set to at
-- most 1,000,000 bytes.
vStringValue :: Lens' Value (Maybe Text)
vStringValue
= lens _vStringValue (\ s a -> s{_vStringValue = a})
| 285
|
vStringValue :: Lens' Value (Maybe Text)
vStringValue
= lens _vStringValue (\ s a -> s{_vStringValue = a})
| 108
|
vStringValue
= lens _vStringValue (\ s a -> s{_vStringValue = a})
| 67
| true
| true
| 0
| 9
| 50
| 50
| 27
| 23
| null | null |
ejlilley/AbstractMusic
|
LilyParse.hs
|
gpl-3.0
|
setDurExpr :: LilyNote -> LilyExpr -> (LilyNote, LilyExpr)
setDurExpr base (Note n) = let n' = setDuration base n in (n', Note n')
| 130
|
setDurExpr :: LilyNote -> LilyExpr -> (LilyNote, LilyExpr)
setDurExpr base (Note n) = let n' = setDuration base n in (n', Note n')
| 130
|
setDurExpr base (Note n) = let n' = setDuration base n in (n', Note n')
| 71
| false
| true
| 0
| 9
| 22
| 66
| 32
| 34
| null | null |
brendanhay/gogol
|
gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs
|
mpl-2.0
|
-- | Service-specific metadata associated with the operation. It typically
-- contains progress information and common metadata such as create time.
-- Some services might not provide such metadata. Any method that returns a
-- long-running operation should document the metadata type, if any.
gloMetadata :: Lens' GoogleLongrunning_Operation (Maybe GoogleLongrunning_OperationMetadata)
gloMetadata
= lens _gloMetadata (\ s a -> s{_gloMetadata = a})
| 451
|
gloMetadata :: Lens' GoogleLongrunning_Operation (Maybe GoogleLongrunning_OperationMetadata)
gloMetadata
= lens _gloMetadata (\ s a -> s{_gloMetadata = a})
| 157
|
gloMetadata
= lens _gloMetadata (\ s a -> s{_gloMetadata = a})
| 64
| true
| true
| 0
| 9
| 62
| 51
| 28
| 23
| null | null |
glguy/cereal
|
src/Data/Serialize/Get.hs
|
bsd-3-clause
|
------------------------------------------------------------------------
-- | If at least @n@ bytes of input are available, return the current
-- input, otherwise fail.
ensure :: Int -> Get B.ByteString
ensure n = n `seq` Get $ \ s0 b0 m0 kf ks ->
if B.length s0 >= n
then ks s0 b0 m0 s0
else unGet (demandInput >> ensureRec n) s0 b0 m0 kf ks
| 357
|
ensure :: Int -> Get B.ByteString
ensure n = n `seq` Get $ \ s0 b0 m0 kf ks ->
if B.length s0 >= n
then ks s0 b0 m0 s0
else unGet (demandInput >> ensureRec n) s0 b0 m0 kf ks
| 185
|
ensure n = n `seq` Get $ \ s0 b0 m0 kf ks ->
if B.length s0 >= n
then ks s0 b0 m0 s0
else unGet (demandInput >> ensureRec n) s0 b0 m0 kf ks
| 151
| true
| true
| 0
| 11
| 75
| 98
| 51
| 47
| null | null |
steveshogren/haskell-katas
|
src/BankOCR.hs
|
bsd-3-clause
|
parse = makeOutput . map matchWith . makeDigitTable . breakIntoThrees
| 69
|
parse = makeOutput . map matchWith . makeDigitTable . breakIntoThrees
| 69
|
parse = makeOutput . map matchWith . makeDigitTable . breakIntoThrees
| 69
| false
| false
| 0
| 8
| 9
| 21
| 10
| 11
| null | null |
hvr/vector
|
Data/Vector/Primitive.hs
|
bsd-3-clause
|
scanl = G.scanl
| 15
|
scanl = G.scanl
| 15
|
scanl = G.scanl
| 15
| false
| false
| 0
| 5
| 2
| 8
| 4
| 4
| null | null |
DougBurke/swish
|
tests/RDFProofTest.hs
|
lgpl-2.1
|
prefix2 :: B.Builder
prefix2 =
"@prefix pers: <urn:pers:> . \n"
`mappend`
"@prefix rel: <urn:rel:> . \n"
| 117
|
prefix2 :: B.Builder
prefix2 =
"@prefix pers: <urn:pers:> . \n"
`mappend`
"@prefix rel: <urn:rel:> . \n"
| 117
|
prefix2 =
"@prefix pers: <urn:pers:> . \n"
`mappend`
"@prefix rel: <urn:rel:> . \n"
| 96
| false
| true
| 0
| 5
| 28
| 19
| 11
| 8
| null | null |
hausdorff/pyli
|
src/Parser.hs
|
mit
|
exceptType :: Parser String
exceptType = catchAllExceptions
<|> catchSpecificExceptions ==> emitExceptType
where catchAllExceptions = eps "" -- `except:` will catch all excptns
catchSpecificExceptions = test <~> exceptVars
-- matches vars in exception declaration, eg, in `except ValueError as e:` we
-- we would match `as e`
| 355
|
exceptType :: Parser String
exceptType = catchAllExceptions
<|> catchSpecificExceptions ==> emitExceptType
where catchAllExceptions = eps "" -- `except:` will catch all excptns
catchSpecificExceptions = test <~> exceptVars
-- matches vars in exception declaration, eg, in `except ValueError as e:` we
-- we would match `as e`
| 355
|
exceptType = catchAllExceptions
<|> catchSpecificExceptions ==> emitExceptType
where catchAllExceptions = eps "" -- `except:` will catch all excptns
catchSpecificExceptions = test <~> exceptVars
-- matches vars in exception declaration, eg, in `except ValueError as e:` we
-- we would match `as e`
| 327
| false
| true
| 3
| 6
| 75
| 54
| 27
| 27
| null | null |
ameingast/yawn
|
src/Yawn/Mime.hs
|
bsd-3-clause
|
eol :: CharParser () Char
eol = char '\n' <|> (eof >> return '\n')
| 66
|
eol :: CharParser () Char
eol = char '\n' <|> (eof >> return '\n')
| 66
|
eol = char '\n' <|> (eof >> return '\n')
| 40
| false
| true
| 0
| 8
| 13
| 35
| 17
| 18
| null | null |
agomezl/tstp2agda
|
src/Data/Proof.hs
|
mit
|
uildProofMap ∷ [F] -- ^ List of functions
→ ProofMap -- ^ Map of the given functions indexed by its names
buildProofMap = foldl buildMap empty
where
-- buildMap ∷ Map String F → F → Map String F
buildMap m f' = insert (name f') f' m
-- | 'getParentsTree' 'm' 'p', from a 'Map' 'm' and a list of parents 'p'
-- return a list of corresponding parent subtrees.
| 394
|
buildProofMap ∷ [F] -- ^ List of functions
→ ProofMap
buildProofMap = foldl buildMap empty
where
-- buildMap ∷ Map String F → F → Map String F
buildMap m f' = insert (name f') f' m
-- | 'getParentsTree' 'm' 'p', from a 'Map' 'm' and a list of parents 'p'
-- return a list of corresponding parent subtrees.
| 341
|
buildProofMap = foldl buildMap empty
where
-- buildMap ∷ Map String F → F → Map String F
buildMap m f' = insert (name f') f' m
-- | 'getParentsTree' 'm' 'p', from a 'Map' 'm' and a list of parents 'p'
-- return a list of corresponding parent subtrees.
| 268
| true
| true
| 0
| 7
| 107
| 53
| 29
| 24
| null | null |
hankaiwen/libsbp
|
haskell/src/SwiftNav/SBP/Observation.hs
|
lgpl-3.0
|
msgEphemeris :: Word16
msgEphemeris = 0x0047
| 44
|
msgEphemeris :: Word16
msgEphemeris = 0x0047
| 44
|
msgEphemeris = 0x0047
| 21
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
qrilka/xlsx
|
src/Codec/Xlsx/Parser/Internal.hs
|
mit
|
runReader :: T.Reader a -> Text -> [a]
runReader reader t = case reader t of
Right (r, leftover) | T.null leftover -> [r]
_ -> []
-- | Add sml namespace to name
| 165
|
runReader :: T.Reader a -> Text -> [a]
runReader reader t = case reader t of
Right (r, leftover) | T.null leftover -> [r]
_ -> []
-- | Add sml namespace to name
| 165
|
runReader reader t = case reader t of
Right (r, leftover) | T.null leftover -> [r]
_ -> []
-- | Add sml namespace to name
| 126
| false
| true
| 0
| 12
| 38
| 77
| 38
| 39
| null | null |
ezyang/ghc
|
compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
|
bsd-3-clause
|
- | Find the refl. trans. closure of the association from this point.
closeAssoc :: (Uniquable a)
=> a -> Assoc a -> UniqSet a
closeAssoc a assoc
= closeAssoc' assoc emptyUniqSet (unitUniqSet a)
where
closeAssoc' assoc visited toVisit
= case nonDetEltsUniqSet toVisit of
-- See Note [Unique Determinism and code generation]
-- nothing else to visit, we're done
[] -> visited
(x:_)
-- we've already seen this node
| elementOfUniqSet x visited
-> closeAssoc' assoc visited (delOneFromUniqSet toVisit x)
-- haven't seen this node before,
-- remember to visit all its neighbors
| otherwise
-> let neighbors
= case lookupUFM assoc x of
Nothing -> emptyUniqSet
Just set -> set
in closeAssoc' assoc
(addOneToUniqSet visited x)
(unionUniqSets toVisit neighbors)
-- | Intersect two associations.
| 1,189
|
closeAssoc :: (Uniquable a)
=> a -> Assoc a -> UniqSet a
closeAssoc a assoc
= closeAssoc' assoc emptyUniqSet (unitUniqSet a)
where
closeAssoc' assoc visited toVisit
= case nonDetEltsUniqSet toVisit of
-- See Note [Unique Determinism and code generation]
-- nothing else to visit, we're done
[] -> visited
(x:_)
-- we've already seen this node
| elementOfUniqSet x visited
-> closeAssoc' assoc visited (delOneFromUniqSet toVisit x)
-- haven't seen this node before,
-- remember to visit all its neighbors
| otherwise
-> let neighbors
= case lookupUFM assoc x of
Nothing -> emptyUniqSet
Just set -> set
in closeAssoc' assoc
(addOneToUniqSet visited x)
(unionUniqSets toVisit neighbors)
-- | Intersect two associations.
| 1,117
|
closeAssoc a assoc
= closeAssoc' assoc emptyUniqSet (unitUniqSet a)
where
closeAssoc' assoc visited toVisit
= case nonDetEltsUniqSet toVisit of
-- See Note [Unique Determinism and code generation]
-- nothing else to visit, we're done
[] -> visited
(x:_)
-- we've already seen this node
| elementOfUniqSet x visited
-> closeAssoc' assoc visited (delOneFromUniqSet toVisit x)
-- haven't seen this node before,
-- remember to visit all its neighbors
| otherwise
-> let neighbors
= case lookupUFM assoc x of
Nothing -> emptyUniqSet
Just set -> set
in closeAssoc' assoc
(addOneToUniqSet visited x)
(unionUniqSets toVisit neighbors)
-- | Intersect two associations.
| 1,052
| true
| true
| 5
| 16
| 527
| 235
| 112
| 123
| null | null |
eddywestbrook/hobbits
|
src/Data/Type/RList.hs
|
bsd-3-clause
|
-- | Look up an element of an 'RAssign' vector using a 'Member' proof
get :: Member c a -> RAssign f c -> f a
get Member_Base (_ :>: x) = x
| 139
|
get :: Member c a -> RAssign f c -> f a
get Member_Base (_ :>: x) = x
| 69
|
get Member_Base (_ :>: x) = x
| 29
| true
| true
| 0
| 7
| 32
| 50
| 23
| 27
| null | null |
ComputationWithBoundedResources/ara-inference
|
doc/tpdb_trs/Haskell/basic_haskell/notElem_5.hs
|
mit
|
all :: (a -> MyBool) -> (List a) -> MyBool;
all p = pt and (map p)
| 72
|
all :: (a -> MyBool) -> (List a) -> MyBool
all p = pt and (map p)
| 71
|
all p = pt and (map p)
| 22
| false
| true
| 1
| 9
| 22
| 55
| 25
| 30
| null | null |
FranklinChen/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
pToV' n i (Bind x b sc)
-- We can assume the inner scope has been pToVed already, so continue to
-- resolve names from the *outer* scope which may happen to have the same id.
| n == x = Bind x (fmap (pToV' n i) b) sc
| otherwise = Bind x (fmap (pToV' n i) b) (pToV' n (i+1) sc)
| 290
|
pToV' n i (Bind x b sc)
-- We can assume the inner scope has been pToVed already, so continue to
-- resolve names from the *outer* scope which may happen to have the same id.
| n == x = Bind x (fmap (pToV' n i) b) sc
| otherwise = Bind x (fmap (pToV' n i) b) (pToV' n (i+1) sc)
| 290
|
pToV' n i (Bind x b sc)
-- We can assume the inner scope has been pToVed already, so continue to
-- resolve names from the *outer* scope which may happen to have the same id.
| n == x = Bind x (fmap (pToV' n i) b) sc
| otherwise = Bind x (fmap (pToV' n i) b) (pToV' n (i+1) sc)
| 290
| false
| false
| 1
| 10
| 75
| 108
| 52
| 56
| null | null |
unisonweb/platform
|
unison-core/src/Unison/Names3.hs
|
mit
|
-- Simple 2 way diff, has the property that:
-- addedNames (diff0 n1 n2) == removedNames (diff0 n2 n1)
--
-- `addedNames` are names in `n2` but not `n1`
-- `removedNames` are names in `n1` but not `n2`
diff0 :: Names0 -> Names0 -> Diff
diff0 n1 n2 = Diff n1 added removed where
added = Names0 (terms0 n2 `R.difference` terms0 n1)
(types0 n2 `R.difference` types0 n1)
removed = Names0 (terms0 n1 `R.difference` terms0 n2)
(types0 n1 `R.difference` types0 n2)
| 498
|
diff0 :: Names0 -> Names0 -> Diff
diff0 n1 n2 = Diff n1 added removed where
added = Names0 (terms0 n2 `R.difference` terms0 n1)
(types0 n2 `R.difference` types0 n1)
removed = Names0 (terms0 n1 `R.difference` terms0 n2)
(types0 n1 `R.difference` types0 n2)
| 295
|
diff0 n1 n2 = Diff n1 added removed where
added = Names0 (terms0 n2 `R.difference` terms0 n1)
(types0 n2 `R.difference` types0 n1)
removed = Names0 (terms0 n1 `R.difference` terms0 n2)
(types0 n1 `R.difference` types0 n2)
| 261
| true
| true
| 0
| 10
| 120
| 130
| 68
| 62
| null | null |
rifung/nand2tetris
|
projects/compiler/src/Assembler/Parser.hs
|
gpl-3.0
|
invalidSymbolString = "Invalid char(s) in symbol"
| 49
|
invalidSymbolString = "Invalid char(s) in symbol"
| 49
|
invalidSymbolString = "Invalid char(s) in symbol"
| 49
| false
| false
| 0
| 4
| 5
| 6
| 3
| 3
| null | null |
airt/Haskell-99
|
test/Cases.hs
|
mit
|
case23 = testCase "rndSelect" $ do
rs <- rndSelect 5 [1..10] <$> getStdGen
5 @=? length rs
5 @=? length (nub rs)
all (`elem` [1..10]) rs @? []
| 150
|
case23 = testCase "rndSelect" $ do
rs <- rndSelect 5 [1..10] <$> getStdGen
5 @=? length rs
5 @=? length (nub rs)
all (`elem` [1..10]) rs @? []
| 150
|
case23 = testCase "rndSelect" $ do
rs <- rndSelect 5 [1..10] <$> getStdGen
5 @=? length rs
5 @=? length (nub rs)
all (`elem` [1..10]) rs @? []
| 150
| false
| false
| 0
| 11
| 35
| 85
| 41
| 44
| null | null |
shayan-najd/QHaskell
|
QHaskell/MyPrelude.hs
|
gpl-3.0
|
badUse :: String -> a
badUse = error . ("Bad use of " ++)
| 57
|
badUse :: String -> a
badUse = error . ("Bad use of " ++)
| 57
|
badUse = error . ("Bad use of " ++)
| 35
| false
| true
| 1
| 7
| 13
| 31
| 14
| 17
| null | null |
GaloisInc/halvm-ghc
|
compiler/basicTypes/VarEnv.hs
|
bsd-3-clause
|
rnOccL, rnOccR :: RnEnv2 -> Var -> Var
-- ^ Look up the renaming of an occurrence in the left or right term
rnOccL (RV2 { envL = env }) v = lookupVarEnv env v `orElse` v
| 169
|
rnOccL, rnOccR :: RnEnv2 -> Var -> Var
rnOccL (RV2 { envL = env }) v = lookupVarEnv env v `orElse` v
| 100
|
rnOccL (RV2 { envL = env }) v = lookupVarEnv env v `orElse` v
| 61
| true
| true
| 2
| 9
| 36
| 55
| 28
| 27
| null | null |
JAnthelme/relation-tool
|
src/Relvar/Pretty/BoxesText.hs
|
bsd-3-clause
|
-- | @alignVert algn n bx@ creates a box of height @n@, with the
-- contents and width of @bx@, vertically aligned according to
-- @algn@.
alignVert :: Alignment -> Int -> Box -> Box
alignVert a r b = Box r (cols b) $ SubBox AlignFirst a b
| 243
|
alignVert :: Alignment -> Int -> Box -> Box
alignVert a r b = Box r (cols b) $ SubBox AlignFirst a b
| 100
|
alignVert a r b = Box r (cols b) $ SubBox AlignFirst a b
| 56
| true
| true
| 0
| 8
| 52
| 55
| 28
| 27
| null | null |
ezyang/ghc
|
compiler/prelude/THNames.hs
|
bsd-3-clause
|
-- data DerivStrategy = ...
stockDataConKey, anyclassDataConKey, newtypeDataConKey :: Unique
stockDataConKey = mkPreludeDataConUnique 213
| 140
|
stockDataConKey, anyclassDataConKey, newtypeDataConKey :: Unique
stockDataConKey = mkPreludeDataConUnique 213
| 112
|
stockDataConKey = mkPreludeDataConUnique 213
| 47
| true
| true
| 0
| 5
| 16
| 19
| 12
| 7
| null | null |
shockkolate/gameai-chess
|
src/Main.hs
|
unlicense
|
parseColPos '7' = Col7
| 22
|
parseColPos '7' = Col7
| 22
|
parseColPos '7' = Col7
| 22
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
ghc-android/ghc
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
doAtomicRMW :: LocalReg -- ^ Result reg
-> AtomicMachOp -- ^ Atomic op (e.g. add)
-> CmmExpr -- ^ MutableByteArray#
-> CmmExpr -- ^ Index
-> CmmType -- ^ Type of element by which we are indexing
-> CmmExpr -- ^ Op argument (e.g. amount to add)
-> FCode ()
doAtomicRMW res amop mba idx idx_ty n = do
dflags <- getDynFlags
let width = typeWidth idx_ty
addr = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)
width mba idx
emitPrimCall
[ res ]
(MO_AtomicRMW width amop)
[ addr, n ]
-- | Emit an atomic read to a byte array that acts as a memory barrier.
| 713
|
doAtomicRMW :: LocalReg -- ^ Result reg
-> AtomicMachOp -- ^ Atomic op (e.g. add)
-> CmmExpr -- ^ MutableByteArray#
-> CmmExpr -- ^ Index
-> CmmType -- ^ Type of element by which we are indexing
-> CmmExpr -- ^ Op argument (e.g. amount to add)
-> FCode ()
doAtomicRMW res amop mba idx idx_ty n = do
dflags <- getDynFlags
let width = typeWidth idx_ty
addr = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)
width mba idx
emitPrimCall
[ res ]
(MO_AtomicRMW width amop)
[ addr, n ]
-- | Emit an atomic read to a byte array that acts as a memory barrier.
| 713
|
doAtomicRMW res amop mba idx idx_ty n = do
dflags <- getDynFlags
let width = typeWidth idx_ty
addr = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)
width mba idx
emitPrimCall
[ res ]
(MO_AtomicRMW width amop)
[ addr, n ]
-- | Emit an atomic read to a byte array that acts as a memory barrier.
| 355
| false
| true
| 0
| 12
| 266
| 128
| 66
| 62
| null | null |
ltfschoen/HelloHaskell
|
src/Chapter2/Section2/LabInteractive.hs
|
mit
|
sequence' :: Monad m => [m a] -> m [a]
{- RIGHT -}
sequence' [] = return []
| 86
|
sequence' :: Monad m => [m a] -> m [a]
sequence' [] = return []
| 63
|
sequence' [] = return []
| 24
| true
| true
| 0
| 8
| 28
| 45
| 22
| 23
| null | null |
myShoggoth/shakespeare
|
test/Text/Shakespeare/HamletSpec.hs
|
mit
|
caseElseIf :: Assertion
caseElseIf = helper "elseif" [hamlet|
$if false theArg
if
$elseif true theArg
elseif
$else
else
|]
| 134
|
caseElseIf :: Assertion
caseElseIf = helper "elseif" [hamlet|
$if false theArg
if
$elseif true theArg
elseif
$else
else
|]
| 134
|
caseElseIf = helper "elseif" [hamlet|
$if false theArg
if
$elseif true theArg
elseif
$else
else
|]
| 110
| false
| true
| 0
| 5
| 30
| 20
| 12
| 8
| null | null |
symengine/symengine.hs
|
test/Spec.hs
|
mit
|
-- These are used to check invariants that can be tested by creating
-- random members of the type and then checking invariants on them
-- properties :: TestTree
-- properties = testGroup "Properties" [qcProps]
unitTests = testGroup "Unit tests"
[ HU.testCase "FFI Sanity Check - ASCII Art should be non-empty" $
do
ascii_art <- Sym.ascii_art_str
HU.assertBool "ASCII art from ascii_art_str is empty" (not . null $ ascii_art)
, HU.testCase "Basic Constructors" $
do
"0" @?= (show zero)
"1" @?= (show one)
"-1" @?= (show minus_one)
, HU.testCase "Basic Trignometric Functions" $
do
let pi_over_3 = pi / 3 :: BasicSym
let pi_over_2 = pi / 2 :: BasicSym
sin zero @?= zero
cos zero @?= one
sin (pi / 6) @?= 1 / 2
sin (pi / 3) @?= (3 ** (1/2)) / 2
cos (pi / 6) @?= (3 ** (1/2)) / 2
cos (pi / 3) @?= 1 / 2
sin pi_over_2 @?= one
cos pi_over_2 @?= zero
]
| 987
|
unitTests = testGroup "Unit tests"
[ HU.testCase "FFI Sanity Check - ASCII Art should be non-empty" $
do
ascii_art <- Sym.ascii_art_str
HU.assertBool "ASCII art from ascii_art_str is empty" (not . null $ ascii_art)
, HU.testCase "Basic Constructors" $
do
"0" @?= (show zero)
"1" @?= (show one)
"-1" @?= (show minus_one)
, HU.testCase "Basic Trignometric Functions" $
do
let pi_over_3 = pi / 3 :: BasicSym
let pi_over_2 = pi / 2 :: BasicSym
sin zero @?= zero
cos zero @?= one
sin (pi / 6) @?= 1 / 2
sin (pi / 3) @?= (3 ** (1/2)) / 2
cos (pi / 6) @?= (3 ** (1/2)) / 2
cos (pi / 3) @?= 1 / 2
sin pi_over_2 @?= one
cos pi_over_2 @?= zero
]
| 774
|
unitTests = testGroup "Unit tests"
[ HU.testCase "FFI Sanity Check - ASCII Art should be non-empty" $
do
ascii_art <- Sym.ascii_art_str
HU.assertBool "ASCII art from ascii_art_str is empty" (not . null $ ascii_art)
, HU.testCase "Basic Constructors" $
do
"0" @?= (show zero)
"1" @?= (show one)
"-1" @?= (show minus_one)
, HU.testCase "Basic Trignometric Functions" $
do
let pi_over_3 = pi / 3 :: BasicSym
let pi_over_2 = pi / 2 :: BasicSym
sin zero @?= zero
cos zero @?= one
sin (pi / 6) @?= 1 / 2
sin (pi / 3) @?= (3 ** (1/2)) / 2
cos (pi / 6) @?= (3 ** (1/2)) / 2
cos (pi / 3) @?= 1 / 2
sin pi_over_2 @?= one
cos pi_over_2 @?= zero
]
| 774
| true
| false
| 0
| 14
| 302
| 305
| 147
| 158
| null | null |
olorin/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
|
mpl-2.0
|
-- | Indicates whether this is a Spot Instance.
insInstanceLifecycle :: Lens' Instance (Maybe InstanceLifecycleType)
insInstanceLifecycle = lens _insInstanceLifecycle (\ s a -> s{_insInstanceLifecycle = a})
| 206
|
insInstanceLifecycle :: Lens' Instance (Maybe InstanceLifecycleType)
insInstanceLifecycle = lens _insInstanceLifecycle (\ s a -> s{_insInstanceLifecycle = a})
| 158
|
insInstanceLifecycle = lens _insInstanceLifecycle (\ s a -> s{_insInstanceLifecycle = a})
| 89
| true
| true
| 0
| 9
| 25
| 46
| 25
| 21
| null | null |
haskell-opengl/OpenGLRaw
|
src/Graphics/GL/Functions/F15.hs
|
bsd-3-clause
|
-- glLineWidth -----------------------------------------------------------------
-- | Manual pages for <https://www.opengl.org/sdk/docs/man2/xhtml/glLineWidth.xml OpenGL 2.x> or <https://www.opengl.org/sdk/docs/man3/xhtml/glLineWidth.xml OpenGL 3.x> or <https://www.opengl.org/sdk/docs/man4/html/glLineWidth.xhtml OpenGL 4.x>.
glLineWidth
:: MonadIO m
=> GLfloat -- ^ @width@ of type @CheckedFloat32@.
-> m ()
glLineWidth v1 = liftIO $ dyn85 ptr_glLineWidth v1
| 467
|
glLineWidth
:: MonadIO m
=> GLfloat -- ^ @width@ of type @CheckedFloat32@.
-> m ()
glLineWidth v1 = liftIO $ dyn85 ptr_glLineWidth v1
| 139
|
glLineWidth v1 = liftIO $ dyn85 ptr_glLineWidth v1
| 50
| true
| true
| 2
| 9
| 48
| 48
| 22
| 26
| null | null |
dec9ue/jhc_copygc
|
src/FrontEnd/Tc/Type.hs
|
gpl-2.0
|
ctFun :: CoerceTerm -> CoerceTerm
ctFun CTId = CTId
| 51
|
ctFun :: CoerceTerm -> CoerceTerm
ctFun CTId = CTId
| 51
|
ctFun CTId = CTId
| 17
| false
| true
| 0
| 7
| 8
| 24
| 10
| 14
| null | null |
hlian/zwischenzug
|
Canvas.hs
|
bsd-3-clause
|
octagon = gon 8
| 15
|
octagon = gon 8
| 15
|
octagon = gon 8
| 15
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
ribag/ganeti-experiments
|
src/Ganeti/Constants.hs
|
gpl-2.0
|
opPrioHigh :: Int
opPrioHigh = Types.opSubmitPriorityToRaw OpPrioHigh
| 69
|
opPrioHigh :: Int
opPrioHigh = Types.opSubmitPriorityToRaw OpPrioHigh
| 69
|
opPrioHigh = Types.opSubmitPriorityToRaw OpPrioHigh
| 51
| false
| true
| 0
| 6
| 6
| 16
| 8
| 8
| null | null |
ony/hledger
|
hledger-lib/Hledger/Data/Dates.hs
|
gpl-3.0
|
spanContainsDate (DateSpan Nothing (Just e)) d = d < e
| 55
|
spanContainsDate (DateSpan Nothing (Just e)) d = d < e
| 55
|
spanContainsDate (DateSpan Nothing (Just e)) d = d < e
| 55
| false
| false
| 0
| 9
| 10
| 29
| 14
| 15
| null | null |
d0kt0r0/estuary
|
client/src/Estuary/Languages/CineCer0/Parser.hs
|
gpl-3.0
|
sigRat_sigRat_sigMayRat:: H (Signal Rational -> Signal Rational -> Signal (Maybe Rational))
sigRat_sigRat_sigMayRat =
(multi' <$ reserved "*") <|>
-- reserved "por" >> return multi' <|>
(sigRat_sigRat_sigRat_sigMayRat <*> sigRat)
| 234
|
sigRat_sigRat_sigMayRat:: H (Signal Rational -> Signal Rational -> Signal (Maybe Rational))
sigRat_sigRat_sigMayRat =
(multi' <$ reserved "*") <|>
-- reserved "por" >> return multi' <|>
(sigRat_sigRat_sigRat_sigMayRat <*> sigRat)
| 234
|
sigRat_sigRat_sigMayRat =
(multi' <$ reserved "*") <|>
-- reserved "por" >> return multi' <|>
(sigRat_sigRat_sigRat_sigMayRat <*> sigRat)
| 142
| false
| true
| 0
| 11
| 32
| 62
| 31
| 31
| null | null |
serokell/importify
|
src/Importify/Resolution/Hiding.hs
|
mit
|
funPattern Selector{..} = Just symbolName
| 41
|
funPattern Selector{..} = Just symbolName
| 41
|
funPattern Selector{..} = Just symbolName
| 41
| false
| false
| 0
| 7
| 4
| 18
| 8
| 10
| null | null |
changlinli/nikki
|
src/Base/Pixmap.hs
|
lgpl-3.0
|
debugMode = False
| 17
|
debugMode = False
| 17
|
debugMode = False
| 17
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
paulbarbu/ePseudocode
|
src/EPseudocode/Evaluator.hs
|
bsd-3-clause
|
evalBinExpr _ (BinExpr Lt (List _) _) = throwError "Lists can be compared only to lists"
| 88
|
evalBinExpr _ (BinExpr Lt (List _) _) = throwError "Lists can be compared only to lists"
| 88
|
evalBinExpr _ (BinExpr Lt (List _) _) = throwError "Lists can be compared only to lists"
| 88
| false
| false
| 0
| 9
| 15
| 30
| 14
| 16
| null | null |
Icelandjack/lens
|
src/Language/Haskell/TH/Lens.hs
|
bsd-3-clause
|
fieldExpName :: Lens' FieldExp Name
fieldExpName = _1
| 53
|
fieldExpName :: Lens' FieldExp Name
fieldExpName = _1
| 53
|
fieldExpName = _1
| 17
| false
| true
| 0
| 5
| 7
| 16
| 8
| 8
| null | null |
8l/barrelfish
|
hake/RuleDefs.hs
|
mit
|
--
-- Emit all the Flounder-related rules/dependencies for a given target
--
flounderRules :: Options -> Args.Args -> [String] -> [HRule]
flounderRules opts args csrcs =
([ flounderBinding opts f csrcs | f <- Args.flounderBindings args ]
++
[ flounderExtraBinding opts f backends csrcs
| (f, backends) <- Args.flounderExtraBindings args ]
++
[ flounderTHCStub opts f csrcs | f <- Args.flounderTHCStubs args ]
++
-- Flounder extra defs (header files) also depend on the base
-- Flounder headers for the same interface
[ flounderDefsDepend opts f baseBackends csrcs | f <- allIf ]
++
-- Extra defs only for non-base backends (those were already emitted above)
[ flounderDefsDepend opts f (backends \\ baseBackends) csrcs
| (f, backends) <- Args.flounderExtraDefs args ]
)
where
-- base backends enabled by default
baseBackends = optFlounderBackends opts
-- all interfaces mentioned in flounderDefs or ExtraDefs
allIf = nub $ Args.flounderDefs args ++ [f | (f,_) <- Args.flounderExtraDefs args]
--
-- Build a Fugu library
--
| 1,130
|
flounderRules :: Options -> Args.Args -> [String] -> [HRule]
flounderRules opts args csrcs =
([ flounderBinding opts f csrcs | f <- Args.flounderBindings args ]
++
[ flounderExtraBinding opts f backends csrcs
| (f, backends) <- Args.flounderExtraBindings args ]
++
[ flounderTHCStub opts f csrcs | f <- Args.flounderTHCStubs args ]
++
-- Flounder extra defs (header files) also depend on the base
-- Flounder headers for the same interface
[ flounderDefsDepend opts f baseBackends csrcs | f <- allIf ]
++
-- Extra defs only for non-base backends (those were already emitted above)
[ flounderDefsDepend opts f (backends \\ baseBackends) csrcs
| (f, backends) <- Args.flounderExtraDefs args ]
)
where
-- base backends enabled by default
baseBackends = optFlounderBackends opts
-- all interfaces mentioned in flounderDefs or ExtraDefs
allIf = nub $ Args.flounderDefs args ++ [f | (f,_) <- Args.flounderExtraDefs args]
--
-- Build a Fugu library
--
| 1,052
|
flounderRules opts args csrcs =
([ flounderBinding opts f csrcs | f <- Args.flounderBindings args ]
++
[ flounderExtraBinding opts f backends csrcs
| (f, backends) <- Args.flounderExtraBindings args ]
++
[ flounderTHCStub opts f csrcs | f <- Args.flounderTHCStubs args ]
++
-- Flounder extra defs (header files) also depend on the base
-- Flounder headers for the same interface
[ flounderDefsDepend opts f baseBackends csrcs | f <- allIf ]
++
-- Extra defs only for non-base backends (those were already emitted above)
[ flounderDefsDepend opts f (backends \\ baseBackends) csrcs
| (f, backends) <- Args.flounderExtraDefs args ]
)
where
-- base backends enabled by default
baseBackends = optFlounderBackends opts
-- all interfaces mentioned in flounderDefs or ExtraDefs
allIf = nub $ Args.flounderDefs args ++ [f | (f,_) <- Args.flounderExtraDefs args]
--
-- Build a Fugu library
--
| 991
| true
| true
| 3
| 14
| 269
| 263
| 136
| 127
| null | null |
githubkleon/ConvenientHDL
|
src/Language/Cynide/PrettyPrint.hs
|
bsd-3-clause
|
unary_op_table :: [(UnaryOp, String)]
unary_op_table
= [ (UPlus, "+"), (UMinus, "-"), (UBang, "!"), (UTilde, "~")
, (UAnd, "&"), (UNand, "~&"), (UOr, "|"), (UNor, "~|")
, (UXor, "^"), (UXnor, "~^"), (UXnor, "^~")
]
| 228
|
unary_op_table :: [(UnaryOp, String)]
unary_op_table
= [ (UPlus, "+"), (UMinus, "-"), (UBang, "!"), (UTilde, "~")
, (UAnd, "&"), (UNand, "~&"), (UOr, "|"), (UNor, "~|")
, (UXor, "^"), (UXnor, "~^"), (UXnor, "^~")
]
| 228
|
unary_op_table
= [ (UPlus, "+"), (UMinus, "-"), (UBang, "!"), (UTilde, "~")
, (UAnd, "&"), (UNand, "~&"), (UOr, "|"), (UNor, "~|")
, (UXor, "^"), (UXnor, "~^"), (UXnor, "^~")
]
| 190
| false
| true
| 0
| 8
| 45
| 126
| 79
| 47
| null | null |
Zigazou/containers
|
Data/Set/Base.hs
|
bsd-3-clause
|
-- | /O(1)/. Create a singleton set.
singleton :: a -> Set a
singleton x = Bin 1 x Tip Tip
| 90
|
singleton :: a -> Set a
singleton x = Bin 1 x Tip Tip
| 53
|
singleton x = Bin 1 x Tip Tip
| 29
| true
| true
| 0
| 6
| 20
| 31
| 15
| 16
| null | null |
jwiegley/ghc-release
|
libraries/containers/Data/Sequence.hs
|
gpl-3.0
|
emptyConstr, consConstr :: Constr
emptyConstr = mkConstr seqDataType "empty" [] Prefix
| 86
|
emptyConstr, consConstr :: Constr
emptyConstr = mkConstr seqDataType "empty" [] Prefix
| 86
|
emptyConstr = mkConstr seqDataType "empty" [] Prefix
| 52
| false
| true
| 0
| 6
| 10
| 24
| 13
| 11
| null | null |
dillonhuff/CLP
|
src/CLTerm.hs
|
lgpl-3.0
|
prettyTypeVars :: Type -> Type
prettyTypeVars t = applySubstitution uglyVarsToPrettyVars t
where
varsInType = allVars t
prettyVars = take (length varsInType) (L.map var (L.map (:[]) ['a'..'z']))
uglyVarsToPrettyVars = case length varsInType > 25 of
True -> error $ "MORE THAN 25 VARS IN TYPE EXPRESSION"
False -> M.fromList $ zip varsInType prettyVars
| 377
|
prettyTypeVars :: Type -> Type
prettyTypeVars t = applySubstitution uglyVarsToPrettyVars t
where
varsInType = allVars t
prettyVars = take (length varsInType) (L.map var (L.map (:[]) ['a'..'z']))
uglyVarsToPrettyVars = case length varsInType > 25 of
True -> error $ "MORE THAN 25 VARS IN TYPE EXPRESSION"
False -> M.fromList $ zip varsInType prettyVars
| 377
|
prettyTypeVars t = applySubstitution uglyVarsToPrettyVars t
where
varsInType = allVars t
prettyVars = take (length varsInType) (L.map var (L.map (:[]) ['a'..'z']))
uglyVarsToPrettyVars = case length varsInType > 25 of
True -> error $ "MORE THAN 25 VARS IN TYPE EXPRESSION"
False -> M.fromList $ zip varsInType prettyVars
| 346
| false
| true
| 0
| 11
| 77
| 124
| 62
| 62
| null | null |
silkapp/cassava
|
Data/Csv/Encoding.hs
|
bsd-3-clause
|
-- | Like 'decodeByName', but lets you customize how the CSV data is
-- parsed.
decodeByNameWith :: FromNamedRecord a
=> DecodeOptions -- ^ Decoding options
-> L.ByteString -- ^ CSV data
-> Either String (Header, Vector a)
decodeByNameWith !opts = decodeWithP (csvWithHeader opts)
| 334
|
decodeByNameWith :: FromNamedRecord a
=> DecodeOptions -- ^ Decoding options
-> L.ByteString -- ^ CSV data
-> Either String (Header, Vector a)
decodeByNameWith !opts = decodeWithP (csvWithHeader opts)
| 254
|
decodeByNameWith !opts = decodeWithP (csvWithHeader opts)
| 57
| true
| true
| 0
| 10
| 96
| 59
| 30
| 29
| null | null |
TeensyPass/teensy_pass_haskell
|
Cli.hs
|
gpl-2.0
|
lsParser = LsOptions
<$> strOption (long "subdir"
<> metavar "SUBDIR"
<> value "" )
| 146
|
lsParser = LsOptions
<$> strOption (long "subdir"
<> metavar "SUBDIR"
<> value "" )
| 146
|
lsParser = LsOptions
<$> strOption (long "subdir"
<> metavar "SUBDIR"
<> value "" )
| 146
| false
| false
| 0
| 10
| 76
| 33
| 15
| 18
| null | null |
hvr/lens
|
src/Control/Lens/Internal/ByteString.hs
|
bsd-3-clause
|
-- TODO: Should this create the list in chunks, like unpackBytes does in 0.10?
-- | Unpack a strict 'B.Bytestring', pretending the bytes are chars.
unpackStrict8 :: B.ByteString -> String
unpackStrict8 (BI.PS fp off len) =
let p = unsafeForeignPtrToPtr fp
in go (p `plusPtr` off) (p `plusPtr` (off+len))
where
go !p !q | p == q = []
| otherwise = let !x = BI.inlinePerformIO $ do
x' <- peek p
touchForeignPtr fp
return x'
in w2c x : go (p `plusPtr` 1) q
| 645
|
unpackStrict8 :: B.ByteString -> String
unpackStrict8 (BI.PS fp off len) =
let p = unsafeForeignPtrToPtr fp
in go (p `plusPtr` off) (p `plusPtr` (off+len))
where
go !p !q | p == q = []
| otherwise = let !x = BI.inlinePerformIO $ do
x' <- peek p
touchForeignPtr fp
return x'
in w2c x : go (p `plusPtr` 1) q
| 496
|
unpackStrict8 (BI.PS fp off len) =
let p = unsafeForeignPtrToPtr fp
in go (p `plusPtr` off) (p `plusPtr` (off+len))
where
go !p !q | p == q = []
| otherwise = let !x = BI.inlinePerformIO $ do
x' <- peek p
touchForeignPtr fp
return x'
in w2c x : go (p `plusPtr` 1) q
| 456
| true
| true
| 2
| 14
| 276
| 188
| 87
| 101
| null | null |
abakst/liquidhaskell
|
benchmarks/hmatrix-0.15.0.1/lib/Numeric/GSL/Vector.hs
|
bsd-3-clause
|
-- | obtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc.
toScalarF :: FunCodeS -> Vector Float -> Float
toScalarF oper = toScalarAux c_toScalarF (fromei oper)
| 193
|
toScalarF :: FunCodeS -> Vector Float -> Float
toScalarF oper = toScalarAux c_toScalarF (fromei oper)
| 102
|
toScalarF oper = toScalarAux c_toScalarF (fromei oper)
| 55
| true
| true
| 0
| 7
| 30
| 37
| 18
| 19
| null | null |
dahlia/nirum
|
src/Nirum/Docs/ReStructuredText.hs
|
gpl-3.0
|
renderBlock (List BulletList (TightItemList items)) =
T.intercalate "\n" [[qq|- {renderInlines i}|] | i <- items]
| 117
|
renderBlock (List BulletList (TightItemList items)) =
T.intercalate "\n" [[qq|- {renderInlines i}|] | i <- items]
| 117
|
renderBlock (List BulletList (TightItemList items)) =
T.intercalate "\n" [[qq|- {renderInlines i}|] | i <- items]
| 117
| false
| false
| 0
| 8
| 18
| 47
| 24
| 23
| null | null |
ben-schulz/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
termSmallerThan x (P _ _ ty) = termSmallerThan (x-1) ty
| 55
|
termSmallerThan x (P _ _ ty) = termSmallerThan (x-1) ty
| 55
|
termSmallerThan x (P _ _ ty) = termSmallerThan (x-1) ty
| 55
| false
| false
| 0
| 7
| 9
| 34
| 16
| 18
| null | null |
haskellbr/missingh
|
missingh-all/src/System/Time/ParseDate.hs
|
mit
|
setSec x = updateState (\t -> t{ ctSec = x })
| 51
|
setSec x = updateState (\t -> t{ ctSec = x })
| 51
|
setSec x = updateState (\t -> t{ ctSec = x })
| 51
| false
| false
| 0
| 9
| 16
| 28
| 15
| 13
| null | null |
isomorphism/webgl
|
src/Graphics/Rendering/WebGL/Constants.hs
|
mit
|
gl_TEXTURE_BINDING_3D :: GLenum
gl_TEXTURE_BINDING_3D = 0x806A
| 62
|
gl_TEXTURE_BINDING_3D :: GLenum
gl_TEXTURE_BINDING_3D = 0x806A
| 62
|
gl_TEXTURE_BINDING_3D = 0x806A
| 30
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
CulpaBS/wbBach
|
src/Futhark/Optimise/Simplifier/Rules.hs
|
bsd-3-clause
|
letRule :: MonadBinder m => LetTopDownRule (Lore m) u -> TopDownRule m
letRule rule vtable (Let pat _ (PrimOp op)) =
letBind_ pat =<< liftMaybe (PrimOp <$> rule defOf seType op)
where defOf = (`ST.lookupExp` vtable)
seType (Var v) = ST.lookupType v vtable
seType (Constant v) = Just $ Prim $ primValueType v
| 327
|
letRule :: MonadBinder m => LetTopDownRule (Lore m) u -> TopDownRule m
letRule rule vtable (Let pat _ (PrimOp op)) =
letBind_ pat =<< liftMaybe (PrimOp <$> rule defOf seType op)
where defOf = (`ST.lookupExp` vtable)
seType (Var v) = ST.lookupType v vtable
seType (Constant v) = Just $ Prim $ primValueType v
| 327
|
letRule rule vtable (Let pat _ (PrimOp op)) =
letBind_ pat =<< liftMaybe (PrimOp <$> rule defOf seType op)
where defOf = (`ST.lookupExp` vtable)
seType (Var v) = ST.lookupType v vtable
seType (Constant v) = Just $ Prim $ primValueType v
| 256
| false
| true
| 2
| 9
| 72
| 145
| 71
| 74
| null | null |
kovach/web
|
res0/Interpreter.hs
|
gpl-2.0
|
-- Interpreter
update :: Expr -> Expr -> Context -> Edge
-> Either String Context
update v1 v2 c (s, t) = do
f1 <- toVar v1 c s
f2 <- toVar v2 c t
return $ f2 . f1 $ c
--TODO remove
--isRooted (NRoot base) (NSym prop) = Just (base, prop)
--isRooted (NSym prop) (NRoot base) = Just (base, prop)
| 307
|
update :: Expr -> Expr -> Context -> Edge
-> Either String Context
update v1 v2 c (s, t) = do
f1 <- toVar v1 c s
f2 <- toVar v2 c t
return $ f2 . f1 $ c
--TODO remove
--isRooted (NRoot base) (NSym prop) = Just (base, prop)
--isRooted (NSym prop) (NRoot base) = Just (base, prop)
| 292
|
update v1 v2 c (s, t) = do
f1 <- toVar v1 c s
f2 <- toVar v2 c t
return $ f2 . f1 $ c
--TODO remove
--isRooted (NRoot base) (NSym prop) = Just (base, prop)
--isRooted (NSym prop) (NRoot base) = Just (base, prop)
| 218
| true
| true
| 0
| 9
| 75
| 94
| 47
| 47
| null | null |
ekmett/text
|
Data/Text/Lazy.hs
|
bsd-2-clause
|
-- | /O(n)/ Right-justify a string to the given length, using the
-- specified fill character on the left. Performs replacement on
-- invalid scalar values.
--
-- Examples:
--
-- > justifyRight 7 'x' "bar" == "xxxxbar"
-- > justifyRight 3 'x' "foobar" == "foobar"
justifyRight :: Int64 -> Char -> Text -> Text
justifyRight k c t
| len >= k = t
| otherwise = replicateChar (k-len) c `append` t
where len = length t
| 429
|
justifyRight :: Int64 -> Char -> Text -> Text
justifyRight k c t
| len >= k = t
| otherwise = replicateChar (k-len) c `append` t
where len = length t
| 161
|
justifyRight k c t
| len >= k = t
| otherwise = replicateChar (k-len) c `append` t
where len = length t
| 115
| true
| true
| 0
| 9
| 93
| 86
| 46
| 40
| null | null |
anttisalonen/freekick2
|
src/Main.hs
|
gpl-3.0
|
ownerToColor :: String -> WorldContext -> SColor
ownerToColor t c =
case getOwner t c of
Nothing -> SOrange
Just AIOwner -> SRed
Just HumanOwner -> SBlue
| 179
|
ownerToColor :: String -> WorldContext -> SColor
ownerToColor t c =
case getOwner t c of
Nothing -> SOrange
Just AIOwner -> SRed
Just HumanOwner -> SBlue
| 179
|
ownerToColor t c =
case getOwner t c of
Nothing -> SOrange
Just AIOwner -> SRed
Just HumanOwner -> SBlue
| 130
| false
| true
| 0
| 8
| 52
| 57
| 27
| 30
| null | null |
573/leksah
|
src/IDE/Pane/Files.hs
|
gpl-2.0
|
dirContents :: FilePath -> IO [FileRecord]
dirContents dir = do
contents <- filter ((/= '.') . head) <$> getDirectoryContents dir
`catch` \ (e :: IOError) -> return []
records <- forM contents $ \f -> do
let full = dir </> f
isDir <- doesDirectoryExist full
return $ if isDir then DirRecord full else FileRecord full
return (sort records)
| 420
|
dirContents :: FilePath -> IO [FileRecord]
dirContents dir = do
contents <- filter ((/= '.') . head) <$> getDirectoryContents dir
`catch` \ (e :: IOError) -> return []
records <- forM contents $ \f -> do
let full = dir </> f
isDir <- doesDirectoryExist full
return $ if isDir then DirRecord full else FileRecord full
return (sort records)
| 420
|
dirContents dir = do
contents <- filter ((/= '.') . head) <$> getDirectoryContents dir
`catch` \ (e :: IOError) -> return []
records <- forM contents $ \f -> do
let full = dir </> f
isDir <- doesDirectoryExist full
return $ if isDir then DirRecord full else FileRecord full
return (sort records)
| 377
| false
| true
| 0
| 15
| 140
| 150
| 73
| 77
| null | null |
diekmann/Iptables_Semantics
|
haskell_tool/lib/Network/IPTables/Parser.hs
|
bsd-2-clause
|
skipWS = many $ oneOf ws
| 24
|
skipWS = many $ oneOf ws
| 24
|
skipWS = many $ oneOf ws
| 24
| false
| false
| 1
| 6
| 5
| 16
| 6
| 10
| null | null |
tolysz/hs-tls
|
debug/src/SimpleClient.hs
|
bsd-3-clause
|
defaultTimeout = 2000
| 21
|
defaultTimeout = 2000
| 21
|
defaultTimeout = 2000
| 21
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
facebookincubator/duckling
|
Duckling/Time/TR/Rules.hs
|
bsd-3-clause
|
ruleMorning :: Rule
ruleMorning = Rule
{ name = "morning"
, pattern =
[ regex "sabah(ı|a|tan)?"
]
, prod = \_ ->
let from = hour False 3
to = hour False 12
in Token Time . mkLatent . partOfDay <$>
interval TTime.Open from to
}
| 275
|
ruleMorning :: Rule
ruleMorning = Rule
{ name = "morning"
, pattern =
[ regex "sabah(ı|a|tan)?"
]
, prod = \_ ->
let from = hour False 3
to = hour False 12
in Token Time . mkLatent . partOfDay <$>
interval TTime.Open from to
}
| 275
|
ruleMorning = Rule
{ name = "morning"
, pattern =
[ regex "sabah(ı|a|tan)?"
]
, prod = \_ ->
let from = hour False 3
to = hour False 12
in Token Time . mkLatent . partOfDay <$>
interval TTime.Open from to
}
| 255
| false
| true
| 0
| 14
| 94
| 96
| 49
| 47
| null | null |
GaloisInc/orc
|
src/Orc/Combinators.hs
|
bsd-3-clause
|
rompt :: String -> Orc String
prompt str = liftIO $ S.prompt str
| 65
|
prompt :: String -> Orc String
prompt str = liftIO $ S.prompt str
| 65
|
prompt str = liftIO $ S.prompt str
| 34
| false
| true
| 2
| 7
| 13
| 35
| 15
| 20
| null | null |
SwiftsNamesake/3DWaves
|
src/Graphics/WaveFront/Parse/MTL.hs
|
mit
|
--------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Expose these parsers for testing purposes (?)
-- TODO | - Change definition of 'colour' and 'Colour' to only allow three channels (alpha is handled by the 'dissolve' attribute)
-- - Change the definition of 'Colour' or use the one defined in the colour package
-- | Three or four channel values (RGB[A])
ambient :: (Fractional f) => Atto.Parser (MTLToken f s)
ambient = Ambient <$> colour
| 548
|
ambient :: (Fractional f) => Atto.Parser (MTLToken f s)
ambient = Ambient <$> colour
| 84
|
ambient = Ambient <$> colour
| 28
| true
| true
| 0
| 8
| 79
| 42
| 24
| 18
| null | null |
beni55/haste-compiler
|
libraries/ghc-7.8/base/Control/Exception/Base.hs
|
bsd-3-clause
|
-----------------------------------------------------------------------------
-- 'mapException'
-- | This function maps one exception into another as proposed in the
-- paper \"A semantics for imprecise exceptions\".
-- Notice that the usage of 'unsafePerformIO' is safe here.
mapException :: (Exception e1, Exception e2) => (e1 -> e2) -> a -> a
mapException f v = unsafePerformIO (catch (evaluate v)
(\x -> throwIO (f x)))
| 468
|
mapException :: (Exception e1, Exception e2) => (e1 -> e2) -> a -> a
mapException f v = unsafePerformIO (catch (evaluate v)
(\x -> throwIO (f x)))
| 188
|
mapException f v = unsafePerformIO (catch (evaluate v)
(\x -> throwIO (f x)))
| 119
| true
| true
| 0
| 12
| 104
| 85
| 46
| 39
| null | null |
DougBurke/swish
|
tests/RDFRulesetTest.hs
|
lgpl-2.1
|
rdfr2modc :: Maybe RDFVarBindingModify
rdfr2modc = vbmCompose (makeVarFilterModify $ isXMLLit "l") rdfr2modv
| 108
|
rdfr2modc :: Maybe RDFVarBindingModify
rdfr2modc = vbmCompose (makeVarFilterModify $ isXMLLit "l") rdfr2modv
| 108
|
rdfr2modc = vbmCompose (makeVarFilterModify $ isXMLLit "l") rdfr2modv
| 69
| false
| true
| 0
| 8
| 11
| 35
| 15
| 20
| null | null |
lamontu/learning_haskell
|
heathrow.hs
|
gpl-3.0
|
roadStep :: (Path, Path) -> Section -> (Path, Path)
roadStep (pathA, pathB) (Section a b c) =
let priceA = sum $ map snd pathA
priceB = sum $ map snd pathB
forwardPriceToA = priceA + a
crossPriceToA = priceB + b + c
forwardPriceToB = priceB + b
crossPriceToB = priceA + a + c
newPathToA = if forwardPriceToA <= crossPriceToA
then (A,a):pathA
else (C,c):(B,b):pathB
newPathToB = if forwardPriceToB <= crossPriceToB
then (B,b):pathB
else (C,c):(A,a):pathA
in (newPathToA, newPathToB)
| 642
|
roadStep :: (Path, Path) -> Section -> (Path, Path)
roadStep (pathA, pathB) (Section a b c) =
let priceA = sum $ map snd pathA
priceB = sum $ map snd pathB
forwardPriceToA = priceA + a
crossPriceToA = priceB + b + c
forwardPriceToB = priceB + b
crossPriceToB = priceA + a + c
newPathToA = if forwardPriceToA <= crossPriceToA
then (A,a):pathA
else (C,c):(B,b):pathB
newPathToB = if forwardPriceToB <= crossPriceToB
then (B,b):pathB
else (C,c):(A,a):pathA
in (newPathToA, newPathToB)
| 642
|
roadStep (pathA, pathB) (Section a b c) =
let priceA = sum $ map snd pathA
priceB = sum $ map snd pathB
forwardPriceToA = priceA + a
crossPriceToA = priceB + b + c
forwardPriceToB = priceB + b
crossPriceToB = priceA + a + c
newPathToA = if forwardPriceToA <= crossPriceToA
then (A,a):pathA
else (C,c):(B,b):pathB
newPathToB = if forwardPriceToB <= crossPriceToB
then (B,b):pathB
else (C,c):(A,a):pathA
in (newPathToA, newPathToB)
| 590
| false
| true
| 0
| 12
| 239
| 230
| 129
| 101
| null | null |
gromakovsky/Orchid
|
src/Orchid/Codegen/Body.hs
|
mit
|
delete :: TypedOperand -> BodyGen ()
delete ((TPointer _),op) = do
free <- nameToValue "free"
bytePtr <- lowLevelCast op $ TPointer TByte
() <$ call free [bytePtr]
| 175
|
delete :: TypedOperand -> BodyGen ()
delete ((TPointer _),op) = do
free <- nameToValue "free"
bytePtr <- lowLevelCast op $ TPointer TByte
() <$ call free [bytePtr]
| 175
|
delete ((TPointer _),op) = do
free <- nameToValue "free"
bytePtr <- lowLevelCast op $ TPointer TByte
() <$ call free [bytePtr]
| 138
| false
| true
| 0
| 9
| 38
| 79
| 37
| 42
| null | null |
ku-fpg/sunroof-active
|
examples/tictactoe/Main.hs
|
bsd-3-clause
|
scopeA :: Active JSTime Painting -> Active JSTime Painting
scopeA = fmap scopeP
| 79
|
scopeA :: Active JSTime Painting -> Active JSTime Painting
scopeA = fmap scopeP
| 79
|
scopeA = fmap scopeP
| 20
| false
| true
| 0
| 7
| 12
| 33
| 14
| 19
| null | null |
rodrigo-machado/verigraph
|
src/library/XML/GGXWriter.hs
|
gpl-3.0
|
writeInitialGraph :: ArrowXml a => TypedGraph b c -> a XmlTree XmlTree
writeInitialGraph initial = writeHostGraph ("Init", initial)
| 131
|
writeInitialGraph :: ArrowXml a => TypedGraph b c -> a XmlTree XmlTree
writeInitialGraph initial = writeHostGraph ("Init", initial)
| 131
|
writeInitialGraph initial = writeHostGraph ("Init", initial)
| 60
| false
| true
| 0
| 7
| 17
| 44
| 21
| 23
| null | null |
sdiehl/ghc
|
testsuite/tests/partial-sigs/should_fail/T11515.hs
|
bsd-3-clause
|
foo :: (ShowSyn a, _) => a -> String
foo x = show x
| 51
|
foo :: (ShowSyn a, _) => a -> String
foo x = show x
| 51
|
foo x = show x
| 14
| false
| true
| 0
| 8
| 13
| 40
| 18
| 22
| null | null |
massysett/pinchot
|
pinchot/lib/Pinchot/Names.hs
|
bsd-3-clause
|
-- | @a'@ followed by the given string.
recordName :: String -> T.Name
recordName n = T.mkName $ "a'" ++ n
| 106
|
recordName :: String -> T.Name
recordName n = T.mkName $ "a'" ++ n
| 66
|
recordName n = T.mkName $ "a'" ++ n
| 35
| true
| true
| 0
| 7
| 20
| 31
| 16
| 15
| null | null |
kazu-yamamoto/llrbtree
|
Data/Heap/Skew.hs
|
bsd-3-clause
|
deleteMin (Node l _ r) = merge l r
| 34
|
deleteMin (Node l _ r) = merge l r
| 34
|
deleteMin (Node l _ r) = merge l r
| 34
| false
| false
| 0
| 6
| 8
| 25
| 11
| 14
| null | null |
astro/expat-conduit
|
Text/XML/Expat/Conduit/Internal.hs
|
apache-2.0
|
xmlStatusSuspended = 2
| 22
|
xmlStatusSuspended = 2
| 22
|
xmlStatusSuspended = 2
| 22
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
amccausl/Swish
|
Swish/HaskellRDF/VarBindingTest.hs
|
lgpl-2.1
|
-- 1
testFindComp51 = testJust "testFindComp51" jcompab
| 61
|
testFindComp51 = testJust "testFindComp51" jcompab
| 53
|
testFindComp51 = testJust "testFindComp51" jcompab
| 53
| true
| false
| 0
| 5
| 12
| 12
| 6
| 6
| null | null |
rsasse/tamarin-prover
|
lib/utils/src/Extension/Prelude.hs
|
gpl-3.0
|
implies False _ = True
| 22
|
implies False _ = True
| 22
|
implies False _ = True
| 22
| false
| false
| 0
| 4
| 4
| 13
| 5
| 8
| null | null |
wavewave/evchain
|
sample/evchainRun2.hs
|
gpl-3.0
|
p_antitop :: DDecay
p_antitop = d (antitop, [p_Wminus, t antibottom])
| 69
|
p_antitop :: DDecay
p_antitop = d (antitop, [p_Wminus, t antibottom])
| 69
|
p_antitop = d (antitop, [p_Wminus, t antibottom])
| 49
| false
| true
| 0
| 8
| 9
| 29
| 16
| 13
| null | null |
oldmanmike/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
-- Overloaded labels
isLabelClassName :: Name
isLabelClassName
= clsQual gHC_OVER_LABELS (fsLit "IsLabel") isLabelClassNameKey
| 127
|
isLabelClassName :: Name
isLabelClassName
= clsQual gHC_OVER_LABELS (fsLit "IsLabel") isLabelClassNameKey
| 106
|
isLabelClassName
= clsQual gHC_OVER_LABELS (fsLit "IsLabel") isLabelClassNameKey
| 81
| true
| true
| 0
| 7
| 13
| 28
| 13
| 15
| null | null |
stormont/forecast-io
|
ForecastIO/V2/Types.hs
|
bsd-3-clause
|
key_darksky_unavailable = pack "darksky-unavailable"
| 52
|
key_darksky_unavailable = pack "darksky-unavailable"
| 52
|
key_darksky_unavailable = pack "darksky-unavailable"
| 52
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
RefactoringTools/HaRe
|
test/testdata/Renaming/D3.hs
|
bsd-3-clause
|
fringe :: Tree a -> [a]
fringe (Leaf x ) = [x]
| 46
|
fringe :: Tree a -> [a]
fringe (Leaf x ) = [x]
| 46
|
fringe (Leaf x ) = [x]
| 22
| false
| true
| 0
| 7
| 11
| 33
| 17
| 16
| null | null |
robx/puzzle-draw
|
tests/Util.hs
|
mit
|
testNonparse :: Show a => (Value -> Parser a) -> Value -> Assertion
testNonparse p t =
(not . justShow . parseMaybe p $ t) @? "parsed but shouldn't"
| 150
|
testNonparse :: Show a => (Value -> Parser a) -> Value -> Assertion
testNonparse p t =
(not . justShow . parseMaybe p $ t) @? "parsed but shouldn't"
| 150
|
testNonparse p t =
(not . justShow . parseMaybe p $ t) @? "parsed but shouldn't"
| 82
| false
| true
| 0
| 9
| 30
| 63
| 31
| 32
| null | null |
transient-haskell/transient-universe
|
app/server/Transient/Move/Services/controlServices.hs
|
mit
|
selfService str = localIO $ return $ "hello " ++ str
| 52
|
selfService str = localIO $ return $ "hello " ++ str
| 52
|
selfService str = localIO $ return $ "hello " ++ str
| 52
| false
| false
| 0
| 7
| 10
| 21
| 10
| 11
| null | null |
josefs/sbv
|
Data/SBV/SMT/SMTLib2.hs
|
bsd-3-clause
|
smtType KFloat = "(_ FloatingPoint 8 24)"
| 51
|
smtType KFloat = "(_ FloatingPoint 8 24)"
| 51
|
smtType KFloat = "(_ FloatingPoint 8 24)"
| 51
| false
| false
| 1
| 5
| 16
| 13
| 4
| 9
| null | null |
alexander-at-github/eta
|
compiler/ETA/DeSugar/Check.hs
|
bsd-3-clause
|
-- Always succeeds
might_fail_pat _ = False
| 71
|
might_fail_pat _ = False
| 52
|
might_fail_pat _ = False
| 52
| true
| false
| 0
| 5
| 34
| 10
| 5
| 5
| null | null |
iu-parfunc/AutoObsidian
|
interface_brainstorming/06_ExtensibleEffects/newVer/Eff1.hs
|
bsd-3-clause
|
runReader :: Eff (Reader e ': r) w -> e -> Eff r w
runReader m e = handle_relay return (\Reader k -> unArr k e) m
| 113
|
runReader :: Eff (Reader e ': r) w -> e -> Eff r w
runReader m e = handle_relay return (\Reader k -> unArr k e) m
| 113
|
runReader m e = handle_relay return (\Reader k -> unArr k e) m
| 62
| false
| true
| 0
| 9
| 26
| 68
| 33
| 35
| null | null |
mstksg/auto
|
src/Control/Auto/Effects.hs
|
mit
|
-- | The non-resumable/non-serializable version of 'cache'. Every time the
-- 'Auto' is deserialized/reloaded, it re-executes the action to retrieve
-- the result again.
--
-- Useful in cases where you want to "re-load" an expensive resource on
-- every startup, instead of saving it to in the save states.
--
-- @
-- dictionary :: Auto IO a [String]
-- dictionary = cache_ (lines <$> readFile "dictionary.txt")
-- @
cache_ :: Monad m
=> m b -- ^ monadic action to execute and use the result of
-> Auto m a b
cache_ m = snd <$> iteratorM_ (_cacheF m) (False, undefined)
| 592
|
cache_ :: Monad m
=> m b -- ^ monadic action to execute and use the result of
-> Auto m a b
cache_ m = snd <$> iteratorM_ (_cacheF m) (False, undefined)
| 174
|
cache_ m = snd <$> iteratorM_ (_cacheF m) (False, undefined)
| 60
| true
| true
| 0
| 8
| 125
| 68
| 39
| 29
| null | null |
ucam-cl-dtg/naps-camfort
|
Transformation/CommonBlockElim.hs
|
mit
|
-- Adds additional statements to the start of the statement block in a program unit
addToProgUnit :: ProgUnit A -> [Fortran A] -> ProgUnit A
addToProgUnit p [] = p
| 163
|
addToProgUnit :: ProgUnit A -> [Fortran A] -> ProgUnit A
addToProgUnit p [] = p
| 79
|
addToProgUnit p [] = p
| 22
| true
| true
| 0
| 8
| 29
| 39
| 19
| 20
| null | null |
mikesteele81/Phone-Directory
|
src/GUIConstants.hs
|
gpl-3.0
|
scale :: RelPix -> DPI -> AbsPix
scale rel dpi = rel * dpi `div` 96
| 67
|
scale :: RelPix -> DPI -> AbsPix
scale rel dpi = rel * dpi `div` 96
| 67
|
scale rel dpi = rel * dpi `div` 96
| 34
| false
| true
| 0
| 6
| 15
| 34
| 18
| 16
| null | null |
rueshyna/gogol
|
gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/AdClients/List.hs
|
mpl-2.0
|
-- | Creates a value of 'AccountsAdClientsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aaclAccountId'
--
-- * 'aaclPageToken'
--
-- * 'aaclMaxResults'
accountsAdClientsList
:: Text -- ^ 'aaclAccountId'
-> AccountsAdClientsList
accountsAdClientsList pAaclAccountId_ =
AccountsAdClientsList'
{ _aaclAccountId = pAaclAccountId_
, _aaclPageToken = Nothing
, _aaclMaxResults = Nothing
}
| 504
|
accountsAdClientsList
:: Text -- ^ 'aaclAccountId'
-> AccountsAdClientsList
accountsAdClientsList pAaclAccountId_ =
AccountsAdClientsList'
{ _aaclAccountId = pAaclAccountId_
, _aaclPageToken = Nothing
, _aaclMaxResults = Nothing
}
| 258
|
accountsAdClientsList pAaclAccountId_ =
AccountsAdClientsList'
{ _aaclAccountId = pAaclAccountId_
, _aaclPageToken = Nothing
, _aaclMaxResults = Nothing
}
| 174
| true
| true
| 0
| 7
| 94
| 57
| 34
| 23
| null | null |
Raphexion/SimplifiedEnigmaMachine
|
EnigmaChars.hs
|
mit
|
valToEnigmaBase' n
| n < nbOfEnigmaChars = [ n ]
| otherwise = div n nbOfEnigmaChars : valToEnigmaBase' (rem n nbOfEnigmaChars)
| 141
|
valToEnigmaBase' n
| n < nbOfEnigmaChars = [ n ]
| otherwise = div n nbOfEnigmaChars : valToEnigmaBase' (rem n nbOfEnigmaChars)
| 141
|
valToEnigmaBase' n
| n < nbOfEnigmaChars = [ n ]
| otherwise = div n nbOfEnigmaChars : valToEnigmaBase' (rem n nbOfEnigmaChars)
| 141
| false
| false
| 0
| 9
| 34
| 56
| 25
| 31
| null | null |
Sgoettschkes/learning
|
haskell/ProjectEuler/src/Problems/Problem047.hs
|
mit
|
distincts :: [Int] -> Bool
distincts = all ((4 ==) . length . distinctPrimeFactors)
| 83
|
distincts :: [Int] -> Bool
distincts = all ((4 ==) . length . distinctPrimeFactors)
| 83
|
distincts = all ((4 ==) . length . distinctPrimeFactors)
| 56
| false
| true
| 0
| 9
| 13
| 36
| 20
| 16
| null | null |
Nathan-Fenner/New-Nickel
|
ParseAST.hs
|
mit
|
parseKindArrow :: Parse Kind
parseKindArrow = parseBetween parseKindAtom (checkAt LexOperator "->") (\left _ right -> Higher left right)
| 136
|
parseKindArrow :: Parse Kind
parseKindArrow = parseBetween parseKindAtom (checkAt LexOperator "->") (\left _ right -> Higher left right)
| 136
|
parseKindArrow = parseBetween parseKindAtom (checkAt LexOperator "->") (\left _ right -> Higher left right)
| 107
| false
| true
| 0
| 8
| 17
| 46
| 23
| 23
| null | null |
ComputationWithBoundedResources/ara-inference
|
doc/tpdb_trs/Haskell/basic_haskell/take_1.hs
|
mit
|
esEsOrdering LT GT = MyFalse
| 28
|
esEsOrdering LT GT = MyFalse
| 28
|
esEsOrdering LT GT = MyFalse
| 28
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
sdiehl/ghc
|
testsuite/tests/pmcheck/complete_sigs/T17386.hs
|
bsd-3-clause
|
f :: B -> ()
f P = ()
| 21
|
f :: B -> ()
f P = ()
| 21
|
f P = ()
| 8
| false
| true
| 0
| 6
| 8
| 26
| 12
| 14
| null | null |
AlexeyRaga/eta
|
compiler/ETA/Prelude/PrelNames.hs
|
bsd-3-clause
|
unsafeCoerceIdKey, concatIdKey, filterIdKey, zipIdKey, bindIOIdKey,
returnIOIdKey, newStablePtrIdKey,
printIdKey, failIOIdKey, nullAddrIdKey, voidArgIdKey,
fstIdKey, sndIdKey, otherwiseIdKey, assertIdKey, runSTRepIdKey :: Unique
unsafeCoerceIdKey = mkPreludeMiscIdUnique 30
| 297
|
unsafeCoerceIdKey, concatIdKey, filterIdKey, zipIdKey, bindIOIdKey,
returnIOIdKey, newStablePtrIdKey,
printIdKey, failIOIdKey, nullAddrIdKey, voidArgIdKey,
fstIdKey, sndIdKey, otherwiseIdKey, assertIdKey, runSTRepIdKey :: Unique
unsafeCoerceIdKey = mkPreludeMiscIdUnique 30
| 297
|
unsafeCoerceIdKey = mkPreludeMiscIdUnique 30
| 56
| false
| true
| 0
| 5
| 45
| 44
| 37
| 7
| null | null |
ribag/ganeti-experiments
|
src/Ganeti/Constants.hs
|
gpl-2.0
|
ipolicySpindleRatio :: String
ipolicySpindleRatio = ConstantUtils.ipolicySpindleRatio
| 85
|
ipolicySpindleRatio :: String
ipolicySpindleRatio = ConstantUtils.ipolicySpindleRatio
| 85
|
ipolicySpindleRatio = ConstantUtils.ipolicySpindleRatio
| 55
| false
| true
| 0
| 5
| 5
| 13
| 7
| 6
| null | null |
romanb/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/CreateVpnGateway.hs
|
mpl-2.0
|
-- | Information about the virtual private gateway.
cvgrVpnGateway :: Lens' CreateVpnGatewayResponse (Maybe VpnGateway)
cvgrVpnGateway = lens _cvgrVpnGateway (\s a -> s { _cvgrVpnGateway = a })
| 193
|
cvgrVpnGateway :: Lens' CreateVpnGatewayResponse (Maybe VpnGateway)
cvgrVpnGateway = lens _cvgrVpnGateway (\s a -> s { _cvgrVpnGateway = a })
| 141
|
cvgrVpnGateway = lens _cvgrVpnGateway (\s a -> s { _cvgrVpnGateway = a })
| 73
| true
| true
| 1
| 9
| 26
| 51
| 25
| 26
| null | null |
leshchevds/ganeti
|
src/Ganeti/JSON.hs
|
bsd-2-clause
|
-- | Maybe obtain a map from a JSON object.
maybeParseMap :: J.JSON a => J.JSValue -> Maybe (Map.Map String a)
maybeParseMap = liftM fromContainer . readContainer <=< asJSObject
| 177
|
maybeParseMap :: J.JSON a => J.JSValue -> Maybe (Map.Map String a)
maybeParseMap = liftM fromContainer . readContainer <=< asJSObject
| 133
|
maybeParseMap = liftM fromContainer . readContainer <=< asJSObject
| 66
| true
| true
| 0
| 11
| 28
| 57
| 26
| 31
| null | null |
mariefarrell/Hets
|
OMDoc/XmlInterface.hs
|
gpl-2.0
|
omelementFromOmobj :: Element -> Result (Maybe OMElement)
omelementFromOmobj e = fmapMaybe omobjToOMElement $ findChild el_omobj e
| 130
|
omelementFromOmobj :: Element -> Result (Maybe OMElement)
omelementFromOmobj e = fmapMaybe omobjToOMElement $ findChild el_omobj e
| 130
|
omelementFromOmobj e = fmapMaybe omobjToOMElement $ findChild el_omobj e
| 72
| false
| true
| 0
| 8
| 15
| 39
| 18
| 21
| null | null |
tomtitchener/RealSimpleMusic
|
src/Music/RealSimpleMusic/ScoreToLilypond/Utils.hs
|
cc0-1.0
|
renderNotes' :: Note -> State (Bool, Bool) Builder
renderNotes' note =
get >>= \(c, p) -> let (c', p', b) = renderNoteFrame (c, p) note in put (c', p') >> return b
| 166
|
renderNotes' :: Note -> State (Bool, Bool) Builder
renderNotes' note =
get >>= \(c, p) -> let (c', p', b) = renderNoteFrame (c, p) note in put (c', p') >> return b
| 165
|
renderNotes' note =
get >>= \(c, p) -> let (c', p', b) = renderNoteFrame (c, p) note in put (c', p') >> return b
| 114
| false
| true
| 0
| 12
| 34
| 92
| 49
| 43
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.