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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OpenSourceOrg/haskell-opensource | Network/Protocol/OpenSource/License.hs | mit | licenseBySchemeAndIdentifier :: String -> String -> ExceptT String IO OSILicense
licenseBySchemeAndIdentifier s i = getLicense (concat [s, "/", i]) | 147 | licenseBySchemeAndIdentifier :: String -> String -> ExceptT String IO OSILicense
licenseBySchemeAndIdentifier s i = getLicense (concat [s, "/", i]) | 147 | licenseBySchemeAndIdentifier s i = getLicense (concat [s, "/", i]) | 66 | false | true | 0 | 8 | 18 | 49 | 25 | 24 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/SY/Lib.hs | bsd-3-clause | delay :: a -- ^ initial value
-> Signal a -- ^ input signal
-> Signal a -- ^ output signal
delay i = MoC.delay (unit i) | 135 | delay :: a -- ^ initial value
-> Signal a -- ^ input signal
-> Signal a
delay i = MoC.delay (unit i) | 116 | delay i = MoC.delay (unit i) | 28 | true | true | 0 | 8 | 42 | 47 | 22 | 25 | null | null |
nevrenato/Hets_Fork | CASL/MixfixParser.hs | gpl-2.0 | mkRule :: Id -> Rule
mkRule = mixRule 1 | 39 | mkRule :: Id -> Rule
mkRule = mixRule 1 | 39 | mkRule = mixRule 1 | 18 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
neongreen/untilbot | src/Telegram.hs | bsd-3-clause | getUpdatesRoute :: Maybe UpdateId -> Route
getUpdatesRoute mbOffset = Route {
urlPieces = ["getUpdates"],
urlParams = ["offset" =. mbOffset],
httpMethod = "GET" } | 170 | getUpdatesRoute :: Maybe UpdateId -> Route
getUpdatesRoute mbOffset = Route {
urlPieces = ["getUpdates"],
urlParams = ["offset" =. mbOffset],
httpMethod = "GET" } | 170 | getUpdatesRoute mbOffset = Route {
urlPieces = ["getUpdates"],
urlParams = ["offset" =. mbOffset],
httpMethod = "GET" } | 127 | false | true | 0 | 9 | 30 | 57 | 30 | 27 | null | null |
rfranek/duckling | Duckling/Numeral/HR/Rules.hs | bsd-3-clause | rulePowersOfTen :: Rule
rulePowersOfTen = Rule
{ name = "powers of tens"
, pattern =
[ regex "(stotin(u|a|e)|tisu(c|\x0107)(a|u|e)|milij(u|o)na?)"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (match:_)):_) -> case Text.toLower match of
"stotinu" -> double 1e2 >>= withGr... | 1,223 | rulePowersOfTen :: Rule
rulePowersOfTen = Rule
{ name = "powers of tens"
, pattern =
[ regex "(stotin(u|a|e)|tisu(c|\x0107)(a|u|e)|milij(u|o)na?)"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (match:_)):_) -> case Text.toLower match of
"stotinu" -> double 1e2 >>= withGr... | 1,223 | rulePowersOfTen = Rule
{ name = "powers of tens"
, pattern =
[ regex "(stotin(u|a|e)|tisu(c|\x0107)(a|u|e)|milij(u|o)na?)"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (match:_)):_) -> case Text.toLower match of
"stotinu" -> double 1e2 >>= withGrain 2 >>= withMultipliab... | 1,199 | false | true | 0 | 18 | 299 | 362 | 171 | 191 | null | null |
dalaing/type-systems | src/Fragment/Pair/Rules/Type/Infer/Common.hs | bsd-3-clause | pairInferTypeInput :: PairInferTypeConstraint e w s r m ki ty pt tm a i
=> Proxy (MonadProxy e w s r m)
-> Proxy i
-> InferTypeInput e w s r m (InferTypeMonad m ki ty a i) ki ty pt tm a
pairInferTypeInput m i =
InferTypeInput
(unifyPairRules m i)
[ Infe... | 473 | pairInferTypeInput :: PairInferTypeConstraint e w s r m ki ty pt tm a i
=> Proxy (MonadProxy e w s r m)
-> Proxy i
-> InferTypeInput e w s r m (InferTypeMonad m ki ty a i) ki ty pt tm a
pairInferTypeInput m i =
InferTypeInput
(unifyPairRules m i)
[ Infe... | 473 | pairInferTypeInput m i =
InferTypeInput
(unifyPairRules m i)
[ InferTypeRecurse $ inferTmPair m i
, InferTypeRecurse $ inferTmFst m i
, InferTypeRecurse $ inferTmSnd m i
]
[ PCheckRecurse $ checkPair m i] | 230 | false | true | 0 | 10 | 158 | 173 | 83 | 90 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Scales.hs | gpl-3.0 | melodicMinor :: Fractional a => [a]
melodicMinor = [0,2,3,5,7,9,11] | 67 | melodicMinor :: Fractional a => [a]
melodicMinor = [0,2,3,5,7,9,11] | 67 | melodicMinor = [0,2,3,5,7,9,11] | 31 | false | true | 0 | 8 | 8 | 49 | 26 | 23 | null | null |
joelburget/haste-compiler | libraries/base-ghc-7.6/Data/Traversable.hs | bsd-3-clause | mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
mapAccumR f s t = runStateR (traverse (StateR . flip f) t) s | 133 | mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
mapAccumR f s t = runStateR (traverse (StateR . flip f) t) s | 133 | mapAccumR f s t = runStateR (traverse (StateR . flip f) t) s | 60 | false | true | 0 | 12 | 32 | 94 | 46 | 48 | null | null |
hvr/jhc | regress/tests/6_fixed_bugs/Rand.hs | mit | main = do
let f s = case xorshift s of
(s',w) -> w:f s'
-- let g 0 s r = s `seq` r
-- g n s r = r `seq` n `seq` case xorshift s of
-- (s',w) -> g (n - 1) s' (w + r)
print (g (10000000::Int) initialState 0)
-- print (sum (take 1000000 (f initialState))) | 298 | main = do
let f s = case xorshift s of
(s',w) -> w:f s'
-- let g 0 s r = s `seq` r
-- g n s r = r `seq` n `seq` case xorshift s of
-- (s',w) -> g (n - 1) s' (w + r)
print (g (10000000::Int) initialState 0)
-- print (sum (take 1000000 (f initialState))) | 298 | main = do
let f s = case xorshift s of
(s',w) -> w:f s'
-- let g 0 s r = s `seq` r
-- g n s r = r `seq` n `seq` case xorshift s of
-- (s',w) -> g (n - 1) s' (w + r)
print (g (10000000::Int) initialState 0)
-- print (sum (take 1000000 (f initialState))) | 298 | false | false | 1 | 15 | 107 | 74 | 36 | 38 | null | null |
hanshoglund/hsconf | src/Data/Config/Reader/Internals.hs | bsd-3-clause | errorMessage (ConfigSyntaxError x) = x | 38 | errorMessage (ConfigSyntaxError x) = x | 38 | errorMessage (ConfigSyntaxError x) = x | 38 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
ghorn/classy-dvda | src/Classy/State.hs | bsd-3-clause | rotZ = rotXYZ Z | 15 | rotZ = rotXYZ Z | 15 | rotZ = rotXYZ Z | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
reedrosenbluth/othello | src/Game.hs | bsd-3-clause | toFlip _ _ (_:[]) = [] | 22 | toFlip _ _ (_:[]) = [] | 22 | toFlip _ _ (_:[]) = [] | 22 | false | false | 0 | 8 | 5 | 24 | 12 | 12 | null | null |
JohnLato/impulse | src/Reactive/Impulse/Internal/Types.hs | lgpl-3.0 | cBoundarySet :: IndexPreservingGetter EChain BoundarySet
cBoundarySet = to f.boundarySet
where
f (EChain _ (CEvent l n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CMap l _ n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CFilt l _ n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CApply l _ ... | 472 | cBoundarySet :: IndexPreservingGetter EChain BoundarySet
cBoundarySet = to f.boundarySet
where
f (EChain _ (CEvent l n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CMap l _ n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CFilt l _ n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CApply l _ ... | 472 | cBoundarySet = to f.boundarySet
where
f (EChain _ (CEvent l n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CMap l _ n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CFilt l _ n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CApply l _ n)) = IntSet.insert l $ n^.cnPushSet
f (EChain _ (CJo... | 415 | false | true | 0 | 8 | 118 | 242 | 115 | 127 | null | null |
QuickChick/Luck | luck/src/Outer/Types.hs | mit | inferTyPat t (PLit lit) = do
t' <- inferLit lit
equate t t' $ show ("PLit", lit) | 84 | inferTyPat t (PLit lit) = do
t' <- inferLit lit
equate t t' $ show ("PLit", lit) | 84 | inferTyPat t (PLit lit) = do
t' <- inferLit lit
equate t t' $ show ("PLit", lit) | 84 | false | false | 0 | 9 | 20 | 48 | 22 | 26 | null | null |
bitemyapp/Haskell-Turtle-Library | src/Turtle/Prelude.hs | bsd-3-clause | {-| Count the number of lines in the stream (like @wc -l@)
This uses the convention that each element of the stream represents one
line
-}
countLines :: Integral n => Fold Text n
countLines = genericLength | 214 | countLines :: Integral n => Fold Text n
countLines = genericLength | 66 | countLines = genericLength | 26 | true | true | 0 | 6 | 45 | 24 | 12 | 12 | null | null |
jwiegley/ghc-release | libraries/transformers/Control/Monad/Trans/Maybe.hs | gpl-3.0 | -- | Lift a @catchError@ operation to the new monad.
liftCatch :: (m (Maybe a) -> (e -> m (Maybe a)) -> m (Maybe a)) ->
MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a
liftCatch f m h = MaybeT $ f (runMaybeT m) (runMaybeT . h) | 228 | liftCatch :: (m (Maybe a) -> (e -> m (Maybe a)) -> m (Maybe a)) ->
MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a
liftCatch f m h = MaybeT $ f (runMaybeT m) (runMaybeT . h) | 175 | liftCatch f m h = MaybeT $ f (runMaybeT m) (runMaybeT . h) | 58 | true | true | 0 | 13 | 55 | 120 | 59 | 61 | null | null |
cbaatz/hamu8080 | src/Hamu8080/Compute.hs | mit | -- DCX DE
doOp 0x2B = liftM (subtract 1) (getRegPair HL) >>= setRegPair HL | 74 | doOp 0x2B = liftM (subtract 1) (getRegPair HL) >>= setRegPair HL | 64 | doOp 0x2B = liftM (subtract 1) (getRegPair HL) >>= setRegPair HL | 64 | true | false | 0 | 8 | 13 | 34 | 16 | 18 | null | null |
mpickering/hackage-server | Distribution/Server/Users/Users.hs | bsd-3-clause | lookupUserId :: UserId -> Users -> Maybe UserInfo
lookupUserId (UserId userId) users = IntMap.lookup userId (userIdMap users) | 125 | lookupUserId :: UserId -> Users -> Maybe UserInfo
lookupUserId (UserId userId) users = IntMap.lookup userId (userIdMap users) | 125 | lookupUserId (UserId userId) users = IntMap.lookup userId (userIdMap users) | 75 | false | true | 0 | 10 | 16 | 50 | 23 | 27 | null | null |
jasonzoladz/persistent | persistent-test/CompositeTest.hs | mit | catch' :: (Control.Monad.Trans.Control.MonadBaseControl IO m, E.Exception e)
=> m a -- ^ The computation to run
-> (e -> m a) -- ^ Handler to invoke if an exception is raised
-> m a
catch' a handler = Control.Monad.Trans.Control.control $ \runInIO ->
E.catch (runInIO a)
... | 373 | catch' :: (Control.Monad.Trans.Control.MonadBaseControl IO m, E.Exception e)
=> m a -- ^ The computation to run
-> (e -> m a) -- ^ Handler to invoke if an exception is raised
-> m a
catch' a handler = Control.Monad.Trans.Control.control $ \runInIO ->
E.catch (runInIO a)
... | 373 | catch' a handler = Control.Monad.Trans.Control.control $ \runInIO ->
E.catch (runInIO a)
(\e -> runInIO $ handler e) | 164 | false | true | 0 | 11 | 125 | 112 | 59 | 53 | null | null |
hmemcpy/milewski-ctfp-pdf | src/content/1.9/code/haskell/snippet13.hs | gpl-3.0 | eval :: ((a -> b), a) -> b
eval (f, x) = f x | 44 | eval :: ((a -> b), a) -> b
eval (f, x) = f x | 44 | eval (f, x) = f x | 17 | false | true | 0 | 8 | 13 | 45 | 23 | 22 | null | null |
roldugin/LiveFusion | Data/LiveFusion/Loop/Var.hs | bsd-3-clause | indexPrefix = "ix" | 20 | indexPrefix = "ix" | 20 | indexPrefix = "ix" | 20 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
dysinger/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | The name of the character set.
csCharacterSetName :: Lens' CharacterSet (Maybe Text)
csCharacterSetName =
lens _csCharacterSetName (\s a -> s { _csCharacterSetName = a }) | 179 | csCharacterSetName :: Lens' CharacterSet (Maybe Text)
csCharacterSetName =
lens _csCharacterSetName (\s a -> s { _csCharacterSetName = a }) | 143 | csCharacterSetName =
lens _csCharacterSetName (\s a -> s { _csCharacterSetName = a }) | 89 | true | true | 0 | 9 | 30 | 46 | 25 | 21 | null | null |
travitch/language-python-builder | src/Language/Python/Common/Builder.hs | bsd-3-clause | compForAC :: annot -> [ExprQ annot] -> ExprQ annot -> Maybe (CompIterQ annot) -> CompForQ annot
compForAC annot forExprs inExpr forIter = do
forExprs' <- sequence forExprs
inExpr' <- inExpr
forIter' <- T.sequence forIter
return $ CompFor forExprs' inExpr' forIter' annot | 278 | compForAC :: annot -> [ExprQ annot] -> ExprQ annot -> Maybe (CompIterQ annot) -> CompForQ annot
compForAC annot forExprs inExpr forIter = do
forExprs' <- sequence forExprs
inExpr' <- inExpr
forIter' <- T.sequence forIter
return $ CompFor forExprs' inExpr' forIter' annot | 278 | compForAC annot forExprs inExpr forIter = do
forExprs' <- sequence forExprs
inExpr' <- inExpr
forIter' <- T.sequence forIter
return $ CompFor forExprs' inExpr' forIter' annot | 182 | false | true | 0 | 11 | 48 | 102 | 46 | 56 | null | null |
mettekou/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | deTagExpr (Let bind body) = Let (deTagBind bind) (deTagExpr body) | 75 | deTagExpr (Let bind body) = Let (deTagBind bind) (deTagExpr body) | 75 | deTagExpr (Let bind body) = Let (deTagBind bind) (deTagExpr body) | 75 | false | false | 0 | 7 | 19 | 35 | 16 | 19 | null | null |
keithodulaigh/Hets | OWL2/Keywords.hs | gpl-2.0 | xsdNumbers :: [String]
xsdNumbers = [integerS, negativeIntegerS, nonNegativeIntegerS,
nonPositiveIntegerS, positiveIntegerS, decimalS, doubleS, floatS,
longS, intS, shortS, byteS, unsignedLongS, unsignedIntS, unsignedShortS,
unsignedByteS] | 251 | xsdNumbers :: [String]
xsdNumbers = [integerS, negativeIntegerS, nonNegativeIntegerS,
nonPositiveIntegerS, positiveIntegerS, decimalS, doubleS, floatS,
longS, intS, shortS, byteS, unsignedLongS, unsignedIntS, unsignedShortS,
unsignedByteS] | 251 | xsdNumbers = [integerS, negativeIntegerS, nonNegativeIntegerS,
nonPositiveIntegerS, positiveIntegerS, decimalS, doubleS, floatS,
longS, intS, shortS, byteS, unsignedLongS, unsignedIntS, unsignedShortS,
unsignedByteS] | 228 | false | true | 0 | 5 | 32 | 62 | 40 | 22 | null | null |
anttisalonen/freekick2 | src/Match/DrawPitch.hs | gpl-3.0 | draw2DArc :: (Float, Float) -> Float -> Float -> Float -> IO ()
draw2DArc p r w d = draw2DArcAngled' p r w d Nothing | 116 | draw2DArc :: (Float, Float) -> Float -> Float -> Float -> IO ()
draw2DArc p r w d = draw2DArcAngled' p r w d Nothing | 116 | draw2DArc p r w d = draw2DArcAngled' p r w d Nothing | 52 | false | true | 0 | 11 | 24 | 62 | 30 | 32 | null | null |
HaskellForCats/HaskellForCats | MenaBeginning/Ch001/ch1ListsRecursion.hs | mit | {- *Ch1ListsRecur> quickCheck prop_ifCondRec
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package time-1.4.0.1 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading... | 651 | odds :: Integral t => [t] -> [t]
odds xs = [x | x <- xs, odd x ] | 64 | odds xs = [x | x <- xs, odd x ] | 31 | true | true | 0 | 7 | 98 | 52 | 28 | 24 | null | null |
joelwilliamson/validator | Command.hs | agpl-3.0 | numericCommands =
[ "add_piety_modifier","add_prestige_modifier","participation_scaled_decadence"
, "participation_scaled_piety", "participation_scaled_prestige"
, "reduce_disease" ] <>
[ "change_diplomacy", "change_intrigue", "change_learning", "change_martial"
, "change_random_civ_tech", "change_random_eco_... | 520 | numericCommands =
[ "add_piety_modifier","add_prestige_modifier","participation_scaled_decadence"
, "participation_scaled_piety", "participation_scaled_prestige"
, "reduce_disease" ] <>
[ "change_diplomacy", "change_intrigue", "change_learning", "change_martial"
, "change_random_civ_tech", "change_random_eco_... | 520 | numericCommands =
[ "add_piety_modifier","add_prestige_modifier","participation_scaled_decadence"
, "participation_scaled_piety", "participation_scaled_prestige"
, "reduce_disease" ] <>
[ "change_diplomacy", "change_intrigue", "change_learning", "change_martial"
, "change_random_civ_tech", "change_random_eco_... | 520 | false | false | 0 | 6 | 49 | 79 | 51 | 28 | null | null |
li-zhirui/EoplLangs | src/ExceptionLang/Evaluator.hs | bsd-3-clause | applyCont (IfCont thenE elseE env cont) val = do
bool <- unpackBool "Predicate of if expression" val
let body = if bool then thenE else elseE
valueOf body env cont | 169 | applyCont (IfCont thenE elseE env cont) val = do
bool <- unpackBool "Predicate of if expression" val
let body = if bool then thenE else elseE
valueOf body env cont | 169 | applyCont (IfCont thenE elseE env cont) val = do
bool <- unpackBool "Predicate of if expression" val
let body = if bool then thenE else elseE
valueOf body env cont | 169 | false | false | 0 | 10 | 35 | 62 | 29 | 33 | null | null |
plumlife/cabal | cabal-install/Distribution/Client/Config.hs | bsd-3-clause | liftUserInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate))
-> FieldDescr SavedConfig
liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 223 | liftUserInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate))
-> FieldDescr SavedConfig
liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 223 | liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 109 | false | true | 0 | 10 | 43 | 57 | 29 | 28 | null | null |
pgj/bead | src/Bead/Persistence/SQL/Comment.hs | bsd-3-clause | submissionOfComment :: Domain.CommentKey -> Persist Domain.SubmissionKey
submissionOfComment key = do
sbs <- selectList [ CommentsOfSubmissionComment ==. toEntityKey key ] []
return $!
maybe (persistError "submissionOfComment" $ "The comment is not found: " ++ show key)
(toDomainKey . commentsOfSubmis... | 388 | submissionOfComment :: Domain.CommentKey -> Persist Domain.SubmissionKey
submissionOfComment key = do
sbs <- selectList [ CommentsOfSubmissionComment ==. toEntityKey key ] []
return $!
maybe (persistError "submissionOfComment" $ "The comment is not found: " ++ show key)
(toDomainKey . commentsOfSubmis... | 388 | submissionOfComment key = do
sbs <- selectList [ CommentsOfSubmissionComment ==. toEntityKey key ] []
return $!
maybe (persistError "submissionOfComment" $ "The comment is not found: " ++ show key)
(toDomainKey . commentsOfSubmissionSubmission . entityVal)
(listToMaybe sbs)
#ifdef TEST | 315 | false | true | 0 | 12 | 72 | 98 | 47 | 51 | null | null |
manpages/blog | src/Blog.hs | mit | -- |
-- Based on our ReaderT, posts an entry to the blog, if category is ok
postR :: Path -> BlogCat -> Blog
postR thing category = do
(BlogCfg { connection = con
, blog_spec = spec
, pathFn = f}) <- ask
let (cmd, remote, pth) = rsyncTup con
liftIO $ putStrLn $ show (category, spec)
t... | 538 | postR :: Path -> BlogCat -> Blog
postR thing category = do
(BlogCfg { connection = con
, blog_spec = spec
, pathFn = f}) <- ask
let (cmd, remote, pth) = rsyncTup con
liftIO $ putStrLn $ show (category, spec)
tau <- liftIO $ getCurrentTime
if knownCategory category spec
then lift... | 462 | postR thing category = do
(BlogCfg { connection = con
, blog_spec = spec
, pathFn = f}) <- ask
let (cmd, remote, pth) = rsyncTup con
liftIO $ putStrLn $ show (category, spec)
tau <- liftIO $ getCurrentTime
if knownCategory category spec
then liftIO $ rsyncSend cmd thing remote $... | 429 | true | true | 0 | 12 | 140 | 164 | 82 | 82 | null | null |
rueshyna/gogol | gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs | mpl-2.0 | -- | Creation time of this submission. This may be unset if the student has
-- not accessed this item. Read-only.
ssCreationTime :: Lens' StudentSubmission (Maybe Text)
ssCreationTime
= lens _ssCreationTime
(\ s a -> s{_ssCreationTime = a}) | 248 | ssCreationTime :: Lens' StudentSubmission (Maybe Text)
ssCreationTime
= lens _ssCreationTime
(\ s a -> s{_ssCreationTime = a}) | 134 | ssCreationTime
= lens _ssCreationTime
(\ s a -> s{_ssCreationTime = a}) | 79 | true | true | 2 | 9 | 45 | 56 | 26 | 30 | null | null |
ouroboros8/xmonad-config | xmonad.hs | mit | colors = fromList
[("Black", "#282828")
,("DarkGrey", "#7c6f64")
,("DarkRed", "#cc241d")
,("Red", "#fb4934")
,("DarkGreen", "#98971a")
,("Green", "#b8bb26")
,("DarkYellow", "#d79921")
,("Yellow", "#fabd2f")
,("DarkBlue", "#458588")
,("Blue", ... | 535 | colors = fromList
[("Black", "#282828")
,("DarkGrey", "#7c6f64")
,("DarkRed", "#cc241d")
,("Red", "#fb4934")
,("DarkGreen", "#98971a")
,("Green", "#b8bb26")
,("DarkYellow", "#d79921")
,("Yellow", "#fabd2f")
,("DarkBlue", "#458588")
,("Blue", ... | 535 | colors = fromList
[("Black", "#282828")
,("DarkGrey", "#7c6f64")
,("DarkRed", "#cc241d")
,("Red", "#fb4934")
,("DarkGreen", "#98971a")
,("Green", "#b8bb26")
,("DarkYellow", "#d79921")
,("Yellow", "#fabd2f")
,("DarkBlue", "#458588")
,("Blue", ... | 535 | false | false | 0 | 6 | 170 | 153 | 100 | 53 | null | null |
jonaprieto/online-atps | src/OnlineATPs/SystemOnTPTP.hs | mit | etDataQuietFlag ∷ SystemOnTPTP → [(String, String)]
getDataQuietFlag spec
| not $ null $ optQuietFlag spec = val
| otherwise = []
where
val ∷ [(String, String)]
val = [("QuietFlag", optQuietFlag spec )]
| 217 | getDataQuietFlag ∷ SystemOnTPTP → [(String, String)]
getDataQuietFlag spec
| not $ null $ optQuietFlag spec = val
| otherwise = []
where
val ∷ [(String, String)]
val = [("QuietFlag", optQuietFlag spec )] | 217 | getDataQuietFlag spec
| not $ null $ optQuietFlag spec = val
| otherwise = []
where
val ∷ [(String, String)]
val = [("QuietFlag", optQuietFlag spec )] | 164 | false | true | 0 | 9 | 46 | 102 | 50 | 52 | null | null |
gcampax/ghc | compiler/main/DynFlags.hs | bsd-3-clause | wayExtras _ WayDyn dflags = dflags | 39 | wayExtras _ WayDyn dflags = dflags | 39 | wayExtras _ WayDyn dflags = dflags | 39 | false | false | 0 | 5 | 10 | 13 | 6 | 7 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_340 (142#) = happyShift action_197 | 41 | action_340 (142#) = happyShift action_197 | 41 | action_340 (142#) = happyShift action_197 | 41 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
ChaosCabbage/my-haskell-flailing | app/Debugger.hs | bsd-3-clause | stepWhile :: forall s. StopCondition s -> CycleCountedComputation s
stepWhile condition = stepWhile' 0
where
stepWhile' sum = do
continue <- condition
if continue then
step >>= stepWhile' . (sum +)
else
return sum | 294 | stepWhile :: forall s. StopCondition s -> CycleCountedComputation s
stepWhile condition = stepWhile' 0
where
stepWhile' sum = do
continue <- condition
if continue then
step >>= stepWhile' . (sum +)
else
return sum | 294 | stepWhile condition = stepWhile' 0
where
stepWhile' sum = do
continue <- condition
if continue then
step >>= stepWhile' . (sum +)
else
return sum | 226 | false | true | 0 | 9 | 114 | 76 | 37 | 39 | null | null |
CindyLinz/Haskell.js | trans/src/Desugar/Tuple.hs | mit | deTupleExp (LeftArrApp l exp1 exp2) = LeftArrApp (id l) (deTupleExp exp1) (deTupleExp exp2) | 91 | deTupleExp (LeftArrApp l exp1 exp2) = LeftArrApp (id l) (deTupleExp exp1) (deTupleExp exp2) | 91 | deTupleExp (LeftArrApp l exp1 exp2) = LeftArrApp (id l) (deTupleExp exp1) (deTupleExp exp2) | 91 | false | false | 0 | 7 | 12 | 45 | 21 | 24 | null | null |
xu-hao/QueryArrow | QueryArrow-db-sql-common/src/QueryArrow/SQL/SQL.hs | bsd-3-clause | simpleBuildIn :: String -> ([SQLExpr] -> TransMonad SQL) -> [Expr] -> TransMonad SQL
simpleBuildIn n builtin args = do
let err m = do
a <- m
case a of
Left expr -> return expr
Right _ -> error ("unconstrained argument to built-in predica... | 402 | simpleBuildIn :: String -> ([SQLExpr] -> TransMonad SQL) -> [Expr] -> TransMonad SQL
simpleBuildIn n builtin args = do
let err m = do
a <- m
case a of
Left expr -> return expr
Right _ -> error ("unconstrained argument to built-in predicat... | 401 | simpleBuildIn n builtin args = do
let err m = do
a <- m
case a of
Left expr -> return expr
Right _ -> error ("unconstrained argument to built-in predicate " ++ n)
sqlExprs <- mapM (err . sqlExprFromArg) args
builtin sqlExprs | 316 | false | true | 0 | 17 | 148 | 131 | 61 | 70 | null | null |
Numberartificial/workflow | haskell-first-principles/src/RW/CH8/Regexp.hs | mit | namesMatching pat
| not (isPattern pat) = do
exists <- doesNameExist pat
return (if exists then [pat] else [])
| otherwise = do
case splitFileName pat of
("", baseName) -> do
curDir <- getCurrentDirectory
listMatches curDir baseName
(dirName, baseName) -> do
dir... | 787 | namesMatching pat
| not (isPattern pat) = do
exists <- doesNameExist pat
return (if exists then [pat] else [])
| otherwise = do
case splitFileName pat of
("", baseName) -> do
curDir <- getCurrentDirectory
listMatches curDir baseName
(dirName, baseName) -> do
dir... | 787 | namesMatching pat
| not (isPattern pat) = do
exists <- doesNameExist pat
return (if exists then [pat] else [])
| otherwise = do
case splitFileName pat of
("", baseName) -> do
curDir <- getCurrentDirectory
listMatches curDir baseName
(dirName, baseName) -> do
dir... | 787 | false | false | 1 | 22 | 309 | 229 | 108 | 121 | null | null |
fmapfmapfmap/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/Types/Product.hs | mpl-2.0 | -- | The name of the on-premises instance.
iiInstanceName :: Lens' InstanceInfo (Maybe Text)
iiInstanceName = lens _iiInstanceName (\ s a -> s{_iiInstanceName = a}) | 164 | iiInstanceName :: Lens' InstanceInfo (Maybe Text)
iiInstanceName = lens _iiInstanceName (\ s a -> s{_iiInstanceName = a}) | 121 | iiInstanceName = lens _iiInstanceName (\ s a -> s{_iiInstanceName = a}) | 71 | true | true | 0 | 9 | 24 | 46 | 25 | 21 | null | null |
phaazon/Idris-dev | src/IRTS/CodegenJavaScript.hs | bsd-3-clause | translateConstant (Str s) = JSString $ concatMap translateChar s | 81 | translateConstant (Str s) = JSString $ concatMap translateChar s | 81 | translateConstant (Str s) = JSString $ concatMap translateChar s | 81 | false | false | 0 | 7 | 25 | 24 | 11 | 13 | null | null |
josefs/sbv | Data/SBV/Core/Symbolic.hs | bsd-3-clause | swKind :: SW -> Kind
swKind (SW k _) = k | 40 | swKind :: SW -> Kind
swKind (SW k _) = k | 40 | swKind (SW k _) = k | 19 | false | true | 0 | 6 | 10 | 30 | 14 | 16 | null | null |
ditto/ditto | src/Ditto/Parse.hs | gpl-3.0 | parseVar :: Parser Exp
parseVar = try $ EVar <$> parseName | 58 | parseVar :: Parser Exp
parseVar = try $ EVar <$> parseName | 58 | parseVar = try $ EVar <$> parseName | 35 | false | true | 3 | 5 | 10 | 26 | 11 | 15 | null | null |
clockworkdevstudio/Idlewild-Lang | Semantics.hs | bsd-2-clause | isCustomTypeVariable :: Symbol -> Bool
isCustomTypeVariable (Variable {variableType = (VARIABLE_TYPE_CUSTOM {})}) = True | 120 | isCustomTypeVariable :: Symbol -> Bool
isCustomTypeVariable (Variable {variableType = (VARIABLE_TYPE_CUSTOM {})}) = True | 120 | isCustomTypeVariable (Variable {variableType = (VARIABLE_TYPE_CUSTOM {})}) = True | 81 | false | true | 0 | 11 | 12 | 37 | 20 | 17 | null | null |
2ion/yst | Yst/Render.hs | gpl-2.0 | formatFromExtension :: FilePath -> Format
formatFromExtension f = case (map toLower $ takeExtension f) of
".html" -> HtmlFormat
".xhtml" -> HtmlFormat
".latex" -> LaTeXFormat
".tex" -> LaTeXFormat
... | 804 | formatFromExtension :: FilePath -> Format
formatFromExtension f = case (map toLower $ takeExtension f) of
".html" -> HtmlFormat
".xhtml" -> HtmlFormat
".latex" -> LaTeXFormat
".tex" -> LaTeXFormat
... | 804 | formatFromExtension f = case (map toLower $ takeExtension f) of
".html" -> HtmlFormat
".xhtml" -> HtmlFormat
".latex" -> LaTeXFormat
".tex" -> LaTeXFormat
".context" -> Con... | 762 | false | true | 0 | 8 | 452 | 113 | 56 | 57 | null | null |
rahulaaj/ML-Library | src/Logistic/Logistic.hs | gpl-3.0 | train n ((x,feature):xs) weight = do newWeight<-someIterateTrain feature x weight;
--print newWeight
nextWeight<-train n xs newWeight;
--print newWeight
--print ("Done "++(... | 407 | train n ((x,feature):xs) weight = do newWeight<-someIterateTrain feature x weight;
--print newWeight
nextWeight<-train n xs newWeight;
--print newWeight
--print ("Done "++(... | 407 | train n ((x,feature):xs) weight = do newWeight<-someIterateTrain feature x weight;
--print newWeight
nextWeight<-train n xs newWeight;
--print newWeight
--print ("Done "++(... | 407 | false | false | 0 | 10 | 210 | 92 | 48 | 44 | null | null |
ml9951/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gen_Traversable_binds :: SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Traversable_binds loc tycon
= (unitBag traverse_bind, emptyBag)
where
data_cons = tyConDataCons tycon
traverse_bind = mkRdrFunBind (L loc traverse_RDR) eqns
eqns = map traverse_eqn data_cons
traverse_eqn con = evalSt... | 2,660 | gen_Traversable_binds :: SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Traversable_binds loc tycon
= (unitBag traverse_bind, emptyBag)
where
data_cons = tyConDataCons tycon
traverse_bind = mkRdrFunBind (L loc traverse_RDR) eqns
eqns = map traverse_eqn data_cons
traverse_eqn con = evalSt... | 2,660 | gen_Traversable_binds loc tycon
= (unitBag traverse_bind, emptyBag)
where
data_cons = tyConDataCons tycon
traverse_bind = mkRdrFunBind (L loc traverse_RDR) eqns
eqns = map traverse_eqn data_cons
traverse_eqn con = evalState (match_for_con [f_Pat] con =<< parts) bs_RDRs
where
parts = s... | 2,581 | false | true | 2 | 11 | 1,018 | 402 | 208 | 194 | null | null |
unisonweb/platform | codebase2/codebase-sqlite/U/Codebase/Sqlite/Queries.hs | mit | loadNamespaceRoot :: EDB m => m CausalHashId
loadNamespaceRoot = loadMaybeNamespaceRoot >>= \case
Nothing -> throwError NoNamespaceRoot
Just id -> pure id | 158 | loadNamespaceRoot :: EDB m => m CausalHashId
loadNamespaceRoot = loadMaybeNamespaceRoot >>= \case
Nothing -> throwError NoNamespaceRoot
Just id -> pure id | 158 | loadNamespaceRoot = loadMaybeNamespaceRoot >>= \case
Nothing -> throwError NoNamespaceRoot
Just id -> pure id | 113 | false | true | 3 | 6 | 24 | 48 | 22 | 26 | null | null |
TomHammersley/HaskellRenderer | app/src/SceneGraph.hs | gpl-2.0 | calculateBoundingRadius :: [Object] -> Vector -> Double
calculateBoundingRadius objs centre = foldr (Prelude.max . (\obj -> primitiveBoundingRadius (primitive obj) (transform obj) centre)) 0 objs | 195 | calculateBoundingRadius :: [Object] -> Vector -> Double
calculateBoundingRadius objs centre = foldr (Prelude.max . (\obj -> primitiveBoundingRadius (primitive obj) (transform obj) centre)) 0 objs | 195 | calculateBoundingRadius objs centre = foldr (Prelude.max . (\obj -> primitiveBoundingRadius (primitive obj) (transform obj) centre)) 0 objs | 139 | false | true | 0 | 12 | 23 | 70 | 36 | 34 | null | null |
cirquit/Personal-Repository | Haskell/freemonad/bf-interpreter/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_bf_interpreter.hs | mit | getLibexecDir = catchIO (getEnv "bf_interpreter_libexecdir") (\_ -> return libexecdir) | 86 | getLibexecDir = catchIO (getEnv "bf_interpreter_libexecdir") (\_ -> return libexecdir) | 86 | getLibexecDir = catchIO (getEnv "bf_interpreter_libexecdir") (\_ -> return libexecdir) | 86 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
shinjiro-itagaki/shinjirecs | shinjirecs-api/src/Helper/EnumHelper.hs | gpl-3.0 | enumToMask :: (Enum a, Num b, Bits b) => a -> b
enumToMask x = fromInteger $ 1 `shiftL` (fromEnum x) | 100 | enumToMask :: (Enum a, Num b, Bits b) => a -> b
enumToMask x = fromInteger $ 1 `shiftL` (fromEnum x) | 100 | enumToMask x = fromInteger $ 1 `shiftL` (fromEnum x) | 52 | false | true | 0 | 7 | 20 | 55 | 29 | 26 | null | null |
TransformingMusicology/tabcode-haskell | src/TabCode/Serialiser/MEIXML/Serialiser.hs | gpl-3.0 | meiDoc (MEIPageBreak attrs []) xmlIds =
meiXml_ "pb" attrs xmlIds | 67 | meiDoc (MEIPageBreak attrs []) xmlIds =
meiXml_ "pb" attrs xmlIds | 67 | meiDoc (MEIPageBreak attrs []) xmlIds =
meiXml_ "pb" attrs xmlIds | 67 | false | false | 0 | 8 | 11 | 28 | 13 | 15 | null | null |
abhean/phffp-examples | src/BinaryTree.hs | bsd-3-clause | mapSorted' :: (Ord a, Ord b) => (a -> b) -> BinaryTree a -> BinaryTree b
mapSorted' _ Leaf = Leaf | 97 | mapSorted' :: (Ord a, Ord b) => (a -> b) -> BinaryTree a -> BinaryTree b
mapSorted' _ Leaf = Leaf | 97 | mapSorted' _ Leaf = Leaf | 24 | false | true | 0 | 9 | 20 | 57 | 27 | 30 | null | null |
reactive-systems/icedude | src/Main.hs | mit | ctrlSerial
:: OP (Maybe String)
ctrlSerial =
let cSerial = ControlSetup Standard ToDevice 0xE4 0x00 0x00
in do
h <- getHandle
lift $ catch
(liftM (Just . ('D' :) . drop 6 . filter (/= '"') .
show . B.takeWhile (/= 0)) $
readControlExact h cSerial 12 timeout)
((\ _ -> retu... | 448 | ctrlSerial
:: OP (Maybe String)
ctrlSerial =
let cSerial = ControlSetup Standard ToDevice 0xE4 0x00 0x00
in do
h <- getHandle
lift $ catch
(liftM (Just . ('D' :) . drop 6 . filter (/= '"') .
show . B.takeWhile (/= 0)) $
readControlExact h cSerial 12 timeout)
((\ _ -> retur... | 447 | ctrlSerial =
let cSerial = ControlSetup Standard ToDevice 0xE4 0x00 0x00
in do
h <- getHandle
lift $ catch
(liftM (Just . ('D' :) . drop 6 . filter (/= '"') .
show . B.takeWhile (/= 0)) $
readControlExact h cSerial 12 timeout)
((\ _ -> return Nothing) :: USBException -> IO (... | 413 | false | true | 1 | 21 | 108 | 161 | 79 | 82 | null | null |
kishoredbn/barrelfish | hake/Main.hs | mit | reePath o BFSrcTree "cache" path hakepath =
relPath Config.cache_dir path hakepath
| 87 | treePath o BFSrcTree "cache" path hakepath =
relPath Config.cache_dir path hakepath | 87 | treePath o BFSrcTree "cache" path hakepath =
relPath Config.cache_dir path hakepath | 87 | false | false | 0 | 6 | 15 | 26 | 12 | 14 | null | null |
thoughtpolice/hs-noise | examples/noisecat.hs | mit | packetInputStream :: S.InputStream ByteString -> IO (S.InputStream ByteString)
packetInputStream input = S.parserToInputStream parsePkt input | 141 | packetInputStream :: S.InputStream ByteString -> IO (S.InputStream ByteString)
packetInputStream input = S.parserToInputStream parsePkt input | 141 | packetInputStream input = S.parserToInputStream parsePkt input | 62 | false | true | 0 | 9 | 13 | 41 | 19 | 22 | null | null |
pnutus/geometric-algebra | src/Numeric/LinearCombination.hs | mit | find :: (Num a, AEq a, Eq b, Ord b)
=> (b -> Bool) -> LinearCombination a b
-> Maybe (Term a b)
find p (LinComb terms) = L.find (p . element) terms | 168 | find :: (Num a, AEq a, Eq b, Ord b)
=> (b -> Bool) -> LinearCombination a b
-> Maybe (Term a b)
find p (LinComb terms) = L.find (p . element) terms | 168 | find p (LinComb terms) = L.find (p . element) terms | 51 | false | true | 0 | 10 | 53 | 94 | 47 | 47 | null | null |
atodorov/bdcs | src/BDCS/DB.hs | lgpl-2.1 | -- | Run an SQL query, returning the first value from the result list.
-- Use this when you want a single index out of the database and it is guaranteed not to be empty.
firstListResult :: Monad m => m [Value a] -> m a
firstListResult query =
head . map unValue <$> query | 275 | firstListResult :: Monad m => m [Value a] -> m a
firstListResult query =
head . map unValue <$> query | 105 | firstListResult query =
head . map unValue <$> query | 56 | true | true | 0 | 9 | 58 | 50 | 24 | 26 | null | null |
zmthy/snaplet-rest | src/Snap/Snaplet/Rest/Serve.hs | mit | ------------------------------------------------------------------------------
-- | Serve the specified resource using the given configuration.
serveResourceWith
:: (MonadSnap m, FromRequest id)
=> Resource res m id diff -> ResourceConfig m -> m ()
serveResourceWith res' cfg = checkPath $
serveRoute' GE... | 1,030 | serveResourceWith
:: (MonadSnap m, FromRequest id)
=> Resource res m id diff -> ResourceConfig m -> m ()
serveResourceWith res' cfg = checkPath $
serveRoute' GET (handleGet res) (retrieve res)
<|> serveRoute' POST (handlePost res) (create res)
<|> serveRoute' DELETE (handleDelete res) (delete re... | 886 | serveResourceWith res' cfg = checkPath $
serveRoute' GET (handleGet res) (retrieve res)
<|> serveRoute' POST (handlePost res) (create res)
<|> serveRoute' DELETE (handleDelete res) (delete res)
<|> servePut res cfg
<|> serveRoute' PATCH (handlePatch res) (update res)
<|> serveRoute' OPTIONS ... | 773 | true | true | 20 | 10 | 189 | 295 | 142 | 153 | null | null |
MWRuszczycky/Chemno | src/Model/SimpleCLP.hs | bsd-3-clause | addShortOptArg :: Option -> StateT ParserSt ( Either ParseError ) ()
-- ^Handles a single character as an option that takes an argument
-- that is separated from the character by spaces.
addShortOptArg opt = do
nxtCmd <- popCmd
case nxtCmd of
Nothing -> cantParse $ MissingShortArgument opt
... | 486 | addShortOptArg :: Option -> StateT ParserSt ( Either ParseError ) ()
addShortOptArg opt = do
nxtCmd <- popCmd
case nxtCmd of
Nothing -> cantParse $ MissingShortArgument opt
Just ('-':cs) -> cantParse $ MissingShortArgument opt
Just cs -> addOpt ( opt, cs )
---------------... | 368 | addShortOptArg opt = do
nxtCmd <- popCmd
case nxtCmd of
Nothing -> cantParse $ MissingShortArgument opt
Just ('-':cs) -> cantParse $ MissingShortArgument opt
Just cs -> addOpt ( opt, cs )
---------------------------------------
-- Parsing long options | 299 | true | true | 0 | 12 | 115 | 105 | 52 | 53 | null | null |
sdiehl/ghc | libraries/base/GHC/IO/Handle.hs | bsd-3-clause | try :: IO () -> IO ()
try io = io `catchException` (const (pure ()) :: SomeException -> IO ()) | 94 | try :: IO () -> IO ()
try io = io `catchException` (const (pure ()) :: SomeException -> IO ()) | 94 | try io = io `catchException` (const (pure ()) :: SomeException -> IO ()) | 72 | false | true | 0 | 11 | 19 | 68 | 32 | 36 | null | null |
djudd/blokus | Utils.hs | gpl-3.0 | reflections offsets =
[reflect reflector offsets | reflector <- [(1,1),(1,-1),(-1,1),(-1,-1)]] | 98 | reflections offsets =
[reflect reflector offsets | reflector <- [(1,1),(1,-1),(-1,1),(-1,-1)]] | 98 | reflections offsets =
[reflect reflector offsets | reflector <- [(1,1),(1,-1),(-1,1),(-1,-1)]] | 98 | false | false | 0 | 10 | 13 | 69 | 40 | 29 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFRuleset.hs | lgpl-2.1 | querySubs :: [RDFVarBinding] -> [Arc RDFLabel] -> [RDFGraph]
querySubs vars qas =
{-
seq (trace "\nquerySubs") $
seq (traceShow "\nvars: " vars)
seq (traceShow "\narcs: " qas)
seq (trace "\n") $
-}
rdfQuerySubs vars (toRDFGraph qas) | 269 | querySubs :: [RDFVarBinding] -> [Arc RDFLabel] -> [RDFGraph]
querySubs vars qas =
{-
seq (trace "\nquerySubs") $
seq (traceShow "\nvars: " vars)
seq (traceShow "\narcs: " qas)
seq (trace "\n") $
-}
rdfQuerySubs vars (toRDFGraph qas) | 268 | querySubs vars qas =
{-
seq (trace "\nquerySubs") $
seq (traceShow "\nvars: " vars)
seq (traceShow "\narcs: " qas)
seq (trace "\n") $
-}
rdfQuerySubs vars (toRDFGraph qas) | 207 | false | true | 0 | 8 | 72 | 48 | 25 | 23 | null | null |
phischu/fragnix | builtins/integer-gmp/GHC.Integer.Type.hs | bsd-3-clause | quotRemInteger !_ (S# 0#) = (# S# (quotInt# 0# 0#),S# (remInt# 0# 0#) #) | 77 | quotRemInteger !_ (S# 0#) = (# S# (quotInt# 0# 0#),S# (remInt# 0# 0#) #) | 77 | quotRemInteger !_ (S# 0#) = (# S# (quotInt# 0# 0#),S# (remInt# 0# 0#) #) | 77 | false | false | 0 | 8 | 18 | 45 | 21 | 24 | null | null |
changlinli/nikki | src/linuxDeploy.hs | lgpl-3.0 | -- | Set of libraries expected not to be on every standard linux system.
nonStandardLibraries :: Set String
nonStandardLibraries = fromList (
-- Qt
"libQtOpenGL" :
"libQtCore" :
"libQtGui" :
-- other
"libopenal" :
"libzip" :
"libaudio" :
"libgmp" :
"libpng" :
[]) | 309 | nonStandardLibraries :: Set String
nonStandardLibraries = fromList (
-- Qt
"libQtOpenGL" :
"libQtCore" :
"libQtGui" :
-- other
"libopenal" :
"libzip" :
"libaudio" :
"libgmp" :
"libpng" :
[]) | 236 | nonStandardLibraries = fromList (
-- Qt
"libQtOpenGL" :
"libQtCore" :
"libQtGui" :
-- other
"libopenal" :
"libzip" :
"libaudio" :
"libgmp" :
"libpng" :
[]) | 201 | true | true | 0 | 14 | 88 | 57 | 30 | 27 | null | null |
sergv/icfpc2013 | haskell/Main.hs | bsd-3-clause | decodeSexpUnsafe :: SBS.ByteString -> Program
decodeSexpUnsafe input =
case decodeSexp input of
Right prog -> prog
Left err -> error $ "decodeSexpUnsafe: error while decoding program: " ++ err | 212 | decodeSexpUnsafe :: SBS.ByteString -> Program
decodeSexpUnsafe input =
case decodeSexp input of
Right prog -> prog
Left err -> error $ "decodeSexpUnsafe: error while decoding program: " ++ err | 212 | decodeSexpUnsafe input =
case decodeSexp input of
Right prog -> prog
Left err -> error $ "decodeSexpUnsafe: error while decoding program: " ++ err | 166 | false | true | 0 | 9 | 48 | 53 | 25 | 28 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES :: GLenum
gl_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43 | 98 | gl_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES :: GLenum
gl_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43 | 98 | gl_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43 | 48 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
sourcewave/pg-schema-diff | Diff.hs | unlicense | coalzip (a:b,z) = coalzip (b, a : z) | 36 | coalzip (a:b,z) = coalzip (b, a : z) | 36 | coalzip (a:b,z) = coalzip (b, a : z) | 36 | false | false | 0 | 6 | 7 | 33 | 17 | 16 | null | null |
tfausak/strive | source/library/Strive/Actions/Streams.hs | mit | -- | <http://strava.github.io/api/v3/streams/#activity>
getActivityStreams
:: Client
-> StreamId
-> [StreamType]
-> GetStreamsOptions
-> IO (Result [StreamDetailed])
getActivityStreams = flip getStreams "activities" | 225 | getActivityStreams
:: Client
-> StreamId
-> [StreamType]
-> GetStreamsOptions
-> IO (Result [StreamDetailed])
getActivityStreams = flip getStreams "activities" | 169 | getActivityStreams = flip getStreams "activities" | 49 | true | true | 0 | 13 | 30 | 53 | 26 | 27 | null | null |
ekmett/ghc | compiler/cmm/CmmRewriteAssignments.hs | bsd-3-clause | middleAssignment dflags (Plain n@(CmmUnsafeForeignCall{})) assign
= deleteCallerSaves (foldLocalRegsDefd dflags (\m r -> addToUFM m r NeverOptimize) (deleteSinks dflags n assign) n)
where deleteCallerSaves m = foldUFM_Directly f m m
f u (xassign -> Just x) m | wrapRecExpf g x False = addToUFM_Directly... | 571 | middleAssignment dflags (Plain n@(CmmUnsafeForeignCall{})) assign
= deleteCallerSaves (foldLocalRegsDefd dflags (\m r -> addToUFM m r NeverOptimize) (deleteSinks dflags n assign) n)
where deleteCallerSaves m = foldUFM_Directly f m m
f u (xassign -> Just x) m | wrapRecExpf g x False = addToUFM_Directly... | 571 | middleAssignment dflags (Plain n@(CmmUnsafeForeignCall{})) assign
= deleteCallerSaves (foldLocalRegsDefd dflags (\m r -> addToUFM m r NeverOptimize) (deleteSinks dflags n assign) n)
where deleteCallerSaves m = foldUFM_Directly f m m
f u (xassign -> Just x) m | wrapRecExpf g x False = addToUFM_Directly... | 571 | false | false | 10 | 10 | 156 | 214 | 108 | 106 | null | null |
bredelings/BAli-Phy | haskell/Probability/Distribution/Poisson.hs | gpl-2.0 | poisson_effect x = do
let bnds = getIntegerBounds poisson_bounds
add_move $ slice_sample_integer_random_variable x bnds
add_move $ inc_dec_mh x bnds | 157 | poisson_effect x = do
let bnds = getIntegerBounds poisson_bounds
add_move $ slice_sample_integer_random_variable x bnds
add_move $ inc_dec_mh x bnds | 157 | poisson_effect x = do
let bnds = getIntegerBounds poisson_bounds
add_move $ slice_sample_integer_random_variable x bnds
add_move $ inc_dec_mh x bnds | 157 | false | false | 0 | 10 | 27 | 45 | 19 | 26 | null | null |
nbloomf/carl | src/Carl/Struct/Matrix.hs | gpl-3.0 | mEAddT :: (Ringoid a, URingoid a)
=> a -> Integer -> Integer -> Integer -> a -> Either AlgErr (Matrix a)
mEAddT _ n i j r = mEAdd n (i,j) r | 141 | mEAddT :: (Ringoid a, URingoid a)
=> a -> Integer -> Integer -> Integer -> a -> Either AlgErr (Matrix a)
mEAddT _ n i j r = mEAdd n (i,j) r | 141 | mEAddT _ n i j r = mEAdd n (i,j) r | 34 | false | true | 0 | 13 | 33 | 81 | 41 | 40 | null | null |
jaapweel/bloop | PPrint.hs | gpl-2.0 | lbrace = char '{' | 26 | lbrace = char '{' | 26 | lbrace = char '{' | 26 | false | false | 0 | 5 | 12 | 9 | 4 | 5 | null | null |
CIFASIS/QuickFuzz | src/Test/QuickFuzz/Gen/Code/Evm.hs | gpl-3.0 | decode' x = disasmBSAt (L.toStrict x) 0 10240 | 45 | decode' x = disasmBSAt (L.toStrict x) 0 10240 | 45 | decode' x = disasmBSAt (L.toStrict x) 0 10240 | 45 | false | false | 1 | 8 | 7 | 27 | 11 | 16 | null | null |
hkuplg/fcore | examples/case_studies/PureLambda.hs | bsd-2-clause | allAlphaCon :: [TermL] -> Bool
allAlphaCon [] = True | 52 | allAlphaCon :: [TermL] -> Bool
allAlphaCon [] = True | 52 | allAlphaCon [] = True | 21 | false | true | 0 | 8 | 8 | 29 | 13 | 16 | null | null |
Heather/Idris-dev | src/Idris/Elab/AsPat.hs | bsd-3-clause | collectAs x = return x | 22 | collectAs x = return x | 22 | collectAs x = return x | 22 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
GaloisInc/halvm-ghc | compiler/specialise/Rules.hs | bsd-3-clause | matchRule _ in_scope is_active _ args rough_args
(Rule { ru_name = rule_name, ru_act = act, ru_rough = tpl_tops
, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs })
| not (is_active act) = Nothing
| ruleCantMatch tpl_tops rough_args = Nothing
| otherwise
= case matc... | 730 | matchRule _ in_scope is_active _ args rough_args
(Rule { ru_name = rule_name, ru_act = act, ru_rough = tpl_tops
, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs })
| not (is_active act) = Nothing
| ruleCantMatch tpl_tops rough_args = Nothing
| otherwise
= case matc... | 730 | matchRule _ in_scope is_active _ args rough_args
(Rule { ru_name = rule_name, ru_act = act, ru_rough = tpl_tops
, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs })
| not (is_active act) = Nothing
| ruleCantMatch tpl_tops rough_args = Nothing
| otherwise
= case matc... | 730 | false | false | 4 | 12 | 234 | 183 | 91 | 92 | null | null |
vTurbine/ghc | compiler/utils/UniqFM.hs | bsd-3-clause | addListToUFM_C
:: Uniquable key
=> (elt -> elt -> elt)
-> UniqFM elt -> [(key,elt)]
-> UniqFM elt
addListToUFM_C f = foldl (\m (k, v) -> addToUFM_C f m k v) | 164 | addListToUFM_C
:: Uniquable key
=> (elt -> elt -> elt)
-> UniqFM elt -> [(key,elt)]
-> UniqFM elt
addListToUFM_C f = foldl (\m (k, v) -> addToUFM_C f m k v) | 164 | addListToUFM_C f = foldl (\m (k, v) -> addToUFM_C f m k v) | 58 | false | true | 0 | 11 | 38 | 91 | 46 | 45 | null | null |
sdiehl/ghc | compiler/GHC/Stg/Lint.hs | bsd-3-clause | pp_binders :: [Id] -> SDoc
pp_binders bs
= sep (punctuate comma (map pp_binder bs))
where
pp_binder b
= hsep [ppr b, dcolon, ppr (idType b)] | 154 | pp_binders :: [Id] -> SDoc
pp_binders bs
= sep (punctuate comma (map pp_binder bs))
where
pp_binder b
= hsep [ppr b, dcolon, ppr (idType b)] | 154 | pp_binders bs
= sep (punctuate comma (map pp_binder bs))
where
pp_binder b
= hsep [ppr b, dcolon, ppr (idType b)] | 127 | false | true | 0 | 9 | 38 | 75 | 37 | 38 | null | null |
afiskon/leprosorium-captcha-recognizer | src/Captcha/Leprosorium/Recognizer/GeneticAlgorithm.hs | bsd-2-clause | squareSize = 24 :: Int | 22 | squareSize = 24 :: Int | 22 | squareSize = 24 :: Int | 22 | false | false | 0 | 4 | 4 | 9 | 5 | 4 | null | null |
apriori/luminance | src/Graphics/Luminance/Shader/Stage.hs | bsd-3-clause | clogLength :: GLuint -> IO Int
clogLength sid =
fmap fromIntegral . alloca $
liftA2 (*>) (glGetShaderiv sid GL_INFO_LOG_LENGTH) peek | 138 | clogLength :: GLuint -> IO Int
clogLength sid =
fmap fromIntegral . alloca $
liftA2 (*>) (glGetShaderiv sid GL_INFO_LOG_LENGTH) peek | 138 | clogLength sid =
fmap fromIntegral . alloca $
liftA2 (*>) (glGetShaderiv sid GL_INFO_LOG_LENGTH) peek | 107 | false | true | 0 | 8 | 25 | 49 | 24 | 25 | null | null |
seni/copilot-libraries | src/Copilot/Library/Utils.hs | bsd-3-clause | nscanl1 :: ( Typed a )
=> Int -> ( Stream a -> Stream a -> Stream a )
-> Stream a -> [ Stream a ]
nscanl1 n f s = scanl1 f $ take n s | 155 | nscanl1 :: ( Typed a )
=> Int -> ( Stream a -> Stream a -> Stream a )
-> Stream a -> [ Stream a ]
nscanl1 n f s = scanl1 f $ take n s | 155 | nscanl1 n f s = scanl1 f $ take n s | 35 | false | true | 2 | 12 | 59 | 88 | 39 | 49 | null | null |
nikki-and-the-robots/nikki | src/Sorts/Background.hs | lgpl-3.0 | mkSort :: String -> IO BSort
mkSort name = do
-- zeropadding :)
pixmaps <- mapM (loadSymmetricPixmap zero) =<< getPngPaths name
let sortId = SortId ("background/" ++ name)
return $ BSort sortId (sortByResolution pixmaps)
where
getPngPaths :: String -> IO [FilePath]
... | 403 | mkSort :: String -> IO BSort
mkSort name = do
-- zeropadding :)
pixmaps <- mapM (loadSymmetricPixmap zero) =<< getPngPaths name
let sortId = SortId ("background/" ++ name)
return $ BSort sortId (sortByResolution pixmaps)
where
getPngPaths :: String -> IO [FilePath]
... | 403 | mkSort name = do
-- zeropadding :)
pixmaps <- mapM (loadSymmetricPixmap zero) =<< getPngPaths name
let sortId = SortId ("background/" ++ name)
return $ BSort sortId (sortByResolution pixmaps)
where
getPngPaths :: String -> IO [FilePath]
getPngPaths n =
getDa... | 374 | false | true | 0 | 12 | 113 | 139 | 64 | 75 | null | null |
romanb/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateStack.hs | mpl-2.0 | -- | Whether to associate the AWS OpsWorks built-in security groups with the
-- stack's layers.
--
-- AWS OpsWorks provides a standard set of built-in security groups, one for
-- each layer, which are associated with layers by default. With 'UseOpsworksSecurityGroups' you can instead provide your own custom security gr... | 1,347 | csUseOpsworksSecurityGroups :: Lens' CreateStack (Maybe Bool)
csUseOpsworksSecurityGroups =
lens _csUseOpsworksSecurityGroups
(\s a -> s { _csUseOpsworksSecurityGroups = a }) | 186 | csUseOpsworksSecurityGroups =
lens _csUseOpsworksSecurityGroups
(\s a -> s { _csUseOpsworksSecurityGroups = a }) | 124 | true | true | 0 | 8 | 202 | 61 | 39 | 22 | null | null |
gcross/habit-of-fate | sources/library/HabitOfFate/Testing/Server.hs | agpl-3.0 | replaceGroup group_id group = putGroup group_id group >>= (@?= ResourceReplaced) | 80 | replaceGroup group_id group = putGroup group_id group >>= (@?= ResourceReplaced) | 80 | replaceGroup group_id group = putGroup group_id group >>= (@?= ResourceReplaced) | 80 | false | false | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
urbanslug/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprCtO IfOrigin = ptext (sLit "an if statement") | 61 | pprCtO IfOrigin = ptext (sLit "an if statement") | 61 | pprCtO IfOrigin = ptext (sLit "an if statement") | 61 | false | false | 0 | 7 | 20 | 19 | 8 | 11 | null | null |
zhiyuanshi/fcore | frontend/simplify/SimplifyImpl.hs | bsd-2-clause | subst g ts@((FI.RecordType (l, _)):_) = FI.RecordType (l, t')
where t' = subst g . map (\x -> let FI.RecordType (_, t) = x in t) $ ts | 135 | subst g ts@((FI.RecordType (l, _)):_) = FI.RecordType (l, t')
where t' = subst g . map (\x -> let FI.RecordType (_, t) = x in t) $ ts | 135 | subst g ts@((FI.RecordType (l, _)):_) = FI.RecordType (l, t')
where t' = subst g . map (\x -> let FI.RecordType (_, t) = x in t) $ ts | 135 | false | false | 0 | 15 | 29 | 99 | 51 | 48 | null | null |
julienchurch/julienchurch.com | app/Utils.hs | apache-2.0 | blaze :: MonadIO m => Html -> ActionCtxT ctx m a
blaze = lazyBytes . renderHtml | 79 | blaze :: MonadIO m => Html -> ActionCtxT ctx m a
blaze = lazyBytes . renderHtml | 79 | blaze = lazyBytes . renderHtml | 30 | false | true | 0 | 8 | 15 | 39 | 17 | 22 | null | null |
Xuyuanp/hscheme | main.hs | apache-2.0 | parseList :: Parser LispVal
parseList = liftM List $ sepBy parseExpr spaces | 75 | parseList :: Parser LispVal
parseList = liftM List $ sepBy parseExpr spaces | 75 | parseList = liftM List $ sepBy parseExpr spaces | 47 | false | true | 0 | 6 | 11 | 26 | 12 | 14 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/DataCollectors/Types.hs | gpl-2.0 | categoryNames :: Map.Map String DCCategory
categoryNames =
let l = [DCInstance, DCStorage, DCDaemon, DCHypervisor]
in Map.fromList $ zip (map getCategoryName l) l | 166 | categoryNames :: Map.Map String DCCategory
categoryNames =
let l = [DCInstance, DCStorage, DCDaemon, DCHypervisor]
in Map.fromList $ zip (map getCategoryName l) l | 166 | categoryNames =
let l = [DCInstance, DCStorage, DCDaemon, DCHypervisor]
in Map.fromList $ zip (map getCategoryName l) l | 123 | false | true | 2 | 9 | 25 | 68 | 32 | 36 | null | null |
Tarabadi/CI285Calc | app/Main.hs | bsd-3-clause | where
ans = divCalc x y | 27 | where
ans = divCalc x y | 27 | where
ans = divCalc x y | 27 | false | false | 0 | 5 | 9 | 14 | 6 | 8 | null | null |
ToJans/learninghaskell | 0005Tetris/src/Main.hs | unlicense | main :: IO ()
main = runEngine initLevel eventHandler timeStepHandler | 70 | main :: IO ()
main = runEngine initLevel eventHandler timeStepHandler | 69 | main = runEngine initLevel eventHandler timeStepHandler | 55 | false | true | 0 | 6 | 10 | 23 | 11 | 12 | null | null |
pbogdan/ngx-cache-inspector | src/Inspector/Cli/Args.hs | bsd-3-clause | findFlagPredicate (ValidUntil time) header =
let (comparator, val) = flagValueComparator . toS $ time
in cacheHeaderValidSec header `comparator` (fromIntegral . date . toS $ val) | 182 | findFlagPredicate (ValidUntil time) header =
let (comparator, val) = flagValueComparator . toS $ time
in cacheHeaderValidSec header `comparator` (fromIntegral . date . toS $ val) | 182 | findFlagPredicate (ValidUntil time) header =
let (comparator, val) = flagValueComparator . toS $ time
in cacheHeaderValidSec header `comparator` (fromIntegral . date . toS $ val) | 182 | false | false | 1 | 10 | 28 | 72 | 34 | 38 | null | null |
tmhedberg/hsenv | src/Util/Cabal.hs | bsd-3-clause | parsePkgInfo :: String -> Maybe PackageIdentifier
parsePkgInfo str | "builtin_" `isPrefixOf` str =
let name = drop (length "builtin_") str -- ghc-pkg doesn't like builtin_ prefix
in Just $ PackageIdentifier (PackageName name) $ Version [] []
| otherwise = parse... | 329 | parsePkgInfo :: String -> Maybe PackageIdentifier
parsePkgInfo str | "builtin_" `isPrefixOf` str =
let name = drop (length "builtin_") str -- ghc-pkg doesn't like builtin_ prefix
in Just $ PackageIdentifier (PackageName name) $ Version [] []
| otherwise = parse... | 329 | parsePkgInfo str | "builtin_" `isPrefixOf` str =
let name = drop (length "builtin_") str -- ghc-pkg doesn't like builtin_ prefix
in Just $ PackageIdentifier (PackageName name) $ Version [] []
| otherwise = parseCheck str | 279 | false | true | 0 | 12 | 99 | 94 | 44 | 50 | null | null |
diogob/postgrest | src/PostgREST/DbStructure.hs | mit | allPrimaryKeys :: [Table] -> H.Statement () [PrimaryKey]
allPrimaryKeys tabs =
H.Statement sql HE.noParams (decodePks tabs) True
where
sql = [q|
/*
-- CTE to replace information_schema.table_constraints to remove owner limit
*/
WITH tc AS (
SELECT current_database()::information_schema.sql_... | 5,948 | allPrimaryKeys :: [Table] -> H.Statement () [PrimaryKey]
allPrimaryKeys tabs =
H.Statement sql HE.noParams (decodePks tabs) True
where
sql = [q|
/*
-- CTE to replace information_schema.table_constraints to remove owner limit
*/
WITH tc AS (
SELECT current_database()::information_schema.sql_... | 5,948 | allPrimaryKeys tabs =
H.Statement sql HE.noParams (decodePks tabs) True
where
sql = [q|
/*
-- CTE to replace information_schema.table_constraints to remove owner limit
*/
WITH tc AS (
SELECT current_database()::information_schema.sql_identifier AS constraint_catalog,
nc.nspname:... | 5,891 | false | true | 1 | 7 | 1,591 | 73 | 35 | 38 | null | null |
sonyandy/fd | src/Control/Monad/FD/Internal/Pruning.hs | bsd-3-clause | affectedBy :: Pruning -> Pruning -> Bool
_ `affectedBy` Val = True | 66 | affectedBy :: Pruning -> Pruning -> Bool
_ `affectedBy` Val = True | 66 | _ `affectedBy` Val = True | 25 | false | true | 0 | 6 | 11 | 27 | 14 | 13 | null | null |
peterokagey/haskellOEIS | test/Miscellaneous/A275673Spec.hs | apache-2.0 | spec :: Spec
spec = describe "A275673" $
it "correctly computes the first 20 elements" $
take 20 (map a275673 [1..]) `shouldBe` expectedValue where
expectedValue = [1,2,3,4,5,6,7,9,11,13,15,17,19,22,25,28,31,34,37,41] | 229 | spec :: Spec
spec = describe "A275673" $
it "correctly computes the first 20 elements" $
take 20 (map a275673 [1..]) `shouldBe` expectedValue where
expectedValue = [1,2,3,4,5,6,7,9,11,13,15,17,19,22,25,28,31,34,37,41] | 229 | spec = describe "A275673" $
it "correctly computes the first 20 elements" $
take 20 (map a275673 [1..]) `shouldBe` expectedValue where
expectedValue = [1,2,3,4,5,6,7,9,11,13,15,17,19,22,25,28,31,34,37,41] | 216 | false | true | 1 | 8 | 38 | 125 | 69 | 56 | null | null |
sdiehl/ghc | compiler/prelude/THNames.hs | bsd-3-clause | typeQTyConKey = mkPreludeTyConUnique 211 | 50 | typeQTyConKey = mkPreludeTyConUnique 211 | 50 | typeQTyConKey = mkPreludeTyConUnique 211 | 50 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.