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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sviperll/LambdaInterpreter | src/UI.hs | gpl-3.0 | msgBox :: Maybe Window -> [DialogFlags] -> MessageType -> ButtonsType -> String -> IO ResponseId
msgBox wnd flags typ buttons msg =
do dialog <- messageDialogNew wnd flags typ buttons msg
widgetShow dialog
response <- dialogRun dialog
widgetHide dialog
return response | 290 | msgBox :: Maybe Window -> [DialogFlags] -> MessageType -> ButtonsType -> String -> IO ResponseId
msgBox wnd flags typ buttons msg =
do dialog <- messageDialogNew wnd flags typ buttons msg
widgetShow dialog
response <- dialogRun dialog
widgetHide dialog
return response | 290 | msgBox wnd flags typ buttons msg =
do dialog <- messageDialogNew wnd flags typ buttons msg
widgetShow dialog
response <- dialogRun dialog
widgetHide dialog
return response | 193 | false | true | 0 | 10 | 62 | 102 | 44 | 58 | null | null |
Chobbes/HaRay | src/HaRay/Vectors.hs | mit | dot :: (Elt a, IsNum a) => Exp (Vec a) -> Exp (Vec a) -> Exp a
dot u v = x + y + z
where
(x, y, z) = unlift prod
prod = u .*. v | 137 | dot :: (Elt a, IsNum a) => Exp (Vec a) -> Exp (Vec a) -> Exp a
dot u v = x + y + z
where
(x, y, z) = unlift prod
prod = u .*. v | 137 | dot u v = x + y + z
where
(x, y, z) = unlift prod
prod = u .*. v | 74 | false | true | 1 | 10 | 47 | 98 | 49 | 49 | null | null |
emwap/feldspar-compiler | lib/Feldspar/Compiler/Imperative/FromCore.hs | bsd-3-clause | compileExpr :: CompileEnv -> Ut.UntypedFeld -> CodeWriter (Expression ())
-- Array
compileExpr env (In (App Ut.GetLength _ [a])) = do
aExpr <- compileExpr env a
return $ arrayLength aExpr | 193 | compileExpr :: CompileEnv -> Ut.UntypedFeld -> CodeWriter (Expression ())
compileExpr env (In (App Ut.GetLength _ [a])) = do
aExpr <- compileExpr env a
return $ arrayLength aExpr | 184 | compileExpr env (In (App Ut.GetLength _ [a])) = do
aExpr <- compileExpr env a
return $ arrayLength aExpr | 110 | true | true | 0 | 10 | 34 | 81 | 39 | 42 | null | null |
runeksvendsen/rbpcp-handler | src/RBPCP/Handler/Internal/Types.hs | bsd-3-clause | toHandlerEx :: DB.ChanDBException -> HandlerErr a
toHandlerEx e =
if DB.is404 e
then UserError ResourceNotFound
else InternalErr $ OtherInternalErr "DB Error" | 190 | toHandlerEx :: DB.ChanDBException -> HandlerErr a
toHandlerEx e =
if DB.is404 e
then UserError ResourceNotFound
else InternalErr $ OtherInternalErr "DB Error" | 190 | toHandlerEx e =
if DB.is404 e
then UserError ResourceNotFound
else InternalErr $ OtherInternalErr "DB Error" | 140 | false | true | 0 | 7 | 52 | 46 | 22 | 24 | null | null |
FPtje/LuaAnalysis | analysis/src/GLua/Parser.hs | lgpl-2.1 | -- | Function calls are prefix expressions, but the last suffix MUST be either a function call or a metafunction call
pFunctionCall :: AParser PrefixExp
pFunctionCall = pPrefixExp suffixes
where
suffixes = concat <$> pSome ((\ix c -> ix ++ [c]) <$> pSome pPFExprIndexSuffix <*> pPFExprCallSuffix <<|>
... | 697 | pFunctionCall :: AParser PrefixExp
pFunctionCall = pPrefixExp suffixes
where
suffixes = concat <$> pSome ((\ix c -> ix ++ [c]) <$> pSome pPFExprIndexSuffix <*> pPFExprCallSuffix <<|>
(:[]) <$> pPFExprCallSuffix)
-- | single variable. Note: definition diff... | 579 | pFunctionCall = pPrefixExp suffixes
where
suffixes = concat <$> pSome ((\ix c -> ix ++ [c]) <$> pSome pPFExprIndexSuffix <*> pPFExprCallSuffix <<|>
(:[]) <$> pPFExprCallSuffix)
-- | single variable. Note: definition differs from reference to circumvent th... | 544 | true | true | 3 | 14 | 157 | 90 | 45 | 45 | null | null |
olorin/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types/Product.hs | mpl-2.0 | -- | Indicates if the option setting is part of a collection.
osIsCollection :: Lens' OptionSetting (Maybe Bool)
osIsCollection = lens _osIsCollection (\ s a -> s{_osIsCollection = a}) | 184 | osIsCollection :: Lens' OptionSetting (Maybe Bool)
osIsCollection = lens _osIsCollection (\ s a -> s{_osIsCollection = a}) | 122 | osIsCollection = lens _osIsCollection (\ s a -> s{_osIsCollection = a}) | 71 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
sonyxperiadev/dataflow | src/DataFlow/SequenceDiagram.hs | bsd-3-clause | asSequenceDiagram :: C.Diagram -> Diagram
asSequenceDiagram (C.Diagram _ rootNodes flows) =
SequenceDiagram $ defaultSkinParams
++ map convertRootNode rootNodes
++ map convertFlow flows | 227 | asSequenceDiagram :: C.Diagram -> Diagram
asSequenceDiagram (C.Diagram _ rootNodes flows) =
SequenceDiagram $ defaultSkinParams
++ map convertRootNode rootNodes
++ map convertFlow flows | 227 | asSequenceDiagram (C.Diagram _ rootNodes flows) =
SequenceDiagram $ defaultSkinParams
++ map convertRootNode rootNodes
++ map convertFlow flows | 185 | false | true | 6 | 10 | 63 | 64 | 27 | 37 | null | null |
LukaHorvat/Halt | test/Parsing/AST.hs | mit | typeLiteral :: TypeLiteralVariant -> Gen TypeLiteral
typeLiteral variant = frequency $
[ (3, Parameter <$> lowerLetter)
, (3, Concrete <$> rightCapitalIdentifier)
, (1, Generic <$> rightCapitalIdentifier <*> resize 3 (listOf1 (typeLiteral WithNothing)))
, (2, Function <$> typeLiteral WithNothing <*> typ... | 494 | typeLiteral :: TypeLiteralVariant -> Gen TypeLiteral
typeLiteral variant = frequency $
[ (3, Parameter <$> lowerLetter)
, (3, Concrete <$> rightCapitalIdentifier)
, (1, Generic <$> rightCapitalIdentifier <*> resize 3 (listOf1 (typeLiteral WithNothing)))
, (2, Function <$> typeLiteral WithNothing <*> typ... | 494 | typeLiteral variant = frequency $
[ (3, Parameter <$> lowerLetter)
, (3, Concrete <$> rightCapitalIdentifier)
, (1, Generic <$> rightCapitalIdentifier <*> resize 3 (listOf1 (typeLiteral WithNothing)))
, (2, Function <$> typeLiteral WithNothing <*> typeLiteral WithUnit) ]
++ case variant of WithVar ... | 441 | false | true | 2 | 13 | 131 | 162 | 86 | 76 | null | null |
nushio3/ghc | compiler/basicTypes/VarEnv.hs | bsd-3-clause | foldVarEnv = foldUFM | 26 | foldVarEnv = foldUFM | 26 | foldVarEnv = foldUFM | 26 | false | false | 0 | 4 | 8 | 6 | 3 | 3 | null | null |
iteloo/tsuru-sample | iteratee-0.8.9.6/src/Data/Iteratee/ListLike.hs | bsd-3-clause | -- | Get the length of the current chunk, or @Nothing@ if 'EOF'.
--
-- This function consumes no input.
chunkLength :: (LL.ListLike s el) => Iteratee s m (Maybe Int)
chunkLength = liftI step
where
step s@(Chunk xs) = idone (Just $ LL.length xs) s
step stream = idone Nothing stream
| 294 | chunkLength :: (LL.ListLike s el) => Iteratee s m (Maybe Int)
chunkLength = liftI step
where
step s@(Chunk xs) = idone (Just $ LL.length xs) s
step stream = idone Nothing stream
| 189 | chunkLength = liftI step
where
step s@(Chunk xs) = idone (Just $ LL.length xs) s
step stream = idone Nothing stream
| 127 | true | true | 2 | 9 | 64 | 106 | 48 | 58 | null | null |
mindriot101/pandoc | src/Text/Pandoc/Writers/Man.hs | gpl-2.0 | inlineToMan _ (LineBreak) = return $
cr <> text ".PD 0" $$ text ".P" $$ text ".PD" <> cr | 90 | inlineToMan _ (LineBreak) = return $
cr <> text ".PD 0" $$ text ".P" $$ text ".PD" <> cr | 90 | inlineToMan _ (LineBreak) = return $
cr <> text ".PD 0" $$ text ".P" $$ text ".PD" <> cr | 90 | false | false | 2 | 8 | 20 | 45 | 20 | 25 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Checker/Kinds.hs | bsd-3-clause | inferCoeffectTypeInContext _ _ (CNat _) = return $ TyCon $ mkId "Nat" | 78 | inferCoeffectTypeInContext _ _ (CNat _) = return $ TyCon $ mkId "Nat" | 78 | inferCoeffectTypeInContext _ _ (CNat _) = return $ TyCon $ mkId "Nat" | 78 | false | false | 0 | 7 | 20 | 30 | 14 | 16 | null | null |
ezyang/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | charDataCon :: DataCon
charDataCon = pcDataCon charDataConName [] [charPrimTy] charTyCon | 88 | charDataCon :: DataCon
charDataCon = pcDataCon charDataConName [] [charPrimTy] charTyCon | 88 | charDataCon = pcDataCon charDataConName [] [charPrimTy] charTyCon | 65 | false | true | 0 | 6 | 9 | 25 | 13 | 12 | null | null |
tel/riemann-hs | src/riemann.hs | mit | main :: IO ()
main = do
[rhost,rport,uriList] <- getArgs
c <- makeTCPClient rhost (read rport)
uris <- lines <$> readFile uriList
forever $ checkAll c uris | 163 | main :: IO ()
main = do
[rhost,rport,uriList] <- getArgs
c <- makeTCPClient rhost (read rport)
uris <- lines <$> readFile uriList
forever $ checkAll c uris | 163 | main = do
[rhost,rport,uriList] <- getArgs
c <- makeTCPClient rhost (read rport)
uris <- lines <$> readFile uriList
forever $ checkAll c uris | 149 | false | true | 0 | 11 | 34 | 82 | 37 | 45 | null | null |
jb55/cabal2nix | src/Cabal2Nix/Name.hs | bsd-3-clause | libNixName "ncursesw" = return "ncurses" | 66 | libNixName "ncursesw" = return "ncurses" | 66 | libNixName "ncursesw" = return "ncurses" | 66 | false | false | 0 | 5 | 30 | 13 | 5 | 8 | null | null |
jystic/river | src/River/Source/Concrete/Annotation.hs | bsd-3-clause | annotOfStatement :: Statement a -> a
annotOfStatement = \case
SSimple a _ ->
a
SControl a _ ->
a
SBlock a _ ->
a | 130 | annotOfStatement :: Statement a -> a
annotOfStatement = \case
SSimple a _ ->
a
SControl a _ ->
a
SBlock a _ ->
a | 130 | annotOfStatement = \case
SSimple a _ ->
a
SControl a _ ->
a
SBlock a _ ->
a | 93 | false | true | 4 | 6 | 41 | 51 | 25 | 26 | null | null |
alphalambda/codeworld | codeworld-base/src/Internal/Event.hs | apache-2.0 | fromCWEvent (CW.PointerRelease p) = PointerRelease (fromCWVect p) | 65 | fromCWEvent (CW.PointerRelease p) = PointerRelease (fromCWVect p) | 65 | fromCWEvent (CW.PointerRelease p) = PointerRelease (fromCWVect p) | 65 | false | false | 0 | 8 | 6 | 26 | 12 | 14 | null | null |
urbanslug/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | markInsideLam occ = occ | 45 | markInsideLam occ = occ | 45 | markInsideLam occ = occ | 45 | false | false | 0 | 4 | 25 | 9 | 4 | 5 | null | null |
stackbuilders/hapistrano | spec/System/HapistranoPropsSpec.hs | mit | isTrimmed' str =
let a = not . isSpace $ head str
b = not . isSpace $ last str
in a && b | 99 | isTrimmed' str =
let a = not . isSpace $ head str
b = not . isSpace $ last str
in a && b | 99 | isTrimmed' str =
let a = not . isSpace $ head str
b = not . isSpace $ last str
in a && b | 99 | false | false | 0 | 10 | 34 | 51 | 24 | 27 | null | null |
kmcallister/yices-easy | examples/latin.hs | bsd-3-clause | cell :: (Int,Int) -> String
cell (x,y) = concat ["c", show x, "_", show y] | 74 | cell :: (Int,Int) -> String
cell (x,y) = concat ["c", show x, "_", show y] | 74 | cell (x,y) = concat ["c", show x, "_", show y] | 46 | false | true | 0 | 7 | 14 | 51 | 28 | 23 | null | null |
enolan/Idris-dev | src/Idris/Parser/Helpers.hs | bsd-3-clause | -- | Parses a reserved identifier, computing its span. Assumes that
-- reserved identifiers never contain line breaks.
reservedFC :: MonadicParsing m => String -> m FC
reservedFC str = do (FC file (l, c) _) <- getFC
reserved str
return $ FC file (l, c) (l, c + length str)
-- | P... | 381 | reservedFC :: MonadicParsing m => String -> m FC
reservedFC str = do (FC file (l, c) _) <- getFC
reserved str
return $ FC file (l, c) (l, c + length str)
-- | Parse a reserved identfier, highlighting its span as a keyword | 262 | reservedFC str = do (FC file (l, c) _) <- getFC
reserved str
return $ FC file (l, c) (l, c + length str)
-- | Parse a reserved identfier, highlighting its span as a keyword | 213 | true | true | 0 | 12 | 103 | 98 | 48 | 50 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | cultivatedly = id | 17 | cultivatedly = id | 17 | cultivatedly = id | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
kazu-yamamoto/rpf | RPF/Parser.hs | bsd-3-clause | ip6range :: Parser IPRange
ip6range = IPv6Range . read <$> many1 (oneOf $ ['0'..'9'] ++ ['a'..'f'] ++ ['A'..'F'] ++ ".:/") | 123 | ip6range :: Parser IPRange
ip6range = IPv6Range . read <$> many1 (oneOf $ ['0'..'9'] ++ ['a'..'f'] ++ ['A'..'F'] ++ ".:/") | 123 | ip6range = IPv6Range . read <$> many1 (oneOf $ ['0'..'9'] ++ ['a'..'f'] ++ ['A'..'F'] ++ ".:/") | 96 | false | true | 1 | 12 | 20 | 65 | 32 | 33 | null | null |
pparkkin/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp DoubleAcosOp = Just $ normalOp $ doubleMathEndoOp "acos" | 65 | simpleOp DoubleAcosOp = Just $ normalOp $ doubleMathEndoOp "acos" | 65 | simpleOp DoubleAcosOp = Just $ normalOp $ doubleMathEndoOp "acos" | 65 | false | false | 0 | 6 | 8 | 20 | 9 | 11 | null | null |
raphaelnova/cis194 | src/Week1/CreditCard.hs | unlicense | -- Ex. 4
validate :: Integer -> Bool
validate = (== 0) . (`mod` 10) . sumDigits . doubleEveryOther . toDigits | 109 | validate :: Integer -> Bool
validate = (== 0) . (`mod` 10) . sumDigits . doubleEveryOther . toDigits | 100 | validate = (== 0) . (`mod` 10) . sumDigits . doubleEveryOther . toDigits | 72 | true | true | 0 | 9 | 20 | 42 | 25 | 17 | null | null |
Melvar/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | explicitNames (Proj x idx) = Proj (explicitNames x) idx | 55 | explicitNames (Proj x idx) = Proj (explicitNames x) idx | 55 | explicitNames (Proj x idx) = Proj (explicitNames x) idx | 55 | false | false | 0 | 7 | 8 | 30 | 13 | 17 | null | null |
mgomezch/yesod-squealer | source/Yesod/Squealer/Handler.hs | bsd-3-clause | escapeFieldName ∷ String → String
escapeFieldName = escapeURIString isUnreserved | 80 | escapeFieldName ∷ String → String
escapeFieldName = escapeURIString isUnreserved | 80 | escapeFieldName = escapeURIString isUnreserved | 46 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
eiji-a/aya | src/Aya/Mapping.hs | bsd-3-clause | --
-- TEXTURE MAPPING
--
-- uni-texture
mapUni :: Material -> Vector3 -> Material
mapUni mate1 pt = mate1 | 107 | mapUni :: Material -> Vector3 -> Material
mapUni mate1 pt = mate1 | 65 | mapUni mate1 pt = mate1 | 23 | true | true | 0 | 6 | 20 | 28 | 16 | 12 | null | null |
naoto-ogawa/h-xproto-mysql | src/DataBase/MySQLX/Model.hs | mit | mkMember val = PB.defaultValue { PDPI.type' = PDPIT.MEMBER , PDPI.value = Just $ PBH.uFromString val } | 123 | mkMember val = PB.defaultValue { PDPI.type' = PDPIT.MEMBER , PDPI.value = Just $ PBH.uFromString val } | 123 | mkMember val = PB.defaultValue { PDPI.type' = PDPIT.MEMBER , PDPI.value = Just $ PBH.uFromString val } | 123 | false | false | 1 | 10 | 36 | 44 | 21 | 23 | null | null |
shockkolate/containers | Data/IntSet/Base.hs | bsd-3-clause | showTree :: IntSet -> String
showTree s
= showTreeWith True False s | 69 | showTree :: IntSet -> String
showTree s
= showTreeWith True False s | 69 | showTree s
= showTreeWith True False s | 40 | false | true | 0 | 5 | 13 | 25 | 12 | 13 | null | null |
cgorski/general-games | src/Game/Game/Poker.hs | mit | -- |
-- All flushes in a full deck of playing cards.
-- The current implementation traverses the entire list of allPossibleHands,
-- and is not efficient.
allFlush :: [[PlayingCard]]
allFlush = [x | x <- allPossibleHands, isFlush x] | 232 | allFlush :: [[PlayingCard]]
allFlush = [x | x <- allPossibleHands, isFlush x] | 77 | allFlush = [x | x <- allPossibleHands, isFlush x] | 49 | true | true | 0 | 7 | 38 | 39 | 23 | 16 | null | null |
gpahal/hgraph | src/SocialNetwork.hs | bsd-3-clause | areConnected :: Id -> Id -> Label -> GS Bool
areConnected si ei l = do es <- getOutNodes (==l) si
let ess = map (nodeId . snd) es
return $ ei `elem` ess | 204 | areConnected :: Id -> Id -> Label -> GS Bool
areConnected si ei l = do es <- getOutNodes (==l) si
let ess = map (nodeId . snd) es
return $ ei `elem` ess | 204 | areConnected si ei l = do es <- getOutNodes (==l) si
let ess = map (nodeId . snd) es
return $ ei `elem` ess | 159 | false | true | 0 | 12 | 85 | 83 | 41 | 42 | null | null |
cpettitt/euler | Util.hs | mit | -- | Generates an infinite, lazy list of fibonacci numbers using the arguments
-- as the first two numbers in the sequence.
fibs :: Integral a => a -> a -> [a]
fibs n0 n1 = fibs'
where
fibs' = n0 : n1 : zipWith (+) fibs' (tail fibs') | 243 | fibs :: Integral a => a -> a -> [a]
fibs n0 n1 = fibs'
where
fibs' = n0 : n1 : zipWith (+) fibs' (tail fibs') | 119 | fibs n0 n1 = fibs'
where
fibs' = n0 : n1 : zipWith (+) fibs' (tail fibs') | 83 | true | true | 3 | 10 | 58 | 76 | 36 | 40 | null | null |
brendanhay/gogol | gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs | mpl-2.0 | -- | Time that this version was created.\'OutputOnly
verCreateTime :: Lens' Version (Maybe UTCTime)
verCreateTime
= lens _verCreateTime
(\ s a -> s{_verCreateTime = a})
. mapping _DateTime | 202 | verCreateTime :: Lens' Version (Maybe UTCTime)
verCreateTime
= lens _verCreateTime
(\ s a -> s{_verCreateTime = a})
. mapping _DateTime | 149 | verCreateTime
= lens _verCreateTime
(\ s a -> s{_verCreateTime = a})
. mapping _DateTime | 102 | true | true | 2 | 8 | 41 | 60 | 28 | 32 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpFixity IntLeOp = Just (Fixity 4 InfixN) | 45 | primOpFixity IntLeOp = Just (Fixity 4 InfixN) | 45 | primOpFixity IntLeOp = Just (Fixity 4 InfixN) | 45 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
olsner/ghc | compiler/nativeGen/X86/Instr.hs | bsd-3-clause | x86_mkRegRegMoveInstr
:: Platform
-> Reg
-> Reg
-> Instr
x86_mkRegRegMoveInstr platform src dst
= case targetClassOfReg platform src of
RcInteger -> case platformArch platform of
ArchX86 -> MOV II32 (OpReg src) (OpReg dst)
ArchX86_64 -> MOV II64 (Op... | 799 | x86_mkRegRegMoveInstr
:: Platform
-> Reg
-> Reg
-> Instr
x86_mkRegRegMoveInstr platform src dst
= case targetClassOfReg platform src of
RcInteger -> case platformArch platform of
ArchX86 -> MOV II32 (OpReg src) (OpReg dst)
ArchX86_64 -> MOV II64 (OpR... | 798 | x86_mkRegRegMoveInstr platform src dst
= case targetClassOfReg platform src of
RcInteger -> case platformArch platform of
ArchX86 -> MOV II32 (OpReg src) (OpReg dst)
ArchX86_64 -> MOV II64 (OpReg src) (OpReg dst)
_ -> panic "x86_mkRegRe... | 725 | false | true | 4 | 11 | 244 | 169 | 79 | 90 | null | null |
raymoo/shmuppy | src/Game/Player.hs | gpl-3.0 | player :: Behavior Time -> Behavior (Set PlayerControl) -> Vector Float
-> Behavior (Behavior Player)
player bt bcs pos = (<*> bShot) . fmap Player <$> bbPos
where bv = controlToVel playerSpeed <$> bcs
bbPos = fmap (pos ^+^) <$> integrate bt bv
bShot = (CShoot `S.member`) <$> bcs
-- | Play... | 328 | player :: Behavior Time -> Behavior (Set PlayerControl) -> Vector Float
-> Behavior (Behavior Player)
player bt bcs pos = (<*> bShot) . fmap Player <$> bbPos
where bv = controlToVel playerSpeed <$> bcs
bbPos = fmap (pos ^+^) <$> integrate bt bv
bShot = (CShoot `S.member`) <$> bcs
-- | Play... | 328 | player bt bcs pos = (<*> bShot) . fmap Player <$> bbPos
where bv = controlToVel playerSpeed <$> bcs
bbPos = fmap (pos ^+^) <$> integrate bt bv
bShot = (CShoot `S.member`) <$> bcs
-- | Player shots | 216 | false | true | 3 | 11 | 82 | 137 | 64 | 73 | null | null |
diminishedprime/.org | reading-list/learn_you_a_haskell/own_types.hs | mit | baseRect :: Float -> Float -> Shape
baseRect width height = Rectangle (Point 0 0) (Point width height) | 102 | baseRect :: Float -> Float -> Shape
baseRect width height = Rectangle (Point 0 0) (Point width height) | 102 | baseRect width height = Rectangle (Point 0 0) (Point width height) | 66 | false | true | 0 | 7 | 17 | 45 | 22 | 23 | null | null |
rjregenold/chutes-and-ladders | Game/ChutesAndLadders/Board.hs | mit | renderBoardBoxes :: [Box] -> String
renderBoardBoxes b = render $ hsep 1 left $ map (vcat center1) withArrows where
withArrows = [leftArrows] ++ rows ++ [rightArrows]
rows = chunk 10 showBoard
showBoard = rotateBoard lbToSbXs . rotateBoard gbToLbXs $ b | 264 | renderBoardBoxes :: [Box] -> String
renderBoardBoxes b = render $ hsep 1 left $ map (vcat center1) withArrows where
withArrows = [leftArrows] ++ rows ++ [rightArrows]
rows = chunk 10 showBoard
showBoard = rotateBoard lbToSbXs . rotateBoard gbToLbXs $ b | 264 | renderBoardBoxes b = render $ hsep 1 left $ map (vcat center1) withArrows where
withArrows = [leftArrows] ++ rows ++ [rightArrows]
rows = chunk 10 showBoard
showBoard = rotateBoard lbToSbXs . rotateBoard gbToLbXs $ b | 228 | false | true | 0 | 9 | 51 | 95 | 48 | 47 | null | null |
oldmanmike/ghc | compiler/cmm/CmmType.hs | bsd-3-clause | vec16 = vec 16 | 14 | vec16 = vec 16 | 14 | vec16 = vec 16 | 14 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
dgonyeo/brandskell | Utils/Days.hs | mit | showDate :: Day -> String
showDate d = let (year, month, day) = toGregorian d
in show month ++ "/" ++ show day ++ "/" ++ show year | 143 | showDate :: Day -> String
showDate d = let (year, month, day) = toGregorian d
in show month ++ "/" ++ show day ++ "/" ++ show year | 143 | showDate d = let (year, month, day) = toGregorian d
in show month ++ "/" ++ show day ++ "/" ++ show year | 117 | false | true | 0 | 11 | 40 | 67 | 32 | 35 | null | null |
tippenein/scrape_the_truth | HLint.hs | mit | error "Avoid return" =
return ==> pure
where note = "return is obsolete as of GHC 7.10" | 95 | error "Avoid return" =
return ==> pure
where note = "return is obsolete as of GHC 7.10" | 95 | error "Avoid return" =
return ==> pure
where note = "return is obsolete as of GHC 7.10" | 95 | false | false | 0 | 6 | 24 | 20 | 10 | 10 | null | null |
aostiles/LiveHaskell | src/IHaskell/Eval/Evaluate.hs | mit | debug :: Bool
debug = False | 27 | debug :: Bool
debug = False | 27 | debug = False | 13 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
qhool/constraint | Data/ConstraintSystem/Example/Sudoku.hs | gpl-3.0 | blockIdx :: [[(Int,Int)]]
blockIdx = map (\offset -> map (\s -> ((fst s) + (fst offset),(snd s) + (snd offset))) bloc) offsets where
bloc = [ (i,j) | i <- [0..2], j <- [0..2] ]
offsets = [ (n,m) | n <- [1,4,7], m <- [1,4,7] ] | 229 | blockIdx :: [[(Int,Int)]]
blockIdx = map (\offset -> map (\s -> ((fst s) + (fst offset),(snd s) + (snd offset))) bloc) offsets where
bloc = [ (i,j) | i <- [0..2], j <- [0..2] ]
offsets = [ (n,m) | n <- [1,4,7], m <- [1,4,7] ] | 229 | blockIdx = map (\offset -> map (\s -> ((fst s) + (fst offset),(snd s) + (snd offset))) bloc) offsets where
bloc = [ (i,j) | i <- [0..2], j <- [0..2] ]
offsets = [ (n,m) | n <- [1,4,7], m <- [1,4,7] ] | 203 | false | true | 0 | 14 | 50 | 176 | 101 | 75 | null | null |
mettekou/ghc | compiler/cmm/CmmNode.hs | bsd-3-clause | mapExpM _ (CmmBranch _) = Nothing | 45 | mapExpM _ (CmmBranch _) = Nothing | 45 | mapExpM _ (CmmBranch _) = Nothing | 45 | false | false | 1 | 6 | 17 | 20 | 8 | 12 | null | null |
elitak/forest | Language/Forest/Parser.hs | epl-1.0 | forestArg :: Parser TH.Exp
forestArg = forestArgR <|> parens forestArgR | 71 | forestArg :: Parser TH.Exp
forestArg = forestArgR <|> parens forestArgR | 71 | forestArg = forestArgR <|> parens forestArgR | 44 | false | true | 0 | 6 | 9 | 23 | 11 | 12 | null | null |
coreyoconnor/corebot-bliki | src/Yesod/CoreBot/Bliki/Resources/Wiki.hs | bsd-3-clause | -- XXX: needs json representation
getWikiIndexR :: Yesod master => [ Text ] -> GHandler ( Wiki_ master ) master RepHtml
getWikiIndexR node_path = do
liftIO $ putStrLn $ "index for node " ++ show node_path
wiki@(Wiki src_data) <- getYesodSub
defaultLayout $ do
let store_path = foldl (</>) "" $ map Te... | 1,080 | getWikiIndexR :: Yesod master => [ Text ] -> GHandler ( Wiki_ master ) master RepHtml
getWikiIndexR node_path = do
liftIO $ putStrLn $ "index for node " ++ show node_path
wiki@(Wiki src_data) <- getYesodSub
defaultLayout $ do
let store_path = foldl (</>) "" $ map Text.unpack node_path
listin... | 1,046 | getWikiIndexR node_path = do
liftIO $ putStrLn $ "index for node " ++ show node_path
wiki@(Wiki src_data) <- getYesodSub
defaultLayout $ do
let store_path = foldl (</>) "" $ map Text.unpack node_path
listing <- evalStateT (directory_listing store_path) ( store src_data )
let entry_na... | 960 | true | true | 2 | 11 | 294 | 235 | 117 | 118 | null | null |
snoyberg/convertible | utils/genCinstances.hs | lgpl-2.1 | printIntInt (i1, i2) = printInt (i1, i2) ++ printInt (i2, i1) | 61 | printIntInt (i1, i2) = printInt (i1, i2) ++ printInt (i2, i1) | 61 | printIntInt (i1, i2) = printInt (i1, i2) ++ printInt (i2, i1) | 61 | false | false | 0 | 7 | 10 | 38 | 20 | 18 | null | null |
SwiftsNamesake/BattleHack-2015 | src/BattleHack/Piano.hs | mit | -- | Is the point within the right indent of the key?
-- TODO: Buggy!
insideRight :: PianoSettings -> Vector -> Bool
insideRight piano p = let shiftx = piano-->keysize.real * (piano-->indent - 1) in insideLeft piano $ p + (shiftx:+0) | 233 | insideRight :: PianoSettings -> Vector -> Bool
insideRight piano p = let shiftx = piano-->keysize.real * (piano-->indent - 1) in insideLeft piano $ p + (shiftx:+0) | 163 | insideRight piano p = let shiftx = piano-->keysize.real * (piano-->indent - 1) in insideLeft piano $ p + (shiftx:+0) | 116 | true | true | 0 | 12 | 40 | 82 | 40 | 42 | null | null |
andrewjanke/mytardis-dicom | src/Dicom.hs | bsd-2-clause | pMediaStorageSOPInstanceUID = parseField "(0002,0003) UI" | 57 | pMediaStorageSOPInstanceUID = parseField "(0002,0003) UI" | 57 | pMediaStorageSOPInstanceUID = parseField "(0002,0003) UI" | 57 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
iu-parfunc/containers | Data/Sequence.hs | bsd-3-clause | rigidify Empty = error "rigidify: empty tree" | 45 | rigidify Empty = error "rigidify: empty tree" | 45 | rigidify Empty = error "rigidify: empty tree" | 45 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
kig/tomtegebra | Tomtegebra/Algebra.hs | gpl-3.0 | outerMapExprWithIndex' :: (Expr -> Int -> Expr) -> Expr -> Int -> (Int, Expr)
outerMapExprWithIndex' f (Expr (ox,a,b)) c =
let (c', left) = outerMapExprWithIndex' f a c in
let (c'', expr) = (c'+1, f (Expr (ox, left, b)) c') in
case expr of
Expr (o',left',b') -> let (c''', right) = outerMapExprWithIn... | 439 | outerMapExprWithIndex' :: (Expr -> Int -> Expr) -> Expr -> Int -> (Int, Expr)
outerMapExprWithIndex' f (Expr (ox,a,b)) c =
let (c', left) = outerMapExprWithIndex' f a c in
let (c'', expr) = (c'+1, f (Expr (ox, left, b)) c') in
case expr of
Expr (o',left',b') -> let (c''', right) = outerMapExprWithIn... | 439 | outerMapExprWithIndex' f (Expr (ox,a,b)) c =
let (c', left) = outerMapExprWithIndex' f a c in
let (c'', expr) = (c'+1, f (Expr (ox, left, b)) c') in
case expr of
Expr (o',left',b') -> let (c''', right) = outerMapExprWithIndex' f b' c'' in
(c''', Expr (o', left', right))
... | 361 | false | true | 2 | 15 | 121 | 210 | 113 | 97 | null | null |
hvr/lens | src/Control/Lens/Lens.hs | bsd-3-clause | (<<+~) :: Num a => Optical' (->) q ((,) a) s a -> a -> q s (a, s)
l <<+~ b = l $ \a -> (a, a + b) | 97 | (<<+~) :: Num a => Optical' (->) q ((,) a) s a -> a -> q s (a, s)
l <<+~ b = l $ \a -> (a, a + b) | 97 | l <<+~ b = l $ \a -> (a, a + b) | 31 | false | true | 2 | 11 | 30 | 92 | 47 | 45 | null | null |
lordi/haskell-terminal | src/Hstermplay/Main.hs | gpl-2.0 | renderAnnotatedAction (action, bytes) = do
putStrLn $ sb ++ replicate (10 - length sb) ' ' ++ "\t" ++ show action
where sb = show bytes
-- |Parse a string and apply the resulting TerminalActions to a default
-- terminal. While at it, print each TerminalAction and the resulting
-- terminal state. | 305 | renderAnnotatedAction (action, bytes) = do
putStrLn $ sb ++ replicate (10 - length sb) ' ' ++ "\t" ++ show action
where sb = show bytes
-- |Parse a string and apply the resulting TerminalActions to a default
-- terminal. While at it, print each TerminalAction and the resulting
-- terminal state. | 305 | renderAnnotatedAction (action, bytes) = do
putStrLn $ sb ++ replicate (10 - length sb) ' ' ++ "\t" ++ show action
where sb = show bytes
-- |Parse a string and apply the resulting TerminalActions to a default
-- terminal. While at it, print each TerminalAction and the resulting
-- terminal state. | 305 | false | false | 1 | 13 | 60 | 69 | 33 | 36 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Elements/Elements.hs | bsd-3-clause | wbr' ∷ forall t m a. DomBuilder t m ⇒ Wbr → m a → m (Element EventResult (DomBuilderSpace m) t, a)
wbr' bm = elAttr' "wbr" (A.attrMap bm) | 138 | wbr' ∷ forall t m a. DomBuilder t m ⇒ Wbr → m a → m (Element EventResult (DomBuilderSpace m) t, a)
wbr' bm = elAttr' "wbr" (A.attrMap bm) | 138 | wbr' bm = elAttr' "wbr" (A.attrMap bm) | 39 | false | true | 0 | 14 | 29 | 80 | 39 | 41 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2013-11-nicta/src/Course/HC.hs | unlicense | applyFHC :: (a -> b) -> HC a -> HC b
applyFHC f (HC a) = HC (f a) | 65 | applyFHC :: (a -> b) -> HC a -> HC b
applyFHC f (HC a) = HC (f a) | 65 | applyFHC f (HC a) = HC (f a) | 28 | false | true | 0 | 10 | 18 | 57 | 26 | 31 | null | null |
scan/yampa-sdl | src/FRP/Yampa/SDL/Graphic.hs | mit | overOpt :: GraphicOpt -> GraphicOpt -> GraphicOpt
overOpt g1 g2 r = g1 r `over` g2 r | 84 | overOpt :: GraphicOpt -> GraphicOpt -> GraphicOpt
overOpt g1 g2 r = g1 r `over` g2 r | 84 | overOpt g1 g2 r = g1 r `over` g2 r | 34 | false | true | 0 | 6 | 16 | 38 | 19 | 19 | null | null |
palas/detparaminf | src/DetParamInf/TKPMap.hs | bsd-2-clause | empty :: (v -> [ka]) -> (v -> [kb]) -> (v -> [kc]) -> TKPMap ka kb kc v
empty f1 f2 f3 = TKPMap (M.empty, M.empty, M.empty, f1, f2, f3) | 135 | empty :: (v -> [ka]) -> (v -> [kb]) -> (v -> [kc]) -> TKPMap ka kb kc v
empty f1 f2 f3 = TKPMap (M.empty, M.empty, M.empty, f1, f2, f3) | 135 | empty f1 f2 f3 = TKPMap (M.empty, M.empty, M.empty, f1, f2, f3) | 63 | false | true | 0 | 10 | 30 | 96 | 53 | 43 | null | null |
LumiGuide/blaze-react | src/Text/Blaze/Internal.hs | mit | objectAttribute :: Tag -- ^ Name of the attribute
-> HMS.HashMap T.Text T.Text -- ^ Value of the attribute
-> Attribute ev -- ^ Resulting HTML attribtu
objectAttribute key object = Attribute $ AddObjectAttribute
(unTag key)
object | 305 | objectAttribute :: Tag -- ^ Name of the attribute
-> HMS.HashMap T.Text T.Text -- ^ Value of the attribute
-> Attribute ev
objectAttribute key object = Attribute $ AddObjectAttribute
(unTag key)
object | 263 | objectAttribute key object = Attribute $ AddObjectAttribute
(unTag key)
object | 86 | true | true | 0 | 8 | 111 | 56 | 28 | 28 | null | null |
sleexyz/haskell-fun | Archer.hs | bsd-3-clause | -- introduction
pack :: forall p a. p a => a -> Exists p
pack x = MkExists (\f -> f x) | 86 | pack :: forall p a. p a => a -> Exists p
pack x = MkExists (\f -> f x) | 70 | pack x = MkExists (\f -> f x) | 29 | true | true | 0 | 8 | 21 | 49 | 25 | 24 | null | null |
ulyssesp/oscillare | src/Visuals.hs | gpl-3.0 | repeatTxy = repeatTxy' id | 25 | repeatTxy = repeatTxy' id | 25 | repeatTxy = repeatTxy' id | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
HIPERFIT/futhark | src/Language/Futhark/TypeChecker/Terms/Monad.hs | isc | extSize :: SrcLoc -> SizeSource -> TermTypeM (DimDecl VName, Maybe VName)
extSize loc e = do
prev <- gets $ M.lookup e . stateDimTable
case prev of
Nothing -> do
let rsrc = case e of
SourceArg (FName fname) e' ->
RigidArg fname $ prettyOneLine e'
SourceBound e' ->
... | 729 | extSize :: SrcLoc -> SizeSource -> TermTypeM (DimDecl VName, Maybe VName)
extSize loc e = do
prev <- gets $ M.lookup e . stateDimTable
case prev of
Nothing -> do
let rsrc = case e of
SourceArg (FName fname) e' ->
RigidArg fname $ prettyOneLine e'
SourceBound e' ->
... | 729 | extSize loc e = do
prev <- gets $ M.lookup e . stateDimTable
case prev of
Nothing -> do
let rsrc = case e of
SourceArg (FName fname) e' ->
RigidArg fname $ prettyOneLine e'
SourceBound e' ->
RigidBound $ prettyOneLine e'
SourceSlice d i j s -... | 655 | false | true | 0 | 20 | 280 | 265 | 123 | 142 | null | null |
runjak/carbon-adf | Carbon/Website/User.hs | gpl-3.0 | getUsername :: OBW Username
getUsername = liftM sanitize $ look "username" | 74 | getUsername :: OBW Username
getUsername = liftM sanitize $ look "username" | 74 | getUsername = liftM sanitize $ look "username" | 46 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
asr/apia | src/Apia/Translation.hs | mit | equiredATPDefsByHints ∷ T [AF]
requiredATPDefsByHints = do
ghDefs ∷ Definitions ← getATPHints <$> getTDefs
fmap (nub . concat) (mapM requiredATPDefsByDefinition (HashMap.elems ghDefs))
-- | Translate the ATP axioms, the ATP general hints, and the ATP
-- required definitions in the top level module and its importe... | 356 | requiredATPDefsByHints ∷ T [AF]
requiredATPDefsByHints = do
ghDefs ∷ Definitions ← getATPHints <$> getTDefs
fmap (nub . concat) (mapM requiredATPDefsByDefinition (HashMap.elems ghDefs))
-- | Translate the ATP axioms, the ATP general hints, and the ATP
-- required definitions in the top level module and its import... | 356 | requiredATPDefsByHints = do
ghDefs ∷ Definitions ← getATPHints <$> getTDefs
fmap (nub . concat) (mapM requiredATPDefsByDefinition (HashMap.elems ghDefs))
-- | Translate the ATP axioms, the ATP general hints, and the ATP
-- required definitions in the top level module and its imported
-- modules to annotated formu... | 324 | false | true | 0 | 12 | 57 | 66 | 34 | 32 | null | null |
gergoerdi/enigma-kansas-lava | src/Enigma.hs | bsd-3-clause | permuteFwd :: (Size n) => Permutation n -> Matrix n (Signal clk Bool) -> Matrix n (Signal clk Bool)
permuteFwd p = Matrix.ixmap $ \i -> maybe (error "Not surjective") fst $ find ((== i) . snd) $ Matrix.assocs p | 210 | permuteFwd :: (Size n) => Permutation n -> Matrix n (Signal clk Bool) -> Matrix n (Signal clk Bool)
permuteFwd p = Matrix.ixmap $ \i -> maybe (error "Not surjective") fst $ find ((== i) . snd) $ Matrix.assocs p | 210 | permuteFwd p = Matrix.ixmap $ \i -> maybe (error "Not surjective") fst $ find ((== i) . snd) $ Matrix.assocs p | 110 | false | true | 0 | 12 | 39 | 113 | 55 | 58 | null | null |
hephaestus-pl/hephaestus | willian/hephaestus-integrated/asset-base/bpmn/src/BusinessProcess/Types.hs | mit | idflow :: FlowObject -> String
idflow (FlowObject i _ _ _) = i | 63 | idflow :: FlowObject -> String
idflow (FlowObject i _ _ _) = i | 62 | idflow (FlowObject i _ _ _) = i | 31 | false | true | 0 | 6 | 13 | 34 | 16 | 18 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | A list of moderators that match the request criteria.
lItems :: Lens' LiveChatModeratorListResponse [LiveChatModerator]
lItems
= lens _lItems (\ s a -> s{_lItems = a}) . _Default .
_Coerce | 201 | lItems :: Lens' LiveChatModeratorListResponse [LiveChatModerator]
lItems
= lens _lItems (\ s a -> s{_lItems = a}) . _Default .
_Coerce | 142 | lItems
= lens _lItems (\ s a -> s{_lItems = a}) . _Default .
_Coerce | 76 | true | true | 0 | 11 | 38 | 53 | 28 | 25 | null | null |
juhp/stack | src/Stack/SDist.hs | bsd-3-clause | getModTime :: FilePath -> IO Tar.EpochTime
getModTime path = do
t <- getModificationTime path
return . floor . utcTimeToPOSIXSeconds $ t | 144 | getModTime :: FilePath -> IO Tar.EpochTime
getModTime path = do
t <- getModificationTime path
return . floor . utcTimeToPOSIXSeconds $ t | 144 | getModTime path = do
t <- getModificationTime path
return . floor . utcTimeToPOSIXSeconds $ t | 101 | false | true | 0 | 9 | 28 | 48 | 22 | 26 | null | null |
mariefarrell/Hets | CspCASLProver/CspProverConsts.hs | gpl-2.0 | -- | Internal choice operator
cspProver_internal_choiceOp :: Term -> Term -> Term
cspProver_internal_choiceOp =
makeBinCspProverOp cspProver_internal_choiceS
cspProver_internal_choiceAltS
cspProver_internal_choiceAltArgPrios
cspProver_internal_cho... | 332 | cspProver_internal_choiceOp :: Term -> Term -> Term
cspProver_internal_choiceOp =
makeBinCspProverOp cspProver_internal_choiceS
cspProver_internal_choiceAltS
cspProver_internal_choiceAltArgPrios
cspProver_internal_choiceAltOpPrio | 302 | cspProver_internal_choiceOp =
makeBinCspProverOp cspProver_internal_choiceS
cspProver_internal_choiceAltS
cspProver_internal_choiceAltArgPrios
cspProver_internal_choiceAltOpPrio | 250 | true | true | 0 | 6 | 91 | 29 | 15 | 14 | null | null |
ben-schulz/Idris-dev | src/IRTS/JavaScript/AST.hs | bsd-3-clause | compileJS' indent (JSSwitch val branches def) =
"switch(" `T.append` compileJS' indent val `T.append` "){\n"
`T.append` T.concat (map mkBranch branches)
`T.append` mkDefault def
`T.append` T.replicate indent " " `T.append` "}"
where
mkBranch :: (JS, JS) -> T.Text
mkBranch (tag, code) =
T.r... | 789 | compileJS' indent (JSSwitch val branches def) =
"switch(" `T.append` compileJS' indent val `T.append` "){\n"
`T.append` T.concat (map mkBranch branches)
`T.append` mkDefault def
`T.append` T.replicate indent " " `T.append` "}"
where
mkBranch :: (JS, JS) -> T.Text
mkBranch (tag, code) =
T.r... | 789 | compileJS' indent (JSSwitch val branches def) =
"switch(" `T.append` compileJS' indent val `T.append` "){\n"
`T.append` T.concat (map mkBranch branches)
`T.append` mkDefault def
`T.append` T.replicate indent " " `T.append` "}"
where
mkBranch :: (JS, JS) -> T.Text
mkBranch (tag, code) =
T.r... | 789 | false | false | 0 | 10 | 200 | 377 | 190 | 187 | null | null |
deech/hpack | test/Hpack/RunSpec.hs | mit | spec :: Spec
spec = do
describe "renderPackage" $ do
let renderPackage_ = renderPackage defaultRenderSettings 0 [] []
it "renders a package" $ do
renderPackage_ package `shouldBe` unlines [
"name: foo"
, "version: 0.0.0"
, "build-type: Simple"
, "cabal-version: >= 1.10"... | 11,524 | spec :: Spec
spec = do
describe "renderPackage" $ do
let renderPackage_ = renderPackage defaultRenderSettings 0 [] []
it "renders a package" $ do
renderPackage_ package `shouldBe` unlines [
"name: foo"
, "version: 0.0.0"
, "build-type: Simple"
, "cabal-version: >= 1.10"... | 11,524 | spec = do
describe "renderPackage" $ do
let renderPackage_ = renderPackage defaultRenderSettings 0 [] []
it "renders a package" $ do
renderPackage_ package `shouldBe` unlines [
"name: foo"
, "version: 0.0.0"
, "build-type: Simple"
, "cabal-version: >= 1.10"
]
... | 11,511 | false | true | 0 | 25 | 4,059 | 2,195 | 1,175 | 1,020 | null | null |
tomjaguarpaw/postgresql-simple | src/Database/PostgreSQL/Simple/TypeInfo/Static.hs | bsd-3-clause | array_int8Oid :: Oid
array_int8Oid = Oid 1016 | 45 | array_int8Oid :: Oid
array_int8Oid = Oid 1016 | 45 | array_int8Oid = Oid 1016 | 24 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
brendanhay/gogol | gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'SignupNewUserResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'snurEmail'
--
-- * 'snurKind'
--
-- * 'snurRefreshToken'
--
-- * 'snurExpiresIn'
--
-- * 'snurDisplayName'
--
-- * 'snurLocalId'
--
-- * '... | 679 | signupNewUserResponse
:: SignupNewUserResponse
signupNewUserResponse =
SignupNewUserResponse'
{ _snurEmail = Nothing
, _snurKind = "identitytoolkit#SignupNewUserResponse"
, _snurRefreshToken = Nothing
, _snurExpiresIn = Nothing
, _snurDisplayName = Nothing
, _snurLocalId = Nothing
, _s... | 346 | signupNewUserResponse =
SignupNewUserResponse'
{ _snurEmail = Nothing
, _snurKind = "identitytoolkit#SignupNewUserResponse"
, _snurRefreshToken = Nothing
, _snurExpiresIn = Nothing
, _snurDisplayName = Nothing
, _snurLocalId = Nothing
, _snurIdToken = Nothing
} | 295 | true | true | 0 | 6 | 130 | 72 | 52 | 20 | null | null |
crogers1/manager | apptool/AppInventory.hs | gpl-2.0 | findAppliance :: MonadRpc e m => String -> m (Maybe AppID)
findAppliance id = unlist . filter matches <$> enumAppliances where
matches (AppID id' _) = id == id'
unlist (app:_) = Just app
unlist _ = Nothing | 211 | findAppliance :: MonadRpc e m => String -> m (Maybe AppID)
findAppliance id = unlist . filter matches <$> enumAppliances where
matches (AppID id' _) = id == id'
unlist (app:_) = Just app
unlist _ = Nothing | 211 | findAppliance id = unlist . filter matches <$> enumAppliances where
matches (AppID id' _) = id == id'
unlist (app:_) = Just app
unlist _ = Nothing | 152 | false | true | 0 | 9 | 43 | 94 | 46 | 48 | null | null |
reinvdwoerd/lisp | src/Parse.hs | mit | readOne :: ReadTable -> String -> LispM LispVal
readOne = parseSyntaxError exprSurroundedByWhitespace | 101 | readOne :: ReadTable -> String -> LispM LispVal
readOne = parseSyntaxError exprSurroundedByWhitespace | 101 | readOne = parseSyntaxError exprSurroundedByWhitespace | 53 | false | true | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
m-alvarez/jhc | drift_processed/Ho/Type.hs | mit | choVarMap_u f r@CollectedHo{choVarMap = x} = r{choVarMap = f x} | 64 | choVarMap_u f r@CollectedHo{choVarMap = x} = r{choVarMap = f x} | 64 | choVarMap_u f r@CollectedHo{choVarMap = x} = r{choVarMap = f x} | 64 | false | false | 0 | 9 | 10 | 34 | 18 | 16 | null | null |
brendanhay/gogol | gogol-cloudiot/gen/Network/Google/Resource/CloudIOT/Projects/Locations/Registries/Groups/Devices/ModifyCloudToDeviceConfig.hs | mpl-2.0 | -- | V1 error format.
plrgdmctdcXgafv :: Lens' ProjectsLocationsRegistriesGroupsDevicesModifyCloudToDeviceConfig (Maybe Xgafv)
plrgdmctdcXgafv
= lens _plrgdmctdcXgafv
(\ s a -> s{_plrgdmctdcXgafv = a}) | 209 | plrgdmctdcXgafv :: Lens' ProjectsLocationsRegistriesGroupsDevicesModifyCloudToDeviceConfig (Maybe Xgafv)
plrgdmctdcXgafv
= lens _plrgdmctdcXgafv
(\ s a -> s{_plrgdmctdcXgafv = a}) | 187 | plrgdmctdcXgafv
= lens _plrgdmctdcXgafv
(\ s a -> s{_plrgdmctdcXgafv = a}) | 82 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-gool/GOOL/Drasil/LanguageRenderer/LanguagePolymorphic.hs | bsd-2-clause | void :: (RenderSym repr) => VS (repr (Type repr))
void = toState $ typeFromData Void "void" (text "void") | 105 | void :: (RenderSym repr) => VS (repr (Type repr))
void = toState $ typeFromData Void "void" (text "void") | 105 | void = toState $ typeFromData Void "void" (text "void") | 55 | false | true | 2 | 11 | 17 | 58 | 27 | 31 | null | null |
TOSPIO/yi | src/library/Yi/Keymap/Vim/Ex/Commands/Quit.hs | gpl-2.0 | action True False True = saveAndQuitAllE | 42 | action True False True = saveAndQuitAllE | 42 | action True False True = saveAndQuitAllE | 42 | false | false | 0 | 5 | 7 | 13 | 6 | 7 | null | null |
kajigor/uKanren_transformations | test/resources/Program/LLangType.hs | bsd-3-clause | integer :: Term a
integer = C "integer" [] | 42 | integer :: Term a
integer = C "integer" [] | 42 | integer = C "integer" [] | 24 | false | true | 0 | 6 | 8 | 27 | 11 | 16 | null | null |
NCrashed/JuicyPixels-blp | src/Codec/Picture/Blp.hs | bsd-3-clause | encodeBlpUncompressedWithoutAlpha :: Int -> DynamicImage -> BSL.ByteString
encodeBlpUncompressedWithoutAlpha numMips = encodeBlp numMips {-. traceTextShowId-} . toBlpStruct BlpCompressionUncompressed 100 numMips | 211 | encodeBlpUncompressedWithoutAlpha :: Int -> DynamicImage -> BSL.ByteString
encodeBlpUncompressedWithoutAlpha numMips = encodeBlp numMips {-. traceTextShowId-} . toBlpStruct BlpCompressionUncompressed 100 numMips | 211 | encodeBlpUncompressedWithoutAlpha numMips = encodeBlp numMips {-. traceTextShowId-} . toBlpStruct BlpCompressionUncompressed 100 numMips | 136 | false | true | 0 | 7 | 18 | 39 | 19 | 20 | null | null |
ekmett/stackage | Stackage/Tarballs.hs | mit | makeTarballs :: InstallInfo -> IO ()
makeTarballs ii = do
tarName <- getTarballName
origEntries <- fmap Tar.read $ L.readFile tarName
(stableEntries, extraEntries) <- loop id id origEntries
(stableTar, extraTar) <- getStackageTarballNames
createDirectoryIfMissing True $ takeDirectory stableTar
... | 1,328 | makeTarballs :: InstallInfo -> IO ()
makeTarballs ii = do
tarName <- getTarballName
origEntries <- fmap Tar.read $ L.readFile tarName
(stableEntries, extraEntries) <- loop id id origEntries
(stableTar, extraTar) <- getStackageTarballNames
createDirectoryIfMissing True $ takeDirectory stableTar
... | 1,328 | makeTarballs ii = do
tarName <- getTarballName
origEntries <- fmap Tar.read $ L.readFile tarName
(stableEntries, extraEntries) <- loop id id origEntries
(stableTar, extraTar) <- getStackageTarballNames
createDirectoryIfMissing True $ takeDirectory stableTar
L.writeFile stableTar $ Tar.write st... | 1,291 | false | true | 0 | 17 | 449 | 407 | 199 | 208 | null | null |
haskell-infra/hackage-server | Main.hs | bsd-3-clause | defaultInitFlags :: InitFlags
defaultInitFlags = InitFlags {
flagInitVerbosity = Flag Verbosity.normal,
flagInitAdmin = NoFlag,
flagInitStateDir = NoFlag,
flagInitStaticDir = NoFlag
} | 206 | defaultInitFlags :: InitFlags
defaultInitFlags = InitFlags {
flagInitVerbosity = Flag Verbosity.normal,
flagInitAdmin = NoFlag,
flagInitStateDir = NoFlag,
flagInitStaticDir = NoFlag
} | 206 | defaultInitFlags = InitFlags {
flagInitVerbosity = Flag Verbosity.normal,
flagInitAdmin = NoFlag,
flagInitStateDir = NoFlag,
flagInitStaticDir = NoFlag
} | 176 | false | true | 0 | 8 | 43 | 42 | 25 | 17 | null | null |
izgzhen/hadrian | src/Hadrian/Utilities.hs | mit | lookupAll :: Ord a => [a] -> [(a, b)] -> [Maybe b]
lookupAll [] _ = [] | 79 | lookupAll :: Ord a => [a] -> [(a, b)] -> [Maybe b]
lookupAll [] _ = [] | 79 | lookupAll [] _ = [] | 28 | false | true | 0 | 9 | 25 | 53 | 28 | 25 | null | null |
Jim-Holmstroem/Maskin | src/Zipper.hs | gpl-3.0 | toList :: Zipper a -> [a]
toList (Zipper ls rs) = reverse ls ++ rs | 66 | toList :: Zipper a -> [a]
toList (Zipper ls rs) = reverse ls ++ rs | 66 | toList (Zipper ls rs) = reverse ls ++ rs | 40 | false | true | 0 | 7 | 14 | 39 | 19 | 20 | null | null |
quchen/shaking-up-ghc | src/GHC.hs | bsd-3-clause | filepath = library "filepath" | 37 | filepath = library "filepath" | 37 | filepath = library "filepath" | 37 | false | false | 1 | 5 | 11 | 13 | 4 | 9 | null | null |
sseefried/shady-graphics | src/Shady/Image.hs | agpl-3.0 | scale2X = andInverse (onRI2 (*)) (onRI recip) | 49 | scale2X = andInverse (onRI2 (*)) (onRI recip) | 49 | scale2X = andInverse (onRI2 (*)) (onRI recip) | 49 | false | false | 1 | 7 | 10 | 29 | 13 | 16 | null | null |
centromere/cacophony | tests/vectors/VectorFile.hs | unlicense | decodeSB :: Text
-> ScrubbedBytes
decodeSB = convert . fst . B16.decode . encodeUtf8 | 93 | decodeSB :: Text
-> ScrubbedBytes
decodeSB = convert . fst . B16.decode . encodeUtf8 | 93 | decodeSB = convert . fst . B16.decode . encodeUtf8 | 50 | false | true | 2 | 7 | 22 | 38 | 16 | 22 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromThenTo_3.hs | mit | primCharToInt :: Char -> MyInt;
primCharToInt (Char x) = x | 60 | primCharToInt :: Char -> MyInt
primCharToInt (Char x) = x | 59 | primCharToInt (Char x) = x | 26 | false | true | 0 | 7 | 11 | 25 | 13 | 12 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_PROPS_DEFVAL :: Int
wxSTC_PROPS_DEFVAL = 4 | 48 | wxSTC_PROPS_DEFVAL :: Int
wxSTC_PROPS_DEFVAL = 4 | 48 | wxSTC_PROPS_DEFVAL = 4 | 22 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
abakst/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Generic.hs | bsd-3-clause | or = Stream.or . stream | 23 | or = Stream.or . stream | 23 | or = Stream.or . stream | 23 | false | false | 2 | 5 | 4 | 17 | 6 | 11 | null | null |
elliottt/huff | src/Huff/QQ.hs | bsd-3-clause | huff :: QuasiQuoter
huff = QuasiQuoter { quoteExp = notSupported "expressions"
, quotePat = notSupported "patterns"
, quoteType = notSupported "types"
, quoteDec = huffDecs
}
where
notSupported n _ = fail ("huff: Quasi-quotation is ... | 345 | huff :: QuasiQuoter
huff = QuasiQuoter { quoteExp = notSupported "expressions"
, quotePat = notSupported "patterns"
, quoteType = notSupported "types"
, quoteDec = huffDecs
}
where
notSupported n _ = fail ("huff: Quasi-quotation is ... | 345 | huff = QuasiQuoter { quoteExp = notSupported "expressions"
, quotePat = notSupported "patterns"
, quoteType = notSupported "types"
, quoteDec = huffDecs
}
where
notSupported n _ = fail ("huff: Quasi-quotation is not supported for " ... | 325 | false | true | 0 | 7 | 128 | 81 | 39 | 42 | null | null |
unisonweb/platform | codebase2/codebase-sqlite/U/Codebase/Sqlite/Operations.hs | mit | -- | shared implementation of lookupTextHelper and lookupDefnHelper
-- Look up a value in the LUT, or append it.
lookup_ ::
(MonadState s m, MonadWriter w m, Ord t) =>
Lens' s (Map t t') ->
Lens' w (Seq t) ->
(Word64 -> t') ->
t ->
m t'
lookup_ stateLens writerLens mk t = do
map <- Lens.use stateLens
c... | 551 | lookup_ ::
(MonadState s m, MonadWriter w m, Ord t) =>
Lens' s (Map t t') ->
Lens' w (Seq t) ->
(Word64 -> t') ->
t ->
m t'
lookup_ stateLens writerLens mk t = do
map <- Lens.use stateLens
case Map.lookup t map of
Nothing -> do
let id = mk . fromIntegral $ Map.size map
stateLens Lens.%= ... | 437 | lookup_ stateLens writerLens mk t = do
map <- Lens.use stateLens
case Map.lookup t map of
Nothing -> do
let id = mk . fromIntegral $ Map.size map
stateLens Lens.%= Map.insert t id
Writer.tell $ Lens.set writerLens (Seq.singleton t) mempty
pure id
Just t' -> pure t' | 301 | true | true | 0 | 18 | 144 | 216 | 100 | 116 | null | null |
jberthold/rts-serialisation | testExceptions.hs | bsd-3-clause | main :: IO ()
main=do hSetBuffering stdout NoBuffering
args <- getArgs
putStrLn "Test program for packing/serialization:"
putStrLn "testing exceptions during packing. Use -qQ1k or so..."
let n = if (length args < 2) then 1 else read (args!!1)
size = if null args then 128... | 2,848 | main :: IO ()
main=do hSetBuffering stdout NoBuffering
args <- getArgs
putStrLn "Test program for packing/serialization:"
putStrLn "testing exceptions during packing. Use -qQ1k or so..."
let n = if (length args < 2) then 1 else read (args!!1)
size = if null args then 128... | 2,848 | main=do hSetBuffering stdout NoBuffering
args <- getArgs
putStrLn "Test program for packing/serialization:"
putStrLn "testing exceptions during packing. Use -qQ1k or so..."
let n = if (length args < 2) then 1 else read (args!!1)
size = if null args then 128 else read (he... | 2,834 | false | true | 0 | 16 | 1,001 | 799 | 362 | 437 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | leftDataConKey, rightDataConKey :: Unique
leftDataConKey = mkPreludeDataConUnique 25 | 109 | leftDataConKey, rightDataConKey :: Unique
leftDataConKey = mkPreludeDataConUnique 25 | 109 | leftDataConKey = mkPreludeDataConUnique 25 | 67 | false | true | 0 | 5 | 32 | 16 | 9 | 7 | null | null |
shlevy/ghc | compiler/coreSyn/CoreTidy.hs | bsd-3-clause | ------------ Expressions --------------
tidyExpr :: TidyEnv -> CoreExpr -> CoreExpr
tidyExpr env (Var v) = Var (tidyVarOcc env v) | 137 | tidyExpr :: TidyEnv -> CoreExpr -> CoreExpr
tidyExpr env (Var v) = Var (tidyVarOcc env v) | 95 | tidyExpr env (Var v) = Var (tidyVarOcc env v) | 51 | true | true | 0 | 7 | 26 | 42 | 21 | 21 | null | null |
Hodapp87/ivory | ivory-backend-c/src/Ivory/Compile/C/Gen.hs | bsd-3-clause | toParam :: C.Type -> C.Param
toParam ty = case ty of
C.Type spec decl loc -> C.Param Nothing spec decl loc
_ -> error "toParam: unexpected anti-quote"
--------------------------------------------------------------------------------
-- Types
-- | Type conversion outside of an casting context. Th... | 377 | toParam :: C.Type -> C.Param
toParam ty = case ty of
C.Type spec decl loc -> C.Param Nothing spec decl loc
_ -> error "toParam: unexpected anti-quote"
--------------------------------------------------------------------------------
-- Types
-- | Type conversion outside of an casting context. Th... | 377 | toParam ty = case ty of
C.Type spec decl loc -> C.Param Nothing spec decl loc
_ -> error "toParam: unexpected anti-quote"
--------------------------------------------------------------------------------
-- Types
-- | Type conversion outside of an casting context. This converts arrays to
-- arra... | 348 | false | true | 0 | 9 | 73 | 65 | 33 | 32 | null | null |
leshchevds/ganeti | src/Ganeti/Errors.hs | bsd-2-clause | formatError err =
"Unhandled exception: " ++ show err | 55 | formatError err =
"Unhandled exception: " ++ show err | 55 | formatError err =
"Unhandled exception: " ++ show err | 55 | false | false | 0 | 6 | 10 | 16 | 7 | 9 | null | null |
holdenlee/fluidity | Modifiers.hs | mit | modifier :: String -> Lens' ModifierMap Double
modifier modName = lens (fromMaybe 0 . M.lookup modName) (flip (M.insert modName)) | 130 | modifier :: String -> Lens' ModifierMap Double
modifier modName = lens (fromMaybe 0 . M.lookup modName) (flip (M.insert modName)) | 129 | modifier modName = lens (fromMaybe 0 . M.lookup modName) (flip (M.insert modName)) | 82 | false | true | 0 | 10 | 19 | 61 | 28 | 33 | null | null |
ModernSteward/blog | Handler/Crash.hs | bsd-2-clause | crashForm :: Form Crash
crashForm = renderBootstrap $ Crash
<$> areq textField (FieldSettings "Error" Nothing Nothing (Just "error") []) Nothing
<*> areq textField (FieldSettings "StackTrace" Nothing Nothing (Just "stacktrace") []) Nothing
<*> aformM (liftIO getCurrentTime) | 286 | crashForm :: Form Crash
crashForm = renderBootstrap $ Crash
<$> areq textField (FieldSettings "Error" Nothing Nothing (Just "error") []) Nothing
<*> areq textField (FieldSettings "StackTrace" Nothing Nothing (Just "stacktrace") []) Nothing
<*> aformM (liftIO getCurrentTime) | 286 | crashForm = renderBootstrap $ Crash
<$> areq textField (FieldSettings "Error" Nothing Nothing (Just "error") []) Nothing
<*> areq textField (FieldSettings "StackTrace" Nothing Nothing (Just "stacktrace") []) Nothing
<*> aformM (liftIO getCurrentTime) | 262 | false | true | 8 | 9 | 46 | 104 | 51 | 53 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.