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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enolan/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | -- 'cabal unpack' is a deprecated alias for 'cabal get'.
unpackCommand :: CommandUI GetFlags
unpackCommand = getCommand {
commandName = "unpack",
commandUsage = usagePackages "unpack"
} | 192 | unpackCommand :: CommandUI GetFlags
unpackCommand = getCommand {
commandName = "unpack",
commandUsage = usagePackages "unpack"
} | 135 | unpackCommand = getCommand {
commandName = "unpack",
commandUsage = usagePackages "unpack"
} | 99 | true | true | 0 | 7 | 32 | 32 | 18 | 14 | null | null |
WSCU/JSEuterpea | Euterpea Examples/Rhythm.hs | gpl-3.0 | --changed
consEightS = ">**>>*>**>>*>**>>*>*****" | 53 | consEightS = ">**>>*>**>>*>**>>*>*****" | 42 | consEightS = ">**>>*>**>>*>**>>*>*****" | 42 | true | false | 1 | 5 | 7 | 11 | 4 | 7 | null | null |
abstools/abs-haskell-formal | benchmarks/2_primality_test/progs/1500.hs | bsd-3-clause | main :: IO ()
main = printHeap =<< run 1000000 main_ (head the_end) | 67 | main :: IO ()
main = printHeap =<< run 1000000 main_ (head the_end) | 67 | main = printHeap =<< run 1000000 main_ (head the_end) | 53 | false | true | 2 | 7 | 12 | 35 | 16 | 19 | null | null |
ezyang/ghc | compiler/codeGen/StgCmmMonad.hs | bsd-3-clause | setVirtHp :: VirtualHpOffset -> FCode ()
setVirtHp new_virtHp
= do { hp_usage <- getHpUsage
; setHpUsage (hp_usage {virtHp = new_virtHp}) } | 150 | setVirtHp :: VirtualHpOffset -> FCode ()
setVirtHp new_virtHp
= do { hp_usage <- getHpUsage
; setHpUsage (hp_usage {virtHp = new_virtHp}) } | 150 | setVirtHp new_virtHp
= do { hp_usage <- getHpUsage
; setHpUsage (hp_usage {virtHp = new_virtHp}) } | 109 | false | true | 0 | 10 | 31 | 50 | 26 | 24 | null | null |
scottgw/language-eiffel | Language/Eiffel/Util.hs | bsd-3-clause | -- | Find a routine by name.
findRoutineInt :: ClasInterface -> Text -> Maybe RoutineI
findRoutineInt = findFeature | 115 | findRoutineInt :: ClasInterface -> Text -> Maybe RoutineI
findRoutineInt = findFeature | 86 | findRoutineInt = findFeature | 28 | true | true | 0 | 7 | 17 | 23 | 12 | 11 | null | null |
shangaslammi/haskeroids | Haskeroids/Asteroid.hs | mit | spawnNewAsteroids :: Asteroid -> ParticleGen [RandomAsteroid]
spawnNewAsteroids a@(Asteroid sz b _ _) =
explosionParticles a >> return new where
new
| sz == Small = []
| otherwise = replicate 3 $ randomAsteroid (pred sz) (bodyPos b) | 258 | spawnNewAsteroids :: Asteroid -> ParticleGen [RandomAsteroid]
spawnNewAsteroids a@(Asteroid sz b _ _) =
explosionParticles a >> return new where
new
| sz == Small = []
| otherwise = replicate 3 $ randomAsteroid (pred sz) (bodyPos b) | 258 | spawnNewAsteroids a@(Asteroid sz b _ _) =
explosionParticles a >> return new where
new
| sz == Small = []
| otherwise = replicate 3 $ randomAsteroid (pred sz) (bodyPos b) | 196 | false | true | 0 | 11 | 62 | 101 | 48 | 53 | null | null |
DaMSL/K3 | src/Language/K3/Analysis/Provenance/Inference.hs | apache-2.0 | chaseLambda env path ti (tnc -> (PChoice, r:_)) = chaseLambda env path (head $ children ti) r | 100 | chaseLambda env path ti (tnc -> (PChoice, r:_)) = chaseLambda env path (head $ children ti) r | 100 | chaseLambda env path ti (tnc -> (PChoice, r:_)) = chaseLambda env path (head $ children ti) r | 100 | false | false | 0 | 9 | 23 | 51 | 26 | 25 | null | null |
bravit/Idris-dev | test/TestRun.hs | bsd-3-clause | indexToString :: Int -> String
indexToString index = let str = show index in
replicate (3 - length str) '0' ++ str | 140 | indexToString :: Int -> String
indexToString index = let str = show index in
replicate (3 - length str) '0' ++ str | 140 | indexToString index = let str = show index in
replicate (3 - length str) '0' ++ str | 109 | false | true | 0 | 11 | 47 | 51 | 24 | 27 | null | null |
nejla/nejla-common | src/NejlaCommon/Persistence/SqlStatistics.hs | bsd-3-clause | -- | Add hooks to an SqlBackend to collect query execution statistics, remove
-- hooks once the function returns
--
-- You provide it with a Fold (aka reducer), i.e. a function that calculates the
-- aggregate statistics you are interested in from the individual samples. For
-- example, you might want to know how often... | 3,623 | backendWithStats
:: MonadIO m
=> StatsFold stats -- ^ Fold describes how to calculate statistics. See for example 'foldStats'
-> P.SqlBackend -- ^ Backend to hook into
-> (IO stats
-> P.SqlBackend
-> m a) -- ^ Callback (what to do with the hooked backend)
-> m a
backendWithStats (Foldl.Fold fadd f... | 2,788 | backendWithStats (Foldl.Fold fadd fempty fextract) con k = do
statsRef <- liftIO $ newIORef fempty
let update x = atomicModifyIORef statsRef $ \stats -> (fadd stats x, ())
-- Save statements before we add hooks so we can undo them
unhookedStatements <- liftIO $ newIORef =<< readIORef (P.connStmtMap con)
-- H... | 2,503 | true | true | 12 | 23 | 820 | 569 | 286 | 283 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 204321 = 2100 | 33 | getValueFromProduct 204321 = 2100 | 33 | getValueFromProduct 204321 = 2100 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
badp/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | ssGlusterStorageDir :: String
ssGlusterStorageDir = "gluster_storage_dir" | 73 | ssGlusterStorageDir :: String
ssGlusterStorageDir = "gluster_storage_dir" | 73 | ssGlusterStorageDir = "gluster_storage_dir" | 43 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
CulpaBS/wbBach | src/Futhark/Optimise/Simplifier/Simple.hs | bsd-3-clause | bindableSimpleOps :: (Engine.MonadEngine m,
Bindable (Engine.InnerLore m)) =>
SimpleOps m
bindableSimpleOps =
SimpleOps mkLetS' mkBodyS' mkLetNamesS'
where mkLetS' _ pat e = return $
mkLet (map asPair $ patternContextElements pat)
... | 568 | bindableSimpleOps :: (Engine.MonadEngine m,
Bindable (Engine.InnerLore m)) =>
SimpleOps m
bindableSimpleOps =
SimpleOps mkLetS' mkBodyS' mkLetNamesS'
where mkLetS' _ pat e = return $
mkLet (map asPair $ patternContextElements pat)
... | 568 | bindableSimpleOps =
SimpleOps mkLetS' mkBodyS' mkLetNamesS'
where mkLetS' _ pat e = return $
mkLet (map asPair $ patternContextElements pat)
(map asPair $ patternValueElements pat)
e
where asPair patElem = (patElemIdent patElem,... | 435 | false | true | 2 | 9 | 208 | 125 | 63 | 62 | null | null |
noamz/linlam-gos | src/MapsCDs.hs | mit | arcs2dt :: Arcs -> DTree
arcs2dt [] = error "empty diagram" | 59 | arcs2dt :: Arcs -> DTree
arcs2dt [] = error "empty diagram" | 59 | arcs2dt [] = error "empty diagram" | 34 | false | true | 0 | 6 | 10 | 23 | 11 | 12 | null | null |
yoo-e/yesod-helpers | Yesod/Helpers/Utils.hs | bsd-3-clause | -- | parse a UTCTime, try the following format
-- 2015-01-02 12:53:46+0800
-- 2015-01-02 12:53:46 (as in the specified time zone)
-- 2015年01月02日12时53分46秒 (as in the specified time zone)
humanParseUTCTime :: TimeZone -> String -> Maybe UTCTime
humanParseUTCTime tz s =
parse_local "%Y-%m-%d %T"
<|> parse_loca... | 965 | humanParseUTCTime :: TimeZone -> String -> Maybe UTCTime
humanParseUTCTime tz s =
parse_local "%Y-%m-%d %T"
<|> parse_local "%Y年%m月%d日%H时%M分%S秒"
<|> parse_day "%Y-%m-%d"
<|> parse_day "%Y年%m月%d日"
<|> parse_zoned "%Y-%m-%d %T%z"
<|> parse_zoned "%Y-%m-%d %T%Z"
where
... | 779 | humanParseUTCTime tz s =
parse_local "%Y-%m-%d %T"
<|> parse_local "%Y年%m月%d日%H时%M分%S秒"
<|> parse_day "%Y-%m-%d"
<|> parse_day "%Y年%m月%d日"
<|> parse_zoned "%Y-%m-%d %T%z"
<|> parse_zoned "%Y-%m-%d %T%Z"
where
parse_t :: ParseTime t => String -> Maybe t
par... | 722 | true | true | 6 | 11 | 264 | 186 | 89 | 97 | null | null |
ssaavedra/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy.hs | bsd-3-clause | --TODO: a better implementation
-- ---------------------------------------------------------------------
-- Zipping
--LIQUID TODO: zip and zipWith are in LazyZip.hs because they need a
--qualifier that takes 4 parameters and this module is slow enough to
--verify as is.
-- | /O(n)/ 'zip' takes two ByteStrings and re... | 788 | zip :: ByteString -> ByteString -> [(Word8,Word8)]
zip = zipWith (,) | 68 | zip = zipWith (,) | 17 | true | true | 0 | 10 | 130 | 53 | 32 | 21 | null | null |
Th30n/hasgel | app/Main.hs | mit | handleGameEvent (KeyPressedEvent KeySpace) = modify $ insertCmd Shoot | 69 | handleGameEvent (KeyPressedEvent KeySpace) = modify $ insertCmd Shoot | 69 | handleGameEvent (KeyPressedEvent KeySpace) = modify $ insertCmd Shoot | 69 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
mcmaniac/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | -- | Decide what C function to use to implement a CallishMachOp
cmmPrimOpFunctions :: LlvmEnv -> CallishMachOp -> LMString
cmmPrimOpFunctions env mop
= case mop of
MO_F32_Exp -> fsLit "expf"
MO_F32_Log -> fsLit "logf"
MO_F32_Sqrt -> fsLit "llvm.sqrt.f32"
MO_F32_Pwr -> fsLit "llvm.pow.f32"
... | 1,811 | cmmPrimOpFunctions :: LlvmEnv -> CallishMachOp -> LMString
cmmPrimOpFunctions env mop
= case mop of
MO_F32_Exp -> fsLit "expf"
MO_F32_Log -> fsLit "logf"
MO_F32_Sqrt -> fsLit "llvm.sqrt.f32"
MO_F32_Pwr -> fsLit "llvm.pow.f32"
MO_F32_Sin -> fsLit "llvm.sin.f32"
MO_F32_Cos -> fs... | 1,747 | cmmPrimOpFunctions env mop
= case mop of
MO_F32_Exp -> fsLit "expf"
MO_F32_Log -> fsLit "logf"
MO_F32_Sqrt -> fsLit "llvm.sqrt.f32"
MO_F32_Pwr -> fsLit "llvm.pow.f32"
MO_F32_Sin -> fsLit "llvm.sin.f32"
MO_F32_Cos -> fsLit "llvm.cos.f32"
MO_F32_Tan -> fsLit "tanf"
M... | 1,688 | true | true | 0 | 11 | 518 | 417 | 198 | 219 | null | null |
Zielon/Bounce | src/Collision/VectorOperations.hs | bsd-3-clause | (•) :: Vector -> Vector -> GLfloat
(•) (x1, y1) (x2, y2) = x1 * x2 + y1 * y2 | 76 | (•) :: Vector -> Vector -> GLfloat
(•) (x1, y1) (x2, y2) = x1 * x2 + y1 * y2 | 76 | (•) (x1, y1) (x2, y2) = x1 * x2 + y1 * y2 | 41 | false | true | 0 | 9 | 19 | 58 | 31 | 27 | null | null |
rueshyna/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The object ID of the page the update is applied to.
upprObjectId :: Lens' UpdatePagePropertiesRequest (Maybe Text)
upprObjectId
= lens _upprObjectId (\ s a -> s{_upprObjectId = a}) | 187 | upprObjectId :: Lens' UpdatePagePropertiesRequest (Maybe Text)
upprObjectId
= lens _upprObjectId (\ s a -> s{_upprObjectId = a}) | 130 | upprObjectId
= lens _upprObjectId (\ s a -> s{_upprObjectId = a}) | 67 | true | true | 0 | 9 | 31 | 48 | 25 | 23 | null | null |
aztek/voogie | src/Voogie/Back.hs | gpl-3.0 | translateAssign :: B.Assignment -> F.Term
translateAssign (lval, e) = F.foldStore F.select F.store n is (translateExpr e)
where (n, is) = translateLValue lval | 160 | translateAssign :: B.Assignment -> F.Term
translateAssign (lval, e) = F.foldStore F.select F.store n is (translateExpr e)
where (n, is) = translateLValue lval | 160 | translateAssign (lval, e) = F.foldStore F.select F.store n is (translateExpr e)
where (n, is) = translateLValue lval | 118 | false | true | 0 | 7 | 23 | 68 | 35 | 33 | null | null |
roman/Haskell-Reactive-Extensions | rx-core/src/Rx/Observable/Types.hs | mit | safeSubscribe
:: Observable s v
-> (v -> IO ())
-> (SomeException -> IO ())
-> IO ()
-> IO Disposable
safeSubscribe !source nextHandler errHandler complHandler =
subscribe (secureSource source) nextHandler errHandler complHandler
where
secureSource :: Observable s v -> Observable s v
sec... | 701 | safeSubscribe
:: Observable s v
-> (v -> IO ())
-> (SomeException -> IO ())
-> IO ()
-> IO Disposable
safeSubscribe !source nextHandler errHandler complHandler =
subscribe (secureSource source) nextHandler errHandler complHandler
where
secureSource :: Observable s v -> Observable s v
sec... | 701 | safeSubscribe !source nextHandler errHandler complHandler =
subscribe (secureSource source) nextHandler errHandler complHandler
where
secureSource :: Observable s v -> Observable s v
secureSource source' = Observable $ \observer ->
main observer
where
main observer =
subs... | 581 | false | true | 0 | 13 | 225 | 222 | 107 | 115 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprReg :: Reg -> SDoc
pprReg r
= case r of
RegReal (RealRegSingle i) -> ppr_reg_no i
RegReal (RealRegPair{}) -> panic "PPC.pprReg: no reg pairs on this arch"
RegVirtual (VirtualRegI u) -> text "%vI_" <> pprUnique u
RegVirtual (VirtualRegHi u) -> text "%vHi_" <> pprUnique u
Re... | 2,615 | pprReg :: Reg -> SDoc
pprReg r
= case r of
RegReal (RealRegSingle i) -> ppr_reg_no i
RegReal (RealRegPair{}) -> panic "PPC.pprReg: no reg pairs on this arch"
RegVirtual (VirtualRegI u) -> text "%vI_" <> pprUnique u
RegVirtual (VirtualRegHi u) -> text "%vHi_" <> pprUnique u
Reg... | 2,614 | pprReg r
= case r of
RegReal (RealRegSingle i) -> ppr_reg_no i
RegReal (RealRegPair{}) -> panic "PPC.pprReg: no reg pairs on this arch"
RegVirtual (VirtualRegI u) -> text "%vI_" <> pprUnique u
RegVirtual (VirtualRegHi u) -> text "%vHi_" <> pprUnique u
RegVirtual (VirtualRegF ... | 2,592 | false | true | 0 | 15 | 1,129 | 954 | 465 | 489 | null | null |
stevezhee/eel | src/Eel.hs | bsd-3-clause | -- | result = xor ty op1, op2
-- http://llvm.org/docs/LangRef.html#xor-instruction
xor :: IsInt a => V a -> V a -> I a
xor = binop "xor" | 136 | xor :: IsInt a => V a -> V a -> I a
xor = binop "xor" | 53 | xor = binop "xor" | 17 | true | true | 0 | 9 | 26 | 46 | 20 | 26 | null | null |
cbpark/hep-kinematics | src/HEP/Data/LHEF.hs | bsd-3-clause | getDaughters :: Int -> Reader EventEntry [Particle]
getDaughters i = do
pm <- ask
daughters <- asks $ M.filter (\Particle {..} -> fst mothup == i)
return $ M.foldrWithKey
(\k p acc -> case istup p of
1 -> p : acc
_ -> runReader (getDaughters k) pm <> acc) mempty
... | 332 | getDaughters :: Int -> Reader EventEntry [Particle]
getDaughters i = do
pm <- ask
daughters <- asks $ M.filter (\Particle {..} -> fst mothup == i)
return $ M.foldrWithKey
(\k p acc -> case istup p of
1 -> p : acc
_ -> runReader (getDaughters k) pm <> acc) mempty
... | 332 | getDaughters i = do
pm <- ask
daughters <- asks $ M.filter (\Particle {..} -> fst mothup == i)
return $ M.foldrWithKey
(\k p acc -> case istup p of
1 -> p : acc
_ -> runReader (getDaughters k) pm <> acc) mempty
daughters | 280 | false | true | 0 | 17 | 111 | 136 | 66 | 70 | null | null |
aaronc/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | mapPTermFC f g (PConstant fc c) = PConstant (f fc) c | 52 | mapPTermFC f g (PConstant fc c) = PConstant (f fc) c | 52 | mapPTermFC f g (PConstant fc c) = PConstant (f fc) c | 52 | false | false | 0 | 7 | 10 | 32 | 15 | 17 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/PannerNode.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/webkitAudioPannerNode.coneInnerAngle Mozilla webkitAudioPannerNode.coneInnerAngle documentation>
getConeInnerAngle :: (MonadDOM m) => PannerNode -> m Double
getConeInnerAngle self
= liftDOM ((self ^. js "coneInnerAngle") >>= valToNumber) | 295 | getConeInnerAngle :: (MonadDOM m) => PannerNode -> m Double
getConeInnerAngle self
= liftDOM ((self ^. js "coneInnerAngle") >>= valToNumber) | 142 | getConeInnerAngle self
= liftDOM ((self ^. js "coneInnerAngle") >>= valToNumber) | 82 | true | true | 0 | 9 | 27 | 51 | 26 | 25 | null | null |
google/codeworld | codeworld-compiler/src/CodeWorld/Compile/Requirements/Language.hs | apache-2.0 | definedByFunction :: Aeson.Value -> Aeson.Parser Rule
definedByFunction = withObject "definedByFunction" $ \o ->
DefinedByFunction <$> o .: "variable"
<*> o .: "function" | 176 | definedByFunction :: Aeson.Value -> Aeson.Parser Rule
definedByFunction = withObject "definedByFunction" $ \o ->
DefinedByFunction <$> o .: "variable"
<*> o .: "function" | 176 | definedByFunction = withObject "definedByFunction" $ \o ->
DefinedByFunction <$> o .: "variable"
<*> o .: "function" | 122 | false | true | 7 | 8 | 27 | 62 | 29 | 33 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/interview/zalora/src/Interview.hs | unlicense | newGroupCLI :: String -> IO ()
newGroupCLI gName = do
r <- newGroup gName
print r | 89 | newGroupCLI :: String -> IO ()
newGroupCLI gName = do
r <- newGroup gName
print r | 89 | newGroupCLI gName = do
r <- newGroup gName
print r | 58 | false | true | 0 | 8 | 23 | 39 | 17 | 22 | null | null |
vikraman/ghc | libraries/base/GHC/List.hs | bsd-3-clause | zip3 _ _ _ = [] | 30 | zip3 _ _ _ = [] | 30 | zip3 _ _ _ = [] | 30 | false | false | 1 | 6 | 20 | 16 | 6 | 10 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Html.hs | gpl-2.0 | parseRules ("HTML","CSS") =
(((pDetect2Chars False '/' '>' >>= withAttribute KeywordTok) >>~ (popContext))
<|>
((pDetectChar False '>' >>= withAttribute KeywordTok) >>~ pushContext ("HTML","CSS content"))
<|>
((parseRules ("HTML","FindAttributes")))
<|>
((pRegExpr regex_'5cS >>= withAttribute ErrorT... | 430 | parseRules ("HTML","CSS") =
(((pDetect2Chars False '/' '>' >>= withAttribute KeywordTok) >>~ (popContext))
<|>
((pDetectChar False '>' >>= withAttribute KeywordTok) >>~ pushContext ("HTML","CSS content"))
<|>
((parseRules ("HTML","FindAttributes")))
<|>
((pRegExpr regex_'5cS >>= withAttribute ErrorT... | 430 | parseRules ("HTML","CSS") =
(((pDetect2Chars False '/' '>' >>= withAttribute KeywordTok) >>~ (popContext))
<|>
((pDetectChar False '>' >>= withAttribute KeywordTok) >>~ pushContext ("HTML","CSS content"))
<|>
((parseRules ("HTML","FindAttributes")))
<|>
((pRegExpr regex_'5cS >>= withAttribute ErrorT... | 430 | false | false | 0 | 15 | 71 | 162 | 86 | 76 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Runtime/Machine.hs | mit | uprim1 !ustk ACOS !i = do
d <- peekOffD ustk i
ustk <- bump ustk
pokeD ustk (acos d)
pure ustk | 102 | uprim1 !ustk ACOS !i = do
d <- peekOffD ustk i
ustk <- bump ustk
pokeD ustk (acos d)
pure ustk | 102 | uprim1 !ustk ACOS !i = do
d <- peekOffD ustk i
ustk <- bump ustk
pokeD ustk (acos d)
pure ustk | 102 | false | false | 2 | 10 | 28 | 58 | 24 | 34 | null | null |
PelleJuul/popl | src/Generator/Expression.hs | mit | generateExpr (CharLitExpr c) = show $ charLitValue c | 52 | generateExpr (CharLitExpr c) = show $ charLitValue c | 52 | generateExpr (CharLitExpr c) = show $ charLitValue c | 52 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
rueshyna/gogol | gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/List.hs | mpl-2.0 | -- | V1 error format.
prclXgafv :: Lens' ProjectsRegionsClustersList (Maybe Text)
prclXgafv
= lens _prclXgafv (\ s a -> s{_prclXgafv = a}) | 140 | prclXgafv :: Lens' ProjectsRegionsClustersList (Maybe Text)
prclXgafv
= lens _prclXgafv (\ s a -> s{_prclXgafv = a}) | 118 | prclXgafv
= lens _prclXgafv (\ s a -> s{_prclXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
facebookincubator/duckling | Duckling/Numeral/LO/Rules.hs | bsd-3-clause | elevenToNineteenMap :: HashMap Text Integer
elevenToNineteenMap = HashMap.fromList
[ ( "ສິບເອັດ", 11 )
, ( "ສິບສອງ", 12 )
, ( "ສິບສາມ", 13 )
, ( "ສິບສີ່", 14 )
, ( "ສິບຫ້າ", 15 )
, ( "ສິບຫົກ", 16 )
, ( "ສິບເຈັດ", 17 )
, ( "ສິບແປດ", 18 )
, ( "ສິບເກົ້າ", 19 )
] | 279 | elevenToNineteenMap :: HashMap Text Integer
elevenToNineteenMap = HashMap.fromList
[ ( "ສິບເອັດ", 11 )
, ( "ສິບສອງ", 12 )
, ( "ສິບສາມ", 13 )
, ( "ສິບສີ່", 14 )
, ( "ສິບຫ້າ", 15 )
, ( "ສິບຫົກ", 16 )
, ( "ສິບເຈັດ", 17 )
, ( "ສິບແປດ", 18 )
, ( "ສິບເກົ້າ", 19 )
] | 279 | elevenToNineteenMap = HashMap.fromList
[ ( "ສິບເອັດ", 11 )
, ( "ສິບສອງ", 12 )
, ( "ສິບສາມ", 13 )
, ( "ສິບສີ່", 14 )
, ( "ສິບຫ້າ", 15 )
, ( "ສິບຫົກ", 16 )
, ( "ສິບເຈັດ", 17 )
, ( "ສິບແປດ", 18 )
, ( "ສິບເກົ້າ", 19 )
] | 235 | false | true | 0 | 6 | 73 | 102 | 64 | 38 | null | null |
gibiansky/jupyter-haskell | tests/Jupyter/Test/Install.hs | mit | createTestKernelspec :: String -> IO Kernelspec
createTestKernelspec tmp = do
let kernelJsFile = tmp ++ "/" ++ "kernel.js"
writeFile kernelJsFile "kernel.js"
let kernelLogoFile = tmp ++ "/" ++ "logo-64x64.png"
writeFile kernelLogoFile "logo-64x64.png"
return
Kernelspec
{ kernelspecDisplayName = "T... | 586 | createTestKernelspec :: String -> IO Kernelspec
createTestKernelspec tmp = do
let kernelJsFile = tmp ++ "/" ++ "kernel.js"
writeFile kernelJsFile "kernel.js"
let kernelLogoFile = tmp ++ "/" ++ "logo-64x64.png"
writeFile kernelLogoFile "logo-64x64.png"
return
Kernelspec
{ kernelspecDisplayName = "T... | 586 | createTestKernelspec tmp = do
let kernelJsFile = tmp ++ "/" ++ "kernel.js"
writeFile kernelJsFile "kernel.js"
let kernelLogoFile = tmp ++ "/" ++ "logo-64x64.png"
writeFile kernelLogoFile "logo-64x64.png"
return
Kernelspec
{ kernelspecDisplayName = "Test"
, kernelspecLanguage = "test"
,... | 538 | false | true | 0 | 11 | 130 | 138 | 72 | 66 | null | null |
ekalosak/haskell-practice | tictactoe/Tictactoe.hs | lgpl-3.0 | full :: Board -> Bool
full b = not . any (==E) $ b | 50 | full :: Board -> Bool
full b = not . any (==E) $ b | 50 | full b = not . any (==E) $ b | 28 | false | true | 0 | 8 | 13 | 39 | 18 | 21 | null | null |
balangs/eTeak | src/BalsaLexer.hs | bsd-3-clause | balsaKeywords :: [String]
balsaKeywords = ["and", "arbitrate", "array", "as",
"begin", "bits", "builtin",
"case", "channel", "constant", "continue",
"else", "end", "enumeration",
"for", "function",
"if", "in", "import", "input", "is",
"local", "log", "loop",
"... | 556 | balsaKeywords :: [String]
balsaKeywords = ["and", "arbitrate", "array", "as",
"begin", "bits", "builtin",
"case", "channel", "constant", "continue",
"else", "end", "enumeration",
"for", "function",
"if", "in", "import", "input", "is",
"local", "log", "loop",
"not"... | 552 | balsaKeywords = ["and", "arbitrate", "array", "as",
"begin", "bits", "builtin",
"case", "channel", "constant", "continue",
"else", "end", "enumeration",
"for", "function",
"if", "in", "import", "input", "is",
"local", "log", "loop",
"not",
"of", "or", "out... | 526 | false | true | 0 | 7 | 171 | 150 | 95 | 55 | null | null |
DanielSchuessler/hstri | Blender/Build.hs | gpl-3.0 | newCamObj :: (?sceneE::Python ()) =>PythonVar -> BlenderObject BlenderCamData -> Python ()
newCamObj objVar BObj{..} = do
let camVar = pyv "cam"
blenderInit camVar (bobj_data :: BlenderCamData)
newObj objVar bobj_name camVar
applyBlenderTransform objVar bobj_transform | 284 | newCamObj :: (?sceneE::Python ()) =>PythonVar -> BlenderObject BlenderCamData -> Python ()
newCamObj objVar BObj{..} = do
let camVar = pyv "cam"
blenderInit camVar (bobj_data :: BlenderCamData)
newObj objVar bobj_name camVar
applyBlenderTransform objVar bobj_transform | 284 | newCamObj objVar BObj{..} = do
let camVar = pyv "cam"
blenderInit camVar (bobj_data :: BlenderCamData)
newObj objVar bobj_name camVar
applyBlenderTransform objVar bobj_transform | 193 | false | true | 0 | 11 | 48 | 101 | 46 | 55 | null | null |
li-zhirui/EoplLangs | src/ThreadsLang/Evaluator.hs | bsd-3-clause | valueOf :: Expression -> Environment -> Store -> Scheduler -> Continuation
-> EvaluateResult
valueOf (ConstExpr x) _ s sch c = evalConstExpr x s sch c | 158 | valueOf :: Expression -> Environment -> Store -> Scheduler -> Continuation
-> EvaluateResult
valueOf (ConstExpr x) _ s sch c = evalConstExpr x s sch c | 158 | valueOf (ConstExpr x) _ s sch c = evalConstExpr x s sch c | 57 | false | true | 0 | 13 | 33 | 62 | 29 | 33 | null | null |
IreneKnapp/Faction | libfaction/Distribution/Simple/Program/Run.hs | bsd-3-clause | programInvocation :: ConfiguredProgram -> [String] -> ProgramInvocation
programInvocation prog args =
emptyProgramInvocation {
progInvokePath = programPath prog,
progInvokeArgs = programDefaultArgs prog
++ args
++ programOverrideArgs prog
} | 288 | programInvocation :: ConfiguredProgram -> [String] -> ProgramInvocation
programInvocation prog args =
emptyProgramInvocation {
progInvokePath = programPath prog,
progInvokeArgs = programDefaultArgs prog
++ args
++ programOverrideArgs prog
} | 288 | programInvocation prog args =
emptyProgramInvocation {
progInvokePath = programPath prog,
progInvokeArgs = programDefaultArgs prog
++ args
++ programOverrideArgs prog
} | 216 | false | true | 0 | 9 | 74 | 58 | 30 | 28 | null | null |
ollef/oslo-haskell | State.hs | cc0-1.0 | todo :: a
todo = undefined | 26 | todo :: a
todo = undefined | 26 | todo = undefined | 16 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
elfeck/grouphs | src/SnGroup.hs | mit | applyPermuta :: Permuta -> Permuta -> Permuta
applyPermuta (Permuta p1) (Permuta p2) = Permuta (applyPerm p1 p2) | 112 | applyPermuta :: Permuta -> Permuta -> Permuta
applyPermuta (Permuta p1) (Permuta p2) = Permuta (applyPerm p1 p2) | 112 | applyPermuta (Permuta p1) (Permuta p2) = Permuta (applyPerm p1 p2) | 66 | false | true | 0 | 7 | 16 | 47 | 23 | 24 | null | null |
tomlokhorst/language-cil | src/Language/Cil/Build.hs | bsd-3-clause | beq :: Label -> MethodDecl
beq = OpCode . Beq | 45 | beq :: Label -> MethodDecl
beq = OpCode . Beq | 45 | beq = OpCode . Beq | 18 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
abakst/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString.hs | bsd-3-clause | -- todo fuse
-- | /O(n)/ Applied to a predicate and a 'ByteString', 'all' determines
-- if all elements of the 'ByteString' satisfy the predicate.
all :: (Word8 -> Bool) -> ByteString -> Bool
all _ (PS _ _ 0) = True | 216 | all :: (Word8 -> Bool) -> ByteString -> Bool
all _ (PS _ _ 0) = True | 68 | all _ (PS _ _ 0) = True | 23 | true | true | 0 | 7 | 42 | 44 | 24 | 20 | null | null |
Happy-Ferret/xmonad | src/XMonad/Core.hs | bsd-3-clause | -- | A replacement for 'forkProcess' which resets default signal handlers.
xfork :: MonadIO m => IO () -> m ProcessID
xfork x = io . forkProcess . finally nullStdin $ do
uninstallSignalHandlers
createSession
x
where
nullStdin = do
fd <- openFd "/dev/null" Rea... | 555 | xfork :: MonadIO m => IO () -> m ProcessID
xfork x = io . forkProcess . finally nullStdin $ do
uninstallSignalHandlers
createSession
x
where
nullStdin = do
fd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags
dupTo fd stdInput
closeFd fd... | 480 | xfork x = io . forkProcess . finally nullStdin $ do
uninstallSignalHandlers
createSession
x
where
nullStdin = do
fd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags
dupTo fd stdInput
closeFd fd
-- | This is basically a map function, ru... | 437 | true | true | 0 | 8 | 157 | 98 | 44 | 54 | null | null |
ndmitchell/shake | src/Development/Shake/Command.hs | bsd-3-clause | addFSAOptions :: String -> [CmdOption] -> [CmdOption]
addFSAOptions x opts | any isFSAOptions opts = map f opts
where f (FSAOptions y) = FSAOptions $ nubOrd $ y ++ x
f x = x | 187 | addFSAOptions :: String -> [CmdOption] -> [CmdOption]
addFSAOptions x opts | any isFSAOptions opts = map f opts
where f (FSAOptions y) = FSAOptions $ nubOrd $ y ++ x
f x = x | 187 | addFSAOptions x opts | any isFSAOptions opts = map f opts
where f (FSAOptions y) = FSAOptions $ nubOrd $ y ++ x
f x = x | 133 | false | true | 0 | 9 | 47 | 82 | 40 | 42 | null | null |
geocurnoff/nikki | src/Sorts/DeathStones.hs | lgpl-3.0 | laserAnimationFrameTime :: Seconds = 0.1 | 40 | laserAnimationFrameTime :: Seconds = 0.1 | 40 | laserAnimationFrameTime :: Seconds = 0.1 | 40 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
tomlokhorst/FunVM | src/FunVM/Core/Build.hs | bsd-3-clause | escChar ':' = "colon" | 21 | escChar ':' = "colon" | 21 | escChar ':' = "colon" | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Mattiemus/LaneWars | Game/Shared/Object.hs | mit | enemyTeam Blue = Red | 20 | enemyTeam Blue = Red | 20 | enemyTeam Blue = Red | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
oldmanmike/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | genBranch :: BlockId -> LlvmM StmtData
genBranch id =
let label = blockIdToLlvm id
in return (unitOL $ Branch label, []) | 128 | genBranch :: BlockId -> LlvmM StmtData
genBranch id =
let label = blockIdToLlvm id
in return (unitOL $ Branch label, []) | 128 | genBranch id =
let label = blockIdToLlvm id
in return (unitOL $ Branch label, []) | 89 | false | true | 0 | 10 | 28 | 53 | 25 | 28 | null | null |
mightymoose/liquidhaskell | benchmarks/xmonad-0.10/tests/Properties.hs | bsd-3-clause | prop_greedyView_I (n :: NonNegative Int) (x :: T) =
invariant $ greedyView (fromIntegral n) x | 97 | prop_greedyView_I (n :: NonNegative Int) (x :: T) =
invariant $ greedyView (fromIntegral n) x | 97 | prop_greedyView_I (n :: NonNegative Int) (x :: T) =
invariant $ greedyView (fromIntegral n) x | 97 | false | false | 3 | 7 | 18 | 46 | 21 | 25 | null | null |
cameronkerrnz/iptables-metalanguage | src/Text/IptablesMetalanguage/Print.hs | bsd-3-clause | printPort :: Port -> String
printPort (Port ps) = intercalate "," $ map show ps | 79 | printPort :: Port -> String
printPort (Port ps) = intercalate "," $ map show ps | 79 | printPort (Port ps) = intercalate "," $ map show ps | 51 | false | true | 0 | 9 | 14 | 41 | 18 | 23 | null | null |
tchagnon/cs636-raytracer | a6/Ray.hs | apache-2.0 | etaWater :: RealT
etaWater = 1.33 | 33 | etaWater :: RealT
etaWater = 1.33 | 33 | etaWater = 1.33 | 15 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Utils/Files.hs | bsd-3-clause | extFileName :: Ext -> FilePath -> FilePath
extFileName e f = path </> addExtension file ext
where
path = tempDirectory f
file = takeFileName f
ext = extMap e | 198 | extFileName :: Ext -> FilePath -> FilePath
extFileName e f = path </> addExtension file ext
where
path = tempDirectory f
file = takeFileName f
ext = extMap e | 198 | extFileName e f = path </> addExtension file ext
where
path = tempDirectory f
file = takeFileName f
ext = extMap e | 151 | false | true | 0 | 6 | 69 | 60 | 29 | 31 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Points.hs | bsd-3-clause | --------------------------------------------------------------------------------
pointSprite :: StateVar Capability
pointSprite = makeCapability CapPointSprite | 160 | pointSprite :: StateVar Capability
pointSprite = makeCapability CapPointSprite | 78 | pointSprite = makeCapability CapPointSprite | 43 | true | true | 0 | 5 | 9 | 18 | 9 | 9 | null | null |
shouya/thinking-dumps | tsp/TSPLib.hs | mit | ringInsertBefore :: PathRing -> Node -> [Node] -> PathRing
ringInsertBefore PathRing {..} n ns = PathRing { prLength = newPrLength
, prPath = newPrPath
}
where newPrLength = prLength + length ns
newPrPath = foo p... | 506 | ringInsertBefore :: PathRing -> Node -> [Node] -> PathRing
ringInsertBefore PathRing {..} n ns = PathRing { prLength = newPrLength
, prPath = newPrPath
}
where newPrLength = prLength + length ns
newPrPath = foo p... | 506 | ringInsertBefore PathRing {..} n ns = PathRing { prLength = newPrLength
, prPath = newPrPath
}
where newPrLength = prLength + length ns
newPrPath = foo prPath
foo (a:as) = if a == n
... | 447 | false | true | 3 | 9 | 238 | 157 | 76 | 81 | null | null |
snoyberg/yesodwiki | Handler/DownloadDitamap.hs | bsd-2-clause | mapName :: TMapId -> FilePath
mapName tmid = "map-" ++ unpack (toSinglePiece tmid) ++ ".ditamap" | 96 | mapName :: TMapId -> FilePath
mapName tmid = "map-" ++ unpack (toSinglePiece tmid) ++ ".ditamap" | 96 | mapName tmid = "map-" ++ unpack (toSinglePiece tmid) ++ ".ditamap" | 66 | false | true | 0 | 9 | 14 | 35 | 17 | 18 | null | null |
wavewave/gnuplot | src/Graphics/Gnuplot/Simple.hs | bsd-3-clause | plotTypeToGraph :: PlotType -> Graph2D.Type -- GraphType.T
plotTypeToGraph t =
case t of
Lines -> "lines"
Points -> "points"
LinesPoints -> "linespoints"
Impulses -> "impulses"
Dots -> "dots"
Steps -> "steps"
FSteps -> "fs... | 952 | plotTypeToGraph :: PlotType -> Graph2D.Type
plotTypeToGraph t =
case t of
Lines -> "lines"
Points -> "points"
LinesPoints -> "linespoints"
Impulses -> "impulses"
Dots -> "dots"
Steps -> "steps"
FSteps -> "fsteps"
HiS... | 937 | plotTypeToGraph t =
case t of
Lines -> "lines"
Points -> "points"
LinesPoints -> "linespoints"
Impulses -> "impulses"
Dots -> "dots"
Steps -> "steps"
FSteps -> "fsteps"
HiSteps -> "histeps"
ErrorBars ... | 893 | true | true | 0 | 7 | 354 | 169 | 85 | 84 | null | null |
MichaeGon/stone | src/CodeGen.hs | bsd-3-clause | pop :: EnvState (Maybe Env)
pop = get >>= check
where
check :: Env -> EnvState (Maybe Env)
check (x : xs) = return [x] <$ put xs
check _ = return Nothing | 181 | pop :: EnvState (Maybe Env)
pop = get >>= check
where
check :: Env -> EnvState (Maybe Env)
check (x : xs) = return [x] <$ put xs
check _ = return Nothing | 181 | pop = get >>= check
where
check :: Env -> EnvState (Maybe Env)
check (x : xs) = return [x] <$ put xs
check _ = return Nothing | 153 | false | true | 3 | 8 | 60 | 89 | 42 | 47 | null | null |
shlevy/ghc | compiler/hsSyn/HsBinds.hs | bsd-3-clause | ppr_sig (InlineSig var inl)
= pragSrcBrackets (inl_src inl) "{-# INLINE" (pprInline inl
<+> pprPrefixOcc (unLoc var)) | 155 | ppr_sig (InlineSig var inl)
= pragSrcBrackets (inl_src inl) "{-# INLINE" (pprInline inl
<+> pprPrefixOcc (unLoc var)) | 155 | ppr_sig (InlineSig var inl)
= pragSrcBrackets (inl_src inl) "{-# INLINE" (pprInline inl
<+> pprPrefixOcc (unLoc var)) | 155 | false | false | 0 | 10 | 53 | 51 | 23 | 28 | null | null |
dmbarbour/Sirea | src/Sirea/Internal/B0Impl.hs | bsd-3-clause | getCurr :: LCapsM m (S p x) -> DT
getCurr (LnkSig (LCX lc)) = lc_dtCurr lc | 74 | getCurr :: LCapsM m (S p x) -> DT
getCurr (LnkSig (LCX lc)) = lc_dtCurr lc | 74 | getCurr (LnkSig (LCX lc)) = lc_dtCurr lc | 40 | false | true | 0 | 9 | 15 | 46 | 22 | 24 | null | null |
rueshyna/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/CallSets/Delete.hs | mpl-2.0 | -- | JSONP
csdCallback :: Lens' CallSetsDelete (Maybe Text)
csdCallback
= lens _csdCallback (\ s a -> s{_csdCallback = a}) | 124 | csdCallback :: Lens' CallSetsDelete (Maybe Text)
csdCallback
= lens _csdCallback (\ s a -> s{_csdCallback = a}) | 113 | csdCallback
= lens _csdCallback (\ s a -> s{_csdCallback = a}) | 64 | true | true | 1 | 9 | 21 | 52 | 25 | 27 | null | null |
arianvp/binary-serialise-cbor | Data/Binary/Serialise/CBOR/Term.hs | bsd-3-clause | encodeTerm (TMapI ts) = encodeMapLenIndef
<> mconcat [ encodeTerm t <> encodeTerm t'
| (t, t') <- ts ]
<> encodeBreak | 216 | encodeTerm (TMapI ts) = encodeMapLenIndef
<> mconcat [ encodeTerm t <> encodeTerm t'
| (t, t') <- ts ]
<> encodeBreak | 216 | encodeTerm (TMapI ts) = encodeMapLenIndef
<> mconcat [ encodeTerm t <> encodeTerm t'
| (t, t') <- ts ]
<> encodeBreak | 216 | false | false | 0 | 11 | 119 | 53 | 26 | 27 | null | null |
Cahu/krpc-hs | src/KRPCHS.hs | gpl-3.0 | getStreamMessageIO :: MonadIO m => StreamClient -> m KRPCStreamMsg
getStreamMessageIO StreamClient{..} = unpackStreamMsg <$> liftIO (recvResponse streamSocket)
where
unpackStreamMsg res = KRPCStreamMsg $ M.fromList (extractStreamMessage res) | 247 | getStreamMessageIO :: MonadIO m => StreamClient -> m KRPCStreamMsg
getStreamMessageIO StreamClient{..} = unpackStreamMsg <$> liftIO (recvResponse streamSocket)
where
unpackStreamMsg res = KRPCStreamMsg $ M.fromList (extractStreamMessage res) | 247 | getStreamMessageIO StreamClient{..} = unpackStreamMsg <$> liftIO (recvResponse streamSocket)
where
unpackStreamMsg res = KRPCStreamMsg $ M.fromList (extractStreamMessage res) | 180 | false | true | 1 | 8 | 31 | 80 | 35 | 45 | null | null |
zydeon/fglext | Data/Graph/Inductive/Graph.hs | bsd-3-clause | -- | Remove an 'Edge' from the 'Graph'.
delEdge :: DynGraph gr => Edge -> gr a b -> gr a b
delEdge (v,w) g = case match v g of
(Nothing,_) -> g
(Just (p,v',l,s),g') -> (p,v',l,filter ((/=w).snd) s) & g'
-- | Remove an 'LEdge' from the 'Graph'. | 287 | delEdge :: DynGraph gr => Edge -> gr a b -> gr a b
delEdge (v,w) g = case match v g of
(Nothing,_) -> g
(Just (p,v',l,s),g') -> (p,v',l,filter ((/=w).snd) s) & g'
-- | Remove an 'LEdge' from the 'Graph'. | 247 | delEdge (v,w) g = case match v g of
(Nothing,_) -> g
(Just (p,v',l,s),g') -> (p,v',l,filter ((/=w).snd) s) & g'
-- | Remove an 'LEdge' from the 'Graph'. | 196 | true | true | 0 | 13 | 93 | 132 | 71 | 61 | null | null |
taxell/SHK | src/LexJSH.hs | mit | lexOp False ('\"' : rest) = '\"' : lexOp True rest | 57 | lexOp False ('\"' : rest) = '\"' : lexOp True rest | 57 | lexOp False ('\"' : rest) = '\"' : lexOp True rest | 57 | false | false | 0 | 7 | 17 | 29 | 13 | 16 | null | null |
JohnLato/iteratee | src/Data/Iteratee/Iteratee.hs | bsd-3-clause | -- | trace exceptions through enumeratees
traceEteeExc :: String -> Enumeratee s1 s2 m a -> Enumeratee s1 s2 m a
traceEteeExc lbl etee inner = runIter outer onDone (oc outer) onOuterErr
where
outer = etee inner'
inner' = runIter inner (od inner) (oc inner) (oe inner)
onDone innerRet = runIter innerRet (o... | 777 | traceEteeExc :: String -> Enumeratee s1 s2 m a -> Enumeratee s1 s2 m a
traceEteeExc lbl etee inner = runIter outer onDone (oc outer) onOuterErr
where
outer = etee inner'
inner' = runIter inner (od inner) (oc inner) (oe inner)
onDone innerRet = runIter innerRet (od outer) (oc outer)
... | 735 | traceEteeExc lbl etee inner = runIter outer onDone (oc outer) onOuterErr
where
outer = etee inner'
inner' = runIter inner (od inner) (oc inner) (oe inner)
onDone innerRet = runIter innerRet (od outer) (oc outer)
(showRec "output inner done" outer)
onOuterErr out... | 664 | true | true | 2 | 14 | 253 | 303 | 142 | 161 | null | null |
tjakway/ghcjvm | compiler/main/DynFlags.hs | bsd-3-clause | -- | Combine two Safe Haskell modes correctly. Used for dealing with multiple flags.
-- This makes Safe Haskell very much a monoid but for now I prefer this as I don't
-- want to export this functionality from the module but do want to export the
-- type constructors.
combineSafeFlags :: SafeHaskellMode -> SafeHaskellM... | 922 | combineSafeFlags :: SafeHaskellMode -> SafeHaskellMode -> DynP SafeHaskellMode
combineSafeFlags a b | a == Sf_None = return b
| b == Sf_None = return a
| a == b = return a
| otherwise = addErr errm >> pure a
wher... | 653 | combineSafeFlags a b | a == Sf_None = return b
| b == Sf_None = return a
| a == b = return a
| otherwise = addErr errm >> pure a
where errm = "Incompatible Safe Haskell flags! ("
++ show a ++ ... | 574 | true | true | 6 | 8 | 300 | 142 | 66 | 76 | null | null |
kazu-yamamoto/http-types | Network/HTTP/Types/Status.hs | bsd-3-clause | -- | Accepted 202
status202 :: Status
status202 = mkStatus 202 "Accepted" | 73 | status202 :: Status
status202 = mkStatus 202 "Accepted" | 55 | status202 = mkStatus 202 "Accepted" | 35 | true | true | 0 | 6 | 11 | 25 | 10 | 15 | null | null |
kazu-yamamoto/static-hash | Data/StaticHash.hs | bsd-3-clause | hashBy :: Hashable k => k -> Int -> Int
hashBy k p = hash k `mod` p | 67 | hashBy :: Hashable k => k -> Int -> Int
hashBy k p = hash k `mod` p | 67 | hashBy k p = hash k `mod` p | 27 | false | true | 0 | 7 | 17 | 40 | 20 | 20 | null | null |
orchid-hybrid/WHILE | Parser.hs | gpl-2.0 | parseOpR = choice [ do string "=" ; return Equal
, do string "<" ; return Less
, do string "<=" ; return LessEq
, do string ">" ; return Greater
, do string ">=" ; return GreaterEq
] | 272 | parseOpR = choice [ do string "=" ; return Equal
, do string "<" ; return Less
, do string "<=" ; return LessEq
, do string ">" ; return Greater
, do string ">=" ; return GreaterEq
] | 272 | parseOpR = choice [ do string "=" ; return Equal
, do string "<" ; return Less
, do string "<=" ; return LessEq
, do string ">" ; return Greater
, do string ">=" ; return GreaterEq
] | 272 | false | false | 0 | 9 | 128 | 89 | 39 | 50 | null | null |
carlohamalainen/ghc-mod | Language/Haskell/GhcMod/Types.hs | bsd-3-clause | replace c cs (x:xs)
| x == c = (cs ++) . replace c cs xs
| otherwise = (x :) . replace c cs xs | 101 | replace c cs (x:xs)
| x == c = (cs ++) . replace c cs xs
| otherwise = (x :) . replace c cs xs | 101 | replace c cs (x:xs)
| x == c = (cs ++) . replace c cs xs
| otherwise = (x :) . replace c cs xs | 101 | false | false | 0 | 8 | 32 | 69 | 34 | 35 | null | null |
oldmanmike/ghc | compiler/typecheck/TcGenGenerics.hs | bsd-3-clause | allowedUnliftedTy :: Type -> Bool
allowedUnliftedTy = isJust . unboxedRepRDRs | 77 | allowedUnliftedTy :: Type -> Bool
allowedUnliftedTy = isJust . unboxedRepRDRs | 77 | allowedUnliftedTy = isJust . unboxedRepRDRs | 43 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
brendanhay/gogol | gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs | mpl-2.0 | -- | If provided, the source code used for the build came from this location.
sContext :: Lens' Source (Maybe SourceContext)
sContext = lens _sContext (\ s a -> s{_sContext = a}) | 178 | sContext :: Lens' Source (Maybe SourceContext)
sContext = lens _sContext (\ s a -> s{_sContext = a}) | 100 | sContext = lens _sContext (\ s a -> s{_sContext = a}) | 53 | true | true | 0 | 9 | 31 | 46 | 25 | 21 | null | null |
david-caro/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkTr5 = verify checkTr "tr foo bar" | 43 | prop_checkTr5 = verify checkTr "tr foo bar" | 43 | prop_checkTr5 = verify checkTr "tr foo bar" | 43 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
kirhgoff/haskell-sandbox | euler31/euler31.hs | mit | | amount > 0 && null coins = [Set.empty] | 40 | | amount > 0 && null coins = [Set.empty] | 40 | | amount > 0 && null coins = [Set.empty] | 40 | false | false | 0 | 9 | 8 | 29 | 13 | 16 | null | null |
slpopejoy/fadno-xml | src/Fadno/Xml/XParser.hs | bsd-2-clause | -- Element lenses
lAttrs :: Lens' X.Element [X.Attr]
lAttrs f s = fmap (\a -> s { X.elAttribs = a }) (f $ X.elAttribs s) | 120 | lAttrs :: Lens' X.Element [X.Attr]
lAttrs f s = fmap (\a -> s { X.elAttribs = a }) (f $ X.elAttribs s) | 102 | lAttrs f s = fmap (\a -> s { X.elAttribs = a }) (f $ X.elAttribs s) | 67 | true | true | 0 | 9 | 24 | 64 | 34 | 30 | null | null |
alexander-at-github/eta | compiler/ETA/TypeCheck/TcType.hs | bsd-3-clause | tcGetTyVar :: String -> Type -> TyVar
tcGetTyVar msg ty = expectJust msg (tcGetTyVar_maybe ty) | 94 | tcGetTyVar :: String -> Type -> TyVar
tcGetTyVar msg ty = expectJust msg (tcGetTyVar_maybe ty) | 94 | tcGetTyVar msg ty = expectJust msg (tcGetTyVar_maybe ty) | 56 | false | true | 0 | 8 | 14 | 40 | 18 | 22 | null | null |
GaloisInc/galua | lib/macho/src/Data/Macho.hs | mit | n_type 0x4e = N_ENSYM | 21 | n_type 0x4e = N_ENSYM | 21 | n_type 0x4e = N_ENSYM | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/DsUtils.hs | bsd-3-clause | mkDataConCase var ty alts@(alt1:_) = MatchResult fail_flag mk_case
where
con1 = alt_pat alt1
tycon = dataConTyCon con1
data_cons = tyConDataCons tycon
match_results = map alt_result alts
sorted_alts :: [CaseAlt DataCon]
sorted_alts = sort_alts alts
var_ty = id... | 1,988 | mkDataConCase var ty alts@(alt1:_) = MatchResult fail_flag mk_case
where
con1 = alt_pat alt1
tycon = dataConTyCon con1
data_cons = tyConDataCons tycon
match_results = map alt_result alts
sorted_alts :: [CaseAlt DataCon]
sorted_alts = sort_alts alts
var_ty = id... | 1,988 | mkDataConCase var ty alts@(alt1:_) = MatchResult fail_flag mk_case
where
con1 = alt_pat alt1
tycon = dataConTyCon con1
data_cons = tyConDataCons tycon
match_results = map alt_result alts
sorted_alts :: [CaseAlt DataCon]
sorted_alts = sort_alts alts
var_ty = id... | 1,988 | false | false | 0 | 17 | 630 | 506 | 260 | 246 | null | null |
simhu/cubical | CTT.hs | mit | showVal :: Val -> String
showVal VU = "U" | 63 | showVal :: Val -> String
showVal VU = "U" | 63 | showVal VU = "U" | 38 | false | true | 0 | 5 | 30 | 18 | 9 | 9 | null | null |
HIPERFIT/futhark | src/Futhark/TypeCheck.hs | isc | noArgAliases :: Arg -> Arg
noArgAliases (t, _) = (t, mempty) | 60 | noArgAliases :: Arg -> Arg
noArgAliases (t, _) = (t, mempty) | 60 | noArgAliases (t, _) = (t, mempty) | 33 | false | true | 0 | 8 | 10 | 36 | 18 | 18 | null | null |
kishoredbn/barrelfish | tools/sockeye/v1/SockeyeParser.hs | mit | blockSpec = do
bs <- choice [range, length, singleton]
return bs
where
singleton = do
address <- address
ps <- propSpec
return $ AST.SingletonBlock address ps
range = do
base <- try $ address <* symbol "-"
limit <- address
... | 582 | blockSpec = do
bs <- choice [range, length, singleton]
return bs
where
singleton = do
address <- address
ps <- propSpec
return $ AST.SingletonBlock address ps
range = do
base <- try $ address <* symbol "-"
limit <- address
... | 582 | blockSpec = do
bs <- choice [range, length, singleton]
return bs
where
singleton = do
address <- address
ps <- propSpec
return $ AST.SingletonBlock address ps
range = do
base <- try $ address <* symbol "-"
limit <- address
... | 582 | false | false | 0 | 11 | 244 | 176 | 81 | 95 | null | null |
tangboyun/miranda | src/MiRanda/Sheet/Styles.hs | gpl-3.0 | poorCell = title { bgColor = Just violet } | 42 | poorCell = title { bgColor = Just violet } | 42 | poorCell = title { bgColor = Just violet } | 42 | false | false | 0 | 7 | 8 | 17 | 9 | 8 | null | null |
kahless/report-comparator | src/Data/Extraction.hs | mit | fromNotes :: String -> Int -> FilePath -> IO [Address]
fromNotes sheet col file = do
pyFile <- getDataFileName "tables/addresses"
pyOut <- pythonStdout $ proc "python" [pyFile, file, sheet]
return [ Address name (NoteOrigin file sheet col row) ctx
| (row, line) <- [0..] `zip` splitOn "\0\n" pyOut
... | 491 | fromNotes :: String -> Int -> FilePath -> IO [Address]
fromNotes sheet col file = do
pyFile <- getDataFileName "tables/addresses"
pyOut <- pythonStdout $ proc "python" [pyFile, file, sheet]
return [ Address name (NoteOrigin file sheet col row) ctx
| (row, line) <- [0..] `zip` splitOn "\0\n" pyOut
... | 491 | fromNotes sheet col file = do
pyFile <- getDataFileName "tables/addresses"
pyOut <- pythonStdout $ proc "python" [pyFile, file, sheet]
return [ Address name (NoteOrigin file sheet col row) ctx
| (row, line) <- [0..] `zip` splitOn "\0\n" pyOut
, let names = lines line :: [String]
,... | 436 | false | true | 0 | 13 | 153 | 181 | 91 | 90 | null | null |
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell | src/ATP/Util/List.hs | gpl-3.0 | partition' :: (a -> Maybe (Either b c)) -> [a] -> ([b], [c])
partition' _ [] = ([], []) | 87 | partition' :: (a -> Maybe (Either b c)) -> [a] -> ([b], [c])
partition' _ [] = ([], []) | 87 | partition' _ [] = ([], []) | 26 | false | true | 0 | 10 | 18 | 69 | 38 | 31 | null | null |
lhoghu/yahoo-portfolio-manager | src/Data/YahooPortfolioManager/Yahoo.hs | mit | {-| Make an http request to yahoo for stock symbols and stream the result back.
The list of @Symbol@s are passed to the http request, therefore should be
recognised by yahoo.
See 'Lifting Operations' in conduit documentation for orientation on how to
process the resulting stream.
-}
getUrl :: (MonadIO m, FromRecord a... | 616 | getUrl :: (MonadIO m, FromRecord a) => HasHeader -> UrlBuilder -> Source m a
getUrl h u = do
r <- liftIO $ get (makeUrl' u)
case Data.Csv.decode h (removeUnwantedChars $ r ^. responseBody) of
Left err -> liftIO $ putStrLn ("Failed to decode yahoo response: " ++ err)
Right vals -> mapM_ yield (to... | 330 | getUrl h u = do
r <- liftIO $ get (makeUrl' u)
case Data.Csv.decode h (removeUnwantedChars $ r ^. responseBody) of
Left err -> liftIO $ putStrLn ("Failed to decode yahoo response: " ++ err)
Right vals -> mapM_ yield (toList vals) | 253 | true | true | 0 | 13 | 128 | 134 | 65 | 69 | null | null |
nlim/haskell-playground | src/Euler31.hs | mit | ways [] _ = return 0 | 20 | ways [] _ = return 0 | 20 | ways [] _ = return 0 | 20 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
kim/amazonka | amazonka-cognito-sync/gen/Network/AWS/CognitoSync/Types.hs | mpl-2.0 | -- | Data storage information for the identity pool.
ipuDataStorage :: Lens' IdentityPoolUsage (Maybe Integer)
ipuDataStorage = lens _ipuDataStorage (\s a -> s { _ipuDataStorage = a }) | 184 | ipuDataStorage :: Lens' IdentityPoolUsage (Maybe Integer)
ipuDataStorage = lens _ipuDataStorage (\s a -> s { _ipuDataStorage = a }) | 131 | ipuDataStorage = lens _ipuDataStorage (\s a -> s { _ipuDataStorage = a }) | 73 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
mortberg/cubicaltt | Connections.hs | mit | negFormula :: Formula -> Formula
negFormula (Dir b) = Dir (- b) | 70 | negFormula :: Formula -> Formula
negFormula (Dir b) = Dir (- b) | 70 | negFormula (Dir b) = Dir (- b) | 37 | false | true | 0 | 7 | 18 | 32 | 16 | 16 | null | null |
ezyang/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | zipIdKey = mkPreludeMiscIdUnique 33 | 56 | zipIdKey = mkPreludeMiscIdUnique 33 | 56 | zipIdKey = mkPreludeMiscIdUnique 33 | 56 | false | false | 0 | 5 | 24 | 9 | 4 | 5 | null | null |
nrolland/lab21 | src/Main.hs | apache-2.0 | diagnostics :: StateMonadPlus s String
diagnostics = stateMP (\(s, (a,b,ret)) -> let newCounts = (a,b+1, ret) in (show newCounts, (s, newCounts))) | 147 | diagnostics :: StateMonadPlus s String
diagnostics = stateMP (\(s, (a,b,ret)) -> let newCounts = (a,b+1, ret) in (show newCounts, (s, newCounts))) | 147 | diagnostics = stateMP (\(s, (a,b,ret)) -> let newCounts = (a,b+1, ret) in (show newCounts, (s, newCounts))) | 108 | false | true | 0 | 13 | 21 | 81 | 46 | 35 | null | null |
andreagenso/java2scala | test/Main.hs | apache-2.0 | test "tsp27" = tsp27 | 20 | test "tsp27" = tsp27 | 20 | test "tsp27" = tsp27 | 20 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
mwahab1/pandoc | src/Text/Pandoc/Readers/HTML.hs | gpl-2.0 | isSpace '\r' = True | 19 | isSpace '\r' = True | 19 | isSpace '\r' = True | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
kig/tomtegebra | Tomtegebra/Algebra.hs | gpl-3.0 | -- | Tries to convert the given 'Expr' to a 'Rule'. Only succeeds if the
-- expression is of form @'Expr' (\"=\", a, b)@
toRule :: Expr -> Maybe Rule
toRule (Expr ("=", a, b)) = Just (Rule (a, b)) | 198 | toRule :: Expr -> Maybe Rule
toRule (Expr ("=", a, b)) = Just (Rule (a, b)) | 75 | toRule (Expr ("=", a, b)) = Just (Rule (a, b)) | 46 | true | true | 0 | 8 | 41 | 53 | 29 | 24 | null | null |
diku-dk/futhark | src/Futhark/IR/Traversals.hs | isc | mapExpM tv (BasicOp (Manifest perm e)) =
BasicOp <$> (Manifest perm <$> mapOnVName tv e) | 90 | mapExpM tv (BasicOp (Manifest perm e)) =
BasicOp <$> (Manifest perm <$> mapOnVName tv e) | 90 | mapExpM tv (BasicOp (Manifest perm e)) =
BasicOp <$> (Manifest perm <$> mapOnVName tv e) | 90 | false | false | 0 | 9 | 16 | 44 | 21 | 23 | null | null |
Numberartificial/workflow | haskell-first-principles/src/RW/CH7/basicio.hs | mit | processData :: String -> String
processData = map toUpper | 57 | processData :: String -> String
processData = map toUpper | 57 | processData = map toUpper | 25 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
uduki/hsQt | Qtc/Enums/Gui/QSlider.hs | bsd-2-clause | eTicksRight :: TickPosition
eTicksRight
= ieTickPosition $ 2 | 62 | eTicksRight :: TickPosition
eTicksRight
= ieTickPosition $ 2 | 62 | eTicksRight
= ieTickPosition $ 2 | 34 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
kbiscanic/hash | src/Hash.hs | gpl-2.0 | runInteractive :: IO ()
runInteractive = do
wd' <- getCurrentDirectory
scrState <- initHashRc wd'
runInteractive' scrState
where runInteractive' :: ScriptState -> IO ()
runInteractive' ss = do
putStr $ wd ss
putStr ">"
line <- getLine
case parseAll line of
... | 538 | runInteractive :: IO ()
runInteractive = do
wd' <- getCurrentDirectory
scrState <- initHashRc wd'
runInteractive' scrState
where runInteractive' :: ScriptState -> IO ()
runInteractive' ss = do
putStr $ wd ss
putStr ">"
line <- getLine
case parseAll line of
... | 538 | runInteractive = do
wd' <- getCurrentDirectory
scrState <- initHashRc wd'
runInteractive' scrState
where runInteractive' :: ScriptState -> IO ()
runInteractive' ss = do
putStr $ wd ss
putStr ">"
line <- getLine
case parseAll line of
Left str -> do
... | 514 | false | true | 2 | 16 | 200 | 158 | 68 | 90 | null | null |
eyeinsky/m5 | M5/Expand.hs | mit | zipArgs formal@ (x : xs) actual@ (_ {-space-} : ys) assoc
= zipArgs formal ys assoc | 87 | zipArgs formal@ (x : xs) actual@ (_ {-space-} : ys) assoc
= zipArgs formal ys assoc | 87 | zipArgs formal@ (x : xs) actual@ (_ {-space-} : ys) assoc
= zipArgs formal ys assoc | 87 | false | false | 0 | 8 | 19 | 41 | 22 | 19 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.