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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ahushh/Monaba | monaba/captcha/Yoba/Main.hs | mit | makeCaptcha :: String -> -- ^ Path to captcha
IO (Text, Text) -- ^ captcha value and hint
makeCaptcha path = withMagickWandGenesis $ localGenesis $ do
(_, w) <- magickWand
(_,dw) <- drawingWand
pw <- pixelWand
let len = 5
space = 12.0 :: Double -- space between characters in ... | 1,358 | makeCaptcha :: String -> -- ^ Path to captcha
IO (Text, Text)
makeCaptcha path = withMagickWandGenesis $ localGenesis $ do
(_, w) <- magickWand
(_,dw) <- drawingWand
pw <- pixelWand
let len = 5
space = 12.0 :: Double -- space between characters in px
height = 30 ... | 1,328 | makeCaptcha path = withMagickWandGenesis $ localGenesis $ do
(_, w) <- magickWand
(_,dw) <- drawingWand
pw <- pixelWand
let len = 5
space = 12.0 :: Double -- space between characters in px
height = 30 -- image height
fSize = 25 -- font size
newImage w (t... | 1,249 | true | true | 0 | 20 | 339 | 487 | 244 | 243 | null | null |
osa1/toylisp | src/Parser.hs | bsd-3-clause | parseFexprDefine :: Parser (Expr Define)
parseFexprDefine = do
spString "$("
spString "deff"
name <- parseSymbol
params <- parseArgList
body <- many1 parseAnyExpr
spChar ')'
return $ Define name (AnyExpr $ Fexpr params body) | 238 | parseFexprDefine :: Parser (Expr Define)
parseFexprDefine = do
spString "$("
spString "deff"
name <- parseSymbol
params <- parseArgList
body <- many1 parseAnyExpr
spChar ')'
return $ Define name (AnyExpr $ Fexpr params body) | 238 | parseFexprDefine = do
spString "$("
spString "deff"
name <- parseSymbol
params <- parseArgList
body <- many1 parseAnyExpr
spChar ')'
return $ Define name (AnyExpr $ Fexpr params body) | 197 | false | true | 0 | 11 | 46 | 86 | 37 | 49 | null | null |
fredmorcos/attic | projects/hs-prolog-parser/ArgsHandler.hs | isc | parseArgs :: [String] -> Either String PLState
parseArgs [] = Left "No query arguments given" | 93 | parseArgs :: [String] -> Either String PLState
parseArgs [] = Left "No query arguments given" | 93 | parseArgs [] = Left "No query arguments given" | 46 | false | true | 0 | 6 | 14 | 31 | 15 | 16 | null | null |
meditans/shaped | src/Shaped.hs | bsd-3-clause | splitShaped :: forall a s c c1 f g .
( Functor f, Shaped a s, Code a ~ c, c ~ '[c1], SListI c1
, Generic (s g)
, Code (s g) ~ Map2 g c
, Code (s (f :.: g)) ~ Map2 (f :.: g) c
, Generic (s (f :.: g))
)
=> f (s g) -> s (f :.: g)
splitShaped ev = to . toSOPI . nPtoSingleSOP $ hliftA2 funz duplicato prs
whe... | 960 | splitShaped :: forall a s c c1 f g .
( Functor f, Shaped a s, Code a ~ c, c ~ '[c1], SListI c1
, Generic (s g)
, Code (s g) ~ Map2 g c
, Code (s (f :.: g)) ~ Map2 (f :.: g) c
, Generic (s (f :.: g))
)
=> f (s g) -> s (f :.: g)
splitShaped ev = to . toSOPI . nPtoSingleSOP $ hliftA2 funz duplicato prs
whe... | 960 | splitShaped ev = to . toSOPI . nPtoSingleSOP $ hliftA2 funz duplicato prs
where
prs :: NP (Projection g c1) c1
prs = projections
duplicato :: NP (K (f (s g))) c1
duplicato = hpure (K ev)
funz :: forall a. K (f (s g)) a -> (K (NP g c1) -.-> g) a -> (f :.: g) a
funz (K dup) (Fn p) = Comp . flip ... | 719 | false | true | 5 | 14 | 245 | 418 | 205 | 213 | null | null |
pauldoo/scratch | RealWorldHaskell/ch09/BetterPredicate.hs | isc | pathP :: InfoP FilePath
pathP path _ _ _ = path | 47 | pathP :: InfoP FilePath
pathP path _ _ _ = path | 47 | pathP path _ _ _ = path | 23 | false | true | 0 | 5 | 10 | 23 | 11 | 12 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Atomic/MonadAtomic.hs | bsd-3-clause | broadcastSfxAtomic :: MonadAtomic m
=> (FactionId -> SfxAtomic) -> m ()
broadcastSfxAtomic fcmd = do
factionD <- getsState sfactionD
mapWithKeyM_ (\fid _ -> execSfxAtomic $ fcmd fid) factionD | 214 | broadcastSfxAtomic :: MonadAtomic m
=> (FactionId -> SfxAtomic) -> m ()
broadcastSfxAtomic fcmd = do
factionD <- getsState sfactionD
mapWithKeyM_ (\fid _ -> execSfxAtomic $ fcmd fid) factionD | 214 | broadcastSfxAtomic fcmd = do
factionD <- getsState sfactionD
mapWithKeyM_ (\fid _ -> execSfxAtomic $ fcmd fid) factionD | 123 | false | true | 0 | 12 | 50 | 76 | 35 | 41 | null | null |
dpieroux/euler | 0130.hs | mit | computeA :: Int -> Int
computeA n = computeA' (n*(targetToDigit ! 1) `quot` 10) 1
where
n0 = rem n 10
targetToDigit = gDigitTargetToDigit ! n0
computeA' :: Int -> Int -> Int
computeA' rest acc
= if (rest == 0 && acc /= 0)
then acc
else let d = targetToDigit ! (gRestToT... | 479 | computeA :: Int -> Int
computeA n = computeA' (n*(targetToDigit ! 1) `quot` 10) 1
where
n0 = rem n 10
targetToDigit = gDigitTargetToDigit ! n0
computeA' :: Int -> Int -> Int
computeA' rest acc
= if (rest == 0 && acc /= 0)
then acc
else let d = targetToDigit ! (gRestToT... | 479 | computeA n = computeA' (n*(targetToDigit ! 1) `quot` 10) 1
where
n0 = rem n 10
targetToDigit = gDigitTargetToDigit ! n0
computeA' :: Int -> Int -> Int
computeA' rest acc
= if (rest == 0 && acc /= 0)
then acc
else let d = targetToDigit ! (gRestToTarget ! (rem rest 10))
... | 456 | false | true | 4 | 14 | 147 | 194 | 95 | 99 | null | null |
anucssa/vote3 | backend/votecounters/OptionalPreferential.hs | agpl-3.0 | -- Sort votes into 'piles' by candidate, by highest preference
sortVotesByCandidate :: [Candidate] -> [Vote] -> [[Vote]]
sortVotesByCandidate candidates votes =
let votesFor = (\c v -> highestPreference candidates v == c)
in map (\c -> filter (votesFor c) votes) candidates | 279 | sortVotesByCandidate :: [Candidate] -> [Vote] -> [[Vote]]
sortVotesByCandidate candidates votes =
let votesFor = (\c v -> highestPreference candidates v == c)
in map (\c -> filter (votesFor c) votes) candidates | 216 | sortVotesByCandidate candidates votes =
let votesFor = (\c v -> highestPreference candidates v == c)
in map (\c -> filter (votesFor c) votes) candidates | 158 | true | true | 0 | 12 | 46 | 91 | 48 | 43 | null | null |
uduki/hsQt | Qtc/Gui/Base.hs | bsd-2-clause | qPainterPath__Element_y :: Element a -> IO Double
qPainterPath__Element_y x0
= withDoubleResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_Element_y cobj_x0 | 160 | qPainterPath__Element_y :: Element a -> IO Double
qPainterPath__Element_y x0
= withDoubleResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_Element_y cobj_x0 | 160 | qPainterPath__Element_y x0
= withDoubleResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_Element_y cobj_x0 | 110 | false | true | 0 | 7 | 28 | 43 | 20 | 23 | null | null |
siddhanathan/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | getRegisterReg platform _ (CmmGlobal mid)
= case globalRegMaybe platform mid of
Just reg -> RegReal $ reg
Nothing -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid)
-- By this stage, the only MagicIds remaining should be the
-- ones which map to a real machine register on this
... | 402 | getRegisterReg platform _ (CmmGlobal mid)
= case globalRegMaybe platform mid of
Just reg -> RegReal $ reg
Nothing -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid)
-- By this stage, the only MagicIds remaining should be the
-- ones which map to a real machine register on this
... | 402 | getRegisterReg platform _ (CmmGlobal mid)
= case globalRegMaybe platform mid of
Just reg -> RegReal $ reg
Nothing -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid)
-- By this stage, the only MagicIds remaining should be the
-- ones which map to a real machine register on this
... | 402 | false | false | 4 | 10 | 105 | 64 | 32 | 32 | null | null |
relrod/cx | src/Game/Chess/Piece.hs | bsd-2-clause | pointValue Pawn = 1 | 21 | pointValue Pawn = 1 | 21 | pointValue Pawn = 1 | 21 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
leshchevds/ganeti | src/Ganeti/Errors.hs | bsd-2-clause | -- | Returns the exit code of a program that should be used if we got
-- back an exception from masterd.
errorExitCode :: GanetiException -> ExitCode
errorExitCode (ConfigurationError {}) = ExitFailure 2 | 203 | errorExitCode :: GanetiException -> ExitCode
errorExitCode (ConfigurationError {}) = ExitFailure 2 | 98 | errorExitCode (ConfigurationError {}) = ExitFailure 2 | 53 | true | true | 0 | 7 | 32 | 30 | 16 | 14 | null | null |
f1u77y/xmonad-contrib | XMonad/Layout/ImageButtonDecoration.hs | bsd-3-clause | miniButton :: [[Bool]]
miniButton = convertToBool miniButton' | 61 | miniButton :: [[Bool]]
miniButton = convertToBool miniButton' | 61 | miniButton = convertToBool miniButton' | 38 | false | true | 0 | 8 | 6 | 26 | 12 | 14 | null | null |
legoscia/hsxmpp | Stanzas.hs | bsd-3-clause | -- |Return true if the tag has the given name.
hasNodeName :: String -> StanzaPredicate
hasNodeName name (XML name' _ _) = name == name' | 136 | hasNodeName :: String -> StanzaPredicate
hasNodeName name (XML name' _ _) = name == name' | 89 | hasNodeName name (XML name' _ _) = name == name' | 48 | true | true | 0 | 7 | 24 | 35 | 18 | 17 | null | null |
brinchj/btree-concurrent | Data/BTree/KVBackend/Files.hs | lgpl-3.0 | filePath :: Serialize k => k -> FilesKV FilePath
filePath path =
do dir <- ask
return $ dir </> (B.unpack $ B.map fix $ B64.encode $ encode path)
where
fix '/' = '-'
fix c = c | 194 | filePath :: Serialize k => k -> FilesKV FilePath
filePath path =
do dir <- ask
return $ dir </> (B.unpack $ B.map fix $ B64.encode $ encode path)
where
fix '/' = '-'
fix c = c | 194 | filePath path =
do dir <- ask
return $ dir </> (B.unpack $ B.map fix $ B64.encode $ encode path)
where
fix '/' = '-'
fix c = c | 145 | false | true | 0 | 13 | 56 | 92 | 43 | 49 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Server/HandleAtomicM.hs | bsd-3-clause | addPerActorAny :: MonadServer m => ActorId -> Actor -> m ()
addPerActorAny aid b = do
let fid = bfid b
lid = blid b
f PerceptionCache{perActor} = PerceptionCache
{ ptotal = FovInvalid
, perActor = EM.insert aid FovInvalid perActor }
modifyServer $ \ser ->
ser { sperCacheFid = EM.adju... | 470 | addPerActorAny :: MonadServer m => ActorId -> Actor -> m ()
addPerActorAny aid b = do
let fid = bfid b
lid = blid b
f PerceptionCache{perActor} = PerceptionCache
{ ptotal = FovInvalid
, perActor = EM.insert aid FovInvalid perActor }
modifyServer $ \ser ->
ser { sperCacheFid = EM.adju... | 470 | addPerActorAny aid b = do
let fid = bfid b
lid = blid b
f PerceptionCache{perActor} = PerceptionCache
{ ptotal = FovInvalid
, perActor = EM.insert aid FovInvalid perActor }
modifyServer $ \ser ->
ser { sperCacheFid = EM.adjust (EM.adjust f lid) fid $ sperCacheFid ser
, sperVa... | 410 | false | true | 0 | 16 | 137 | 172 | 84 | 88 | null | null |
CulpaBS/wbBach | src/Futhark/Representation/Primitive.hs | bsd-3-clause | doBinOp LShr{} = doIntBinOp doLShr | 34 | doBinOp LShr{} = doIntBinOp doLShr | 34 | doBinOp LShr{} = doIntBinOp doLShr | 34 | false | false | 1 | 5 | 4 | 18 | 7 | 11 | null | null |
diku-kmc/repg | src/KMC/Program/Backends/C.hs | mit | ctyp UInt32T = text "uint32_t" | 30 | ctyp UInt32T = text "uint32_t" | 30 | ctyp UInt32T = text "uint32_t" | 30 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
fmthoma/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isAnyTy = is_tc anyTyConKey | 34 | isAnyTy = is_tc anyTyConKey | 34 | isAnyTy = is_tc anyTyConKey | 34 | false | false | 1 | 5 | 10 | 13 | 4 | 9 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFDatatypeXsdIntegerTest.hs | lgpl-2.1 | testRuleFwdNeg02 = testRuleFwd "testRuleFwdNeg02" ruleneg neg02inp neg02fwd | 75 | testRuleFwdNeg02 = testRuleFwd "testRuleFwdNeg02" ruleneg neg02inp neg02fwd | 75 | testRuleFwdNeg02 = testRuleFwd "testRuleFwdNeg02" ruleneg neg02inp neg02fwd | 75 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
yannxia-self/code-war-hasekell-training | integers_recreation_one.hs | gpl-3.0 | listSquared :: Int -> Int -> [(Int, Int)]
listSquared m n
| m > n = []
| squared_divisors_is_square $ squared_divisors m = [(m, squared_divisors m)] ++ (listSquared (m+1) n)
| otherwise = [] ++ (listSquared (m+1) n) | 221 | listSquared :: Int -> Int -> [(Int, Int)]
listSquared m n
| m > n = []
| squared_divisors_is_square $ squared_divisors m = [(m, squared_divisors m)] ++ (listSquared (m+1) n)
| otherwise = [] ++ (listSquared (m+1) n) | 221 | listSquared m n
| m > n = []
| squared_divisors_is_square $ squared_divisors m = [(m, squared_divisors m)] ++ (listSquared (m+1) n)
| otherwise = [] ++ (listSquared (m+1) n) | 179 | false | true | 1 | 10 | 43 | 123 | 63 | 60 | null | null |
dancor/melang | src/ProcZhEnJson.hs | mit | tcAppend (TCNone t) tc = tc {tcText = DT.concat [t, tcText tc]} | 63 | tcAppend (TCNone t) tc = tc {tcText = DT.concat [t, tcText tc]} | 63 | tcAppend (TCNone t) tc = tc {tcText = DT.concat [t, tcText tc]} | 63 | false | false | 1 | 10 | 11 | 42 | 20 | 22 | null | null |
nikai3d/ce-challenges | easy/without_repetitions.hs | bsd-3-clause | wr xs (y:ys) | y == head ys = wr xs ys
| otherwise = wr (xs ++ [y]) ys | 86 | wr xs (y:ys) | y == head ys = wr xs ys
| otherwise = wr (xs ++ [y]) ys | 86 | wr xs (y:ys) | y == head ys = wr xs ys
| otherwise = wr (xs ++ [y]) ys | 86 | false | false | 0 | 9 | 35 | 64 | 29 | 35 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcGenGenerics.hs | bsd-3-clause | foldBal' _ _ [y] = y | 21 | foldBal' _ _ [y] = y | 21 | foldBal' _ _ [y] = y | 21 | false | false | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110717set8TEV.hs | gpl-3.0 | -- , (400,1.3) ] ]
-- | (m,g) <- [(600,1.45), (600,1.5), (800,2.0), (800,1.9), (800,2.1) ] ]
sets :: [Int]
sets = [1..50] | 137 | sets :: [Int]
sets = [1..50] | 29 | sets = [1..50] | 15 | true | true | 0 | 7 | 37 | 28 | 14 | 14 | null | null |
vikraman/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (HsCase expr matches)
= sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of {")],
nest 2 (pprMatches (CaseAlt :: HsMatchContext id) matches <+> char '}') ] | 183 | ppr_expr (HsCase expr matches)
= sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of {")],
nest 2 (pprMatches (CaseAlt :: HsMatchContext id) matches <+> char '}') ] | 183 | ppr_expr (HsCase expr matches)
= sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of {")],
nest 2 (pprMatches (CaseAlt :: HsMatchContext id) matches <+> char '}') ] | 183 | false | false | 0 | 12 | 41 | 90 | 44 | 46 | null | null |
phylake/avm3 | vm/store.hs | mit | xform_opCode {- 0x94 -} i u d s m t (Abc.DecLocal u30) = [DecLocal u30] | 71 | xform_opCode {- 0x94 -} i u d s m t (Abc.DecLocal u30) = [DecLocal u30] | 71 | xform_opCode {- 0x94 -} i u d s m t (Abc.DecLocal u30) = [DecLocal u30] | 71 | false | false | 0 | 8 | 14 | 36 | 18 | 18 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_COLOR_TABLE_GREEN_SIZE_SGI :: GLenum
gl_COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB | 78 | gl_COLOR_TABLE_GREEN_SIZE_SGI :: GLenum
gl_COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB | 78 | gl_COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB | 38 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
olsner/ghc | compiler/utils/Outputable.hs | bsd-3-clause | fcat :: [SDoc] -> SDoc
-- ^ This behaves like 'fsep', but it uses '<>' for horizontal conposition rather than '<+>'
hcat ds = SDoc $ \sty -> Pretty.hcat [runSDoc d sty | d <- ds] | 180 | fcat :: [SDoc] -> SDoc
hcat ds = SDoc $ \sty -> Pretty.hcat [runSDoc d sty | d <- ds] | 85 | hcat ds = SDoc $ \sty -> Pretty.hcat [runSDoc d sty | d <- ds] | 62 | true | true | 0 | 10 | 37 | 55 | 28 | 27 | null | null |
genos/online_problems | exercism/haskell/acronym/src/Acronym.hs | mit | abbreviate :: String -> String
abbreviate = concatMap handle . words . punct
where
handle, punct :: String -> String
handle s | all isUpper s = [head s]
| otherwise = filter isUpper (toUpper (head s) : tail s)
punct = fmap (\c -> if isPunctuation c then ' ' else c) | 287 | abbreviate :: String -> String
abbreviate = concatMap handle . words . punct
where
handle, punct :: String -> String
handle s | all isUpper s = [head s]
| otherwise = filter isUpper (toUpper (head s) : tail s)
punct = fmap (\c -> if isPunctuation c then ' ' else c) | 287 | abbreviate = concatMap handle . words . punct
where
handle, punct :: String -> String
handle s | all isUpper s = [head s]
| otherwise = filter isUpper (toUpper (head s) : tail s)
punct = fmap (\c -> if isPunctuation c then ' ' else c) | 256 | false | true | 0 | 11 | 74 | 125 | 62 | 63 | null | null |
ddssff/pandoc | src/Text/Pandoc/Readers/Org.hs | gpl-2.0 | listItem :: OrgParser Int
-> OrgParser (F Blocks)
listItem start = try $ do
markerLength <- try start
firstLine <- anyLineNewline
blank <- option "" ("\n" <$ blankline)
rest <- concat <$> many (listContinuation markerLength)
parseFromString parseBlocks $ firstLine ++ blank ++ rest
-- continuation of... | 433 | listItem :: OrgParser Int
-> OrgParser (F Blocks)
listItem start = try $ do
markerLength <- try start
firstLine <- anyLineNewline
blank <- option "" ("\n" <$ blankline)
rest <- concat <$> many (listContinuation markerLength)
parseFromString parseBlocks $ firstLine ++ blank ++ rest
-- continuation of... | 433 | listItem start = try $ do
markerLength <- try start
firstLine <- anyLineNewline
blank <- option "" ("\n" <$ blankline)
rest <- concat <$> many (listContinuation markerLength)
parseFromString parseBlocks $ firstLine ++ blank ++ rest
-- continuation of a list item - indented and separated by blankline or endli... | 374 | false | true | 0 | 12 | 84 | 110 | 51 | 59 | null | null |
noteed/openerpdist | OpenERP/Dist/Descriptor.hs | bsd-3-clause | hardcodedRequires "web" = ["mock"] | 34 | hardcodedRequires "web" = ["mock"] | 34 | hardcodedRequires "web" = ["mock"] | 34 | false | false | 0 | 5 | 3 | 12 | 6 | 6 | null | null |
wskplho/idris-bash | src/IRTS/CodegenBash.hs | mit | showQuotedParamVar :: LVar -> EmitterM String
showQuotedParamVar v = do
v' <- showParamVar v
return $ "\"" ++ v' ++ "\"" | 128 | showQuotedParamVar :: LVar -> EmitterM String
showQuotedParamVar v = do
v' <- showParamVar v
return $ "\"" ++ v' ++ "\"" | 128 | showQuotedParamVar v = do
v' <- showParamVar v
return $ "\"" ++ v' ++ "\"" | 82 | false | true | 0 | 9 | 28 | 46 | 21 | 25 | null | null |
bitemyapp/serials | server/Serials/Link/Menu.hs | mit | tagsToOption _ = Nothing | 24 | tagsToOption _ = Nothing | 24 | tagsToOption _ = Nothing | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
gbataille/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | breve 'u' = "ŭ" | 15 | breve 'u' = "ŭ" | 15 | breve 'u' = "ŭ" | 15 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
przembot/osm-conduit | src/Data/Conduit/OSM.hs | bsd-3-clause | conduitWays :: MonadThrow m => Conduit Event m Way
conduitWays = loopConduit $ tagIgnoreAttrs "osm" $ manyYield' parseWay | 121 | conduitWays :: MonadThrow m => Conduit Event m Way
conduitWays = loopConduit $ tagIgnoreAttrs "osm" $ manyYield' parseWay | 121 | conduitWays = loopConduit $ tagIgnoreAttrs "osm" $ manyYield' parseWay | 70 | false | true | 0 | 7 | 17 | 39 | 18 | 21 | null | null |
wuerges/vlsi_verification | src/VerParser.hs | bsd-3-clause | topModule :: GenParser Char st Verilog
topModule = do (name, ports) <- moduleExpr
es <- many verilogExpr
endModuleExpr
eof
return $ makeVerilog es | 207 | topModule :: GenParser Char st Verilog
topModule = do (name, ports) <- moduleExpr
es <- many verilogExpr
endModuleExpr
eof
return $ makeVerilog es | 207 | topModule = do (name, ports) <- moduleExpr
es <- many verilogExpr
endModuleExpr
eof
return $ makeVerilog es | 168 | false | true | 1 | 9 | 83 | 62 | 26 | 36 | null | null |
jvilar/hrows | lib/Model/Expression.hs | gpl-2.0 | mkPBinary :: PBinaryOpInfo -> Expression -> Expression -> Expression
mkPBinary i e e' = In $ PrefixBinary i e e' | 112 | mkPBinary :: PBinaryOpInfo -> Expression -> Expression -> Expression
mkPBinary i e e' = In $ PrefixBinary i e e' | 112 | mkPBinary i e e' = In $ PrefixBinary i e e' | 43 | false | true | 2 | 9 | 19 | 47 | 21 | 26 | null | null |
sarahn/ganeti | src/Ganeti/OpParams.hs | gpl-2.0 | tagObjectFrom TagTypeCluster JSNull = return TagCluster | 62 | tagObjectFrom TagTypeCluster JSNull = return TagCluster | 62 | tagObjectFrom TagTypeCluster JSNull = return TagCluster | 62 | false | false | 0 | 5 | 12 | 14 | 6 | 8 | null | null |
ksaveljev/hake-2 | src/Server/SVSend.hs | bsd-3-clause | demoCompleted :: Quake ()
demoCompleted = do
demofile <- use $ svGlobals.svServer.sDemoFile
when (isJust demofile) $ do
let Just h = demofile
ok <- io $ handle (\(_ :: IOException) -> return False) (hClose h >> return True)
unless ok $
Com.printf "IOError closing demo file" -- IMPROV... | 589 | demoCompleted :: Quake ()
demoCompleted = do
demofile <- use $ svGlobals.svServer.sDemoFile
when (isJust demofile) $ do
let Just h = demofile
ok <- io $ handle (\(_ :: IOException) -> return False) (hClose h >> return True)
unless ok $
Com.printf "IOError closing demo file" -- IMPROV... | 589 | demoCompleted = do
demofile <- use $ svGlobals.svServer.sDemoFile
when (isJust demofile) $ do
let Just h = demofile
ok <- io $ handle (\(_ :: IOException) -> return False) (hClose h >> return True)
unless ok $
Com.printf "IOError closing demo file" -- IMPROVE: show exception as well
... | 563 | false | true | 0 | 16 | 128 | 146 | 66 | 80 | null | null |
ksaveljev/hake-2 | src/Constants.hs | bsd-3-clause | mz2SoldierShotgun3 = 84 :: Int | 34 | mz2SoldierShotgun3 = 84 :: Int | 34 | mz2SoldierShotgun3 = 84 :: Int | 34 | false | false | 0 | 4 | 8 | 9 | 5 | 4 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/EC2TransitGatewayRouteTable.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayroutetable.html#cfn-ec2-transitgatewayroutetable-transitgatewayid
ectgrtTransitGatewayId :: Lens' EC2TransitGatewayRouteTable (Val Text)
ectgrtTransitGatewayId = lens _eC2TransitGatewayRouteTableTransitGatewayId (\s a -> s... | 374 | ectgrtTransitGatewayId :: Lens' EC2TransitGatewayRouteTable (Val Text)
ectgrtTransitGatewayId = lens _eC2TransitGatewayRouteTableTransitGatewayId (\s a -> s { _eC2TransitGatewayRouteTableTransitGatewayId = a }) | 210 | ectgrtTransitGatewayId = lens _eC2TransitGatewayRouteTableTransitGatewayId (\s a -> s { _eC2TransitGatewayRouteTableTransitGatewayId = a }) | 139 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
Arguggi/documentator | src/Documentator/Descriptors.hs | gpl-3.0 | propagateContext :: (Maybe [TyVarBind l]) -> (Maybe (Context l)) -> Type () -> Type ()
propagateContext _ _ t@(TyForall _ _ _ _) = t | 132 | propagateContext :: (Maybe [TyVarBind l]) -> (Maybe (Context l)) -> Type () -> Type ()
propagateContext _ _ t@(TyForall _ _ _ _) = t | 132 | propagateContext _ _ t@(TyForall _ _ _ _) = t | 45 | false | true | 0 | 10 | 24 | 79 | 39 | 40 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT45.hs | gpl-3.0 | not True = False | 16 | not True = False | 16 | not True = False | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
alexbiehl/postie | src/Network/Mail/Postie/Address.hs | bsd-3-clause | wsp1 :: Parser ()
wsp1 = skipWhile1 isWsp | 41 | wsp1 :: Parser ()
wsp1 = skipWhile1 isWsp | 41 | wsp1 = skipWhile1 isWsp | 23 | false | true | 1 | 6 | 7 | 22 | 9 | 13 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Insert.hs | mpl-2.0 | -- | Multipart request metadata.
friPayload :: Lens' ForwardingRulesInsert ForwardingRule
friPayload
= lens _friPayload (\ s a -> s{_friPayload = a}) | 151 | friPayload :: Lens' ForwardingRulesInsert ForwardingRule
friPayload
= lens _friPayload (\ s a -> s{_friPayload = a}) | 118 | friPayload
= lens _friPayload (\ s a -> s{_friPayload = a}) | 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
acowley/ghc | compiler/utils/Bag.hs | bsd-3-clause | -- This one is a bit stricter! The bag will get completely evaluated.
unionBags :: Bag a -> Bag a -> Bag a
unionBags EmptyBag b = b | 132 | unionBags :: Bag a -> Bag a -> Bag a
unionBags EmptyBag b = b | 61 | unionBags EmptyBag b = b | 24 | true | true | 0 | 7 | 28 | 34 | 16 | 18 | null | null |
meiersi/scyther-proof | src/Text/Dot.hs | gpl-3.0 | -- | 'attribute' gives a attribute to the current scope.
attribute :: (String,String) -> Dot ()
attribute (name,val) = Dot (\ uq -> ( [ GraphAttribute name val ],uq,())) | 170 | attribute :: (String,String) -> Dot ()
attribute (name,val) = Dot (\ uq -> ( [ GraphAttribute name val ],uq,())) | 113 | attribute (name,val) = Dot (\ uq -> ( [ GraphAttribute name val ],uq,())) | 74 | true | true | 0 | 10 | 29 | 66 | 37 | 29 | null | null |
jasonzoladz/persistent | persistent-sqlite/Database/Persist/Sqlite.hs | mit | execute' :: Sqlite.Connection -> Sqlite.Statement -> [PersistValue] -> IO Int64
execute' conn stmt vals = flip finally (liftIO $ Sqlite.reset conn stmt) $ do
Sqlite.bind stmt vals
_ <- Sqlite.step stmt
Sqlite.changes conn | 233 | execute' :: Sqlite.Connection -> Sqlite.Statement -> [PersistValue] -> IO Int64
execute' conn stmt vals = flip finally (liftIO $ Sqlite.reset conn stmt) $ do
Sqlite.bind stmt vals
_ <- Sqlite.step stmt
Sqlite.changes conn | 233 | execute' conn stmt vals = flip finally (liftIO $ Sqlite.reset conn stmt) $ do
Sqlite.bind stmt vals
_ <- Sqlite.step stmt
Sqlite.changes conn | 153 | false | true | 0 | 10 | 44 | 93 | 43 | 50 | null | null |
pseudonom/persistent | persistent/Database/Persist/Class/PersistUnique.hs | mit | checkUniqueKeys :: (MonadIO m, PersistEntity record, PersistUniqueRead backend, PersistRecordBackend record backend)
=> [Unique record] -> ReaderT backend m (Maybe (Unique record))
checkUniqueKeys [] = return Nothing | 232 | checkUniqueKeys :: (MonadIO m, PersistEntity record, PersistUniqueRead backend, PersistRecordBackend record backend)
=> [Unique record] -> ReaderT backend m (Maybe (Unique record))
checkUniqueKeys [] = return Nothing | 232 | checkUniqueKeys [] = return Nothing | 35 | false | true | 0 | 11 | 41 | 77 | 38 | 39 | null | null |
tomv564/hfsnotify | test/EventUtils.hs | bsd-3-clause | testDirPath :: FilePath
testDirPath = (unsafePerformIO getCurrentDirectory) </> "testdir" | 89 | testDirPath :: FilePath
testDirPath = (unsafePerformIO getCurrentDirectory) </> "testdir" | 89 | testDirPath = (unsafePerformIO getCurrentDirectory) </> "testdir" | 65 | false | true | 0 | 7 | 8 | 21 | 11 | 10 | null | null |
atemerev/icfpc2013 | src/solver-lib/Solve.hs | apache-2.0 | solveExact :: Int -> [String] -> [Word64] -> [Word64] -> IO ()
solveExact size operations inputs outputs = do
result <- basicSolve size operations inputs outputs
case result of
Nothing -> putStrLn "Couldn't find any program matching conditions at all!"
Just v -> print v
-- Check if it is feasible to solve ... | 372 | solveExact :: Int -> [String] -> [Word64] -> [Word64] -> IO ()
solveExact size operations inputs outputs = do
result <- basicSolve size operations inputs outputs
case result of
Nothing -> putStrLn "Couldn't find any program matching conditions at all!"
Just v -> print v
-- Check if it is feasible to solve ... | 372 | solveExact size operations inputs outputs = do
result <- basicSolve size operations inputs outputs
case result of
Nothing -> putStrLn "Couldn't find any program matching conditions at all!"
Just v -> print v
-- Check if it is feasible to solve this problem by brute-force within 'timeout' seconds | 309 | false | true | 0 | 10 | 72 | 95 | 46 | 49 | null | null |
dmeysman/tiny-compiler | src/Language/Tiny/Synthesis/ValueNumbering.hs | mit | numberValuesCode intermediate@(IndexedAccess operand _ _) =
do
uncompute operand
return intermediate | 110 | numberValuesCode intermediate@(IndexedAccess operand _ _) =
do
uncompute operand
return intermediate | 110 | numberValuesCode intermediate@(IndexedAccess operand _ _) =
do
uncompute operand
return intermediate | 110 | false | false | 0 | 8 | 20 | 34 | 15 | 19 | null | null |
olsner/ghc | testsuite/tests/perf/compiler/T10370.hs | bsd-3-clause | a438 :: IO (); a438 = forever $ putStrLn "a438" | 47 | a438 :: IO ()
a438 = forever $ putStrLn "a438" | 46 | a438 = forever $ putStrLn "a438" | 32 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
Kinokkory/cluss | src/Type/Cluss/TH.hs | bsd-3-clause | makeCnstrnt :: Int -> Int -> Type -> Maybe Type
makeCnstrnt 1 0 t = return $ t | 79 | makeCnstrnt :: Int -> Int -> Type -> Maybe Type
makeCnstrnt 1 0 t = return $ t | 78 | makeCnstrnt 1 0 t = return $ t | 30 | false | true | 0 | 8 | 18 | 37 | 18 | 19 | null | null |
tphyahoo/haskoin | haskoin-core/Network/Haskoin/Script/Evaluator.hs | unlicense | orderedSatisfy _ (_:_) [] = False | 33 | orderedSatisfy _ (_:_) [] = False | 33 | orderedSatisfy _ (_:_) [] = False | 33 | false | false | 1 | 6 | 5 | 25 | 11 | 14 | null | null |
thumphries/hgrep | src/Language/Haskell/HGrep.hs | bsd-3-clause | areAdjacentLocs :: SrcLoc.SrcLoc -> SrcLoc.SrcLoc -> Bool
areAdjacentLocs (SrcLoc.RealSrcLoc loc1) (SrcLoc.RealSrcLoc loc2) =
SrcLoc.srcLocLine loc1 + 1 == SrcLoc.srcLocLine loc2 | 180 | areAdjacentLocs :: SrcLoc.SrcLoc -> SrcLoc.SrcLoc -> Bool
areAdjacentLocs (SrcLoc.RealSrcLoc loc1) (SrcLoc.RealSrcLoc loc2) =
SrcLoc.srcLocLine loc1 + 1 == SrcLoc.srcLocLine loc2 | 180 | areAdjacentLocs (SrcLoc.RealSrcLoc loc1) (SrcLoc.RealSrcLoc loc2) =
SrcLoc.srcLocLine loc1 + 1 == SrcLoc.srcLocLine loc2 | 122 | false | true | 0 | 8 | 21 | 62 | 30 | 32 | null | null |
ezyang/ghc | utils/deriveConstants/Main.hs | bsd-3-clause | getWanted :: Bool -> String -> FilePath -> FilePath -> [String] -> FilePath -> Maybe FilePath
-> IO Results
getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
= do let cStuff = unlines (headers ++ concatMap (doWanted . snd) (wanteds os))
cFile = tmpdir </> "tmp.c"
... | 9,567 | getWanted :: Bool -> String -> FilePath -> FilePath -> [String] -> FilePath -> Maybe FilePath
-> IO Results
getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
= do let cStuff = unlines (headers ++ concatMap (doWanted . snd) (wanteds os))
cFile = tmpdir </> "tmp.c"
... | 9,567 | getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
= do let cStuff = unlines (headers ++ concatMap (doWanted . snd) (wanteds os))
cFile = tmpdir </> "tmp.c"
oFile = tmpdir </> "tmp.o"
writeFile cFile cStuff
execute verbose gccProgram (gccFlags ++ ["... | 9,446 | false | true | 0 | 15 | 3,937 | 2,363 | 1,208 | 1,155 | null | null |
gltronred/braidf-ck | Interpreter.hs | gpl-3.0 | execute :: Braid -> Data -> Data
execute braid d = foldl' (flip apply) d $ sigmas braid | 87 | execute :: Braid -> Data -> Data
execute braid d = foldl' (flip apply) d $ sigmas braid | 87 | execute braid d = foldl' (flip apply) d $ sigmas braid | 54 | false | true | 0 | 8 | 17 | 42 | 20 | 22 | null | null |
dsalisbury/xmobar | src/Plugins/MBox.hs | bsd-3-clause | defaults :: Options
defaults = Options {
oAll = False, oUniq = False, oDir = "", oPrefix = "", oSuffix = ""
} | 113 | defaults :: Options
defaults = Options {
oAll = False, oUniq = False, oDir = "", oPrefix = "", oSuffix = ""
} | 113 | defaults = Options {
oAll = False, oUniq = False, oDir = "", oPrefix = "", oSuffix = ""
} | 93 | false | true | 0 | 6 | 26 | 43 | 27 | 16 | null | null |
Jugendhackt/haskell-ricochet | test/Network/Ricochet/Testing/Crypto.hs | gpl-3.0 | rawSignCheck :: ByteString -> ByteString -> Property
rawSignCheck bs bs' = monadicIO $ do
key <- run generate1024BitRSA
let signature = rawRSASign key bs
assert . rawRSAVerify key bs $ signature
assert . not . rawRSAVerify key bs' $ signature
-- | Assert that torDomain computes the correct domain | 309 | rawSignCheck :: ByteString -> ByteString -> Property
rawSignCheck bs bs' = monadicIO $ do
key <- run generate1024BitRSA
let signature = rawRSASign key bs
assert . rawRSAVerify key bs $ signature
assert . not . rawRSAVerify key bs' $ signature
-- | Assert that torDomain computes the correct domain | 309 | rawSignCheck bs bs' = monadicIO $ do
key <- run generate1024BitRSA
let signature = rawRSASign key bs
assert . rawRSAVerify key bs $ signature
assert . not . rawRSAVerify key bs' $ signature
-- | Assert that torDomain computes the correct domain | 256 | false | true | 0 | 11 | 60 | 89 | 41 | 48 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_TEXTURE_CUBE_MAP_SEAMLESS :: GLenum
gl_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F | 76 | gl_TEXTURE_CUBE_MAP_SEAMLESS :: GLenum
gl_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F | 76 | gl_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F | 37 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
patperry/hs-linear-algebra | lib/Numeric/LinearAlgebra/Packed/Tri.hs | bsd-3-clause | triMulVector :: (BLAS2 e)
=> Trans
-> Tri Packed e
-> Vector e
-> Vector e
triMulVector trans a x =
V.create $ do
x' <- V.newCopy x
triMulVectorM_ trans a x'
return x'
-- | @triMulVectorM_ a x@ sets @x := op(a) * x@, where @op(a)@ is deter... | 340 | triMulVector :: (BLAS2 e)
=> Trans
-> Tri Packed e
-> Vector e
-> Vector e
triMulVector trans a x =
V.create $ do
x' <- V.newCopy x
triMulVectorM_ trans a x'
return x'
-- | @triMulVectorM_ a x@ sets @x := op(a) * x@, where @op(a)@ is deter... | 340 | triMulVector trans a x =
V.create $ do
x' <- V.newCopy x
triMulVectorM_ trans a x'
return x'
-- | @triMulVectorM_ a x@ sets @x := op(a) * x@, where @op(a)@ is determined
-- by @trans@. | 213 | false | true | 0 | 10 | 132 | 86 | 40 | 46 | null | null |
ckaestne/CIDE | other/CaseStudies/fgl/CIDEfgl/test/test.hs | gpl-3.0 | t1 :: Gr String ();
t1 = insMapEdge m486 ("shirt", "watch", ()) clr486 | 72 | t1 :: Gr String ()
t1 = insMapEdge m486 ("shirt", "watch", ()) clr486 | 69 | t1 = insMapEdge m486 ("shirt", "watch", ()) clr486 | 50 | false | true | 3 | 7 | 14 | 47 | 20 | 27 | null | null |
haasn/colour | Data/Colour/HDTV.hs | mit | -- |Returns the Y'CbCr studio 8-bit coordinates of a 'Colour'.
toY'CbCr :: (Floating a, RealFrac a) => Colour a -> (Word8, Word8, Word8)
toY'CbCr = L.toY'CbCr lumaCoef space | 173 | toY'CbCr :: (Floating a, RealFrac a) => Colour a -> (Word8, Word8, Word8)
toY'CbCr = L.toY'CbCr lumaCoef space | 110 | toY'CbCr = L.toY'CbCr lumaCoef space | 36 | true | true | 0 | 9 | 27 | 58 | 28 | 30 | null | null |
mtolly/jammittools | src/Sound/Jammit/Base.hs | gpl-3.0 | -- | Tries to find the top-level Jammit library directory on Windows or
-- Mac OS X.
findJammitDir :: IO (Maybe FilePath)
findJammitDir = case Info.os of
"mingw32" -> do
var <- lookupEnv "LocalAppData"
case var of
Just local -> jammitIn local
Nothing -> return Nothing
"darwin" -> do
home ... | 728 | findJammitDir :: IO (Maybe FilePath)
findJammitDir = case Info.os of
"mingw32" -> do
var <- lookupEnv "LocalAppData"
case var of
Just local -> jammitIn local
Nothing -> return Nothing
"darwin" -> do
home <- Dir.getHomeDirectory
jammitIn $ home </> "Library" </> "Application Support"
... | 643 | findJammitDir = case Info.os of
"mingw32" -> do
var <- lookupEnv "LocalAppData"
case var of
Just local -> jammitIn local
Nothing -> return Nothing
"darwin" -> do
home <- Dir.getHomeDirectory
jammitIn $ home </> "Library" </> "Application Support"
_ -> return Nothing
where jammitIn... | 606 | true | true | 3 | 11 | 186 | 170 | 77 | 93 | null | null |
bitemyapp/hakaru | Tests/Lazy.hs | bsd-3-clause | --------------------------------------------------------------------------------
allTests :: Test
allTests = test
[ "easierRoadmapProg1" ~: testL easierRoadmapProg1 []
, "normalFB1" ~: testL normalFB1 []
, "normalFB2" ~: testL normalFB2 []
, "zeroDiv" ~: testL zeroDiv [(unit, 0, Any $ dirac... | 2,679 | allTests :: Test
allTests = test
[ "easierRoadmapProg1" ~: testL easierRoadmapProg1 []
, "normalFB1" ~: testL normalFB1 []
, "normalFB2" ~: testL normalFB2 []
, "zeroDiv" ~: testL zeroDiv [(unit, 0, Any $ dirac 0)]
, "zeroAddInt" ~: testL zeroAddInt [(unit, 0, Any $ dirac 3)]
, "zeroPlusSnd" ~: ... | 2,585 | allTests = test
[ "easierRoadmapProg1" ~: testL easierRoadmapProg1 []
, "normalFB1" ~: testL normalFB1 []
, "normalFB2" ~: testL normalFB2 []
, "zeroDiv" ~: testL zeroDiv [(unit, 0, Any $ dirac 0)]
, "zeroAddInt" ~: testL zeroAddInt [(unit, 0, Any $ dirac 3)]
, "zeroPlusSnd" ~: testL zeroPlusSnd... | 2,568 | true | true | 0 | 24 | 959 | 935 | 492 | 443 | null | null |
MasseR/xmonadcontrib | XMonad/Layout/WindowNavigation.hs | bsd-3-clause | windowNavigation :: LayoutClass l a => l a -> ModifiedLayout WindowNavigation l a
windowNavigation = ModifiedLayout (WindowNavigation defaultWNConfig (I Nothing)) | 162 | windowNavigation :: LayoutClass l a => l a -> ModifiedLayout WindowNavigation l a
windowNavigation = ModifiedLayout (WindowNavigation defaultWNConfig (I Nothing)) | 162 | windowNavigation = ModifiedLayout (WindowNavigation defaultWNConfig (I Nothing)) | 80 | false | true | 0 | 9 | 19 | 51 | 24 | 27 | null | null |
talanis85/mudblood | src/Mudblood/Screen/Gtk.hs | gpl-3.0 | screen :: Screen u () -> Screen u ()
screen updateHandler = do
modify $ \s -> s { scrUpdateHandler = updateHandler }
liftIO G.mainGUI | 141 | screen :: Screen u () -> Screen u ()
screen updateHandler = do
modify $ \s -> s { scrUpdateHandler = updateHandler }
liftIO G.mainGUI | 141 | screen updateHandler = do
modify $ \s -> s { scrUpdateHandler = updateHandler }
liftIO G.mainGUI | 104 | false | true | 0 | 10 | 32 | 60 | 29 | 31 | null | null |
holzensp/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | -- #define dataToTagzh(r,a) r=(GET_TAG(((StgClosure *)a)->header.info))
-- Note: argument may be tagged!
emitPrimOp dflags [res] DataToTagOp [arg]
= emitAssign (CmmLocal res) (getConstrTag dflags (cmmUntag dflags arg)) | 224 | emitPrimOp dflags [res] DataToTagOp [arg]
= emitAssign (CmmLocal res) (getConstrTag dflags (cmmUntag dflags arg)) | 116 | emitPrimOp dflags [res] DataToTagOp [arg]
= emitAssign (CmmLocal res) (getConstrTag dflags (cmmUntag dflags arg)) | 116 | true | false | 0 | 9 | 30 | 50 | 26 | 24 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Network.hs | bsd-2-clause | qCast_QHttpHeader :: Object a -> IO (QHttpHeader ())
qCast_QHttpHeader _qobj
= return (objectCast _qobj) | 106 | qCast_QHttpHeader :: Object a -> IO (QHttpHeader ())
qCast_QHttpHeader _qobj
= return (objectCast _qobj) | 106 | qCast_QHttpHeader _qobj
= return (objectCast _qobj) | 53 | false | true | 0 | 9 | 15 | 41 | 19 | 22 | null | null |
yxm4109/pandoc | src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | blockToHtml _ (HorizontalRule) = return $ hr | 44 | blockToHtml _ (HorizontalRule) = return $ hr | 44 | blockToHtml _ (HorizontalRule) = return $ hr | 44 | false | false | 0 | 6 | 6 | 18 | 9 | 9 | null | null |
DavidAlphaFox/ghc | libraries/containers/Data/Sequence.hs | bsd-3-clause | squashL (Two a b) (Two n1 n2) = Three (node2 a b) n1 n2 | 55 | squashL (Two a b) (Two n1 n2) = Three (node2 a b) n1 n2 | 55 | squashL (Two a b) (Two n1 n2) = Three (node2 a b) n1 n2 | 55 | false | false | 0 | 7 | 13 | 42 | 20 | 22 | null | null |
vikraman/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | -- Others
parensIf :: Bool -> Doc -> Doc
parensIf True d = parens d | 68 | parensIf :: Bool -> Doc -> Doc
parensIf True d = parens d | 57 | parensIf True d = parens d | 26 | true | true | 0 | 6 | 15 | 28 | 14 | 14 | null | null |
hvr/jhc | src/Name/Id.hs | mit | newId :: Int -- ^ a seed value, useful for speeding up finding a unique id
-> (Id -> Bool) -- ^ whether an Id is acceptable
-> Id -- ^ your new Id
newId seed check = head $ filter check (candidateIds seed) | 239 | newId :: Int -- ^ a seed value, useful for speeding up finding a unique id
-> (Id -> Bool) -- ^ whether an Id is acceptable
-> Id
newId seed check = head $ filter check (candidateIds seed) | 211 | newId seed check = head $ filter check (candidateIds seed) | 58 | true | true | 0 | 8 | 77 | 49 | 26 | 23 | null | null |
boundedvariation/ntbible | Greek/Parsers/MorphologyParser.hs | mit | morphParser :: Parser [MorphEntry]
morphParser = do
parseHeader
many' entryParser | 89 | morphParser :: Parser [MorphEntry]
morphParser = do
parseHeader
many' entryParser | 89 | morphParser = do
parseHeader
many' entryParser | 54 | false | true | 1 | 8 | 17 | 30 | 12 | 18 | null | null |
romanb/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types.hs | mpl-2.0 | -- | For load-balanced, autoscaling environments, the URL to the LoadBalancer. For
-- single-instance environments, the IP address of the instance.
ed1EndpointURL :: Lens' EnvironmentDescription (Maybe Text)
ed1EndpointURL = lens _ed1EndpointURL (\s a -> s { _ed1EndpointURL = a }) | 281 | ed1EndpointURL :: Lens' EnvironmentDescription (Maybe Text)
ed1EndpointURL = lens _ed1EndpointURL (\s a -> s { _ed1EndpointURL = a }) | 133 | ed1EndpointURL = lens _ed1EndpointURL (\s a -> s { _ed1EndpointURL = a }) | 73 | true | true | 0 | 9 | 39 | 47 | 26 | 21 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/PointTypes/PointType4.hs | bsd-3-clause | pointType4Parser :: Get PointType4
pointType4Parser = do
pointId <- getByteString 10
units <- getByteString 10
adjustedDA0 <- getInt16
adjustedDA100 <- getInt16
lowReading <- getIeeeFloat32
highReading <- getIeeeFloat32
euValue <- getIeeeFloat32
modeCFG <- getWord8
alarmCode <- getWord8
rawDAOutput... | 580 | pointType4Parser :: Get PointType4
pointType4Parser = do
pointId <- getByteString 10
units <- getByteString 10
adjustedDA0 <- getInt16
adjustedDA100 <- getInt16
lowReading <- getIeeeFloat32
highReading <- getIeeeFloat32
euValue <- getIeeeFloat32
modeCFG <- getWord8
alarmCode <- getWord8
rawDAOutput... | 580 | pointType4Parser = do
pointId <- getByteString 10
units <- getByteString 10
adjustedDA0 <- getInt16
adjustedDA100 <- getInt16
lowReading <- getIeeeFloat32
highReading <- getIeeeFloat32
euValue <- getIeeeFloat32
modeCFG <- getWord8
alarmCode <- getWord8
rawDAOutput <- getInt16
scanningMode <- anyB... | 545 | false | true | 0 | 8 | 95 | 145 | 64 | 81 | null | null |
karshan/syz | Data/Generics/Zipper.hs | bsd-3-clause | ------ Query
-- | Apply a generic query to the left sibling if one exists.
leftQ :: b -- ^ Value to return of no left sibling exists.
-> (Zipper a -> b) -> Zipper a -> b
leftQ b f z = moveQ left b f z | 206 | leftQ :: b -- ^ Value to return of no left sibling exists.
-> (Zipper a -> b) -> Zipper a -> b
leftQ b f z = moveQ left b f z | 131 | leftQ b f z = moveQ left b f z | 30 | true | true | 0 | 10 | 53 | 64 | 29 | 35 | null | null |
ezyang/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | nameSortStableString (WiredIn mod _ _) = moduleStableString mod | 63 | nameSortStableString (WiredIn mod _ _) = moduleStableString mod | 63 | nameSortStableString (WiredIn mod _ _) = moduleStableString mod | 63 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Writers/Textile.hs | gpl-2.0 | blockToTextile _ (RawBlock f str)
| f == Format "html" || f == Format "textile" = return str
| otherwise = return "" | 154 | blockToTextile _ (RawBlock f str)
| f == Format "html" || f == Format "textile" = return str
| otherwise = return "" | 154 | blockToTextile _ (RawBlock f str)
| f == Format "html" || f == Format "textile" = return str
| otherwise = return "" | 154 | false | false | 1 | 11 | 60 | 56 | 25 | 31 | null | null |
cimmanon/snap-handlers | Snap/Handlers/Digestive.hs | bsd-3-clause | getFormConfig :: SnapFormConfig
getFormConfig = SnapFormConfig (Just Post) Nothing defaultUploadPolicy (const disallow) | 119 | getFormConfig :: SnapFormConfig
getFormConfig = SnapFormConfig (Just Post) Nothing defaultUploadPolicy (const disallow) | 119 | getFormConfig = SnapFormConfig (Just Post) Nothing defaultUploadPolicy (const disallow) | 87 | false | true | 0 | 7 | 11 | 32 | 16 | 16 | null | null |
lamefun/haddock | haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | bsd-2-clause | links _ _ _ _ = noHtml | 22 | links _ _ _ _ = noHtml | 22 | links _ _ _ _ = noHtml | 22 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
jwiegley/ghc-release | libraries/containers/Data/Map/Base.hs | gpl-3.0 | -- Functions balanceL and balanceR are specialised versions of balance.
-- balanceL only checks whether the left subtree is too big,
-- balanceR only checks whether the right subtree is too big.
-- balanceL is called when left subtree might have been inserted to or when
-- right subtree might have been deleted from.
b... | 1,520 | balanceL :: k -> a -> Map k a -> Map k a -> Map k a
balanceL k x l r = case r of
Tip -> case l of
Tip -> Bin 1 k x Tip Tip
(Bin _ _ _ Tip Tip) -> Bin 2 k x l Tip
(Bin _ lk lx Tip (Bin _ lrk lrx _ _)) -> Bin 3 lrk lrx (Bin 1 lk lx Tip Tip) (Bin 1 k x Tip Tip)
(Bin _ lk lx ll... | 1,201 | balanceL k x l r = case r of
Tip -> case l of
Tip -> Bin 1 k x Tip Tip
(Bin _ _ _ Tip Tip) -> Bin 2 k x l Tip
(Bin _ lk lx Tip (Bin _ lrk lrx _ _)) -> Bin 3 lrk lrx (Bin 1 lk lx Tip Tip) (Bin 1 k x Tip Tip)
(Bin _ lk lx ll@(Bin _ _ _ _ _) Tip) -> Bin 3 lk lx ll (Bin 1 k x T... | 1,149 | true | true | 0 | 21 | 527 | 763 | 379 | 384 | null | null |
thielema/wxhaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs | lgpl-2.1 | withRefDateTime :: (Ptr (TDateTime a) -> IO ()) -> IO (DateTime a)
withRefDateTime f
= withManagedDateTimeResult $ assignRefPtr wxDateTime_Create f | 150 | withRefDateTime :: (Ptr (TDateTime a) -> IO ()) -> IO (DateTime a)
withRefDateTime f
= withManagedDateTimeResult $ assignRefPtr wxDateTime_Create f | 150 | withRefDateTime f
= withManagedDateTimeResult $ assignRefPtr wxDateTime_Create f | 83 | false | true | 0 | 10 | 22 | 57 | 27 | 30 | null | null |
chwthewke/horbits | src/cc/HorbitsCC/CameraControlExploration.hs | bsd-3-clause | boundSpinButton :: (HasUpdate v t t) =>
v -> Setter' t Double -> String -> Double -> Double -> Double -> Maybe Double -> IO HBox
boundSpinButton src prop lab min' max' step def = do
box <- hBoxNew True 5
spb <- spinButtonNewWithRange min' max' step
forM_ def $ spinButtonSetValue spb
... | 484 | boundSpinButton :: (HasUpdate v t t) =>
v -> Setter' t Double -> String -> Double -> Double -> Double -> Maybe Double -> IO HBox
boundSpinButton src prop lab min' max' step def = do
box <- hBoxNew True 5
spb <- spinButtonNewWithRange min' max' step
forM_ def $ spinButtonSetValue spb
... | 484 | boundSpinButton src prop lab min' max' step def = do
box <- hBoxNew True 5
spb <- spinButtonNewWithRange min' max' step
forM_ def $ spinButtonSetValue spb
_ <- onValueSpinned spb $ spinButtonGetValue spb >>= (mapVarS prop src $=)
_ <- labelNew (Just lab) >>= containerAdd box
containerAdd box spb... | 335 | false | true | 0 | 13 | 124 | 184 | 83 | 101 | null | null |
lambdataro/Dive | Eval.hs | mit | patMatch :: Pat -> Value -> Maybe Env
patMatch (PConst id1) (CONST id2)
| id1 == id2 = Just []
| otherwise = Nothing | 120 | patMatch :: Pat -> Value -> Maybe Env
patMatch (PConst id1) (CONST id2)
| id1 == id2 = Just []
| otherwise = Nothing | 120 | patMatch (PConst id1) (CONST id2)
| id1 == id2 = Just []
| otherwise = Nothing | 82 | false | true | 0 | 10 | 27 | 70 | 31 | 39 | null | null |
overminder/hs-mini-kanren | src/MiniKanren/Predicate.hs | bsd-3-clause | freshN :: [T.Text] -> ([Term] -> Predicate) -> Predicate
freshN = PFreshN | 73 | freshN :: [T.Text] -> ([Term] -> Predicate) -> Predicate
freshN = PFreshN | 73 | freshN = PFreshN | 16 | false | true | 0 | 10 | 11 | 41 | 20 | 21 | null | null |
alekar/hugs | packages/base/Data/Map.hs | bsd-3-clause | -- | /O(n)/. Map a function over all values in the map.
mapWithKey :: (k -> a -> b) -> Map k a -> Map k b
mapWithKey f Tip = Tip | 128 | mapWithKey :: (k -> a -> b) -> Map k a -> Map k b
mapWithKey f Tip = Tip | 72 | mapWithKey f Tip = Tip | 22 | true | true | 0 | 8 | 31 | 46 | 23 | 23 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Runtime/Builtin.hs | mit | atan2f = binop ATN2 Ty.floatRef | 31 | atan2f = binop ATN2 Ty.floatRef | 31 | atan2f = binop ATN2 Ty.floatRef | 31 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
scottgw/language-eiffel | Language/Eiffel/PrettyPrint.hs | bsd-3-clause | expr' i (LitInt int') = condParens (i >= 13) $ integer int' | 59 | expr' i (LitInt int') = condParens (i >= 13) $ integer int' | 59 | expr' i (LitInt int') = condParens (i >= 13) $ integer int' | 59 | false | false | 0 | 8 | 11 | 36 | 16 | 20 | null | null |
pparkkin/eta | compiler/ETA/TypeCheck/TcType.hs | bsd-3-clause | isMetaTyVarTy :: TcType -> Bool
isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv | 75 | isMetaTyVarTy :: TcType -> Bool
isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv | 75 | isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv | 43 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
kareem2048/Asteroids | MainMenu.hs | gpl-3.0 | -- Enter cooperative mode when press '2'
--handleMenuKeys (EventKey (Char '3') _ _ _) game = game {gameMode = Versus} -- Enter versus mode when press '3'
handleMenuKeys (EventResize (w,h)) game = game {gWidth = (fromIntegral w) , gHeight = (fromIntegral h)} | 260 | handleMenuKeys (EventResize (w,h)) game = game {gWidth = (fromIntegral w) , gHeight = (fromIntegral h)} | 103 | handleMenuKeys (EventResize (w,h)) game = game {gWidth = (fromIntegral w) , gHeight = (fromIntegral h)} | 103 | true | false | 0 | 8 | 44 | 51 | 29 | 22 | null | null |
msiegenthaler/haskell-xbee | System/Hardware/XBee/DeviceCommand.hs | bsd-3-clause | failOnLeft (Right v) = return v | 32 | failOnLeft (Right v) = return v | 32 | failOnLeft (Right v) = return v | 32 | false | false | 0 | 7 | 6 | 18 | 8 | 10 | null | null |
anttisalonen/freekick | haskell/freekick_server/physics/src/Main.hs | agpl-3.0 | updatePlayersWithControls :: [String] -> State MatchStatus ()
updatePlayersWithControls ss = mapM_ updatePlayerWithControl ss | 125 | updatePlayersWithControls :: [String] -> State MatchStatus ()
updatePlayersWithControls ss = mapM_ updatePlayerWithControl ss | 125 | updatePlayersWithControls ss = mapM_ updatePlayerWithControl ss | 63 | false | true | 0 | 7 | 12 | 33 | 16 | 17 | null | null |
mstksg/hledger | bin/hledger-check-dupes.hs | gpl-3.0 | render :: (String, [AccountName]) -> IO ()
render (leafName, accountNameL) = printf "%s as %s\n" leafName (concat $ intersperse ", " (map T.unpack accountNameL)) | 161 | render :: (String, [AccountName]) -> IO ()
render (leafName, accountNameL) = printf "%s as %s\n" leafName (concat $ intersperse ", " (map T.unpack accountNameL)) | 161 | render (leafName, accountNameL) = printf "%s as %s\n" leafName (concat $ intersperse ", " (map T.unpack accountNameL)) | 118 | false | true | 0 | 11 | 23 | 67 | 35 | 32 | null | null |
shlevy/ghc | compiler/utils/Util.hs | bsd-3-clause | equalLength (_:xs) (_:ys) = equalLength xs ys | 45 | equalLength (_:xs) (_:ys) = equalLength xs ys | 45 | equalLength (_:xs) (_:ys) = equalLength xs ys | 45 | false | false | 0 | 7 | 6 | 30 | 15 | 15 | null | null |
kcharter/erl | Erl/EntityMap.hs | bsd-2-clause | lift2 :: (DM.Map EntityId a -> DM.Map EntityId a -> DM.Map EntityId a) -> EntityMap a -> EntityMap a -> EntityMap a
lift2 f em1 em2 = fromMap $ f (toMap em1) (toMap em2) | 169 | lift2 :: (DM.Map EntityId a -> DM.Map EntityId a -> DM.Map EntityId a) -> EntityMap a -> EntityMap a -> EntityMap a
lift2 f em1 em2 = fromMap $ f (toMap em1) (toMap em2) | 169 | lift2 f em1 em2 = fromMap $ f (toMap em1) (toMap em2) | 53 | false | true | 2 | 11 | 33 | 98 | 44 | 54 | null | null |
manyoo/ghcjs-famous | src/Famous/Transitions/Curves.hs | bsd-3-clause | curveType2JSString CvSpring = "spring" | 45 | curveType2JSString CvSpring = "spring" | 45 | curveType2JSString CvSpring = "spring" | 45 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
mortum5/programming | haskell/ITMO-Course/test.hs | mit | t = [5,"kkk"] | 13 | t = [5,"kkk"] | 13 | t = [5,"kkk"] | 13 | false | false | 1 | 5 | 2 | 15 | 7 | 8 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.