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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Xtract/Lex.hs | gpl-3.0 | blank k p ('\r':s) = blank k p s | 32 | blank k p ('\r':s) = blank k p s | 32 | blank k p ('\r':s) = blank k p s | 32 | false | false | 0 | 6 | 8 | 30 | 13 | 17 | null | null |
ezyang/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isOverlappableTyVar tv
| isTyVar tv -- See Note [Coercion variables in free variable lists]
= ASSERT2( tcIsTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
SkolemTv _ overlappable -> overlappable
_ -> False
| otherwise = False | 272 | isOverlappableTyVar tv
| isTyVar tv -- See Note [Coercion variables in free variable lists]
= ASSERT2( tcIsTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
SkolemTv _ overlappable -> overlappable
_ -> False
| otherwise = False | 272 | isOverlappableTyVar tv
| isTyVar tv -- See Note [Coercion variables in free variable lists]
= ASSERT2( tcIsTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
SkolemTv _ overlappable -> overlappable
_ -> False
| otherwise = False | 272 | false | false | 0 | 8 | 84 | 76 | 33 | 43 | null | null |
xmonad/xmonad-contrib | XMonad/Actions/Commands.hs | bsd-3-clause | runCommand :: [(String, X ())] -> X ()
runCommand = runCommandConfig dmenu | 74 | runCommand :: [(String, X ())] -> X ()
runCommand = runCommandConfig dmenu | 74 | runCommand = runCommandConfig dmenu | 35 | false | true | 0 | 9 | 11 | 37 | 19 | 18 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo UnsafeThawArrayOp = mkGenPrimOp (fsLit "unsafeThawArray#") [alphaTyVar, deltaTyVar] [mkArrayPrimTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayPrimTy deltaTy alphaTy])) | 231 | primOpInfo UnsafeThawArrayOp = mkGenPrimOp (fsLit "unsafeThawArray#") [alphaTyVar, deltaTyVar] [mkArrayPrimTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayPrimTy deltaTy alphaTy])) | 231 | primOpInfo UnsafeThawArrayOp = mkGenPrimOp (fsLit "unsafeThawArray#") [alphaTyVar, deltaTyVar] [mkArrayPrimTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayPrimTy deltaTy alphaTy])) | 231 | false | false | 0 | 10 | 19 | 67 | 34 | 33 | null | null |
WillGluck/HaskellPlayground | modulesPlayground.hs | apache-2.0 | equation2 = [10,0,0,9] | 22 | equation2 = [10,0,0,9] | 22 | equation2 = [10,0,0,9] | 22 | false | false | 1 | 5 | 2 | 21 | 11 | 10 | null | null |
rfranek/duckling | Duckling/TimeGrain/PL/Rules.hs | bsd-3-clause | grains :: [(Text, String, TG.Grain)]
grains = [ ("second (grain)", "sekund(y|zie|(e|\x0119)|om|ami|ach|o|a)?|s", TG.Second)
, ("minute (grain)", "minut(y|cie|(e|\x0119)|om|o|ami|ach|(a|\x0105))?|m", TG.Minute)
, ("hour (grain)", "h|godzin(y|(e|\x0119)|ie|om|o|ami|ach|(a|\x0105))?", TG.Hour)
,... | 785 | grains :: [(Text, String, TG.Grain)]
grains = [ ("second (grain)", "sekund(y|zie|(e|\x0119)|om|ami|ach|o|a)?|s", TG.Second)
, ("minute (grain)", "minut(y|cie|(e|\x0119)|om|o|ami|ach|(a|\x0105))?|m", TG.Minute)
, ("hour (grain)", "h|godzin(y|(e|\x0119)|ie|om|o|ami|ach|(a|\x0105))?", TG.Hour)
,... | 785 | grains = [ ("second (grain)", "sekund(y|zie|(e|\x0119)|om|ami|ach|o|a)?|s", TG.Second)
, ("minute (grain)", "minut(y|cie|(e|\x0119)|om|o|ami|ach|(a|\x0105))?|m", TG.Minute)
, ("hour (grain)", "h|godzin(y|(e|\x0119)|ie|om|o|ami|ach|(a|\x0105))?", TG.Hour)
, ("day (grain)", "dzie(n|\x0144|ni(a|... | 748 | false | true | 0 | 7 | 119 | 137 | 87 | 50 | null | null |
stevejb71/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | -- | Delaborate a term without resugaring
delab :: IState -> Term -> PTerm
delab i tm = delab' i tm False False | 111 | delab :: IState -> Term -> PTerm
delab i tm = delab' i tm False False | 69 | delab i tm = delab' i tm False False | 36 | true | true | 0 | 6 | 22 | 34 | 17 | 17 | null | null |
mankyKitty/leesp | src/LeespParser.hs | mit | parseQuoted :: Parser LispVal
parseQuoted = do char '\''
x <- parseExpr
return $ List [Atom "quote", x] | 137 | parseQuoted :: Parser LispVal
parseQuoted = do char '\''
x <- parseExpr
return $ List [Atom "quote", x] | 137 | parseQuoted = do char '\''
x <- parseExpr
return $ List [Atom "quote", x] | 107 | false | true | 0 | 11 | 51 | 52 | 22 | 30 | null | null |
rjregenold/blog | css/blog.hs | mit | linkStates = a
<> (a # link)
<> (a # visited)
<> (a # active)
<> (a # hover) | 84 | linkStates = a
<> (a # link)
<> (a # visited)
<> (a # active)
<> (a # hover) | 84 | linkStates = a
<> (a # link)
<> (a # visited)
<> (a # active)
<> (a # hover) | 84 | false | false | 9 | 7 | 26 | 58 | 27 | 31 | null | null |
fpco/fay | src/Fay/Compiler/Exp.hs | bsd-3-clause | compileGuards rhss = throwError . UnsupportedRhs . GuardedRhss noI $ rhss | 73 | compileGuards rhss = throwError . UnsupportedRhs . GuardedRhss noI $ rhss | 73 | compileGuards rhss = throwError . UnsupportedRhs . GuardedRhss noI $ rhss | 73 | false | false | 0 | 7 | 10 | 24 | 11 | 13 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | -- Just another placeholder;
mkHsDo ctxt stmts = HsDo ctxt stmts placeHolderType | 81 | mkHsDo ctxt stmts = HsDo ctxt stmts placeHolderType | 51 | mkHsDo ctxt stmts = HsDo ctxt stmts placeHolderType | 51 | true | false | 0 | 5 | 12 | 19 | 9 | 10 | null | null |
nkaretnikov/ghc | compiler/utils/Outputable.hs | bsd-3-clause | -- E.g. "one argument"
speakNOf n d = speakN n <+> d <> char 's' | 64 | speakNOf n d = speakN n <+> d <> char 's' | 41 | speakNOf n d = speakN n <+> d <> char 's' | 41 | true | false | 0 | 7 | 14 | 26 | 12 | 14 | null | null |
svenssonjoel/ObsidianGFX | Examples/ScanBench/ScanBench.hs | bsd-3-clause | segmentedScan segSize vec | V.length vec == segSize = V.scanl1 (+) vec
| V.length vec < segSize = error "Incorrect vector size" | 153 | segmentedScan segSize vec | V.length vec == segSize = V.scanl1 (+) vec
| V.length vec < segSize = error "Incorrect vector size" | 153 | segmentedScan segSize vec | V.length vec == segSize = V.scanl1 (+) vec
| V.length vec < segSize = error "Incorrect vector size" | 153 | false | false | 0 | 10 | 47 | 56 | 25 | 31 | null | null |
rpeszek/GraphPlay | play/Play/DiGraph/SampleData.hs | bsd-3-clause | playFirstLast = FL.FLWordText playFirstLastTxt | 46 | playFirstLast = FL.FLWordText playFirstLastTxt | 46 | playFirstLast = FL.FLWordText playFirstLastTxt | 46 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
CrazyMerlyn/99problems-haskell | 55-60.hs | mit | -- Problem 56
-- symmetric
-- Symmetric binary trees
-- Write a function to check if a tree is symmetric
mirror :: Tree a -> Tree a -> Bool
mirror Empty Empty = True | 166 | mirror :: Tree a -> Tree a -> Bool
mirror Empty Empty = True | 60 | mirror Empty Empty = True | 25 | true | true | 0 | 7 | 34 | 34 | 18 | 16 | null | null |
edsko/hackage-server | exes/Main.hs | bsd-3-clause | checkStaticDir :: FilePath -> Flag FilePath -> IO ()
checkStaticDir staticDir staticDirFlag = do
exists <- doesDirectoryExist staticDir
when (not exists) $
case staticDirFlag of
Flag _ -> dieNoVerbosity $ "The given static files directory " ++ staticDir
++ " does not exist."
... | 962 | checkStaticDir :: FilePath -> Flag FilePath -> IO ()
checkStaticDir staticDir staticDirFlag = do
exists <- doesDirectoryExist staticDir
when (not exists) $
case staticDirFlag of
Flag _ -> dieNoVerbosity $ "The given static files directory " ++ staticDir
++ " does not exist."
... | 962 | checkStaticDir staticDir staticDirFlag = do
exists <- doesDirectoryExist staticDir
when (not exists) $
case staticDirFlag of
Flag _ -> dieNoVerbosity $ "The given static files directory " ++ staticDir
++ " does not exist."
-- Be helpful to people running from the build... | 909 | false | true | 0 | 14 | 275 | 156 | 73 | 83 | null | null |
rabipelais/record-gl | examples/2D/Main.hs | bsd-3-clause | grassTiles :: IO (BufferedVertices Vertex)
grassTiles = bufferVertices . tileTex . spaceColumns $ map tile gameLevel | 116 | grassTiles :: IO (BufferedVertices Vertex)
grassTiles = bufferVertices . tileTex . spaceColumns $ map tile gameLevel | 116 | grassTiles = bufferVertices . tileTex . spaceColumns $ map tile gameLevel | 73 | false | true | 0 | 7 | 15 | 37 | 18 | 19 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/HTools/Backend/Text.hs | bsd-2-clause | -- | Generate disk template data.
serializeDiskTemplates :: [DiskTemplate] -> String
serializeDiskTemplates = intercalate "," . map diskTemplateToRaw | 149 | serializeDiskTemplates :: [DiskTemplate] -> String
serializeDiskTemplates = intercalate "," . map diskTemplateToRaw | 115 | serializeDiskTemplates = intercalate "," . map diskTemplateToRaw | 64 | true | true | 0 | 6 | 17 | 29 | 15 | 14 | null | null |
diku-dk/futhark | src/Futhark/Internalise/Defunctorise.hs | isc | bindingAbs :: TySet -> TransformM a -> TransformM a
bindingAbs abs = local $ \env ->
env {envAbs = abs <> envAbs env} | 119 | bindingAbs :: TySet -> TransformM a -> TransformM a
bindingAbs abs = local $ \env ->
env {envAbs = abs <> envAbs env} | 119 | bindingAbs abs = local $ \env ->
env {envAbs = abs <> envAbs env} | 67 | false | true | 0 | 10 | 24 | 52 | 26 | 26 | null | null |
shlevy/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | primRepForeignHint UnliftedRep = AddrHint | 42 | primRepForeignHint UnliftedRep = AddrHint | 42 | primRepForeignHint UnliftedRep = AddrHint | 42 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
fujimura/knob | lib/Data/Knob.hs | mit | -- | Create a new 'IO.Handle' pointing to a 'Knob'. This handle behaves like
-- a file-backed handle for most purposes.
newFileHandle :: MonadIO m
=> Knob
-> String -- ^ Filename shown in error messages
-> IO.IOMode -> m IO.Handle
newFileHandle (Knob var) name mode = liftIO $ d... | 618 | newFileHandle :: MonadIO m
=> Knob
-> String -- ^ Filename shown in error messages
-> IO.IOMode -> m IO.Handle
newFileHandle (Knob var) name mode = liftIO $ do
startPosition <- MVar.withMVar var $ \bytes -> return $ case mode of
IO.AppendMode -> Data.ByteString.leng... | 498 | newFileHandle (Knob var) name mode = liftIO $ do
startPosition <- MVar.withMVar var $ \bytes -> return $ case mode of
IO.AppendMode -> Data.ByteString.length bytes
_ -> 0
posVar <- MVar.newMVar startPosition
IO.mkFileHandle (Device mode var posVar) name mode Nothing IO.noNewlineTranslation
... | 345 | true | true | 0 | 16 | 156 | 147 | 72 | 75 | null | null |
rubik/stack | src/main/Main.hs | bsd-3-clause | dockerPullCmd :: () -> GlobalOpts -> IO ()
dockerPullCmd _ go@GlobalOpts{..} = do
(manager,lc) <- liftIO $ loadConfigWithOpts go
-- TODO: can we eliminate this lock if it doesn't touch ~/.stack/?
withUserFileLock go (configStackRoot $ lcConfig lc) $ \_ ->
runStackTGlobal manager (lcConfig lc) go $
... | 392 | dockerPullCmd :: () -> GlobalOpts -> IO ()
dockerPullCmd _ go@GlobalOpts{..} = do
(manager,lc) <- liftIO $ loadConfigWithOpts go
-- TODO: can we eliminate this lock if it doesn't touch ~/.stack/?
withUserFileLock go (configStackRoot $ lcConfig lc) $ \_ ->
runStackTGlobal manager (lcConfig lc) go $
... | 392 | dockerPullCmd _ go@GlobalOpts{..} = do
(manager,lc) <- liftIO $ loadConfigWithOpts go
-- TODO: can we eliminate this lock if it doesn't touch ~/.stack/?
withUserFileLock go (configStackRoot $ lcConfig lc) $ \_ ->
runStackTGlobal manager (lcConfig lc) go $
Docker.preventInContainer Docker.pull
-... | 349 | false | true | 0 | 12 | 78 | 113 | 56 | 57 | null | null |
pikajude/kevin | src/Kevin/Util/Logger.hs | gpl-3.0 | colorAsNum Green = 32 | 21 | colorAsNum Green = 32 | 21 | colorAsNum Green = 32 | 21 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
chalmers-kandidat14/off-lattice | OffLattice/HPChain.hs | bsd-3-clause | energy :: forall n.
( Ord n
, Additive n
, Multiplicative n
, Epsilon n
, Floating n
, Show n
) => HPChain n -> Energy n
energy !ch@(HPChain !ps !rs !bs !is !hpc) = MT.ofoldr ((+) . enrgy) 0 overlaps
where
!rng = hpRange $ hpc
!pp = ppPote... | 1,127 | energy :: forall n.
( Ord n
, Additive n
, Multiplicative n
, Epsilon n
, Floating n
, Show n
) => HPChain n -> Energy n
energy !ch@(HPChain !ps !rs !bs !is !hpc) = MT.ofoldr ((+) . enrgy) 0 overlaps
where
!rng = hpRange $ hpc
!pp = ppPote... | 1,127 | energy !ch@(HPChain !ps !rs !bs !is !hpc) = MT.ofoldr ((+) . enrgy) 0 overlaps
where
!rng = hpRange $ hpc
!pp = ppPotential $ hpc
!hp = hpPotential $ hpc
!hh = hhPotential $ hpc
!xs = V.map f $ V.filter (isHP . snd) $ V.indexed rs
f (!i, !_) = if rng /= 0 then S.Sphere rng (ps V.! i) i el... | 936 | false | true | 0 | 11 | 488 | 523 | 252 | 271 | null | null |
DataStewardshipPortal/ds-wizard | DSServer/app/Persistence/Plan.hs | apache-2.0 | getOpenPlanOfUser :: User -> PG.Connection -> IO (Maybe Plan)
getOpenPlanOfUser user conn = do
r <- PG.query conn "SELECT * FROM \"Plan\" WHERE id = ?" (PG.Only $ u_open_plan_id user) :: IO [Plan]
if null r
then return Nothing
else do
let plan = head r
return $ Just plan | 295 | getOpenPlanOfUser :: User -> PG.Connection -> IO (Maybe Plan)
getOpenPlanOfUser user conn = do
r <- PG.query conn "SELECT * FROM \"Plan\" WHERE id = ?" (PG.Only $ u_open_plan_id user) :: IO [Plan]
if null r
then return Nothing
else do
let plan = head r
return $ Just plan | 295 | getOpenPlanOfUser user conn = do
r <- PG.query conn "SELECT * FROM \"Plan\" WHERE id = ?" (PG.Only $ u_open_plan_id user) :: IO [Plan]
if null r
then return Nothing
else do
let plan = head r
return $ Just plan | 233 | false | true | 0 | 15 | 73 | 115 | 53 | 62 | null | null |
urbanslug/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | floatPrimTyConName = mkPrimTc (fsLit "Float#") floatPrimTyConKey floatPrimTyCon | 90 | floatPrimTyConName = mkPrimTc (fsLit "Float#") floatPrimTyConKey floatPrimTyCon | 90 | floatPrimTyConName = mkPrimTc (fsLit "Float#") floatPrimTyConKey floatPrimTyCon | 90 | false | false | 0 | 7 | 17 | 19 | 9 | 10 | null | null |
athanclark/bottom-up | src/Language/Prenex/Inference.hs | bsd-3-clause | generalize :: S.Set String -> Type -> Scheme
generalize m b = Scheme hs b
where hs = S.toList (fv b `S.difference` fv env) | 124 | generalize :: S.Set String -> Type -> Scheme
generalize m b = Scheme hs b
where hs = S.toList (fv b `S.difference` fv env) | 124 | generalize m b = Scheme hs b
where hs = S.toList (fv b `S.difference` fv env) | 79 | false | true | 0 | 8 | 25 | 64 | 31 | 33 | null | null |
avieth/postgresql-simple | src/Database/PostgreSQL/Simple/FromField.hs | bsd-3-clause | pg_rational :: Parser Rational
pg_rational
= (string "NaN" *> pure notANumber )
<|> (string "Infinity" *> pure infinity )
<|> (string "-Infinity" *> pure (-infinity))
<|> rational | 206 | pg_rational :: Parser Rational
pg_rational
= (string "NaN" *> pure notANumber )
<|> (string "Infinity" *> pure infinity )
<|> (string "-Infinity" *> pure (-infinity))
<|> rational | 206 | pg_rational
= (string "NaN" *> pure notANumber )
<|> (string "Infinity" *> pure infinity )
<|> (string "-Infinity" *> pure (-infinity))
<|> rational | 175 | false | true | 9 | 9 | 53 | 82 | 40 | 42 | null | null |
rueshyna/gogol | gogol-groups-settings/gen/Network/Google/GroupsSettings/Types/Product.hs | mpl-2.0 | -- | Name of the Group
gName :: Lens' Groups (Maybe Text)
gName = lens _gName (\ s a -> s{_gName = a}) | 102 | gName :: Lens' Groups (Maybe Text)
gName = lens _gName (\ s a -> s{_gName = a}) | 79 | gName = lens _gName (\ s a -> s{_gName = a}) | 44 | true | true | 2 | 9 | 22 | 55 | 25 | 30 | null | null |
limaner2002/EPC-tools | USACScripts/src/Scripts/Opts.hs | bsd-3-clause | readReviewerType_ "initial" = pure RevInitial | 45 | readReviewerType_ "initial" = pure RevInitial | 45 | readReviewerType_ "initial" = pure RevInitial | 45 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
ezyang/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | runtimeRep1TyVar, runtimeRep2TyVar :: TyVar
(runtimeRep1TyVar : runtimeRep2TyVar : _)
= drop 16 (mkTemplateTyVars (repeat runtimeRepTy)) | 138 | runtimeRep1TyVar, runtimeRep2TyVar :: TyVar
(runtimeRep1TyVar : runtimeRep2TyVar : _)
= drop 16 (mkTemplateTyVars (repeat runtimeRepTy)) | 138 | (runtimeRep1TyVar : runtimeRep2TyVar : _)
= drop 16 (mkTemplateTyVars (repeat runtimeRepTy)) | 94 | false | true | 0 | 9 | 16 | 42 | 22 | 20 | null | null |
jean-edouard/manager | xenmgr/XenMgr/Expose/VmObject.hs | gpl-2.0 | _add_pt_rule uuid cls vendor_id device_id = modifyVmPciPtRules uuid $ pciAddRule (form_rule (cls,device_id,vendor_id)) | 122 | _add_pt_rule uuid cls vendor_id device_id = modifyVmPciPtRules uuid $ pciAddRule (form_rule (cls,device_id,vendor_id)) | 122 | _add_pt_rule uuid cls vendor_id device_id = modifyVmPciPtRules uuid $ pciAddRule (form_rule (cls,device_id,vendor_id)) | 122 | false | false | 0 | 9 | 15 | 40 | 20 | 20 | null | null |
Botje/crystal | Crystal/Parser.hs | gpl-2.0 | ident = T.identifier tp | 26 | ident = T.identifier tp | 26 | ident = T.identifier tp | 26 | false | false | 1 | 6 | 6 | 14 | 5 | 9 | null | null |
rueshyna/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | [Optional] Number of milliseconds for which to keep the storage for a
-- partition.
tpExpirationMs :: Lens' TimePartitioning (Maybe Int64)
tpExpirationMs
= lens _tpExpirationMs
(\ s a -> s{_tpExpirationMs = a})
. mapping _Coerce | 247 | tpExpirationMs :: Lens' TimePartitioning (Maybe Int64)
tpExpirationMs
= lens _tpExpirationMs
(\ s a -> s{_tpExpirationMs = a})
. mapping _Coerce | 158 | tpExpirationMs
= lens _tpExpirationMs
(\ s a -> s{_tpExpirationMs = a})
. mapping _Coerce | 103 | true | true | 0 | 10 | 49 | 56 | 29 | 27 | null | null |
bjornbm/dimensional-experimental | src/Numeric/Units/Dimensional/Cyclic.hs | bsd-3-clause | -- Consistency metric for cyclic values
-- ------------------------------------
-- | Assume that y(x) is cyclic in meaning (but not in value, as
-- for e.g. angles) with a periodicity @period@ and cycle length @cycle@.
-- Then @cyclesOff (x,y) period cycle@ compute the approximate (closest)
-- integral number of cycle... | 616 | cyclesOff :: RealFrac a
=> (Quantity d a, Quantity dy a)
-> Quantity d a -> Quantity dy a -> Dimensionless a
cyclesOff (x,y) period cycle = cyclesOff1 (x/period, y/cycle) | 190 | cyclesOff (x,y) period cycle = cyclesOff1 (x/period, y/cycle) | 61 | true | true | 0 | 9 | 121 | 96 | 51 | 45 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | mkBasicIndexedWrite off (Just cast) base idx_ty idx val
= mkBasicIndexedWrite off Nothing base idx_ty idx (CmmMachOp cast [val]) | 131 | mkBasicIndexedWrite off (Just cast) base idx_ty idx val
= mkBasicIndexedWrite off Nothing base idx_ty idx (CmmMachOp cast [val]) | 131 | mkBasicIndexedWrite off (Just cast) base idx_ty idx val
= mkBasicIndexedWrite off Nothing base idx_ty idx (CmmMachOp cast [val]) | 131 | false | false | 0 | 8 | 20 | 49 | 24 | 25 | null | null |
jdublu10/toy_lang | src/Lang.hs | mit | exprShow (Let binding subexpr) = "let " ++ bindingShow binding ++ " in " ++ exprShow subexpr | 92 | exprShow (Let binding subexpr) = "let " ++ bindingShow binding ++ " in " ++ exprShow subexpr | 92 | exprShow (Let binding subexpr) = "let " ++ bindingShow binding ++ " in " ++ exprShow subexpr | 92 | false | false | 0 | 8 | 16 | 36 | 16 | 20 | null | null |
katydid/haslapse | src/Data/Katydid/Relapse/Smart.hs | bsd-3-clause | hash Reference { _hash = h } = h | 33 | hash Reference { _hash = h } = h | 33 | hash Reference { _hash = h } = h | 33 | false | false | 0 | 8 | 9 | 18 | 9 | 9 | null | null |
tsurucapital/iteratee-compress | Data/Iteratee/LZMA.hs | bsd-3-clause | -- | Decompress the input and send to inner iteratee. If there is end of LZMA
-- stream it is left unprocessed.
enumDecompress
:: forall m a. MonadIO m
=> DecompressParams
-> Enumeratee ByteString ByteString m a
enumDecompress = go . decompressIO
where
go :: DecompressStream IO r
-> ... | 1,025 | enumDecompress
:: forall m a. MonadIO m
=> DecompressParams
-> Enumeratee ByteString ByteString m a
enumDecompress = go . decompressIO
where
go :: DecompressStream IO r
-> Enumeratee ByteString ByteString m a
go (P.Request () feed) inner = do
compressed <- getChun... | 913 | enumDecompress = go . decompressIO
where
go :: DecompressStream IO r
-> Enumeratee ByteString ByteString m a
go (P.Request () feed) inner = do
compressed <- getChunk
go (feed compressed) inner
go (P.Respond uncompressed demand) inner = do
-- if... | 801 | true | true | 5 | 12 | 350 | 248 | 121 | 127 | null | null |
fmapfmapfmap/amazonka | amazonka-lambda/gen/Network/AWS/Lambda/UpdateFunctionConfiguration.hs | mpl-2.0 | -- | The Amazon Resource Name (ARN) of the IAM role that Lambda will assume
-- when it executes your function.
ufcRole :: Lens' UpdateFunctionConfiguration (Maybe Text)
ufcRole = lens _ufcRole (\ s a -> s{_ufcRole = a}) | 219 | ufcRole :: Lens' UpdateFunctionConfiguration (Maybe Text)
ufcRole = lens _ufcRole (\ s a -> s{_ufcRole = a}) | 108 | ufcRole = lens _ufcRole (\ s a -> s{_ufcRole = a}) | 50 | true | true | 1 | 9 | 37 | 53 | 26 | 27 | null | null |
grnet/snf-ganeti | src/Ganeti/Objects.hs | bsd-2-clause | readIp4Address :: (Applicative m, Monad m) => String -> m Ip4Address
readIp4Address s =
case sepSplit '.' s of
[a, b, c, d] -> Ip4Address <$>
tryRead "first octect" a <*>
tryRead "second octet" b <*>
tryRead "third octet" c <*>
... | 408 | readIp4Address :: (Applicative m, Monad m) => String -> m Ip4Address
readIp4Address s =
case sepSplit '.' s of
[a, b, c, d] -> Ip4Address <$>
tryRead "first octect" a <*>
tryRead "second octet" b <*>
tryRead "third octet" c <*>
... | 408 | readIp4Address s =
case sepSplit '.' s of
[a, b, c, d] -> Ip4Address <$>
tryRead "first octect" a <*>
tryRead "second octet" b <*>
tryRead "third octet" c <*>
tryRead "fourth octet" d
_ -> fail $ "Can't parse IPv4 address... | 339 | false | true | 4 | 8 | 156 | 114 | 56 | 58 | null | null |
psibi/yesod | yesod-static/Yesod/Static.hs | mit | -- | Combine multiple JS files together. Common usage would be:
--
-- >>> combineScripts' development def 'StaticR [script1_js, script2_js]
--
-- Where @development@ is a variable in your site indicated whether you are in
-- development or production mode.
--
-- Since 1.2.0
combineScripts' :: Bool -- ^ development? if ... | 754 | combineScripts' :: Bool -- ^ development? if so, perform no combining
-> CombineSettings
-> Name -- ^ Static route constructor name, e.g. \'StaticR
-> [Route Static] -- ^ files to combine
-> Q Exp
combineScripts' development cs con routes
| development... | 479 | combineScripts' development cs con routes
| development = [| mapM_ (addScript . $(return $ ConE con)) $(liftRoutes routes) |]
| otherwise = [| addScript $ $(return $ ConE con) $(combineStatics' JS cs routes) |] | 218 | true | true | 1 | 10 | 183 | 76 | 45 | 31 | null | null |
NCrashed/hjass | src/library/Language/Jass/Parser/AST/Expression.hs | mit | showUnaryOpAsWord Not = "not" | 29 | showUnaryOpAsWord Not = "not" | 29 | showUnaryOpAsWord Not = "not" | 29 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
8l/asif | src/Language/FOmega/Syntax.hs | mit | app3 a b c d = app (app2 a b c) d | 41 | app3 a b c d = app (app2 a b c) d | 41 | app3 a b c d = app (app2 a b c) d | 41 | false | false | 0 | 7 | 19 | 30 | 14 | 16 | null | null |
Bolt64/my_code | Code Snippets/daily_programmer/run_length_encoding/rle.hs | mit | trackIndex :: [Int] -> Integer -> Maybe Integer
trackIndex [] _ = Nothing | 73 | trackIndex :: [Int] -> Integer -> Maybe Integer
trackIndex [] _ = Nothing | 73 | trackIndex [] _ = Nothing | 25 | false | true | 0 | 9 | 12 | 37 | 17 | 20 | null | null |
databrary/databrary | src/HTTP/Path/Parser.hs | agpl-3.0 | (</>>>) :: PathParser a -> PathParser (b, c, d) -> PathParser (a, b, c, d)
(</>>>) = (>*<<<) | 92 | (</>>>) :: PathParser a -> PathParser (b, c, d) -> PathParser (a, b, c, d)
(</>>>) = (>*<<<) | 92 | (</>>>) = (>*<<<) | 17 | false | true | 0 | 9 | 17 | 61 | 34 | 27 | null | null |
tweag/distributed-process | src/Control/Distributed/Process/Node.hs | bsd-3-clause | destNid (Exit pid _) = Just $ processNodeId pid | 56 | destNid (Exit pid _) = Just $ processNodeId pid | 56 | destNid (Exit pid _) = Just $ processNodeId pid | 56 | false | false | 0 | 7 | 17 | 24 | 11 | 13 | null | null |
rsasse/tamarin-prover | lib/term/src/Term/LTerm.hs | gpl-3.0 | renameIgnoring :: (MonadFresh m, HasFrees a) => [LVar] -> a -> m a
renameIgnoring vars x = case boundsVarIdx x of
Nothing -> return x
Just (minVarIdx, maxVarIdx) -> do
freshStart <- freshIdents (succ (maxVarIdx - minVarIdx))
return . runIdentity . mapFrees (Monotone $ incVar (fre... | 660 | renameIgnoring :: (MonadFresh m, HasFrees a) => [LVar] -> a -> m a
renameIgnoring vars x = case boundsVarIdx x of
Nothing -> return x
Just (minVarIdx, maxVarIdx) -> do
freshStart <- freshIdents (succ (maxVarIdx - minVarIdx))
return . runIdentity . mapFrees (Monotone $ incVar (fre... | 660 | renameIgnoring vars x = case boundsVarIdx x of
Nothing -> return x
Just (minVarIdx, maxVarIdx) -> do
freshStart <- freshIdents (succ (maxVarIdx - minVarIdx))
return . runIdentity . mapFrees (Monotone $ incVar (freshStart - minVarIdx)) $ x
where
incVar shift (LVar n so i) = ... | 593 | false | true | 0 | 17 | 162 | 215 | 108 | 107 | null | null |
claudio-mattera/pandoc-tikz | src/Text/Pandoc/TikZ/Internal.hs | mit | emplate :: String
template = "\\documentclass{standalone}\n" ++
"\\usepackage{tikz}\n" ++
"\\usepackage{pgfplots}\n" ++
"\\begin{document}\n" ++
"$body$\n" ++
"\\end{document}\n"
| 240 | template :: String
template = "\\documentclass{standalone}\n" ++
"\\usepackage{tikz}\n" ++
"\\usepackage{pgfplots}\n" ++
"\\begin{document}\n" ++
"$body$\n" ++
"\\end{document}\n" | 239 | template = "\\documentclass{standalone}\n" ++
"\\usepackage{tikz}\n" ++
"\\usepackage{pgfplots}\n" ++
"\\begin{document}\n" ++
"$body$\n" ++
"\\end{document}\n" | 220 | false | true | 0 | 9 | 77 | 31 | 16 | 15 | null | null |
ndmitchell/hlint | src/Hint/Extensions.hs | bsd-3-clause | used RecordWildCards = hasS hasFieldsDotDot ||^ hasS hasPFieldsDotDot | 69 | used RecordWildCards = hasS hasFieldsDotDot ||^ hasS hasPFieldsDotDot | 69 | used RecordWildCards = hasS hasFieldsDotDot ||^ hasS hasPFieldsDotDot | 69 | false | false | 1 | 6 | 7 | 22 | 8 | 14 | null | null |
projectorhq/haskell-liquid | src/Text/Liquid/Parser.hs | bsd-3-clause | varIndexSection :: Parser (NonEmpty VarIndex)
varIndexSection = do
vs <- sepBy var dot
i <- many parseBoxedInt
brokenChar <- oBr <|> return '~'
let ixs = do obs <- (nonEmpty (ObjectIndex <$> vs))
Just obs <> (nonEmpty (ArrayIndex <$> i))
if brokenChar == '[' then (fail "invalid array index - i... | 446 | varIndexSection :: Parser (NonEmpty VarIndex)
varIndexSection = do
vs <- sepBy var dot
i <- many parseBoxedInt
brokenChar <- oBr <|> return '~'
let ixs = do obs <- (nonEmpty (ObjectIndex <$> vs))
Just obs <> (nonEmpty (ArrayIndex <$> i))
if brokenChar == '[' then (fail "invalid array index - i... | 446 | varIndexSection = do
vs <- sepBy var dot
i <- many parseBoxedInt
brokenChar <- oBr <|> return '~'
let ixs = do obs <- (nonEmpty (ObjectIndex <$> vs))
Just obs <> (nonEmpty (ArrayIndex <$> i))
if brokenChar == '[' then (fail "invalid array index - ill-typed") else case ixs of
Just nel -> re... | 400 | false | true | 1 | 17 | 107 | 159 | 73 | 86 | null | null |
chrisdone/ace | src/ACE/Parsers.hs | bsd-3-clause | -- | A phrasal transitive verb: give away a thing
phrasalTransitiveV =
PhrasalTransitiveV <$> join (fmap acePhrasalTransitiveV getState) | 138 | phrasalTransitiveV =
PhrasalTransitiveV <$> join (fmap acePhrasalTransitiveV getState) | 88 | phrasalTransitiveV =
PhrasalTransitiveV <$> join (fmap acePhrasalTransitiveV getState) | 88 | true | false | 3 | 7 | 19 | 26 | 11 | 15 | null | null |
kristoff3r/importify | HLint.hs | mit | warn = (either (const (pure () )) f m) ==> Universum.whenRight m f | 67 | warn = (either (const (pure () )) f m) ==> Universum.whenRight m f | 67 | warn = (either (const (pure () )) f m) ==> Universum.whenRight m f | 67 | false | false | 0 | 12 | 13 | 41 | 20 | 21 | null | null |
uuhan/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | idemodeProcess fn (Pattelab t) = process fn (Pattelab t) | 56 | idemodeProcess fn (Pattelab t) = process fn (Pattelab t) | 56 | idemodeProcess fn (Pattelab t) = process fn (Pattelab t) | 56 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
davmre/matrizer | src/Matrizer/RewriteRules.hs | gpl-2.0 | swapInverseTranspose _ _ = Nothing | 34 | swapInverseTranspose _ _ = Nothing | 34 | swapInverseTranspose _ _ = Nothing | 34 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
liskin/gooddata-haskell | GoodData/Session.hs | bsd-3-clause | accountLogin ∷ STRING → STRING → GoodDataAction UserLogin
accountLogin l p = fmap responseBody $
jsonPostCall "/gdc/account/login" $ PostUserLogin l p (BOOLEAN False) | 170 | accountLogin ∷ STRING → STRING → GoodDataAction UserLogin
accountLogin l p = fmap responseBody $
jsonPostCall "/gdc/account/login" $ PostUserLogin l p (BOOLEAN False) | 170 | accountLogin l p = fmap responseBody $
jsonPostCall "/gdc/account/login" $ PostUserLogin l p (BOOLEAN False) | 112 | false | true | 0 | 8 | 26 | 54 | 25 | 29 | null | null |
spechub/Hets | OMDoc/OMDocInterface.hs | gpl-2.0 | mkOMVSVar :: XmlString -> OMVariable
mkOMVSVar = OMVS . mkOMSimpleVar | 69 | mkOMVSVar :: XmlString -> OMVariable
mkOMVSVar = OMVS . mkOMSimpleVar | 69 | mkOMVSVar = OMVS . mkOMSimpleVar | 32 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
ion1/swtor-ui | src/SWTOR/UIProfile/Layout.hs | mit | elementSize TargetOfTargetCastbar{..} = scaleBy elemScale (262, 30) | 67 | elementSize TargetOfTargetCastbar{..} = scaleBy elemScale (262, 30) | 67 | elementSize TargetOfTargetCastbar{..} = scaleBy elemScale (262, 30) | 67 | false | false | 0 | 7 | 6 | 26 | 13 | 13 | null | null |
salenaer/functionProject | basic.hs | mit | delete :: [a]->Int->[a]
delete xs n =
let (ys,zs) = splitAt n xs in ys ++ (tail zs) | 91 | delete :: [a]->Int->[a]
delete xs n =
let (ys,zs) = splitAt n xs in ys ++ (tail zs) | 91 | delete xs n =
let (ys,zs) = splitAt n xs in ys ++ (tail zs) | 67 | false | true | 0 | 10 | 25 | 69 | 33 | 36 | null | null |
mbakke/ganeti | src/Ganeti/HTools/Tags/Constants.hs | bsd-2-clause | -- | The exclusion tag prefix. Instance tags starting with this prefix
-- describe a service provided by the instance. Instances providing the
-- same service at not places on the same node.
exTagsPrefix :: String
exTagsPrefix = "htools:iextags:" | 246 | exTagsPrefix :: String
exTagsPrefix = "htools:iextags:" | 55 | exTagsPrefix = "htools:iextags:" | 32 | true | true | 0 | 4 | 38 | 14 | 9 | 5 | null | null |
mdorman/couch-simple | src/lib/Database/Couch/RequestBuilder.hs | mit | defaultRequest :: RequestBuilder ()
defaultRequest = do
defaultHeaders [(hAccept, "application/json"), (hContentType, "application/json")]
setAuth
setConnection
setCookieJar
setMethod "GET"
-- * Applying 'Context' to the 'Request'
-- | Choose the database for the 'Request', based on what's in the 'Context'... | 380 | defaultRequest :: RequestBuilder ()
defaultRequest = do
defaultHeaders [(hAccept, "application/json"), (hContentType, "application/json")]
setAuth
setConnection
setCookieJar
setMethod "GET"
-- * Applying 'Context' to the 'Request'
-- | Choose the database for the 'Request', based on what's in the 'Context'... | 380 | defaultRequest = do
defaultHeaders [(hAccept, "application/json"), (hContentType, "application/json")]
setAuth
setConnection
setCookieJar
setMethod "GET"
-- * Applying 'Context' to the 'Request'
-- | Choose the database for the 'Request', based on what's in the 'Context'. This is the one thing that could ... | 344 | false | true | 1 | 10 | 62 | 61 | 29 | 32 | null | null |
nevrenato/Hets_Fork | LF/MorphParser.hs | gpl-2.0 | parseDef :: CharParser st DEF
parseDef = do
pkeyword "Def"
skipChar '{'
pkeyword "getSym"
skipChar '='
sym <- parseSym
skipChar ','
pkeyword "getType"
skipChar '='
tp <- parseExp
skipChar ','
pkeyword "getValue"
skipChar '='
val <- do pkeyword "Nothing" >> return Noth... | 482 | parseDef :: CharParser st DEF
parseDef = do
pkeyword "Def"
skipChar '{'
pkeyword "getSym"
skipChar '='
sym <- parseSym
skipChar ','
pkeyword "getType"
skipChar '='
tp <- parseExp
skipChar ','
pkeyword "getValue"
skipChar '='
val <- do pkeyword "Nothing" >> return Noth... | 482 | parseDef = do
pkeyword "Def"
skipChar '{'
pkeyword "getSym"
skipChar '='
sym <- parseSym
skipChar ','
pkeyword "getType"
skipChar '='
tp <- parseExp
skipChar ','
pkeyword "getValue"
skipChar '='
val <- do pkeyword "Nothing" >> return Nothing
<|> do pkeywo... | 452 | false | true | 0 | 13 | 174 | 166 | 63 | 103 | null | null |
bravit/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | p_strCons [Ch x, Str xs] = Just $ Str (x:xs) | 44 | p_strCons [Ch x, Str xs] = Just $ Str (x:xs) | 44 | p_strCons [Ch x, Str xs] = Just $ Str (x:xs) | 44 | false | false | 0 | 8 | 9 | 35 | 17 | 18 | null | null |
seereason/ghcjs | test/pkg/base/ratio001.hs | mit | -- !!! Test that (%) has the right fixity
main = print (2^3%5) | 62 | main = print (2^3%5) | 20 | main = print (2^3%5) | 20 | true | false | 0 | 8 | 12 | 21 | 11 | 10 | null | null |
AngusP/NSFWbot | nsfwbot.hs | mit | listen :: Handle -> IO ()
listen irc = forever $ do
t <- hGetLine irc
time <- getPOSIXTime
let s = init t
putStrLn s
addItToThePile ircLog (toCSV $ concatMaybe $ (rfcToEntry (show $ timestamp time) s : []))
if (ping s) then (pong s) else (eval irc (clean s))
where
forever a = a >> forever a
... | 732 | listen :: Handle -> IO ()
listen irc = forever $ do
t <- hGetLine irc
time <- getPOSIXTime
let s = init t
putStrLn s
addItToThePile ircLog (toCSV $ concatMaybe $ (rfcToEntry (show $ timestamp time) s : []))
if (ping s) then (pong s) else (eval irc (clean s))
where
forever a = a >> forever a
... | 732 | listen irc = forever $ do
t <- hGetLine irc
time <- getPOSIXTime
let s = init t
putStrLn s
addItToThePile ircLog (toCSV $ concatMaybe $ (rfcToEntry (show $ timestamp time) s : []))
if (ping s) then (pong s) else (eval irc (clean s))
where
forever a = a >> forever a
clean = drop 1 . dropWhile... | 706 | false | true | 6 | 16 | 256 | 305 | 140 | 165 | null | null |
nevrenato/Hets_Fork | Maude/PreComorphism.hs | gpl-2.0 | -- | generates the sentences to state that the rew predicates are a congruence
-- for a single operator
rewPredCong :: Id -> CSign.OpType -> [Named CAS.CASLFORMULA]
-> [Named CAS.CASLFORMULA]
rewPredCong op ot fs = case args of
[] -> fs
_ -> nq_form : fs
where ar... | 1,197 | rewPredCong :: Id -> CSign.OpType -> [Named CAS.CASLFORMULA]
-> [Named CAS.CASLFORMULA]
rewPredCong op ot fs = case args of
[] -> fs
_ -> nq_form : fs
where args = CSign.opArgs ot
vars1 = rewPredCongPremise 0 args
vars2 = rewPredCongPrem... | 1,093 | rewPredCong op ot fs = case args of
[] -> fs
_ -> nq_form : fs
where args = CSign.opArgs ot
vars1 = rewPredCongPremise 0 args
vars2 = rewPredCongPremise (length args) args
res = CSign.opRes ot
res_pred_type = CAS.... | 1,003 | true | true | 11 | 12 | 382 | 313 | 144 | 169 | null | null |
keithodulaigh/Hets | Syntax/Print_AS_Structured.hs | gpl-2.0 | printFILTERING :: FILTERING -> Doc
printFILTERING (SelectOrReject b aa _) =
keyword (if b then selectS else rejectS) <+> pretty aa | 133 | printFILTERING :: FILTERING -> Doc
printFILTERING (SelectOrReject b aa _) =
keyword (if b then selectS else rejectS) <+> pretty aa | 133 | printFILTERING (SelectOrReject b aa _) =
keyword (if b then selectS else rejectS) <+> pretty aa | 98 | false | true | 0 | 8 | 23 | 49 | 25 | 24 | null | null |
scslab/hails | Hails/HttpServer/Types.hs | mit | removeRequestHeader :: Request -> HeaderName -> Request
removeRequestHeader req hname = req { requestHeaders = headers }
where headers = List.filter ((/= hname) . fst) $ requestHeaders req
--
-- Response
--
-- | A response sent by the app. | 244 | removeRequestHeader :: Request -> HeaderName -> Request
removeRequestHeader req hname = req { requestHeaders = headers }
where headers = List.filter ((/= hname) . fst) $ requestHeaders req
--
-- Response
--
-- | A response sent by the app. | 244 | removeRequestHeader req hname = req { requestHeaders = headers }
where headers = List.filter ((/= hname) . fst) $ requestHeaders req
--
-- Response
--
-- | A response sent by the app. | 188 | false | true | 0 | 9 | 44 | 67 | 37 | 30 | null | null |
hspec/hspec | hspec-core/src/Test/Hspec/Core/Config/Definition.hs | mit | smallCheckOptions :: [Option Config]
smallCheckOptions = [
option "depth" (argument "N" readMaybe setDepth) "maximum depth of generated test values for SmallCheck properties"
] | 182 | smallCheckOptions :: [Option Config]
smallCheckOptions = [
option "depth" (argument "N" readMaybe setDepth) "maximum depth of generated test values for SmallCheck properties"
] | 182 | smallCheckOptions = [
option "depth" (argument "N" readMaybe setDepth) "maximum depth of generated test values for SmallCheck properties"
] | 145 | false | true | 0 | 9 | 28 | 44 | 20 | 24 | null | null |
diku-dk/futhark | src/Futhark/IR/Primitive.hs | isc | doUnOp FAbs {} (FloatValue v) = Just $ FloatValue $ doFAbs v | 60 | doUnOp FAbs {} (FloatValue v) = Just $ FloatValue $ doFAbs v | 60 | doUnOp FAbs {} (FloatValue v) = Just $ FloatValue $ doFAbs v | 60 | false | false | 0 | 7 | 11 | 32 | 15 | 17 | null | null |
nlogax/home | home.hs | bsd-3-clause | chunksOf :: Int -> [a] -> [[a]]
chunksOf _ [] = [] | 50 | chunksOf :: Int -> [a] -> [[a]]
chunksOf _ [] = [] | 50 | chunksOf _ [] = [] | 18 | false | true | 0 | 8 | 11 | 37 | 20 | 17 | null | null |
brendanhay/gogol | gogol-driveactivity/gen/Network/Google/Resource/DriveActivity/Activity/Query.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
aqUploadProtocol :: Lens' ActivityQuery (Maybe Text)
aqUploadProtocol
= lens _aqUploadProtocol
(\ s a -> s{_aqUploadProtocol = a}) | 200 | aqUploadProtocol :: Lens' ActivityQuery (Maybe Text)
aqUploadProtocol
= lens _aqUploadProtocol
(\ s a -> s{_aqUploadProtocol = a}) | 138 | aqUploadProtocol
= lens _aqUploadProtocol
(\ s a -> s{_aqUploadProtocol = a}) | 85 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
sixohsix/tak | src/Tak/Buffer/LineSeq.hs | mit | idxParasAfter :: LineSeq -> LineIdx -> [LineIdx]
idxParasAfter ls idx =
let idxs = comboBreakers [isNotBlank, isBlank] (Seq.drop idx ls)
in map (+ idx) idxs | 160 | idxParasAfter :: LineSeq -> LineIdx -> [LineIdx]
idxParasAfter ls idx =
let idxs = comboBreakers [isNotBlank, isBlank] (Seq.drop idx ls)
in map (+ idx) idxs | 160 | idxParasAfter ls idx =
let idxs = comboBreakers [isNotBlank, isBlank] (Seq.drop idx ls)
in map (+ idx) idxs | 111 | false | true | 0 | 12 | 28 | 74 | 36 | 38 | null | null |
mcmaniac/ghc | compiler/main/DriverMkDepend.hs | bsd-3-clause | processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC node)
= do { let extra_suffixes = depSuffixes dflags
include_pkg_deps = depIncludePkgDeps dflags
src_file = msHsFilePath node
obj_file = msObjFilePath node
obj_files = insertSuffixes obj_file extra_suf... | 1,646 | processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC node)
= do { let extra_suffixes = depSuffixes dflags
include_pkg_deps = depIncludePkgDeps dflags
src_file = msHsFilePath node
obj_file = msObjFilePath node
obj_files = insertSuffixes obj_file extra_suf... | 1,646 | processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC node)
= do { let extra_suffixes = depSuffixes dflags
include_pkg_deps = depIncludePkgDeps dflags
src_file = msHsFilePath node
obj_file = msObjFilePath node
obj_files = insertSuffixes obj_file extra_suf... | 1,646 | false | false | 0 | 21 | 740 | 327 | 166 | 161 | null | null |
dmcclean/HaTeX | Text/LaTeX/Base/Commands.hs | bsd-3-clause | letterpaper :: ClassOption
letterpaper = Paper Letter | 53 | letterpaper :: ClassOption
letterpaper = Paper Letter | 53 | letterpaper = Paper Letter | 26 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
Th30n/hasgel | src/Hasgel/World.hs | mit | handleConsoleEvent _ KeyBackspace = Just DeleteChar | 51 | handleConsoleEvent _ KeyBackspace = Just DeleteChar | 51 | handleConsoleEvent _ KeyBackspace = Just DeleteChar | 51 | false | false | 1 | 5 | 5 | 15 | 6 | 9 | null | null |
Chatanga/kage | src/Graphics/Buffer.hs | mit | extractQuadNormals :: [V3 GLfloat] -> [V3 GLfloat]
extractQuadNormals [] = [] | 77 | extractQuadNormals :: [V3 GLfloat] -> [V3 GLfloat]
extractQuadNormals [] = [] | 77 | extractQuadNormals [] = [] | 26 | false | true | 0 | 7 | 10 | 34 | 17 | 17 | null | null |
Fizzixnerd/xmonad-config | site-haskell/src/XMonad/Actions/Fizzixnerd.hs | gpl-3.0 | runExplorer :: X ()
runExplorer = do
spawn explorer | 53 | runExplorer :: X ()
runExplorer = do
spawn explorer | 53 | runExplorer = do
spawn explorer | 33 | false | true | 0 | 7 | 10 | 22 | 10 | 12 | null | null |
mightymoose/liquidhaskell | tests/pos/GhcListSort.hs | bsd-3-clause | ----------------------------------------------------------------------
-------------------- QuickSort ---------------------------------------
----------------------------------------------------------------------
{-@ assert sort3 :: (Ord a) => w:a -> [{v:a|v<=w}] -> OList a @-}
sort3 :: (Ord a) => a -> [a] -> [a]
sort... | 342 | sort3 :: (Ord a) => a -> [a] -> [a]
sort3 w ls = qsort w ls [] | 62 | sort3 w ls = qsort w ls [] | 26 | true | true | 0 | 8 | 37 | 52 | 29 | 23 | null | null |
lunaris/hindent | src/HIndent/Styles/JohanTibell.hs | bsd-3-clause | isFlat Lit{} = return True | 26 | isFlat Lit{} = return True | 26 | isFlat Lit{} = return True | 26 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
andyarvanitis/Idris-dev | src/Idris/ParseHelpers.hs | bsd-3-clause | accData :: Maybe Accessibility -> Name -> [Name] -> IdrisParser ()
accData (Just Frozen) n ns = do addAcc n (Just Frozen)
mapM_ (\n -> addAcc n (Just Hidden)) ns | 193 | accData :: Maybe Accessibility -> Name -> [Name] -> IdrisParser ()
accData (Just Frozen) n ns = do addAcc n (Just Frozen)
mapM_ (\n -> addAcc n (Just Hidden)) ns | 193 | accData (Just Frozen) n ns = do addAcc n (Just Frozen)
mapM_ (\n -> addAcc n (Just Hidden)) ns | 126 | false | true | 0 | 13 | 61 | 93 | 43 | 50 | null | null |
expipiplus1/vulkan | src/Vulkan/Core10/Enums/BufferViewCreateFlags.hs | bsd-3-clause | enumPrefixBufferViewCreateFlags :: String
enumPrefixBufferViewCreateFlags = "" | 78 | enumPrefixBufferViewCreateFlags :: String
enumPrefixBufferViewCreateFlags = "" | 78 | enumPrefixBufferViewCreateFlags = "" | 36 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
fpco/statistics | tests/Tests/Matrix/Types.hs | bsd-2-clause | arbMat :: (Arbitrary a) => Positive (Small Int) -> Positive (Small Int)
-> Gen (Mat a)
arbMat (Positive (Small r)) (Positive (Small c)) =
Mat r c <$> vectorOf r (vector c) | 182 | arbMat :: (Arbitrary a) => Positive (Small Int) -> Positive (Small Int)
-> Gen (Mat a)
arbMat (Positive (Small r)) (Positive (Small c)) =
Mat r c <$> vectorOf r (vector c) | 182 | arbMat (Positive (Small r)) (Positive (Small c)) =
Mat r c <$> vectorOf r (vector c) | 88 | false | true | 2 | 13 | 42 | 112 | 51 | 61 | null | null |
sol/v8 | test/Foreign/JavaScript/V8/ValueSpec.hs | mit | spec :: Spec
spec = do
describe "withHandleScope" $ do
it "propagates exceptions" $ do
withHandleScope $ do
evaluate (1 `div` 0 :: Int)
`shouldThrow` (== DivideByZero)
describe "numberOfHandles" $ do
it "counts the number of allocated handles" $ do
withHandleScope $ do
num... | 1,093 | spec :: Spec
spec = do
describe "withHandleScope" $ do
it "propagates exceptions" $ do
withHandleScope $ do
evaluate (1 `div` 0 :: Int)
`shouldThrow` (== DivideByZero)
describe "numberOfHandles" $ do
it "counts the number of allocated handles" $ do
withHandleScope $ do
num... | 1,093 | spec = do
describe "withHandleScope" $ do
it "propagates exceptions" $ do
withHandleScope $ do
evaluate (1 `div` 0 :: Int)
`shouldThrow` (== DivideByZero)
describe "numberOfHandles" $ do
it "counts the number of allocated handles" $ do
withHandleScope $ do
numberOfHandles ... | 1,080 | false | true | 0 | 31 | 291 | 312 | 145 | 167 | null | null |
DanielG/stack | src/Stack/Build/Installed.hs | bsd-3-clause | loadDatabase :: (M env m, PackageInstallInfo pii)
=> EnvOverride
-> GetInstalledOpts
-> Maybe InstalledCache -- ^ if Just, profiling or haddock is required
-> Map PackageName pii -- ^ to determine which installed things we should include
-> Maybe (Install... | 2,013 | loadDatabase :: (M env m, PackageInstallInfo pii)
=> EnvOverride
-> GetInstalledOpts
-> Maybe InstalledCache -- ^ if Just, profiling or haddock is required
-> Map PackageName pii -- ^ to determine which installed things we should include
-> Maybe (Install... | 2,013 | loadDatabase menv opts mcache sourceMap mdb lhs0 = do
wc <- getWhichCompiler
(lhs1, gids) <- ghcPkgDump menv wc (fmap snd mdb)
$ conduitDumpPackage =$ sink
let lhs = pruneDeps
(packageIdentifierName . ghcPkgIdPackageIdentifier)
lhId
lhDeps
co... | 1,524 | false | true | 0 | 15 | 629 | 443 | 226 | 217 | null | null |
vincenthz/hs-sdl | Examples/NeHe/lesson02/lesson2.sdl.hs | bsd-3-clause | main = withInit [InitVideo] $
do progname <- getProgName
createAWindow progname
mainLoop | 115 | main = withInit [InitVideo] $
do progname <- getProgName
createAWindow progname
mainLoop | 115 | main = withInit [InitVideo] $
do progname <- getProgName
createAWindow progname
mainLoop | 115 | false | false | 1 | 8 | 38 | 36 | 14 | 22 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | tyCoFVsOfCt (CFunEqCan { cc_tyargs = tys, cc_fsk = fsk })
= tyCoFVsOfTypes tys `unionFV` FV.unitFV fsk
`unionFV` tyCoFVsOfType (tyVarKind fsk) | 167 | tyCoFVsOfCt (CFunEqCan { cc_tyargs = tys, cc_fsk = fsk })
= tyCoFVsOfTypes tys `unionFV` FV.unitFV fsk
`unionFV` tyCoFVsOfType (tyVarKind fsk) | 167 | tyCoFVsOfCt (CFunEqCan { cc_tyargs = tys, cc_fsk = fsk })
= tyCoFVsOfTypes tys `unionFV` FV.unitFV fsk
`unionFV` tyCoFVsOfType (tyVarKind fsk) | 167 | false | false | 0 | 8 | 44 | 63 | 32 | 31 | null | null |
brendanhay/gogol | gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs | mpl-2.0 | -- | The estimated result count for this query.
sResultCountEstimate :: Lens' SearchResponse (Maybe Int64)
sResultCountEstimate
= lens _sResultCountEstimate
(\ s a -> s{_sResultCountEstimate = a})
. mapping _Coerce | 228 | sResultCountEstimate :: Lens' SearchResponse (Maybe Int64)
sResultCountEstimate
= lens _sResultCountEstimate
(\ s a -> s{_sResultCountEstimate = a})
. mapping _Coerce | 180 | sResultCountEstimate
= lens _sResultCountEstimate
(\ s a -> s{_sResultCountEstimate = a})
. mapping _Coerce | 121 | true | true | 2 | 8 | 42 | 59 | 28 | 31 | null | null |
total-git/missingno | yesodMissingNo/Application.hs | mit | makeApplication :: App -> IO Application
makeApplication foundation = do
logWare <- mkRequestLogger def
{ outputFormat =
if appDetailedRequestLogging $ appSettings foundation
then Detailed True
else Apache
(if appIpFromHeader $ appSettings ... | 707 | makeApplication :: App -> IO Application
makeApplication foundation = do
logWare <- mkRequestLogger def
{ outputFormat =
if appDetailedRequestLogging $ appSettings foundation
then Detailed True
else Apache
(if appIpFromHeader $ appSettings ... | 707 | makeApplication foundation = do
logWare <- mkRequestLogger def
{ outputFormat =
if appDetailedRequestLogging $ appSettings foundation
then Detailed True
else Apache
(if appIpFromHeader $ appSettings foundation
th... | 666 | false | true | 0 | 16 | 238 | 121 | 60 | 61 | null | null |
jsavatgy/xroads-game | code/blue-angles-text.hs | gpl-2.0 | paintCanvas = do
setSourceRGB 1 1 1
paint
mapM_ (drawMarkerAt darkGreen) darkPoly
mapM_ drawPair dirUnits50
mapM_ drawText (zip dirUnits60 dirAngles) | 159 | paintCanvas = do
setSourceRGB 1 1 1
paint
mapM_ (drawMarkerAt darkGreen) darkPoly
mapM_ drawPair dirUnits50
mapM_ drawText (zip dirUnits60 dirAngles) | 159 | paintCanvas = do
setSourceRGB 1 1 1
paint
mapM_ (drawMarkerAt darkGreen) darkPoly
mapM_ drawPair dirUnits50
mapM_ drawText (zip dirUnits60 dirAngles) | 159 | false | false | 1 | 10 | 29 | 61 | 24 | 37 | null | null |
roberth/uu-helium | lib/Prelude.hs | gpl-3.0 | dropWhile :: (a -> Bool) -> [a] -> [a]
dropWhile _ [] = [] | 58 | dropWhile :: (a -> Bool) -> [a] -> [a]
dropWhile _ [] = [] | 58 | dropWhile _ [] = [] | 19 | false | true | 0 | 7 | 13 | 41 | 22 | 19 | null | null |
akegalj/snowdrift | Handler/Project.hs | agpl-3.0 | postUnwatchProjectR = watchOrUnwatchProject userUnwatchProjectDB "No longer watching " | 86 | postUnwatchProjectR = watchOrUnwatchProject userUnwatchProjectDB "No longer watching " | 86 | postUnwatchProjectR = watchOrUnwatchProject userUnwatchProjectDB "No longer watching " | 86 | false | false | 1 | 5 | 7 | 14 | 5 | 9 | null | null |
norm2782/JCU | src/Application.hs | bsd-3-clause | logoutH :: AppHandler ()
logoutH = do
with authLens logout
redirect "/" | 75 | logoutH :: AppHandler ()
logoutH = do
with authLens logout
redirect "/" | 75 | logoutH = do
with authLens logout
redirect "/" | 50 | false | true | 0 | 8 | 15 | 36 | 14 | 22 | null | null |
gbaz/cabal | cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs | bsd-3-clause | toConflictSet :: Ord qpn => Goal qpn -> ConflictSet qpn
toConflictSet (Goal g grs) = CS.insert g (goalReasonChainToVars grs) | 124 | toConflictSet :: Ord qpn => Goal qpn -> ConflictSet qpn
toConflictSet (Goal g grs) = CS.insert g (goalReasonChainToVars grs) | 124 | toConflictSet (Goal g grs) = CS.insert g (goalReasonChainToVars grs) | 68 | false | true | 0 | 7 | 18 | 52 | 24 | 28 | null | null |
jsnajder/hofm | test/hofm-de.hs | bsd-3-clause | dPatterns = G.dPatterns :: [DPatternDefault] | 44 | dPatterns = G.dPatterns :: [DPatternDefault] | 44 | dPatterns = G.dPatterns :: [DPatternDefault] | 44 | false | false | 0 | 5 | 4 | 14 | 8 | 6 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110407set1.hs | gpl-3.0 | processHW :: [Char]
processHW =
"\ngenerate P P > h w+ QED=99 @1\nadd process P P > h w- QED=99 @2" | 103 | processHW :: [Char]
processHW =
"\ngenerate P P > h w+ QED=99 @1\nadd process P P > h w- QED=99 @2" | 103 | processHW =
"\ngenerate P P > h w+ QED=99 @1\nadd process P P > h w- QED=99 @2" | 83 | false | true | 0 | 5 | 24 | 14 | 8 | 6 | null | null |
fmapfmapfmap/amazonka | amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types/Product.hs | mpl-2.0 | -- | The frame rate of the input file. If you want Elastic Transcoder to
-- automatically detect the frame rate of the input file, specify 'auto'.
-- If you want to specify the frame rate for the input file, enter one of
-- the following values:
--
-- '10', '15', '23.97', '24', '25', '29.97', '30', '60'
--
-- If you sp... | 528 | jiFrameRate :: Lens' JobInput (Maybe Text)
jiFrameRate = lens _jiFrameRate (\ s a -> s{_jiFrameRate = a}) | 105 | jiFrameRate = lens _jiFrameRate (\ s a -> s{_jiFrameRate = a}) | 62 | true | true | 1 | 9 | 93 | 57 | 33 | 24 | null | null |
mainland/nikola | src/Data/Vector/CUDA/Storable.hs | bsd-3-clause | find = G.find | 13 | find = G.find | 13 | find = G.find | 13 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
whittle/euler | src/Math/Primes.hs | mit | -- http://math.stackexchange.com/questions/22721/is-there-a-formula-to-calculate-the-sum-of-all-proper-divisors-of-a-number
-- http://planetmath.org/formulaforsumofdivisors
sumOfDivisors :: Integral a => a -> a
sumOfDivisors = product . map f . primeFactorization
where f (p, a) = (p ^ (a + 1) - 1) `div` (p - 1) | 314 | sumOfDivisors :: Integral a => a -> a
sumOfDivisors = product . map f . primeFactorization
where f (p, a) = (p ^ (a + 1) - 1) `div` (p - 1) | 141 | sumOfDivisors = product . map f . primeFactorization
where f (p, a) = (p ^ (a + 1) - 1) `div` (p - 1) | 103 | true | true | 0 | 10 | 37 | 82 | 45 | 37 | null | null |
brendanhay/gogol | gogol-replicapool-updater/gen/Network/Google/Resource/ReplicaPoolUpdater/ZoneOperations/Get.hs | mpl-2.0 | -- | Creates a value of 'ZoneOperationsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zogProject'
--
-- * 'zogOperation'
--
-- * 'zogZone'
zoneOperationsGet
:: Text -- ^ 'zogProject'
-> Text -- ^ 'zogOperation'
-> Te... | 544 | zoneOperationsGet
:: Text -- ^ 'zogProject'
-> Text -- ^ 'zogOperation'
-> Text -- ^ 'zogZone'
-> ZoneOperationsGet
zoneOperationsGet pZogProject_ pZogOperation_ pZogZone_ =
ZoneOperationsGet'
{ _zogProject = pZogProject_
, _zogOperation = pZogOperation_
, _zogZone = pZogZone_
} | 313 | zoneOperationsGet pZogProject_ pZogOperation_ pZogZone_ =
ZoneOperationsGet'
{ _zogProject = pZogProject_
, _zogOperation = pZogOperation_
, _zogZone = pZogZone_
} | 181 | true | true | 0 | 9 | 112 | 71 | 42 | 29 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.