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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
diku-dk/futhark | src/Futhark/IR/Primitive.hs | isc | -- | The result type of a binary operator.
binOpType :: BinOp -> PrimType
binOpType (Add t _) = IntType t | 105 | binOpType :: BinOp -> PrimType
binOpType (Add t _) = IntType t | 62 | binOpType (Add t _) = IntType t | 31 | true | true | 0 | 7 | 20 | 30 | 15 | 15 | null | null |
christiaanb/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | bcoPrimTyConKey = mkPreludeTyConUnique 73 | 65 | bcoPrimTyConKey = mkPreludeTyConUnique 73 | 65 | bcoPrimTyConKey = mkPreludeTyConUnique 73 | 65 | false | false | 0 | 5 | 27 | 9 | 4 | 5 | null | null |
zsedem/hlock | src/Graphics/X11/HLock.hs | bsd-3-clause | hlock :: MonadIO io => io ()
hlock = runLoopBody $ HLock.hlock xLocker | 70 | hlock :: MonadIO io => io ()
hlock = runLoopBody $ HLock.hlock xLocker | 70 | hlock = runLoopBody $ HLock.hlock xLocker | 41 | false | true | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
DaMSL/K3 | src/Language/K3/Analysis/Data/BindingEnv.hs | apache-2.0 | {- BindingStackEnv helpers -}
slookup :: BindingStackEnv a -> Identifier -> Except Text a
slookup env x = lookup env x >>= safeHead
where
safeHead s = case Seq.viewl s of
EmptyL -> err
a :< _ -> return $! a
err = mkErr $ "Unbound variable in binding environment: " ++ x | 318 | slookup :: BindingStackEnv a -> Identifier -> Except Text a
slookup env x = lookup env x >>= safeHead
where
safeHead s = case Seq.viewl s of
EmptyL -> err
a :< _ -> return $! a
err = mkErr $ "Unbound variable in binding environment: " ++ x | 287 | slookup env x = lookup env x >>= safeHead
where
safeHead s = case Seq.viewl s of
EmptyL -> err
a :< _ -> return $! a
err = mkErr $ "Unbound variable in binding environment: " ++ x | 227 | true | true | 6 | 8 | 101 | 109 | 48 | 61 | null | null |
peterbecich/haskell-programming-first-principles | src/Chapter2.hs | bsd-3-clause | six :: IO ()
six = printInc' 4 | 30 | six :: IO ()
six = printInc' 4 | 30 | six = printInc' 4 | 17 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
etu-fkti5301-bgu/alt-exam_automated_theorem_proving | src/FormulaSyn.hs | bsd-3-clause | atomicFormula :: Parser Formula
atomicFormula = do Lex.reserved "true" <|> Lex.reserved "⊤"
return Top
<|> do Lex.reserved "false" <|> Lex.reserved "⊥"
return Bot
<|> do (Lex.reserved "~" <|> Lex.reserved "¬")
f <- atomicFormula
... | 1,241 | atomicFormula :: Parser Formula
atomicFormula = do Lex.reserved "true" <|> Lex.reserved "⊤"
return Top
<|> do Lex.reserved "false" <|> Lex.reserved "⊥"
return Bot
<|> do (Lex.reserved "~" <|> Lex.reserved "¬")
f <- atomicFormula
... | 1,241 | atomicFormula = do Lex.reserved "true" <|> Lex.reserved "⊤"
return Top
<|> do Lex.reserved "false" <|> Lex.reserved "⊥"
return Bot
<|> do (Lex.reserved "~" <|> Lex.reserved "¬")
f <- atomicFormula
return $ Not $ f
... | 1,209 | false | true | 29 | 10 | 604 | 414 | 185 | 229 | null | null |
sgillespie/ghc | compiler/cmm/CmmExpr.hs | bsd-3-clause | globalRegType dflags (VanillaReg _ VNonGcPtr) = bWord dflags | 60 | globalRegType dflags (VanillaReg _ VNonGcPtr) = bWord dflags | 60 | globalRegType dflags (VanillaReg _ VNonGcPtr) = bWord dflags | 60 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
m00nlight/hackerrank | functional/Interpreter-and-Compiler/While-Language/main.hs | gpl-2.0 | bExpression :: Parser BExpr
bExpression = buildExpressionParser bOperators bTerm | 80 | bExpression :: Parser BExpr
bExpression = buildExpressionParser bOperators bTerm | 80 | bExpression = buildExpressionParser bOperators bTerm | 52 | false | true | 1 | 5 | 8 | 22 | 9 | 13 | null | null |
kawu/ltag | src/NLP/LTAG/Early2.hs | bsd-2-clause | -- | Complete a leaf non-terminal with a parsed tree on its left.
substR
:: Eq a
=> State a b -- ^ The parsed tree
-> State a b -- ^ A state to complement
-> Maybe (State a b)
substR finSt st@Single{..} = do
fin <- maySngParsed finSt
(treRest, treHead) <- mayViewR left
... | 442 | substR
:: Eq a
=> State a b -- ^ The parsed tree
-> State a b -- ^ A state to complement
-> Maybe (State a b)
substR finSt st@Single{..} = do
fin <- maySngParsed finSt
(treRest, treHead) <- mayViewR left
x <- mayLeaf treHead
guard $ fin `hasInRoot` x
return $ st... | 376 | substR finSt st@Single{..} = do
fin <- maySngParsed finSt
(treRest, treHead) <- mayViewR left
x <- mayLeaf treHead
guard $ fin `hasInRoot` x
return $ st
{ done = fin >< done
, left = treRest } | 228 | true | true | 19 | 7 | 151 | 133 | 70 | 63 | null | null |
tippenein/hasken | lib/Local/Document.hs | bsd-3-clause | tagDocs :: Document -> Text.PrettyPrint.Leijen.Doc
tagDocs d =
text " tags| " <+>
sep (fmap text (tags d)) <+>
linebreak | 127 | tagDocs :: Document -> Text.PrettyPrint.Leijen.Doc
tagDocs d =
text " tags| " <+>
sep (fmap text (tags d)) <+>
linebreak | 127 | tagDocs d =
text " tags| " <+>
sep (fmap text (tags d)) <+>
linebreak | 76 | false | true | 0 | 9 | 26 | 56 | 26 | 30 | null | null |
ImsungChoi/haskell-test | src/HW04Tests.hs | bsd-3-clause | -- Exercise 2 -----------------------------------------
ex2Tests :: [Test]
ex2Tests = [ testF2 "equal test" (==)
[(P [1, 2, 3, 4], P [1, 2, 3, 4], True)]
] | 179 | ex2Tests :: [Test]
ex2Tests = [ testF2 "equal test" (==)
[(P [1, 2, 3, 4], P [1, 2, 3, 4], True)]
] | 122 | ex2Tests = [ testF2 "equal test" (==)
[(P [1, 2, 3, 4], P [1, 2, 3, 4], True)]
] | 103 | true | true | 0 | 10 | 49 | 69 | 42 | 27 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Writers/Docbook.hs | gpl-2.0 | elementToDocbook opts lvl (Sec _ _num (id',_,_) title elements) =
-- Docbook doesn't allow sections with no content, so insert some if needed
let elements' = if null elements
then [Blk (Para [])]
else elements
tag = case lvl of
n | n == 0 -> "... | 630 | elementToDocbook opts lvl (Sec _ _num (id',_,_) title elements) =
-- Docbook doesn't allow sections with no content, so insert some if needed
let elements' = if null elements
then [Blk (Para [])]
else elements
tag = case lvl of
n | n == 0 -> "... | 630 | elementToDocbook opts lvl (Sec _ _num (id',_,_) title elements) =
-- Docbook doesn't allow sections with no content, so insert some if needed
let elements' = if null elements
then [Blk (Para [])]
else elements
tag = case lvl of
n | n == 0 -> "... | 630 | false | false | 0 | 17 | 224 | 209 | 102 | 107 | null | null |
Baranowski/SourceGraph | Parsing/ParseModule.hs | gpl-3.0 | sMsMerge :: (Ord a, Ord b) => (Set a, MultiSet b)
-> (Set a, MultiSet b) -> (Set a, MultiSet b)
sMsMerge (s1, ms1) = S.union s1 *** MS.union ms1 | 176 | sMsMerge :: (Ord a, Ord b) => (Set a, MultiSet b)
-> (Set a, MultiSet b) -> (Set a, MultiSet b)
sMsMerge (s1, ms1) = S.union s1 *** MS.union ms1 | 176 | sMsMerge (s1, ms1) = S.union s1 *** MS.union ms1 | 48 | false | true | 1 | 11 | 61 | 101 | 50 | 51 | null | null |
mcmaniac/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info | 102 | externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info | 102 | externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info | 102 | false | false | 0 | 7 | 12 | 29 | 13 | 16 | null | null |
brendanhay/gogol | gogol-storage/gen/Network/Google/Resource/Storage/Objects/Patch.hs | mpl-2.0 | -- | The project to be billed for this request if the target bucket is
-- requester-pays bucket.
opProvisionalUserProject :: Lens' ObjectsPatch (Maybe Text)
opProvisionalUserProject
= lens _opProvisionalUserProject
(\ s a -> s{_opProvisionalUserProject = a}) | 266 | opProvisionalUserProject :: Lens' ObjectsPatch (Maybe Text)
opProvisionalUserProject
= lens _opProvisionalUserProject
(\ s a -> s{_opProvisionalUserProject = a}) | 169 | opProvisionalUserProject
= lens _opProvisionalUserProject
(\ s a -> s{_opProvisionalUserProject = a}) | 109 | true | true | 0 | 9 | 42 | 49 | 26 | 23 | null | null |
ghorn/dynobud | dynobud/tests/Utils.hs | lgpl-3.0 | reproxy3 :: Proxy f -> Proxy g -> Proxy h -> Proxy j -> Proxy (f g h j)
reproxy3 _ _ _ _ = Proxy | 96 | reproxy3 :: Proxy f -> Proxy g -> Proxy h -> Proxy j -> Proxy (f g h j)
reproxy3 _ _ _ _ = Proxy | 96 | reproxy3 _ _ _ _ = Proxy | 24 | false | true | 0 | 12 | 25 | 66 | 29 | 37 | null | null |
jasonrbriggs/proton | haskell/src/Text/Proton/XmlInternal.hs | apache-2.0 | splitText (x : xs)
| x == '<' =
do let (first, rest) = spanUntil (== '>') xs
(x : first) : splitText rest
| isWhitespace x =
do let (first, rest) = span isWhitespace xs
(x : first) : splitText rest
| otherwise =
do let (first, rest) = span (/= '<') xs
(x : first)... | 337 | splitText (x : xs)
| x == '<' =
do let (first, rest) = spanUntil (== '>') xs
(x : first) : splitText rest
| isWhitespace x =
do let (first, rest) = span isWhitespace xs
(x : first) : splitText rest
| otherwise =
do let (first, rest) = span (/= '<') xs
(x : first)... | 337 | splitText (x : xs)
| x == '<' =
do let (first, rest) = spanUntil (== '>') xs
(x : first) : splitText rest
| isWhitespace x =
do let (first, rest) = span isWhitespace xs
(x : first) : splitText rest
| otherwise =
do let (first, rest) = span (/= '<') xs
(x : first)... | 337 | false | false | 0 | 13 | 116 | 177 | 83 | 94 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/RBTree-col-height.hs | bsd-3-clause | kx s@(Node B x l r) = case compare kx x of
LT -> let t = lbal x (ins kx l) r in t
GT -> let t = rbal x l (ins kx r) in t
EQ -> s | 214 | kx s@(Node B x l r) = case compare kx x of
LT -> let t = lbal x (ins kx l) r in t
GT -> let t = rbal x l (ins kx r) in t
EQ -> s | 214 | kx s@(Node B x l r) = case compare kx x of
LT -> let t = lbal x (ins kx l) r in t
GT -> let t = rbal x l (ins kx r) in t
EQ -> s | 214 | false | false | 2 | 17 | 126 | 105 | 49 | 56 | null | null |
romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | Indicates whether the network interface is deleted when the instance is
-- terminated.
iniaDeleteOnTermination :: Lens' InstanceNetworkInterfaceAttachment (Maybe Bool)
iniaDeleteOnTermination =
lens _iniaDeleteOnTermination (\s a -> s { _iniaDeleteOnTermination = a }) | 277 | iniaDeleteOnTermination :: Lens' InstanceNetworkInterfaceAttachment (Maybe Bool)
iniaDeleteOnTermination =
lens _iniaDeleteOnTermination (\s a -> s { _iniaDeleteOnTermination = a }) | 185 | iniaDeleteOnTermination =
lens _iniaDeleteOnTermination (\s a -> s { _iniaDeleteOnTermination = a }) | 104 | true | true | 1 | 9 | 37 | 51 | 26 | 25 | null | null |
ideas-edu/ideas | src/Ideas/Service/FeedbackScript/Parser.hs | apache-2.0 | lexString :: String -> Parser ()
lexString s = skip (lexeme (try (string s))) <?> "string " ++ show s | 102 | lexString :: String -> Parser ()
lexString s = skip (lexeme (try (string s))) <?> "string " ++ show s | 101 | lexString s = skip (lexeme (try (string s))) <?> "string " ++ show s | 68 | false | true | 0 | 13 | 20 | 55 | 26 | 29 | null | null |
gridaphobe/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | nlHsTyApps :: name -> [Type] -> [LHsExpr name] -> LHsExpr name
nlHsTyApps fun_id tys xs = foldl nlHsApp (nlHsTyApp fun_id tys) xs | 129 | nlHsTyApps :: name -> [Type] -> [LHsExpr name] -> LHsExpr name
nlHsTyApps fun_id tys xs = foldl nlHsApp (nlHsTyApp fun_id tys) xs | 129 | nlHsTyApps fun_id tys xs = foldl nlHsApp (nlHsTyApp fun_id tys) xs | 66 | false | true | 0 | 9 | 21 | 57 | 28 | 29 | null | null |
sru-systems/protobuf-simple | test/Data/ProtoBufSpec.hs | mit | readBinFile :: String -> IO ByteString
readBinFile file = readFile ("data" </> file) | 84 | readBinFile :: String -> IO ByteString
readBinFile file = readFile ("data" </> file) | 84 | readBinFile file = readFile ("data" </> file) | 45 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
momomimachli/Hedsql-tests | src/Database/Hedsql/Tests/PrettyPrint.hs | gpl-3.0 | testJoin :: Test
testJoin =
testCase "SELECT with a join clause" assertSelect
where
assertSelect :: Assertion
assertSelect = assertEqual
"SELECT with a join clause is incorrect."
"SELECT *\n\
\FROM \"People\"\n\
\INNER JOIN \"Countries\"\n\
... | 425 | testJoin :: Test
testJoin =
testCase "SELECT with a join clause" assertSelect
where
assertSelect :: Assertion
assertSelect = assertEqual
"SELECT with a join clause is incorrect."
"SELECT *\n\
\FROM \"People\"\n\
\INNER JOIN \"Countries\"\n\
... | 425 | testJoin =
testCase "SELECT with a join clause" assertSelect
where
assertSelect :: Assertion
assertSelect = assertEqual
"SELECT with a join clause is incorrect."
"SELECT *\n\
\FROM \"People\"\n\
\INNER JOIN \"Countries\"\n\
\ON \"People... | 408 | false | true | 0 | 8 | 134 | 54 | 23 | 31 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_577 (127#) = happyShift action_355 | 41 | action_577 (127#) = happyShift action_355 | 41 | action_577 (127#) = happyShift action_355 | 41 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
goalieca/haskelling | 054.hs | gpl-3.0 | processGame (p1,p2) = compare p1 p2 | 35 | processGame (p1,p2) = compare p1 p2 | 35 | processGame (p1,p2) = compare p1 p2 | 35 | false | false | 0 | 6 | 5 | 20 | 10 | 10 | null | null |
koterpillar/tianbar | src/System/Tianbar/Plugin/DBus/Utils.hs | mit | unwrapVariantsType TypeInt64 = unwrapVariants (Proxy :: Proxy Int64) | 68 | unwrapVariantsType TypeInt64 = unwrapVariants (Proxy :: Proxy Int64) | 68 | unwrapVariantsType TypeInt64 = unwrapVariants (Proxy :: Proxy Int64) | 68 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
charlescrain/chainblock | src/Tholos/Server/V0.hs | bsd-3-clause | postCredentialsEntryPoint :: ( MonadIO m
, Crypto m
, DBModifyCredentials m
) => UserId -> WebsiteId -> PostCredentials -> m ()
postCredentialsEntryPoint uid wid PostCredentials{ postWebUsername = un
... | 577 | postCredentialsEntryPoint :: ( MonadIO m
, Crypto m
, DBModifyCredentials m
) => UserId -> WebsiteId -> PostCredentials -> m ()
postCredentialsEntryPoint uid wid PostCredentials{ postWebUsername = un
... | 577 | postCredentialsEntryPoint uid wid PostCredentials{ postWebUsername = un
, postWebPassword = pass
, postMasterKey = PostMasterKey key
} = do
ep <- encrypt key pass
_ <- i... | 362 | false | true | 0 | 10 | 293 | 116 | 57 | 59 | null | null |
spechub/Hets | CSL/Keywords.hs | gpl-2.0 | asinhS :: String
asinhS = "asinh" | 33 | asinhS :: String
asinhS = "asinh" | 33 | asinhS = "asinh" | 16 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
nushio3/ghc | compiler/utils/Outputable.hs | bsd-3-clause | speakN :: Int -> SDoc
speakN 0 = text "none" | 44 | speakN :: Int -> SDoc
speakN 0 = text "none" | 44 | speakN 0 = text "none" | 22 | false | true | 0 | 5 | 9 | 25 | 11 | 14 | null | null |
xmonad/xmonad-contrib | XMonad/Hooks/FadeWindows.hs | bsd-3-clause | -- A utility to clamp opacity fractions to the range (0,1)
clampRatio :: Rational -> Rational
clampRatio r | r >= 0 && r <= 1 = r
| r < 0 = 0
| otherwise = 1 | 217 | clampRatio :: Rational -> Rational
clampRatio r | r >= 0 && r <= 1 = r
| r < 0 = 0
| otherwise = 1 | 158 | clampRatio r | r >= 0 && r <= 1 = r
| r < 0 = 0
| otherwise = 1 | 113 | true | true | 0 | 10 | 97 | 69 | 31 | 38 | null | null |
narumij/matrix-as-xyz | src/Data/Matrix/AsXYZ/Plain.hs | bsd-3-clause | rowStr label (x:xs) = texP' label x ++ concatMap (texP label) xs | 64 | rowStr label (x:xs) = texP' label x ++ concatMap (texP label) xs | 64 | rowStr label (x:xs) = texP' label x ++ concatMap (texP label) xs | 64 | false | false | 0 | 8 | 11 | 40 | 18 | 22 | null | null |
choener/RNAfold | BioInf/ViennaRNA/Fold.hs | gpl-3.0 | rnaFoldFill :: Vienna2004 -> Maybe (D1Secondary) -> Primary -> IO (PA.Unboxed (Z:.Subword) Deka, PA.Unboxed (Z:.Subword) Deka, PA.Unboxed (Z:.Subword) Deka, PA.Unboxed (Z:.Subword) Deka)
rnaFoldFill !ener !cs !inp = do
let n = VU.length inp
!weak' <- newWithM (Z:.subword 0 0) (Z:.subword 0 n) huge
!block' <- new... | 768 | rnaFoldFill :: Vienna2004 -> Maybe (D1Secondary) -> Primary -> IO (PA.Unboxed (Z:.Subword) Deka, PA.Unboxed (Z:.Subword) Deka, PA.Unboxed (Z:.Subword) Deka, PA.Unboxed (Z:.Subword) Deka)
rnaFoldFill !ener !cs !inp = do
let n = VU.length inp
!weak' <- newWithM (Z:.subword 0 0) (Z:.subword 0 n) huge
!block' <- new... | 768 | rnaFoldFill !ener !cs !inp = do
let n = VU.length inp
!weak' <- newWithM (Z:.subword 0 0) (Z:.subword 0 n) huge
!block' <- newWithM (Z:.subword 0 0) (Z:.subword 0 n) huge
!comps' <- newWithM (Z:.subword 0 0) (Z:.subword 0 n) huge
!struc' <- newWithM (Z:.subword 0 0) (Z:.subword 0 n) 0
fillTables $ gRNAfold... | 581 | false | true | 0 | 12 | 134 | 394 | 186 | 208 | null | null |
gafiatulin/codewars | src/5 kyu/MergeChecker.hs | mit | isMerge s "" part2 = s == part2 | 31 | isMerge s "" part2 = s == part2 | 31 | isMerge s "" part2 = s == part2 | 31 | false | false | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
jedahu/hike | src/Hike/Control/Hike.hs | bsd-3-clause | sources :: Cond BasicConfig s Text [String]
sources = (asks _sourceFiles >>= return . Diff) ?^ "sources" | 104 | sources :: Cond BasicConfig s Text [String]
sources = (asks _sourceFiles >>= return . Diff) ?^ "sources" | 104 | sources = (asks _sourceFiles >>= return . Diff) ?^ "sources" | 60 | false | true | 0 | 9 | 16 | 41 | 21 | 20 | null | null |
piccolo-lang/piccolo | src/Core/Typecheck.hs | gpl-3.0 | tcExpr e@EPrim { exprModule = m, exprName = n } = do
(typOfRet, typParams) <- case Map.lookup (m,n) primTypes of
Nothing -> throwError $ PrimNotFoundError ("#" ++ m ++ ":" ++ n) (localize e)
Just t -> return t
args <- mapM tcExpr $ exprArgs e
let typOfArgs = map exprTyp args
when (length typParams /=... | 596 | tcExpr e@EPrim { exprModule = m, exprName = n } = do
(typOfRet, typParams) <- case Map.lookup (m,n) primTypes of
Nothing -> throwError $ PrimNotFoundError ("#" ++ m ++ ":" ++ n) (localize e)
Just t -> return t
args <- mapM tcExpr $ exprArgs e
let typOfArgs = map exprTyp args
when (length typParams /=... | 596 | tcExpr e@EPrim { exprModule = m, exprName = n } = do
(typOfRet, typParams) <- case Map.lookup (m,n) primTypes of
Nothing -> throwError $ PrimNotFoundError ("#" ++ m ++ ":" ++ n) (localize e)
Just t -> return t
args <- mapM tcExpr $ exprArgs e
let typOfArgs = map exprTyp args
when (length typParams /=... | 596 | false | false | 0 | 16 | 130 | 274 | 136 | 138 | null | null |
pliosoft/toml-parse | src/Text/Toml/Combinators.hs | bsd-3-clause | rbracket :: Parser ()
rbracket = satisfy it
where
it (RightBracketT _) = Just ()
it _ = Nothing
-- | left bracket.. | 126 | rbracket :: Parser ()
rbracket = satisfy it
where
it (RightBracketT _) = Just ()
it _ = Nothing
-- | left bracket.. | 126 | rbracket = satisfy it
where
it (RightBracketT _) = Just ()
it _ = Nothing
-- | left bracket.. | 104 | false | true | 0 | 7 | 33 | 58 | 25 | 33 | null | null |
danr/hipspec | examples/old-examples/hip/Tricky.hs | gpl-3.0 | -- (+ one) and (one +) is not equal here. (of course) One is a finite
-- theorem and the other is a theorem. The two-depth structural
-- induction finds the finite theorem, but the simple induction fails
-- to find this as it is not a theorem with : if the natural number is
-- not total.
incr = map (one +) | 307 | incr = map (one +) | 18 | incr = map (one +) | 18 | true | false | 0 | 6 | 62 | 18 | 12 | 6 | null | null |
jmitchell/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | processStatics :: Archive -> Idris ()
processStatics ar = do
ss <- getEntry [] "ibc_statics" ar
mapM_ (\ (n, s) ->
updateIState (\i -> i { idris_statics = addDef n s (idris_statics i) })) ss | 206 | processStatics :: Archive -> Idris ()
processStatics ar = do
ss <- getEntry [] "ibc_statics" ar
mapM_ (\ (n, s) ->
updateIState (\i -> i { idris_statics = addDef n s (idris_statics i) })) ss | 206 | processStatics ar = do
ss <- getEntry [] "ibc_statics" ar
mapM_ (\ (n, s) ->
updateIState (\i -> i { idris_statics = addDef n s (idris_statics i) })) ss | 168 | false | true | 0 | 18 | 50 | 98 | 48 | 50 | null | null |
kmels/dart-haskell | src/Language/Core/Interpreter/Structures.hs | bsd-3-clause | -- | Stores a value or a thunk in the given address
store :: HeapAddress -> Either Thunk Value -> Id -> IM HeapReference
store address val id = do
-- put the value in the heap
h <- gets heap
io $ H.insert h address val
--watchReductionM $ "Memorized " ++ id ++ " in " ++ show address ++ " as " ++ show val
ret... | 386 | store :: HeapAddress -> Either Thunk Value -> Id -> IM HeapReference
store address val id = do
-- put the value in the heap
h <- gets heap
io $ H.insert h address val
--watchReductionM $ "Memorized " ++ id ++ " in " ++ show address ++ " as " ++ show val
return (id,address)
-- | Stores a value or a thunk in... | 334 | store address val id = do
-- put the value in the heap
h <- gets heap
io $ H.insert h address val
--watchReductionM $ "Memorized " ++ id ++ " in " ++ show address ++ " as " ++ show val
return (id,address)
-- | Stores a value or a thunk in a new address | 265 | true | true | 0 | 10 | 93 | 85 | 40 | 45 | null | null |
HIPERFIT/HQL | src/Utils/Currency.hs | bsd-3-clause | add d (Cash v EUR) = Cash (d+v) EUR | 35 | add d (Cash v EUR) = Cash (d+v) EUR | 35 | add d (Cash v EUR) = Cash (d+v) EUR | 35 | false | false | 0 | 7 | 8 | 34 | 15 | 19 | null | null |
silkapp/xmlhtml | src/Text/XmlHtml/Cursor.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Moves a 'Cursor' to the next node encountered in a depth-first search.
-- If it has children, this is equivalent to 'firstChild'. Otherwise, if it
-- has a right sibling, then this is equivalent to 'right'. Otherwise, the
-- cursor mo... | 661 | nextDF :: Cursor -> Maybe Cursor
nextDF c = firstChild c `mplus` up c
where up x = right x `mplus` (up =<< parent x)
------------------------------------------------------------------------------
-- | Repeats the given move until a 'Cursor' is obtained that matches the
-- predicate. | 287 | nextDF c = firstChild c `mplus` up c
where up x = right x `mplus` (up =<< parent x)
------------------------------------------------------------------------------
-- | Repeats the given move until a 'Cursor' is obtained that matches the
-- predicate. | 254 | true | true | 0 | 8 | 101 | 70 | 39 | 31 | null | null |
lukexi/ghc | testsuite/tests/simplCore/should_compile/spec001.hs | bsd-3-clause | substr :: PackedString -> Int -> Int -> PackedString
substr (PS off len fp) begin end = PS (off+begin) (end-begin+1) fp | 119 | substr :: PackedString -> Int -> Int -> PackedString
substr (PS off len fp) begin end = PS (off+begin) (end-begin+1) fp | 119 | substr (PS off len fp) begin end = PS (off+begin) (end-begin+1) fp | 66 | false | true | 0 | 8 | 20 | 65 | 33 | 32 | null | null |
elieux/ghc | compiler/typecheck/FamInst.hs | bsd-3-clause | -- | Build error message for equation that has a bare type variable in the RHS
-- but LHS pattern is not a bare type variable.
bareVariableInRHSErr :: [Type] -> InjErrorBuilder -> CoAxBranch
-> (SDoc, SrcSpan)
bareVariableInRHSErr tys errorBuilder famInst
= errorBuilder (injectivityErrorHerald Tr... | 592 | bareVariableInRHSErr :: [Type] -> InjErrorBuilder -> CoAxBranch
-> (SDoc, SrcSpan)
bareVariableInRHSErr tys errorBuilder famInst
= errorBuilder (injectivityErrorHerald True $$
text "RHS of injective type family equation is a bare" <+>
text "type variable" $$
... | 465 | bareVariableInRHSErr tys errorBuilder famInst
= errorBuilder (injectivityErrorHerald True $$
text "RHS of injective type family equation is a bare" <+>
text "type variable" $$
text "but these LHS type and kind patterns are not bare" <+>
text "var... | 361 | true | true | 0 | 12 | 172 | 90 | 45 | 45 | null | null |
pparkkin/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects WriteOffAddrOp_Float = True | 48 | primOpHasSideEffects WriteOffAddrOp_Float = True | 48 | primOpHasSideEffects WriteOffAddrOp_Float = True | 48 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
svenssonjoel/MonadObsidian | Obsidian/MonadObsidian/PureAPI.hs | bsd-3-clause | unChop :: Arr s (Arr s a) -> Arr s a
unChop arr = mkArr (\ix -> let x = ix `modi` fromIntegral w
y = ix `divi` fromIntegral w
in (arr ! y) ! x) newLen
where
h = len arr
w = len (arr ! 0)
newLen = h * w
-------------------------... | 375 | unChop :: Arr s (Arr s a) -> Arr s a
unChop arr = mkArr (\ix -> let x = ix `modi` fromIntegral w
y = ix `divi` fromIntegral w
in (arr ! y) ! x) newLen
where
h = len arr
w = len (arr ! 0)
newLen = h * w
--------------------------... | 374 | unChop arr = mkArr (\ix -> let x = ix `modi` fromIntegral w
y = ix `divi` fromIntegral w
in (arr ! y) ! x) newLen
where
h = len arr
w = len (arr ! 0)
newLen = h * w
---------------------------------------------------------------... | 337 | false | true | 4 | 13 | 146 | 146 | 68 | 78 | null | null |
beni55/aeson | Data/Aeson/Types/Instances.hs | bsd-3-clause | withScientific expected _ v = typeMismatch expected v | 71 | withScientific expected _ v = typeMismatch expected v | 71 | withScientific expected _ v = typeMismatch expected v | 71 | false | false | 0 | 5 | 25 | 19 | 8 | 11 | null | null |
fehu/min-dat--weka-data | src/WekaData.hs | mit | lookupInList :: String -> [WekaDataAttribute] -> Maybe WekaDataAttribute
lookupInList = lookupElem (flip (!!)) elemIndex | 120 | lookupInList :: String -> [WekaDataAttribute] -> Maybe WekaDataAttribute
lookupInList = lookupElem (flip (!!)) elemIndex | 120 | lookupInList = lookupElem (flip (!!)) elemIndex | 47 | false | true | 0 | 8 | 13 | 44 | 21 | 23 | null | null |
Javran/Project-Euler | src/ProjectEuler/Problem137.hs | mit | {-
I have no clue for this one, but 74049690 looks like a searchable number,
which leads me to http://oeis.org/A081018 and I suspect this is the answer...
Despite that let's do this properly: first let's just denote the series A(x).
A(x) = x F_1 + x^2 F_2 + x^3 F_3 + ...
x A(x) = x^2 F_1 + x^3 F_2... | 1,238 | _doSearch :: [(Integer, Integer)]
_doSearch =
take 11
$ mapMaybe
(\(v,r) -> (v,) <$> exactSquareRoot r)
[ (n, 1 + n*(2 + n*5)) | n <- [0..] ] | 157 | _doSearch =
take 11
$ mapMaybe
(\(v,r) -> (v,) <$> exactSquareRoot r)
[ (n, 1 + n*(2 + n*5)) | n <- [0..] ] | 123 | true | true | 2 | 11 | 300 | 102 | 57 | 45 | null | null |
gnn/Hets | Syntax/Parse_AS_Library.hs | gpl-2.0 | lGAnnos :: LogicGraph -> AParser st (LogicGraph, [Annotation])
lGAnnos lG = do
as <- annos
let (pfx, _) = partPrefixes as
return (lG { prefixes = Map.union pfx $ prefixes lG }, as)
-- * Parsing functions
-- | Parse a library of specifications | 250 | lGAnnos :: LogicGraph -> AParser st (LogicGraph, [Annotation])
lGAnnos lG = do
as <- annos
let (pfx, _) = partPrefixes as
return (lG { prefixes = Map.union pfx $ prefixes lG }, as)
-- * Parsing functions
-- | Parse a library of specifications | 250 | lGAnnos lG = do
as <- annos
let (pfx, _) = partPrefixes as
return (lG { prefixes = Map.union pfx $ prefixes lG }, as)
-- * Parsing functions
-- | Parse a library of specifications | 187 | false | true | 0 | 14 | 51 | 96 | 48 | 48 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/WConfd/Core.hs | bsd-2-clause | reserveLV :: ClientId -> LogicalVolume -> WConfdMonad ()
reserveLV jobId lv = modifyTempResStateErr $ T.reserveLV jobId lv | 122 | reserveLV :: ClientId -> LogicalVolume -> WConfdMonad ()
reserveLV jobId lv = modifyTempResStateErr $ T.reserveLV jobId lv | 122 | reserveLV jobId lv = modifyTempResStateErr $ T.reserveLV jobId lv | 65 | false | true | 0 | 8 | 16 | 40 | 19 | 21 | null | null |
notogawa/VideoCore4 | src/VideoCore4/QPU/Instruction/PackMode.hs | bsd-3-clause | pack_32_8888S :: PackMode
pack_32_8888S = PackMode 11 | 53 | pack_32_8888S :: PackMode
pack_32_8888S = PackMode 11 | 53 | pack_32_8888S = PackMode 11 | 27 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
Gabriel439/Haskell-Errors-Library | Control/Error/Safe.hs | bsd-3-clause | -- | A 'tail' that fails using 'mzero'
tailZ :: (MonadPlus m) => [a] -> m [a]
tailZ = maybe mzero return . S.tailMay | 116 | tailZ :: (MonadPlus m) => [a] -> m [a]
tailZ = maybe mzero return . S.tailMay | 77 | tailZ = maybe mzero return . S.tailMay | 38 | true | true | 0 | 8 | 23 | 45 | 24 | 21 | null | null |
UW-UPL/InterviewPrepJan2016 | Spring2016/questions/q04/Solution.hs | mit | anyGrandchildrenEqual t@(Node l _ r) = (anyEqual (grandChildren t)) || anyGrandchildrenEqual l || anyGrandchildrenEqual r | 121 | anyGrandchildrenEqual t@(Node l _ r) = (anyEqual (grandChildren t)) || anyGrandchildrenEqual l || anyGrandchildrenEqual r | 121 | anyGrandchildrenEqual t@(Node l _ r) = (anyEqual (grandChildren t)) || anyGrandchildrenEqual l || anyGrandchildrenEqual r | 121 | false | false | 0 | 10 | 14 | 48 | 23 | 25 | null | null |
agrafix/hackage-server | Distribution/Client/Mirror/Session.hs | bsd-3-clause | formatErrorResponse :: ErrorResponse -> String
formatErrorResponse (ErrorResponse uri (a,b,c) reason mBody) =
"HTTP error code " ++ show a ++ show b ++ show c
++ ", " ++ reason ++ "\n " ++ show uri
++ maybe "" (('\n':) . unlines . map (" "++) . lines . wrapText) mBody | 277 | formatErrorResponse :: ErrorResponse -> String
formatErrorResponse (ErrorResponse uri (a,b,c) reason mBody) =
"HTTP error code " ++ show a ++ show b ++ show c
++ ", " ++ reason ++ "\n " ++ show uri
++ maybe "" (('\n':) . unlines . map (" "++) . lines . wrapText) mBody | 277 | formatErrorResponse (ErrorResponse uri (a,b,c) reason mBody) =
"HTTP error code " ++ show a ++ show b ++ show c
++ ", " ++ reason ++ "\n " ++ show uri
++ maybe "" (('\n':) . unlines . map (" "++) . lines . wrapText) mBody | 230 | false | true | 4 | 11 | 59 | 122 | 61 | 61 | null | null |
gridaphobe/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | exprCtOrigin (HsTypeOut {}) = panic "exprCtOrigin HsTypeOut" | 64 | exprCtOrigin (HsTypeOut {}) = panic "exprCtOrigin HsTypeOut" | 64 | exprCtOrigin (HsTypeOut {}) = panic "exprCtOrigin HsTypeOut" | 64 | false | false | 0 | 6 | 10 | 20 | 9 | 11 | null | null |
shangaslammi/haskell-iter | src/Data/Iter.hs | mit | izip i (Finalize z j) = Finalize z (izip i j) | 48 | izip i (Finalize z j) = Finalize z (izip i j) | 48 | izip i (Finalize z j) = Finalize z (izip i j) | 48 | false | false | 0 | 7 | 13 | 34 | 15 | 19 | null | null |
fmapfmapfmap/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/Types/Product.hs | mpl-2.0 | -- | The number of data files referenced by the 'DataSource'.
dsNumberOfFiles :: Lens' DataSource (Maybe Integer)
dsNumberOfFiles = lens _dsNumberOfFiles (\ s a -> s{_dsNumberOfFiles = a}) | 188 | dsNumberOfFiles :: Lens' DataSource (Maybe Integer)
dsNumberOfFiles = lens _dsNumberOfFiles (\ s a -> s{_dsNumberOfFiles = a}) | 126 | dsNumberOfFiles = lens _dsNumberOfFiles (\ s a -> s{_dsNumberOfFiles = a}) | 74 | true | true | 1 | 9 | 27 | 49 | 25 | 24 | null | null |
gwright83/Wheeler | src/Math/Symbolic/Wheeler/Canonicalize.hs | bsd-3-clause | exponentPart :: Expr -> Expr
exponentPart (Const _) = Undefined | 65 | exponentPart :: Expr -> Expr
exponentPart (Const _) = Undefined | 65 | exponentPart (Const _) = Undefined | 36 | false | true | 0 | 7 | 11 | 24 | 12 | 12 | null | null |
Baranowski/SourceGraph | Analyse/Visualise.hs | gpl-3.0 | shapeFor NormalEntity = BoxShape | 39 | shapeFor NormalEntity = BoxShape | 39 | shapeFor NormalEntity = BoxShape | 39 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
daewon/til | exercism/haskell/sieve/src/Sieve.hs | mpl-2.0 | primesUpTo l = takeWhile (<= l) $ primes 2
where
primes n = n : next
where
next = filter (\a -> (a `rem` n) /= 0) $ primes (n + 1) | 151 | primesUpTo l = takeWhile (<= l) $ primes 2
where
primes n = n : next
where
next = filter (\a -> (a `rem` n) /= 0) $ primes (n + 1) | 151 | primesUpTo l = takeWhile (<= l) $ primes 2
where
primes n = n : next
where
next = filter (\a -> (a `rem` n) /= 0) $ primes (n + 1) | 151 | false | false | 6 | 10 | 52 | 89 | 43 | 46 | null | null |
blanu/arbre-go | Arbre/Compile.hs | gpl-2.0 | compileBlockValue :: Block -> String
compileBlockValue (Block args exp) = "func" ++ compileArgs args ++ compileInlineBody exp | 125 | compileBlockValue :: Block -> String
compileBlockValue (Block args exp) = "func" ++ compileArgs args ++ compileInlineBody exp | 125 | compileBlockValue (Block args exp) = "func" ++ compileArgs args ++ compileInlineBody exp | 88 | false | true | 2 | 9 | 16 | 46 | 20 | 26 | null | null |
dolio/vector | Data/Vector/Fusion/Stream/Monadic.hs | bsd-3-clause | findIndex f = findIndexM (return . f) | 37 | findIndex f = findIndexM (return . f) | 37 | findIndex f = findIndexM (return . f) | 37 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
NicolasDP/hit | Data/Git/Storage.hs | bsd-3-clause | findReference :: Git -> Ref -> IO ObjectLocation
findReference git ref = maybe NotFound id <$> (findLoose `mplusIO` findInIndexes)
where findLoose :: IO (Maybe ObjectLocation)
findLoose = do
isLoose <- looseExists (gitRepoPath git) ref
if isLoose then return (Just $ Loose ref) else ret... | 1,027 | findReference :: Git -> Ref -> IO ObjectLocation
findReference git ref = maybe NotFound id <$> (findLoose `mplusIO` findInIndexes)
where findLoose :: IO (Maybe ObjectLocation)
findLoose = do
isLoose <- looseExists (gitRepoPath git) ref
if isLoose then return (Just $ Loose ref) else ret... | 1,027 | findReference git ref = maybe NotFound id <$> (findLoose `mplusIO` findInIndexes)
where findLoose :: IO (Maybe ObjectLocation)
findLoose = do
isLoose <- looseExists (gitRepoPath git) ref
if isLoose then return (Just $ Loose ref) else return Nothing
findInIndexes :: IO (Maybe O... | 978 | false | true | 18 | 11 | 306 | 302 | 155 | 147 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/HTools/Program/Hcheck.hs | gpl-2.0 | descrData ClusterLvl = map snd clusterData | 43 | descrData ClusterLvl = map snd clusterData | 43 | descrData ClusterLvl = map snd clusterData | 43 | false | false | 1 | 5 | 6 | 19 | 6 | 13 | null | null |
urv/fixhs | src/Data/FIX/Spec/FIX43.hs | lgpl-2.1 | tCashSettlAgentAcctName :: FIXTag
tCashSettlAgentAcctName = FIXTag
{ tName = "CashSettlAgentAcctName"
, tnum = 185
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 196 | tCashSettlAgentAcctName :: FIXTag
tCashSettlAgentAcctName = FIXTag
{ tName = "CashSettlAgentAcctName"
, tnum = 185
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 196 | tCashSettlAgentAcctName = FIXTag
{ tName = "CashSettlAgentAcctName"
, tnum = 185
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 162 | false | true | 0 | 8 | 37 | 45 | 26 | 19 | null | null |
joelburget/frankenstein | src/Planetary/Support/Parser.hs | bsd-3-clause | parseHandle :: MonadicParsing m => m Tm'
parseHandle = (do
_ <- reserved "handle"
scrutinee <- parseTm
_ <- colon
peg <- parsePeg
_ <- reserved "with"
(effectHandlers, adjustment, valueHandler) <- indentedBlock $ do
effectHandlers <- many $ absoluteIndentation $ do
uid <- parseUid
tyArgs <-... | 1,137 | parseHandle :: MonadicParsing m => m Tm'
parseHandle = (do
_ <- reserved "handle"
scrutinee <- parseTm
_ <- colon
peg <- parsePeg
_ <- reserved "with"
(effectHandlers, adjustment, valueHandler) <- indentedBlock $ do
effectHandlers <- many $ absoluteIndentation $ do
uid <- parseUid
tyArgs <-... | 1,137 | parseHandle = (do
_ <- reserved "handle"
scrutinee <- parseTm
_ <- colon
peg <- parsePeg
_ <- reserved "with"
(effectHandlers, adjustment, valueHandler) <- indentedBlock $ do
effectHandlers <- many $ absoluteIndentation $ do
uid <- parseUid
tyArgs <- many parseTyArg
_ <- colon
... | 1,096 | false | true | 0 | 26 | 348 | 407 | 201 | 206 | null | null |
infotroph/pandoc | src/Text/Pandoc/Writers/OpenDocument.hs | gpl-2.0 | inParagraphTags :: Doc -> State WriterState Doc
inParagraphTags d | isEmpty d = return empty | 92 | inParagraphTags :: Doc -> State WriterState Doc
inParagraphTags d | isEmpty d = return empty | 92 | inParagraphTags d | isEmpty d = return empty | 44 | false | true | 0 | 8 | 14 | 39 | 16 | 23 | null | null |
Noeda/Megaman | src/Terminal/Terminal.hs | mit | -- these map integers to corresponding colors that are used in ANSI escape
-- sequences to yield that color. Different values for foregrounds and
-- backgrounds.
fgToColor :: Int -> Maybe Color
fgToColor 30 = Just Black | 219 | fgToColor :: Int -> Maybe Color
fgToColor 30 = Just Black | 57 | fgToColor 30 = Just Black | 25 | true | true | 0 | 6 | 36 | 27 | 14 | 13 | null | null |
tjakway/ghcjvm | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | -- | Handle CmmMachOp expressions
-- This is a specialised method that handles Global register manipulations like
-- 'Sp - 16', using the getelementptr instruction.
genMachOp_fast :: EOption -> MachOp -> GlobalReg -> Int -> [CmmExpr]
-> LlvmM ExprData
genMachOp_fast opt op r n e
= do (gv, grt, s1) <- g... | 906 | genMachOp_fast :: EOption -> MachOp -> GlobalReg -> Int -> [CmmExpr]
-> LlvmM ExprData
genMachOp_fast opt op r n e
= do (gv, grt, s1) <- getCmmRegVal (CmmGlobal r)
dflags <- getDynFlags
let (ix,rem) = n `divMod` ((llvmWidthInBits dflags . pLower) grt `div` 8)
case isPointer grt &&... | 741 | genMachOp_fast opt op r n e
= do (gv, grt, s1) <- getCmmRegVal (CmmGlobal r)
dflags <- getDynFlags
let (ix,rem) = n `divMod` ((llvmWidthInBits dflags . pLower) grt `div` 8)
case isPointer grt && rem == 0 of
True -> do
(ptr, s2) <- doExpr grt $ GetElemPtr True gv [toI3... | 639 | true | true | 0 | 16 | 247 | 267 | 138 | 129 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | cvEinstancelayout :: (String, String, String)
cvEinstancelayout =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCELAYOUT,
"Instance has multiple secondary nodes") | 169 | cvEinstancelayout :: (String, String, String)
cvEinstancelayout =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCELAYOUT,
"Instance has multiple secondary nodes") | 169 | cvEinstancelayout =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCELAYOUT,
"Instance has multiple secondary nodes") | 123 | false | true | 0 | 7 | 22 | 34 | 20 | 14 | null | null |
mstksg/write-you-a-haskell | chapter3/parsec.hs | mit | bind :: Parser a -> (a -> Parser b) -> Parser b
bind p f = Parser $ \s -> concatMap (\(a, s') -> parse (f a) s') $ parse p s | 124 | bind :: Parser a -> (a -> Parser b) -> Parser b
bind p f = Parser $ \s -> concatMap (\(a, s') -> parse (f a) s') $ parse p s | 124 | bind p f = Parser $ \s -> concatMap (\(a, s') -> parse (f a) s') $ parse p s | 76 | false | true | 0 | 13 | 31 | 86 | 43 | 43 | null | null |
fmapfmapfmap/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateStack.hs | mpl-2.0 | -- | The default AWS OpsWorks agent version. You have the following options:
--
-- - Auto-update - Set this parameter to 'LATEST'. AWS OpsWorks
-- automatically installs new agent versions on the stack\'s instances
-- as soon as they are available.
-- - Fixed version - Set this parameter to your preferred a... | 1,025 | csAgentVersion :: Lens' CreateStack (Maybe Text)
csAgentVersion = lens _csAgentVersion (\ s a -> s{_csAgentVersion = a}) | 120 | csAgentVersion = lens _csAgentVersion (\ s a -> s{_csAgentVersion = a}) | 71 | true | true | 0 | 9 | 188 | 62 | 41 | 21 | null | null |
shlomobauer/BuildIT | src/Treepr.hs | apache-2.0 | ptreenbl i (INicList a b) = do
ptreenbl i a
ptreenb i b
-- pretty print vcenter block | 88 | ptreenbl i (INicList a b) = do
ptreenbl i a
ptreenb i b
-- pretty print vcenter block | 88 | ptreenbl i (INicList a b) = do
ptreenbl i a
ptreenb i b
-- pretty print vcenter block | 88 | false | false | 0 | 7 | 20 | 38 | 16 | 22 | null | null |
SAdams601/HaRe | old/testing/introCase/AsPatIn2_TokOut.hs | bsd-3-clause | f x@(x_1) = x_1 | 15 | f x@(x_1) = x_1 | 15 | f x@(x_1) = x_1 | 15 | false | false | 0 | 6 | 3 | 16 | 8 | 8 | null | null |
bwmcadams/lambdaconf-2015 | speakers/gbazerman/Algebraically.hs | artistic-2.0 | up4 :: LAlg a b -> ListF a [a] -> b
up4 f = listFold f . listMap (fold f) | 73 | up4 :: LAlg a b -> ListF a [a] -> b
up4 f = listFold f . listMap (fold f) | 73 | up4 f = listFold f . listMap (fold f) | 37 | false | true | 1 | 9 | 19 | 57 | 25 | 32 | null | null |
ksaveljev/hake-2 | src/Game/Monsters/MMutant.hs | bsd-3-clause | frameAttack15 :: Int
frameAttack15 = 14 | 39 | frameAttack15 :: Int
frameAttack15 = 14 | 39 | frameAttack15 = 14 | 18 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
giorgidze/igraph | Data/IGraph/Internal.hs | bsd-3-clause | vectorToList' :: VectorPtr -> IO [Double]
vectorToList' vp = do
len <- c_igraph_vector_length vp
let go :: [Double] -> CLong -> IO [Double]
go acc 0 = return acc
go acc i = do e <- c_igraph_vector_get vp (i - 1)
go (realToFrac e : acc) (i - 1)
go [] len | 291 | vectorToList' :: VectorPtr -> IO [Double]
vectorToList' vp = do
len <- c_igraph_vector_length vp
let go :: [Double] -> CLong -> IO [Double]
go acc 0 = return acc
go acc i = do e <- c_igraph_vector_get vp (i - 1)
go (realToFrac e : acc) (i - 1)
go [] len | 291 | vectorToList' vp = do
len <- c_igraph_vector_length vp
let go :: [Double] -> CLong -> IO [Double]
go acc 0 = return acc
go acc i = do e <- c_igraph_vector_get vp (i - 1)
go (realToFrac e : acc) (i - 1)
go [] len | 249 | false | true | 1 | 10 | 89 | 132 | 65 | 67 | null | null |
christiaanb/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | mk_co_app_fn :: (a -> HsWrapper) -> [a] -> HsWrapper
-- For applications, the *first* argument must
-- come *last* in the composition sequence
mk_co_app_fn f as = foldr (\x wrap -> wrap <.> f x) WpHole as | 204 | mk_co_app_fn :: (a -> HsWrapper) -> [a] -> HsWrapper
mk_co_app_fn f as = foldr (\x wrap -> wrap <.> f x) WpHole as | 114 | mk_co_app_fn f as = foldr (\x wrap -> wrap <.> f x) WpHole as | 61 | true | true | 0 | 9 | 36 | 60 | 32 | 28 | null | null |
keithodulaigh/Hets | CommonLogic/PredefinedCASLAxioms.hs | gpl-2.0 | -- currently a list annotation is needed in the .het file %list [__], nil, cons
brId :: Id
brId = mkId [mkSimpleId "[", placeTok, mkSimpleId "]"] | 145 | brId :: Id
brId = mkId [mkSimpleId "[", placeTok, mkSimpleId "]"] | 65 | brId = mkId [mkSimpleId "[", placeTok, mkSimpleId "]"] | 54 | true | true | 0 | 7 | 25 | 36 | 17 | 19 | null | null |
brendanhay/gogol | gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs | mpl-2.0 | -- | Inventory availability dates. (times are in ms since epoch) The
-- granularity is generally in the order of seconds. (buyer-readonly)
proFlightStartTimeMs :: Lens' Product (Maybe Int64)
proFlightStartTimeMs
= lens _proFlightStartTimeMs
(\ s a -> s{_proFlightStartTimeMs = a})
. mapping _Coerce | 312 | proFlightStartTimeMs :: Lens' Product (Maybe Int64)
proFlightStartTimeMs
= lens _proFlightStartTimeMs
(\ s a -> s{_proFlightStartTimeMs = a})
. mapping _Coerce | 173 | proFlightStartTimeMs
= lens _proFlightStartTimeMs
(\ s a -> s{_proFlightStartTimeMs = a})
. mapping _Coerce | 121 | true | true | 2 | 8 | 55 | 61 | 29 | 32 | null | null |
jmitchell/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | bcc i (CALL n) = indent i ++ "CALL(" ++ cname n ++ ");\n" | 57 | bcc i (CALL n) = indent i ++ "CALL(" ++ cname n ++ ");\n" | 57 | bcc i (CALL n) = indent i ++ "CALL(" ++ cname n ++ ");\n" | 57 | false | false | 0 | 8 | 13 | 35 | 16 | 19 | null | null |
rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | A list of errors defined if and only if the request failed.
oErrors :: Lens' OrdersCustomBatchResponseEntry (Maybe Errors)
oErrors = lens _oErrors (\ s a -> s{_oErrors = a}) | 178 | oErrors :: Lens' OrdersCustomBatchResponseEntry (Maybe Errors)
oErrors = lens _oErrors (\ s a -> s{_oErrors = a}) | 113 | oErrors = lens _oErrors (\ s a -> s{_oErrors = a}) | 50 | true | true | 1 | 9 | 30 | 49 | 25 | 24 | null | null |
QuickChick/Luck | luck/src/Core/Types/Generator.hs | mit | countNodes :: DataTree c -> Int
countNodes (DCon _ ts) = 1 + sum (map countNodes ts) | 84 | countNodes :: DataTree c -> Int
countNodes (DCon _ ts) = 1 + sum (map countNodes ts) | 84 | countNodes (DCon _ ts) = 1 + sum (map countNodes ts) | 52 | false | true | 0 | 8 | 16 | 44 | 21 | 23 | null | null |
winterland1989/stdio | System/LowResTimer.hs | bsd-3-clause | lowResTimerManagerCapabilitiesChanged :: IO ()
lowResTimerManagerCapabilitiesChanged = do
lrtmArray <- readIORef lowResTimerManager
let oldSize = sizeofArr lrtmArray
numCaps <- getNumCapabilities
when (numCaps /= oldSize) $ do
lrtmArray' <- newArr numCaps
if numCaps < oldSize
the... | 850 | lowResTimerManagerCapabilitiesChanged :: IO ()
lowResTimerManagerCapabilitiesChanged = do
lrtmArray <- readIORef lowResTimerManager
let oldSize = sizeofArr lrtmArray
numCaps <- getNumCapabilities
when (numCaps /= oldSize) $ do
lrtmArray' <- newArr numCaps
if numCaps < oldSize
the... | 850 | lowResTimerManagerCapabilitiesChanged = do
lrtmArray <- readIORef lowResTimerManager
let oldSize = sizeofArr lrtmArray
numCaps <- getNumCapabilities
when (numCaps /= oldSize) $ do
lrtmArray' <- newArr numCaps
if numCaps < oldSize
then do
forM [0..numCaps-1] $ \ i -> d... | 803 | false | true | 1 | 20 | 247 | 238 | 113 | 125 | null | null |
fmapfmapfmap/amazonka | amazonka-directconnect/gen/Network/AWS/DirectConnect/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'Connection' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cVlan'
--
-- * 'cLocation'
--
-- * 'cConnectionId'
--
-- * 'cPartnerName'
--
-- * 'cConnectionName'
--
-- * 'cBandwidth'
--
-- * 'cOwnerAccount'
--
-... | 686 | connection
:: Connection
connection =
Connection'
{ _cVlan = Nothing
, _cLocation = Nothing
, _cConnectionId = Nothing
, _cPartnerName = Nothing
, _cConnectionName = Nothing
, _cBandwidth = Nothing
, _cOwnerAccount = Nothing
, _cRegion = Nothing
, _cConnectionState = Nothing
... | 325 | connection =
Connection'
{ _cVlan = Nothing
, _cLocation = Nothing
, _cConnectionId = Nothing
, _cPartnerName = Nothing
, _cConnectionName = Nothing
, _cBandwidth = Nothing
, _cOwnerAccount = Nothing
, _cRegion = Nothing
, _cConnectionState = Nothing
} | 296 | true | true | 0 | 7 | 156 | 98 | 66 | 32 | null | null |
spechub/Hets | CASL/Formula.hs | gpl-2.0 | restTerm :: TermParser f => [String] -> AParser st (TERM f)
restTerm k = startTerm k <|> typedTerm k <|> castedTerm k | 117 | restTerm :: TermParser f => [String] -> AParser st (TERM f)
restTerm k = startTerm k <|> typedTerm k <|> castedTerm k | 117 | restTerm k = startTerm k <|> typedTerm k <|> castedTerm k | 57 | false | true | 0 | 9 | 21 | 56 | 26 | 30 | null | null |
robrix/ui-effects | src/UI/Layout.hs | bsd-3-clause | fitLayoutSize :: Real a => Size (Maybe a) -> Layout a (Size a) -> Maybe (Size a)
fitLayoutSize = (fmap size .) . fitLayout | 122 | fitLayoutSize :: Real a => Size (Maybe a) -> Layout a (Size a) -> Maybe (Size a)
fitLayoutSize = (fmap size .) . fitLayout | 122 | fitLayoutSize = (fmap size .) . fitLayout | 41 | false | true | 0 | 10 | 23 | 66 | 32 | 34 | null | null |
chwthewke/horbits | src/horbits/Horbits/Orbit/Data.hs | bsd-3-clause | _bodyOrbit Gilly = Just $ classical Eve (31500000 *~ meter)
(0.550000 *~ one)
(80.00 *~ degree)
(12.00 *~ degree)
(10.00 *~ degree)
... | 372 | _bodyOrbit Gilly = Just $ classical Eve (31500000 *~ meter)
(0.550000 *~ one)
(80.00 *~ degree)
(12.00 *~ degree)
(10.00 *~ degree)
... | 372 | _bodyOrbit Gilly = Just $ classical Eve (31500000 *~ meter)
(0.550000 *~ one)
(80.00 *~ degree)
(12.00 *~ degree)
(10.00 *~ degree)
... | 372 | false | false | 0 | 8 | 248 | 70 | 37 | 33 | null | null |
prowdsponsor/country-codes | src/Data/CountryCodes/ISO31661.hs | bsd-3-clause | toText BW = "BW" | 16 | toText BW = "BW" | 16 | toText BW = "BW" | 16 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
cblp/ruhaskell-meetup-reg-form-stats | src/Voting.hs | bsd-3-clause | readHaskellLevel s =
error $ mconcat [ "readHaskellLevel: can't understand level \""
, s
, "\""
] | 161 | readHaskellLevel s =
error $ mconcat [ "readHaskellLevel: can't understand level \""
, s
, "\""
] | 161 | readHaskellLevel s =
error $ mconcat [ "readHaskellLevel: can't understand level \""
, s
, "\""
] | 161 | false | false | 0 | 7 | 80 | 25 | 13 | 12 | null | null |
giorgidze/HCodecs | src/Codec/Midi.hs | bsd-3-clause | parseMidi :: Parser Midi
parseMidi = do
_ <- string "MThd"
_ <- word32be 6
formatType' <- getWord16be
trackNumber' <- getWord16be
timeDivision' <- getWord16be
let timeDivision = if testBit timeDivision' 15
then TicksPerSecond
(fromIntegral $ (flip shiftR) 9 $ shiftL timeDivision' 1)
... | 896 | parseMidi :: Parser Midi
parseMidi = do
_ <- string "MThd"
_ <- word32be 6
formatType' <- getWord16be
trackNumber' <- getWord16be
timeDivision' <- getWord16be
let timeDivision = if testBit timeDivision' 15
then TicksPerSecond
(fromIntegral $ (flip shiftR) 9 $ shiftL timeDivision' 1)
... | 896 | parseMidi = do
_ <- string "MThd"
_ <- word32be 6
formatType' <- getWord16be
trackNumber' <- getWord16be
timeDivision' <- getWord16be
let timeDivision = if testBit timeDivision' 15
then TicksPerSecond
(fromIntegral $ (flip shiftR) 9 $ shiftL timeDivision' 1)
(fromInteg... | 871 | false | true | 0 | 17 | 224 | 295 | 140 | 155 | null | null |
hesselink/stack | src/Stack/Build.hs | bsd-3-clause | withLoadPackage :: M env m
=> EnvOverride
-> ((PackageName -> Version -> Map FlagName Bool -> IO Package) -> m a)
-> m a
withLoadPackage menv inner = do
econfig <- asks getEnvConfig
withCabalLoader menv $ \cabalLoader ->
inner $ \name version flags -> do
... | 1,020 | withLoadPackage :: M env m
=> EnvOverride
-> ((PackageName -> Version -> Map FlagName Bool -> IO Package) -> m a)
-> m a
withLoadPackage menv inner = do
econfig <- asks getEnvConfig
withCabalLoader menv $ \cabalLoader ->
inner $ \name version flags -> do
... | 1,020 | withLoadPackage menv inner = do
econfig <- asks getEnvConfig
withCabalLoader menv $ \cabalLoader ->
inner $ \name version flags -> do
bs <- cabalLoader $ PackageIdentifier name version -- TODO automatically update index the first time this fails
readPackageBS (depPackageConfig ec... | 851 | false | true | 0 | 15 | 276 | 229 | 112 | 117 | null | null |
ghc-android/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp _ (VecMulOp FloatVec n w) = Just (MO_VF_Mul n w) | 61 | translateOp _ (VecMulOp FloatVec n w) = Just (MO_VF_Mul n w) | 61 | translateOp _ (VecMulOp FloatVec n w) = Just (MO_VF_Mul n w) | 61 | false | false | 0 | 7 | 11 | 32 | 15 | 17 | null | null |
phischu/fragnix | benchmarks/containers/Data.IntMap.Base.hs | bsd-3-clause | -- | /O(n)/. Fold the keys and values in the map using the given right-associative
-- binary operator, such that
-- @'foldrWithKey' f z == 'Prelude.foldr' ('uncurry' f) z . 'toAscList'@.
--
-- For example,
--
-- > keys map = foldrWithKey (\k x ks -> k:ks) [] map
--
-- > let f k a result = result ++ "(" ++ (show k) ++ "... | 831 | foldrWithKey :: (Key -> a -> b -> b) -> b -> IntMap a -> b
foldrWithKey f z = \t -> -- Use lambda t to be inlinable with two arguments only.
case t of Bin _ m l r | m < 0 -> go (go z l) r -- put negative numbers before
| otherwise -> go (go z r) l
_ -> go z t
where
go z'... | 417 | foldrWithKey f z = \t -> -- Use lambda t to be inlinable with two arguments only.
case t of Bin _ m l r | m < 0 -> go (go z l) r -- put negative numbers before
| otherwise -> go (go z r) l
_ -> go z t
where
go z' Nil = z'
go z' (Tip kx x) = f kx x z'
... | 358 | true | true | 0 | 12 | 250 | 211 | 107 | 104 | null | null |
kishoredbn/barrelfish | tools/flounder/THCBackend.hs | mit | rpc_send_argdecl ServerSide ifn (RPCArgIn _ _) = [] | 51 | rpc_send_argdecl ServerSide ifn (RPCArgIn _ _) = [] | 51 | rpc_send_argdecl ServerSide ifn (RPCArgIn _ _) = [] | 51 | false | false | 0 | 7 | 7 | 23 | 11 | 12 | null | null |
Noeda/caramia | src/Graphics/Caramia/ImageFormats/Internal.hs | mit | isRenderTargettable RGBA16F = True | 34 | isRenderTargettable RGBA16F = True | 34 | isRenderTargettable RGBA16F = True | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/CARET_1.hs | mit | gcd2 zz vuu vuv = gcd0 vuu vuv | 30 | gcd2 zz vuu vuv = gcd0 vuu vuv | 30 | gcd2 zz vuu vuv = gcd0 vuu vuv | 30 | false | false | 0 | 5 | 7 | 18 | 8 | 10 | null | null |
sdiehl/ghc | compiler/coreSyn/CoreSubst.hs | bsd-3-clause | -- | Substitute in a mutually recursive group of 'Id's
substRecBndrs :: Subst -> [Id] -> (Subst, [Id])
substRecBndrs subst bndrs
= (new_subst, new_bndrs)
where -- Here's the reason we need to pass rec_subst to subst_id
(new_subst, new_bndrs) = mapAccumL (substIdBndr (text "rec-bndr") new_subst) subst bn... | 323 | substRecBndrs :: Subst -> [Id] -> (Subst, [Id])
substRecBndrs subst bndrs
= (new_subst, new_bndrs)
where -- Here's the reason we need to pass rec_subst to subst_id
(new_subst, new_bndrs) = mapAccumL (substIdBndr (text "rec-bndr") new_subst) subst bndrs | 268 | substRecBndrs subst bndrs
= (new_subst, new_bndrs)
where -- Here's the reason we need to pass rec_subst to subst_id
(new_subst, new_bndrs) = mapAccumL (substIdBndr (text "rec-bndr") new_subst) subst bndrs | 220 | true | true | 0 | 10 | 61 | 86 | 45 | 41 | null | null |
trobertson/merch | src/Merchandise/Parse/Script.hs | bsd-3-clause | comment :: Parser Script
comment = char ';' >> manyTill anyChar endOfLine >>= return . Comment . pack | 101 | comment :: Parser Script
comment = char ';' >> manyTill anyChar endOfLine >>= return . Comment . pack | 101 | comment = char ';' >> manyTill anyChar endOfLine >>= return . Comment . pack | 76 | false | true | 0 | 9 | 17 | 38 | 18 | 20 | null | null |
Enamex/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | constIsType :: Const -> Bool
constIsType (I _) = False | 54 | constIsType :: Const -> Bool
constIsType (I _) = False | 54 | constIsType (I _) = False | 25 | false | true | 0 | 6 | 9 | 28 | 13 | 15 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.