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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
worksap-ate/aws-sdk | test/RDSTests/TagTests.hs | bsd-3-clause | addAndRemoveTagsTest :: Spec
addAndRemoveTagsTest = do
describe "{add,remove}Tags{To,From}Resouce doesn't fail" $ do
it "{add,remove}Tags{To,From}Resouce doesn't throw any exception" $ do
testRDS region (do
dbiid <- dbInstanceIdentifier . head <$>
describeDBIn... | 849 | addAndRemoveTagsTest :: Spec
addAndRemoveTagsTest = do
describe "{add,remove}Tags{To,From}Resouce doesn't fail" $ do
it "{add,remove}Tags{To,From}Resouce doesn't throw any exception" $ do
testRDS region (do
dbiid <- dbInstanceIdentifier . head <$>
describeDBIn... | 849 | addAndRemoveTagsTest = do
describe "{add,remove}Tags{To,From}Resouce doesn't fail" $ do
it "{add,remove}Tags{To,From}Resouce doesn't throw any exception" $ do
testRDS region (do
dbiid <- dbInstanceIdentifier . head <$>
describeDBInstances Nothing Nothing Nothi... | 820 | false | true | 0 | 23 | 389 | 148 | 74 | 74 | null | null |
brendanhay/numbersd | test/Properties/Series.hs | mpl-2.0 | prop_new_end_last_value_equals_update_value :: SeriesUpdate -> Property
prop_new_end_last_value_equals_update_value su@SeriesUpdate{..} =
isUpdateAfterEnd su ==> updateInputVal == fromJust (last updateOutputValues) | 216 | prop_new_end_last_value_equals_update_value :: SeriesUpdate -> Property
prop_new_end_last_value_equals_update_value su@SeriesUpdate{..} =
isUpdateAfterEnd su ==> updateInputVal == fromJust (last updateOutputValues) | 216 | prop_new_end_last_value_equals_update_value su@SeriesUpdate{..} =
isUpdateAfterEnd su ==> updateInputVal == fromJust (last updateOutputValues) | 144 | false | true | 0 | 8 | 17 | 47 | 23 | 24 | null | null |
Oscarzhao/haskell | functional_program_design/ch07_performance/sum_primes.hs | apache-2.0 | divisors x = [d | d <- [2 .. x], x `mod` d == 0] | 48 | divisors x = [d | d <- [2 .. x], x `mod` d == 0] | 48 | divisors x = [d | d <- [2 .. x], x `mod` d == 0] | 48 | false | false | 0 | 8 | 14 | 40 | 22 | 18 | null | null |
jsavatgy/hatupist | code/settingsDialog.hs | gpl-2.0 | whenEntryChanged gsRef = do
pt <- getPOSIXTime
gs <- readIORef gsRef
txt <- entryGetText (gEntry (g gs))
let label1Str = head (oLabelStrs gs)
status = getStatus txt label1Str (oldlen gs)
f = case (status,oldStatus gs) of
(_,NotStarted) -> whenNotStarted status
(Correct,_) -> w... | 886 | whenEntryChanged gsRef = do
pt <- getPOSIXTime
gs <- readIORef gsRef
txt <- entryGetText (gEntry (g gs))
let label1Str = head (oLabelStrs gs)
status = getStatus txt label1Str (oldlen gs)
f = case (status,oldStatus gs) of
(_,NotStarted) -> whenNotStarted status
(Correct,_) -> w... | 886 | whenEntryChanged gsRef = do
pt <- getPOSIXTime
gs <- readIORef gsRef
txt <- entryGetText (gEntry (g gs))
let label1Str = head (oLabelStrs gs)
status = getStatus txt label1Str (oldlen gs)
f = case (status,oldStatus gs) of
(_,NotStarted) -> whenNotStarted status
(Correct,_) -> w... | 886 | false | false | 1 | 16 | 219 | 344 | 163 | 181 | null | null |
glguy/hpaste | src/API.hs | bsd-3-clause | mRaw = Method (Arg "id" :: Arg Req Int)
"GET" "raw" "Returns paste in text/plain format" | 102 | mRaw = Method (Arg "id" :: Arg Req Int)
"GET" "raw" "Returns paste in text/plain format" | 102 | mRaw = Method (Arg "id" :: Arg Req Int)
"GET" "raw" "Returns paste in text/plain format" | 102 | false | false | 1 | 7 | 29 | 34 | 14 | 20 | null | null |
cgmckeever/contests | 2011-mebipenny/contest/hexcode/hexcode.hs | mit | handleInput "0" = do return () | 30 | handleInput "0" = do return () | 30 | handleInput "0" = do return () | 30 | false | false | 0 | 8 | 5 | 17 | 7 | 10 | null | null |
romanb/amazonka | amazonka-s3/gen/Network/AWS/S3/PutBucketPolicy.hs | mpl-2.0 | -- | The bucket policy as a JSON document.
pbpPolicy :: Lens' PutBucketPolicy Text
pbpPolicy = lens _pbpPolicy (\s a -> s { _pbpPolicy = a }) | 141 | pbpPolicy :: Lens' PutBucketPolicy Text
pbpPolicy = lens _pbpPolicy (\s a -> s { _pbpPolicy = a }) | 98 | pbpPolicy = lens _pbpPolicy (\s a -> s { _pbpPolicy = a }) | 58 | true | true | 0 | 9 | 26 | 40 | 22 | 18 | null | null |
bergmark/fclabels | src/Data/Label/Derive.hs | bsd-3-clause | prune :: [Context] -> [Con] -> [Con]
prune contexts allCons =
case contexts of
(Context _ _ con) : _
-> filter (unifiableCon con) allCons
[] -> [] | 163 | prune :: [Context] -> [Con] -> [Con]
prune contexts allCons =
case contexts of
(Context _ _ con) : _
-> filter (unifiableCon con) allCons
[] -> [] | 163 | prune contexts allCons =
case contexts of
(Context _ _ con) : _
-> filter (unifiableCon con) allCons
[] -> [] | 126 | false | true | 3 | 7 | 44 | 67 | 36 | 31 | null | null |
mzini/hosa | src/HoSA/SizeType/SOConstraint.hs | mit | interpretType :: (IsNat c, Eq c, SemiRing c) => Interpretation c -> SizeType knd Term -> SizeType knd (PartialPolynomial c)
interpretType _ (SzVar v) = SzVar v | 170 | interpretType :: (IsNat c, Eq c, SemiRing c) => Interpretation c -> SizeType knd Term -> SizeType knd (PartialPolynomial c)
interpretType _ (SzVar v) = SzVar v | 170 | interpretType _ (SzVar v) = SzVar v | 46 | false | true | 0 | 10 | 37 | 73 | 35 | 38 | null | null |
ocramz/sparse-linear-algebra | test/LibSpec.hs | gpl-3.0 | --
-- | Example 5.4.2 from G & VL
-- aa1 :: SpMatrix Double
-- aa1 = transpose $ fromListDenseSM 3 [1..12]
-- aa1 :: SpMatrix Double
-- aa1 = sparsifySM $ fromListDenseSM 4 [1,0,0,0,2,5,0,10,3,6,8,11,4,7,9,12]
-- l0 = [1,2,4,5,8]
-- l1 = [2,3,6]
-- l2 = [7]
-- v0,v1 :: V.Vector Int
-- v0 = V.fromList [0,1,2,5,... | 1,131 | x42, y42 :: SpVector Double
x42 = fromListSV 4 [(2,3)] | 54 | x42 = fromListSV 4 [(2,3)] | 26 | true | true | 3 | 7 | 221 | 64 | 43 | 21 | null | null |
phylake/avm3 | abc/json2.hs | mit | multiname s_res nsi_res nss_res (Multiname_QNameA a b) = case nsi_res a of
"" -> s_res b
nsinfo -> nsinfo ++ "::" ++ s_res b | 128 | multiname s_res nsi_res nss_res (Multiname_QNameA a b) = case nsi_res a of
"" -> s_res b
nsinfo -> nsinfo ++ "::" ++ s_res b | 128 | multiname s_res nsi_res nss_res (Multiname_QNameA a b) = case nsi_res a of
"" -> s_res b
nsinfo -> nsinfo ++ "::" ++ s_res b | 128 | false | false | 0 | 9 | 27 | 57 | 26 | 31 | null | null |
d0kt0r0/estuary | client/src/Estuary/Help/MiniTidal.hs | gpl-3.0 | exampleText "fast" = "sound (fast 2 \"bd sn kurt\") # fast 3 (vowel \"a e o\")" | 79 | exampleText "fast" = "sound (fast 2 \"bd sn kurt\") # fast 3 (vowel \"a e o\")" | 79 | exampleText "fast" = "sound (fast 2 \"bd sn kurt\") # fast 3 (vowel \"a e o\")" | 79 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
vigoos/Farrago-OS | aura-master/aura-master/src/Aura/Languages.hs | gpl-2.0 | reportPkgbuildDiffs_1 :: String -> Language -> String
reportPkgbuildDiffs_1 (bt -> p) = \case
Japanese -> p ++ "のPKGBUILDはまだ保存されていない。"
Polish -> p ++ " nie ma jeszcze przechowywanego pliku PKGBUILD."
Croatian -> p ++ " još nema pohranjen PKGBUILD."
German -> p ++ " hat noch keinen gespeicher... | 879 | reportPkgbuildDiffs_1 :: String -> Language -> String
reportPkgbuildDiffs_1 (bt -> p) = \case
Japanese -> p ++ "のPKGBUILDはまだ保存されていない。"
Polish -> p ++ " nie ma jeszcze przechowywanego pliku PKGBUILD."
Croatian -> p ++ " još nema pohranjen PKGBUILD."
German -> p ++ " hat noch keinen gespeicher... | 879 | reportPkgbuildDiffs_1 (bt -> p) = \case
Japanese -> p ++ "のPKGBUILDはまだ保存されていない。"
Polish -> p ++ " nie ma jeszcze przechowywanego pliku PKGBUILD."
Croatian -> p ++ " još nema pohranjen PKGBUILD."
German -> p ++ " hat noch keinen gespeicherten PKGBUILD."
Spanish -> p ++ " no tiene PKGBU... | 825 | false | true | 13 | 7 | 233 | 190 | 84 | 106 | null | null |
uduki/hsQt | Qtc/Core/QLocale.hs | bsd-2-clause | qLocale_delete :: QLocale a -> IO ()
qLocale_delete x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QLocale_delete cobj_x0 | 120 | qLocale_delete :: QLocale a -> IO ()
qLocale_delete x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QLocale_delete cobj_x0 | 120 | qLocale_delete x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QLocale_delete cobj_x0 | 83 | false | true | 0 | 7 | 22 | 41 | 19 | 22 | null | null |
mightymoose/liquidhaskell | benchmarks/ghc-7.4.1/IO/Handle/Internals.hs | bsd-3-clause | ioe_cannotFlushNotSeekable = ioException
(IOError Nothing IllegalOperation ""
"cannot flush the read buffer: underlying device is not seekable"
Nothing Nothing) | 177 | ioe_cannotFlushNotSeekable = ioException
(IOError Nothing IllegalOperation ""
"cannot flush the read buffer: underlying device is not seekable"
Nothing Nothing) | 177 | ioe_cannotFlushNotSeekable = ioException
(IOError Nothing IllegalOperation ""
"cannot flush the read buffer: underlying device is not seekable"
Nothing Nothing) | 177 | false | false | 0 | 6 | 35 | 25 | 12 | 13 | null | null |
infotroph/pandoc | src/Text/Pandoc/Writers/Docx.hs | gpl-2.0 | baseListId :: Int
baseListId = 1000 | 35 | baseListId :: Int
baseListId = 1000 | 35 | baseListId = 1000 | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
scan/yampa-sdl | src/FRP/Yampa/SDL/Graphic.hs | mit | render :: Graphic -> Graphic
render (Graphic x) = Graphic $ \s -> x s >> SDL.flip s | 83 | render :: Graphic -> Graphic
render (Graphic x) = Graphic $ \s -> x s >> SDL.flip s | 83 | render (Graphic x) = Graphic $ \s -> x s >> SDL.flip s | 54 | false | true | 0 | 9 | 17 | 45 | 22 | 23 | null | null |
mhwombat/exp-uivector-cluster-wains | src/ALife/Creatur/Wain/UIVector/Cluster/Universe.hs | bsd-3-clause | cMinAgreementDeltaE :: Setting Double
cMinAgreementDeltaE = requiredSetting "minAgreementDeltaE" | 96 | cMinAgreementDeltaE :: Setting Double
cMinAgreementDeltaE = requiredSetting "minAgreementDeltaE" | 96 | cMinAgreementDeltaE = requiredSetting "minAgreementDeltaE" | 58 | false | true | 1 | 5 | 7 | 20 | 8 | 12 | null | null |
keera-studios/hsQt | Qtc/Enums/Core/QRegExp.hs | bsd-2-clause | eCaretWontMatch :: CaretMode
eCaretWontMatch
= ieCaretMode $ 2 | 64 | eCaretWontMatch :: CaretMode
eCaretWontMatch
= ieCaretMode $ 2 | 64 | eCaretWontMatch
= ieCaretMode $ 2 | 35 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
Alasdair/Mella | Lang/Tactic/Waldmeister.hs | bsd-3-clause | parseWMEquation :: Parser WMEquation
parseWMEquation = do{ x <- parseWMExpr
; spaces
; char '='
; spaces
; y <- parseWMExpr
; return (x,y)
} | 260 | parseWMEquation :: Parser WMEquation
parseWMEquation = do{ x <- parseWMExpr
; spaces
; char '='
; spaces
; y <- parseWMExpr
; return (x,y)
} | 260 | parseWMEquation = do{ x <- parseWMExpr
; spaces
; char '='
; spaces
; y <- parseWMExpr
; return (x,y)
} | 223 | false | true | 0 | 8 | 144 | 59 | 30 | 29 | null | null |
josefs/MiniDSL | Feldspar/Frontend.hs | bsd-3-clause | (=:) :: Syntax a => Index -> a -> Prog a
i =: e = Prog (Assign (desug i) (desug e)) | 83 | (=:) :: Syntax a => Index -> a -> Prog a
i =: e = Prog (Assign (desug i) (desug e)) | 83 | i =: e = Prog (Assign (desug i) (desug e)) | 42 | false | true | 0 | 10 | 20 | 64 | 30 | 34 | null | null |
bravit/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reify _ (P _ n _) | n == reflm "Trivial" = return Trivial | 57 | reify _ (P _ n _) | n == reflm "Trivial" = return Trivial | 57 | reify _ (P _ n _) | n == reflm "Trivial" = return Trivial | 57 | false | false | 1 | 9 | 13 | 39 | 16 | 23 | null | null |
kowey/GenI | geni-test/NLP/GenI/Test/GeniVal.hs | gpl-2.0 | prop_alphaconvert_subset :: [GeniVal] -> Bool
prop_alphaconvert_subset gs_ =
and $ zipWith csubset gs2 gs
where
gs = gs_ ++ gs_ -- duplicate gs_ so that we don't trigger singleton
-- anonymisation
gs2 = finaliseVars "" gs
csubset x y = csubsetH (gConstraints x) (gConstraints y)
csubsetH N... | 654 | prop_alphaconvert_subset :: [GeniVal] -> Bool
prop_alphaconvert_subset gs_ =
and $ zipWith csubset gs2 gs
where
gs = gs_ ++ gs_ -- duplicate gs_ so that we don't trigger singleton
-- anonymisation
gs2 = finaliseVars "" gs
csubset x y = csubsetH (gConstraints x) (gConstraints y)
csubsetH N... | 654 | prop_alphaconvert_subset gs_ =
and $ zipWith csubset gs2 gs
where
gs = gs_ ++ gs_ -- duplicate gs_ so that we don't trigger singleton
-- anonymisation
gs2 = finaliseVars "" gs
csubset x y = csubsetH (gConstraints x) (gConstraints y)
csubsetH Nothing Nothing = True
csubsetH Nothing (... | 608 | false | true | 0 | 10 | 149 | 214 | 110 | 104 | null | null |
ocharles/virtual-dom | src/VirtualDom/HTML.hs | bsd-3-clause | ol_ :: (Term arg result) => arg -> result
ol_ = term "ol" | 57 | ol_ :: (Term arg result) => arg -> result
ol_ = term "ol" | 57 | ol_ = term "ol" | 15 | false | true | 0 | 8 | 12 | 36 | 16 | 20 | null | null |
jasonzoladz/persistent | experimental/couchDB/Database/Persist/CouchDB.hs | mit | dummyFromKey :: Key backend v -> v
dummyFromKey _ = error "dummyFromKey" | 72 | dummyFromKey :: Key backend v -> v
dummyFromKey _ = error "dummyFromKey" | 72 | dummyFromKey _ = error "dummyFromKey" | 37 | false | true | 0 | 7 | 11 | 32 | 13 | 19 | null | null |
noraesae/euler | src/Problem60.hs | bsd-3-clause | retrievePrimePairs x = filterJust $ map (split ds) [1..(length ds - 1)]
where
ds = digits 10 x
split xs idx =
case splitAt idx xs of
(as, 0:_) -> Nothing
(as, bs ) -> let a = unDigits 10 as
b = unDigits 10 bs in
if isPrime a && isPrime b && i... | 422 | retrievePrimePairs x = filterJust $ map (split ds) [1..(length ds - 1)]
where
ds = digits 10 x
split xs idx =
case splitAt idx xs of
(as, 0:_) -> Nothing
(as, bs ) -> let a = unDigits 10 as
b = unDigits 10 bs in
if isPrime a && isPrime b && i... | 422 | retrievePrimePairs x = filterJust $ map (split ds) [1..(length ds - 1)]
where
ds = digits 10 x
split xs idx =
case splitAt idx xs of
(as, 0:_) -> Nothing
(as, bs ) -> let a = unDigits 10 as
b = unDigits 10 bs in
if isPrime a && isPrime b && i... | 422 | false | false | 5 | 15 | 192 | 182 | 84 | 98 | null | null |
raimohanska/huskybot | src/Main.hs | bsd-3-clause | main = do
handle <- connectSocket "localhost" 8080
let name = "rapala" :: String
send handle "join" name
handleMessages handle | 134 | main = do
handle <- connectSocket "localhost" 8080
let name = "rapala" :: String
send handle "join" name
handleMessages handle | 134 | main = do
handle <- connectSocket "localhost" 8080
let name = "rapala" :: String
send handle "join" name
handleMessages handle | 134 | false | false | 0 | 9 | 27 | 46 | 20 | 26 | null | null |
trygvis/hledger | hledger-lib/Hledger/Data/Ledger.hs | gpl-3.0 | subaccounts :: Ledger -> Account -> [Account]
subaccounts = ledgerSubAccounts | 77 | subaccounts :: Ledger -> Account -> [Account]
subaccounts = ledgerSubAccounts | 77 | subaccounts = ledgerSubAccounts | 31 | false | true | 0 | 7 | 9 | 22 | 12 | 10 | null | null |
rueshyna/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs | mpl-2.0 | -- | Multipart request metadata.
pjuPayload :: Lens' ProjectsJobsUpdate Job
pjuPayload
= lens _pjuPayload (\ s a -> s{_pjuPayload = a}) | 137 | pjuPayload :: Lens' ProjectsJobsUpdate Job
pjuPayload
= lens _pjuPayload (\ s a -> s{_pjuPayload = a}) | 104 | pjuPayload
= lens _pjuPayload (\ s a -> s{_pjuPayload = a}) | 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
facebookarchive/lex-pass | src/Transf/FuncManip.hs | bsd-3-clause | isAccessKeyword :: String -> Bool
isAccessKeyword x = x `elem` ["public", "private", "protected"] | 97 | isAccessKeyword :: String -> Bool
isAccessKeyword x = x `elem` ["public", "private", "protected"] | 97 | isAccessKeyword x = x `elem` ["public", "private", "protected"] | 63 | false | true | 0 | 6 | 12 | 33 | 19 | 14 | null | null |
ndmitchell/shake | src/Development/Ninja/Lexer.hs | bsd-3-clause | isVarDot x = x == '.' || isVar x | 32 | isVarDot x = x == '.' || isVar x | 32 | isVarDot x = x == '.' || isVar x | 32 | false | false | 3 | 7 | 8 | 30 | 11 | 19 | null | null |
fmthoma/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | isQual_maybe :: RdrName -> Maybe (ModuleName, OccName)
isQual_maybe (Qual m n) = Just (m,n) | 91 | isQual_maybe :: RdrName -> Maybe (ModuleName, OccName)
isQual_maybe (Qual m n) = Just (m,n) | 91 | isQual_maybe (Qual m n) = Just (m,n) | 36 | false | true | 0 | 9 | 13 | 48 | 24 | 24 | null | null |
eggzilla/RNAlien | Biobase/RNAlien/RNAcentralHTTP.hs | gpl-3.0 | buildSequenceViaMD5Query :: Fasta () () -> String
buildSequenceViaMD5Query s = qString
where querySequence = L8.fromStrict . _bioSequence $ _fasta s
querySequenceUreplacedwithT = L8.map bsreplaceUT querySequence
querySequenceU2Twolb = L8.filter ((/= '\n')) querySequenceUreplacedwithT
md5Sequen... | 434 | buildSequenceViaMD5Query :: Fasta () () -> String
buildSequenceViaMD5Query s = qString
where querySequence = L8.fromStrict . _bioSequence $ _fasta s
querySequenceUreplacedwithT = L8.map bsreplaceUT querySequence
querySequenceU2Twolb = L8.filter ((/= '\n')) querySequenceUreplacedwithT
md5Sequen... | 434 | buildSequenceViaMD5Query s = qString
where querySequence = L8.fromStrict . _bioSequence $ _fasta s
querySequenceUreplacedwithT = L8.map bsreplaceUT querySequence
querySequenceU2Twolb = L8.filter ((/= '\n')) querySequenceUreplacedwithT
md5Sequence = M.md5 querySequenceU2Twolb
qString = ... | 384 | false | true | 4 | 9 | 82 | 103 | 52 | 51 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4194 = 4193 | 11 | 4194 = 4193 | 11 | 4194 = 4193 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ulricha/dsh | src/Database/DSH/Translate/CL2NKL.hs | bsd-3-clause | desugarQuals (CL.BindQ x xs : qs) = do
let xt = elemT $ typeOf xs
let env = mkEnv (x, xt)
xs' <- expr xs
(env', genExpr) <- desugarQualsRec env xs' qs
return (env', genExpr, id)
-- | Desugaring of comprehensions happens in two steps: Desugaring the
-- qualifiers leads to an expression ... | 468 | desugarQuals (CL.BindQ x xs : qs) = do
let xt = elemT $ typeOf xs
let env = mkEnv (x, xt)
xs' <- expr xs
(env', genExpr) <- desugarQualsRec env xs' qs
return (env', genExpr, id)
-- | Desugaring of comprehensions happens in two steps: Desugaring the
-- qualifiers leads to an expression ... | 468 | desugarQuals (CL.BindQ x xs : qs) = do
let xt = elemT $ typeOf xs
let env = mkEnv (x, xt)
xs' <- expr xs
(env', genExpr) <- desugarQualsRec env xs' qs
return (env', genExpr, id)
-- | Desugaring of comprehensions happens in two steps: Desugaring the
-- qualifiers leads to an expression ... | 468 | false | false | 0 | 11 | 109 | 107 | 53 | 54 | null | null |
nushio3/ghc | compiler/simplCore/SimplEnv.hs | bsd-3-clause | pprSimplEnv :: SimplEnv -> SDoc
-- Used for debugging; selective
pprSimplEnv env
= vcat [text "TvSubst:" <+> ppr (seTvSubst env),
text "CvSubst:" <+> ppr (seCvSubst env),
text "IdSubst:" <+> ppr (seIdSubst env),
text "InScope:" <+> vcat (map ppr_one in_scope_vars)
]
where
in_sco... | 460 | pprSimplEnv :: SimplEnv -> SDoc
pprSimplEnv env
= vcat [text "TvSubst:" <+> ppr (seTvSubst env),
text "CvSubst:" <+> ppr (seCvSubst env),
text "IdSubst:" <+> ppr (seIdSubst env),
text "InScope:" <+> vcat (map ppr_one in_scope_vars)
]
where
in_scope_vars = varEnvElts (getInScopeV... | 427 | pprSimplEnv env
= vcat [text "TvSubst:" <+> ppr (seTvSubst env),
text "CvSubst:" <+> ppr (seCvSubst env),
text "IdSubst:" <+> ppr (seIdSubst env),
text "InScope:" <+> vcat (map ppr_one in_scope_vars)
]
where
in_scope_vars = varEnvElts (getInScopeVars (seInScope env))
ppr_one ... | 395 | true | true | 1 | 10 | 120 | 168 | 78 | 90 | null | null |
sol/pandoc | src/Text/Pandoc/Readers/TeXMath.hs | gpl-2.0 | expToInlines (EIdentifier s) = Just [Emph [Str s]] | 50 | expToInlines (EIdentifier s) = Just [Emph [Str s]] | 50 | expToInlines (EIdentifier s) = Just [Emph [Str s]] | 50 | false | false | 0 | 9 | 7 | 30 | 14 | 16 | null | null |
mjhopkins/alerta-client | src/Alerta/Util.hs | bsd-3-clause | uncapitalise (h : t) = toLower h : t | 36 | uncapitalise (h : t) = toLower h : t | 36 | uncapitalise (h : t) = toLower h : t | 36 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
spechub/Hets | CSL/Verification.hs | gpl-2.0 | mkCondition :: AssDefinition -> EXPRESSION -> EXPRESSION -> EXPRESSION
mkCondition def lhs rhs = f args where
args = getArguments def
f (x : l) = g x $ f l
f _ = toExp $ if isInterval rhs then ("in", lhs, rhs)
else ("=", lhs, rhs)
g v b = toExp ("all", mkVar v, b) | 290 | mkCondition :: AssDefinition -> EXPRESSION -> EXPRESSION -> EXPRESSION
mkCondition def lhs rhs = f args where
args = getArguments def
f (x : l) = g x $ f l
f _ = toExp $ if isInterval rhs then ("in", lhs, rhs)
else ("=", lhs, rhs)
g v b = toExp ("all", mkVar v, b) | 290 | mkCondition def lhs rhs = f args where
args = getArguments def
f (x : l) = g x $ f l
f _ = toExp $ if isInterval rhs then ("in", lhs, rhs)
else ("=", lhs, rhs)
g v b = toExp ("all", mkVar v, b) | 219 | false | true | 0 | 7 | 81 | 133 | 70 | 63 | null | null |
jamesdabbs/pi-base-2 | src/Models/Space.hs | bsd-3-clause | delete :: SpaceId -> Entity User -> Action (Entity Space)
delete _id u = do
error "delete space" -- need get404 here, but don't want to invert dependency
-- space <- get404 _id
-- -- TODO: need to delete associated traits, proofs, assumptions &c. as well
-- runDB $ P.delete _id
-- logDeletion u space
-- ret... | 329 | delete :: SpaceId -> Entity User -> Action (Entity Space)
delete _id u = do
error "delete space" -- need get404 here, but don't want to invert dependency
-- space <- get404 _id
-- -- TODO: need to delete associated traits, proofs, assumptions &c. as well
-- runDB $ P.delete _id
-- logDeletion u space
-- ret... | 329 | delete _id u = do
error "delete space" -- need get404 here, but don't want to invert dependency
-- space <- get404 _id
-- -- TODO: need to delete associated traits, proofs, assumptions &c. as well
-- runDB $ P.delete _id
-- logDeletion u space
-- return space | 271 | false | true | 0 | 10 | 69 | 53 | 26 | 27 | null | null |
shlevy/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | -- | Emit a foreign file which will be compiled and linked to the object for
-- the current module. Currently only languages that can be compiled with
-- the C compiler are supported, and the flags passed as part of -optc will
-- be also applied to the C compiler invocation that will compile them.
--
-- Note that for n... | 805 | addForeignFile :: ForeignSrcLang -> String -> Q ()
addForeignFile lang str = Q (qAddForeignFile lang str) | 105 | addForeignFile lang str = Q (qAddForeignFile lang str) | 54 | true | true | 0 | 8 | 161 | 57 | 36 | 21 | null | null |
rkaippully/haskell-ants | src/Ants/Evaporation.hs | apache-2.0 | -- Causes all pheromones to evaporate a bit
evaporate :: World -> IO ()
evaporate w =
forM_ (elems w) $
atomically . updateTVar
(\c -> c {pheromoneQty = round(fromIntegral(pheromoneQty c) * evapRate)}) | 213 | evaporate :: World -> IO ()
evaporate w =
forM_ (elems w) $
atomically . updateTVar
(\c -> c {pheromoneQty = round(fromIntegral(pheromoneQty c) * evapRate)}) | 169 | evaporate w =
forM_ (elems w) $
atomically . updateTVar
(\c -> c {pheromoneQty = round(fromIntegral(pheromoneQty c) * evapRate)}) | 141 | true | true | 0 | 16 | 44 | 79 | 40 | 39 | null | null |
reuleaux/pire | src/Pire/Wrap.hs | bsd-3-clause | p' (Ws_ x ws) = Ws_ (unwrap' x) ws
unw | 39 | unwrap' (Ws_ x ws) = Ws_ (unwrap' x) ws | 39 | unwrap' (Ws_ x ws) = Ws_ (unwrap' x) ws | 39 | false | false | 0 | 7 | 10 | 31 | 14 | 17 | null | null |
Zigazou/deadlink | src/Commands.hs | gpl-3.0 | validStatType _ = Left $ InvalidArg "Invalid statistic type" | 60 | validStatType _ = Left $ InvalidArg "Invalid statistic type" | 60 | validStatType _ = Left $ InvalidArg "Invalid statistic type" | 60 | false | false | 0 | 6 | 8 | 16 | 7 | 9 | null | null |
phischu/fragnix | builtins/base/GHC.Event.PSQ.hs | bsd-3-clause | atMosts :: Prio -> PSQ a -> (Sequ (Elem a), PSQ a)
atMosts !pt q = case q of
(Winner e _ _)
| prio e > pt -> (emptySequ, q)
Void -> (emptySequ, Void)
Winner e Start _ -> (singleSequ e, Void)
Winner e (RLoser _ e' tl m tr) m' ->
let (sequ, q') = atMosts pt (Winner e tl m)
... | 698 | atMosts :: Prio -> PSQ a -> (Sequ (Elem a), PSQ a)
atMosts !pt q = case q of
(Winner e _ _)
| prio e > pt -> (emptySequ, q)
Void -> (emptySequ, Void)
Winner e Start _ -> (singleSequ e, Void)
Winner e (RLoser _ e' tl m tr) m' ->
let (sequ, q') = atMosts pt (Winner e tl m)
... | 698 | atMosts !pt q = case q of
(Winner e _ _)
| prio e > pt -> (emptySequ, q)
Void -> (emptySequ, Void)
Winner e Start _ -> (singleSequ e, Void)
Winner e (RLoser _ e' tl m tr) m' ->
let (sequ, q') = atMosts pt (Winner e tl m)
(sequ', q'') = atMosts pt (Winner e' tr... | 647 | false | true | 9 | 11 | 221 | 328 | 167 | 161 | null | null |
nh2/WashNGo | WASH/CGI/EventHandlers.hs | bsd-3-clause | -- ^The cursor leaves an area (client-side image map) or link from inside that
-- area or link.
--mouseover
onMouseOver :: Monad m => String -> WithHTML x m ()
onMouseOver = attr_SS "onmouseover" | 197 | onMouseOver :: Monad m => String -> WithHTML x m ()
onMouseOver = attr_SS "onmouseover" | 87 | onMouseOver = attr_SS "onmouseover" | 35 | true | true | 0 | 8 | 35 | 37 | 19 | 18 | null | null |
DrewBarclay/XMPP-Chatbot | src/XmlUtils.hs | bsd-3-clause | nodesToText ns = mconcat $ map nodeToText ns | 44 | nodesToText ns = mconcat $ map nodeToText ns | 44 | nodesToText ns = mconcat $ map nodeToText ns | 44 | false | false | 3 | 5 | 7 | 22 | 8 | 14 | null | null |
spechub/Hets | GUI/GraphLogic.hs | gpl-2.0 | proofMenu :: GInfo
-> Command
-> (LibEnv -> IO (Result LibEnv))
-> IO ()
proofMenu gInfo@(GInfo { hetcatsOpts = hOpts
, libName = ln
}) cmd proofFun = do
ost <- readIORef $ intState gInfo
case i_state ost of
Nothing -> return (... | 1,512 | proofMenu :: GInfo
-> Command
-> (LibEnv -> IO (Result LibEnv))
-> IO ()
proofMenu gInfo@(GInfo { hetcatsOpts = hOpts
, libName = ln
}) cmd proofFun = do
ost <- readIORef $ intState gInfo
case i_state ost of
Nothing -> return (... | 1,512 | proofMenu gInfo@(GInfo { hetcatsOpts = hOpts
, libName = ln
}) cmd proofFun = do
ost <- readIORef $ intState gInfo
case i_state ost of
Nothing -> return ()
Just ist -> do
let ost2 = add2history cmd ost []
ost3 = add2history (CommentCmd "") ost2 [... | 1,400 | false | true | 0 | 24 | 559 | 432 | 198 | 234 | null | null |
da-x/lamdu | test/InferCombinators.hs | gpl-3.0 | findTypeOfTagInComposite _ _ = error "Test combinators type checking failed in findTypeOfTagInComposite" | 104 | findTypeOfTagInComposite _ _ = error "Test combinators type checking failed in findTypeOfTagInComposite" | 104 | findTypeOfTagInComposite _ _ = error "Test combinators type checking failed in findTypeOfTagInComposite" | 104 | false | false | 0 | 5 | 11 | 14 | 6 | 8 | null | null |
NaevaTheCat/Project-Euler-Haskell | P14.hs | gpl-2.0 | main = do
putStrLn $ show $ maxCollatz 999999 | 49 | main = do
putStrLn $ show $ maxCollatz 999999 | 49 | main = do
putStrLn $ show $ maxCollatz 999999 | 49 | false | false | 1 | 9 | 12 | 24 | 9 | 15 | null | null |
danstiner/dupes | executable/Strings.hs | mit | appName :: String
appName = "dupes" | 35 | appName :: String
appName = "dupes" | 35 | appName = "dupes" | 17 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
deepakjois/hs-gchart | Graphics/GChart/Types.hs | bsd-3-clause | -- | Default chart label data for QR Encoding
defaultQREncodingLabelData = QRLabelData L' 4 | 91 | defaultQREncodingLabelData = QRLabelData L' 4 | 45 | defaultQREncodingLabelData = QRLabelData L' 4 | 45 | true | false | 1 | 5 | 13 | 15 | 6 | 9 | null | null |
cabrera/stack | src/Stack/Build/Execute.hs | bsd-3-clause | getSetupHs :: Path Abs Dir -- ^ project directory
-> IO (Path Abs File)
getSetupHs dir = do
exists1 <- fileExists fp1
if exists1
then return fp1
else do
exists2 <- fileExists fp2
if exists2
then return fp2
else throwM $ NoSetupHs... | 422 | getSetupHs :: Path Abs Dir -- ^ project directory
-> IO (Path Abs File)
getSetupHs dir = do
exists1 <- fileExists fp1
if exists1
then return fp1
else do
exists2 <- fileExists fp2
if exists2
then return fp2
else throwM $ NoSetupHs... | 422 | getSetupHs dir = do
exists1 <- fileExists fp1
if exists1
then return fp1
else do
exists2 <- fileExists fp2
if exists2
then return fp2
else throwM $ NoSetupHsFound dir
where
fp1 = dir </> $(mkRelFile "Setup.hs")
fp2 = dir </> $(mkR... | 339 | false | true | 6 | 12 | 156 | 136 | 60 | 76 | null | null |
Concomitant/LambdaHack | GameDefinition/Content/ModeKindPlayer.hs | bsd-3-clause | playerSoldier = playerHero
{ fname = "Armed Adventurer Party"
, fgroup = "soldier"
} | 90 | playerSoldier = playerHero
{ fname = "Armed Adventurer Party"
, fgroup = "soldier"
} | 90 | playerSoldier = playerHero
{ fname = "Armed Adventurer Party"
, fgroup = "soldier"
} | 90 | false | false | 0 | 7 | 19 | 24 | 13 | 11 | null | null |
antalsz/hs-to-coq | src/lib/HsToCoq/Coq/Pretty.hs | mit | if_explicit Implicit = const braces | 35 | if_explicit Implicit = const braces | 35 | if_explicit Implicit = const braces | 35 | false | false | 0 | 5 | 4 | 13 | 5 | 8 | null | null |
sdiehl/ghc | libraries/ghci/GHCi/ObjLink.hs | bsd-3-clause | loadDLL :: String -> IO (Maybe String)
-- Nothing => success
-- Just err_msg => failure
loadDLL str0 = do
let
-- On Windows, addDLL takes a filename without an extension, because
-- it tries adding both .dll and .drv. To keep things uniform in the
-- layers above, loadDLL always takes a filename ... | 709 | loadDLL :: String -> IO (Maybe String)
loadDLL str0 = do
let
-- On Windows, addDLL takes a filename without an extension, because
-- it tries adding both .dll and .drv. To keep things uniform in the
-- layers above, loadDLL always takes a filename with an extension, and
-- we drop it here on Wind... | 655 | loadDLL str0 = do
let
-- On Windows, addDLL takes a filename without an extension, because
-- it tries adding both .dll and .drv. To keep things uniform in the
-- layers above, loadDLL always takes a filename with an extension, and
-- we drop it here on Windows only.
str | isWindowsHost = dr... | 616 | true | true | 0 | 12 | 204 | 135 | 64 | 71 | null | null |
hbrouwer/pdrt-sandbox | src/Data/PDRS/Properties.hs | apache-2.0 | isPlainPDRS (AMerge p1 p2) = isPlainPDRS p1 && isPlainPDRS p2 | 61 | isPlainPDRS (AMerge p1 p2) = isPlainPDRS p1 && isPlainPDRS p2 | 61 | isPlainPDRS (AMerge p1 p2) = isPlainPDRS p1 && isPlainPDRS p2 | 61 | false | false | 0 | 6 | 9 | 28 | 12 | 16 | null | null |
pxqr/language-cl-c | Data/Scope.hs | mit | -- | The /initialIndex/ in index assigned for first entity in block.
initialIndex :: Index
initialIndex = 0 | 107 | initialIndex :: Index
initialIndex = 0 | 38 | initialIndex = 0 | 16 | true | true | 0 | 6 | 17 | 19 | 8 | 11 | null | null |
badp/ganeti | src/Ganeti/Runtime.hs | gpl-2.0 | daemonGroup (DaemonGroup GanetiMetad) = AutoConf.metadGroup | 61 | daemonGroup (DaemonGroup GanetiMetad) = AutoConf.metadGroup | 61 | daemonGroup (DaemonGroup GanetiMetad) = AutoConf.metadGroup | 61 | false | false | 0 | 7 | 6 | 17 | 8 | 9 | null | null |
louispan/data-diverse | src/Data/Diverse/Many/Internal.hs | bsd-3-clause | -- | This is @flip 'forMany'@
--
-- @
-- let x = (5 :: Int) './' False './' \'X' './' Just \'O' './' (6 :: Int) './' Just \'A' './' 'nil'
-- y = show \@Int './' show \@Char './' show \@(Maybe Char) './' show \@Bool './' 'nil'
-- 'afoldr' (:) [] ('collect' x ('Data.Diverse.Cases.cases' y)) \`shouldBe`
-- [\"5", ... | 469 | collect :: (Collect c r xs) => Many xs -> c r xs -> Collector c xs r
collect = flip forMany | 91 | collect = flip forMany | 22 | true | true | 0 | 8 | 98 | 58 | 32 | 26 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/maybe_1.hs | mit | maybe :: b -> (a -> b) -> Maybe a -> b;
maybe n f Nothing = n | 69 | maybe :: b -> (a -> b) -> Maybe a -> b
maybe n f Nothing = n | 68 | maybe n f Nothing = n | 21 | false | true | 1 | 9 | 25 | 48 | 22 | 26 | null | null |
kawu/ltag | src/NLP/LTAG/Earley5.hs | bsd-2-clause | labEq
:: forall n t i j f a
-- We have to use scoped type variables in order to be able
-- to refer to them from the internal functions. The usage
-- of the internal `nodeEq` is most likely responsible for
-- this.
. (Eq n, Eq t, Ord i, Ord j, Eq f, Eq a)
=> Lab n t i -- ^ Firs... | 1,796 | labEq
:: forall n t i j f a
-- We have to use scoped type variables in order to be able
-- to refer to them from the internal functions. The usage
-- of the internal `nodeEq` is most likely responsible for
-- this.
. (Eq n, Eq t, Ord i, Ord j, Eq f, Eq a)
=> Lab n t i -- ^ Firs... | 1,796 | labEq p g q h =
eq p q
where
eq x@NonT{} y@NonT{}
= eqOn nonTerm x y
&& eqOn labID x y
&& nodeEqOn topID x y
&& nodeEqOn botID x y
eq (Term x) (Term y)
= x == y
eq x@AuxRoot{} y@AuxRoot{}
= eqOn nonTerm x y
&& nodeEqOn topID x y
&& no... | 1,294 | false | true | 14 | 17 | 637 | 583 | 298 | 285 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpCanFail CloneSmallMutableArrayOp = True | 45 | primOpCanFail CloneSmallMutableArrayOp = True | 45 | primOpCanFail CloneSmallMutableArrayOp = True | 45 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
conal/hermit | src/HERMIT/External.hs | bsd-2-clause | externTypeString :: External -> String
externTypeString = deBoxify . show . dynTypeRep . externDyn | 98 | externTypeString :: External -> String
externTypeString = deBoxify . show . dynTypeRep . externDyn | 98 | externTypeString = deBoxify . show . dynTypeRep . externDyn | 59 | false | true | 0 | 7 | 13 | 34 | 15 | 19 | null | null |
asr/apia | src/Apia/Translation.hs | mit | eneralRolesToAFors ∷ T GeneralRoles
generalRolesToAFors = liftM4 GeneralRoles
axiomsToAFors
requiredATPDefsByAxioms
generalHintsToAFors
requiredATPDefsByHints
| 275 | generalRolesToAFors ∷ T GeneralRoles
generalRolesToAFors = liftM4 GeneralRoles
axiomsToAFors
requiredATPDefsByAxioms
generalHintsToAFors
requiredATPDefsByHints | 275 | generalRolesToAFors = liftM4 GeneralRoles
axiomsToAFors
requiredATPDefsByAxioms
generalHintsToAFors
requiredATPDefsByHints | 238 | false | true | 0 | 5 | 128 | 25 | 12 | 13 | null | null |
nushio3/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | mkEdges :: TcSigFun -> LHsBinds Name -> [Node BKey (LHsBind Name)]
-- See Note [Polymorphic recursion] in HsBinds.
mkEdges sig_fn binds
= [ (bind, key, [key | n <- nameSetElems (bind_fvs (unLoc bind)),
Just key <- [lookupNameEnv key_map n], no_sig n ])
| (bind, key) <- keyd_binds
]
... | 679 | mkEdges :: TcSigFun -> LHsBinds Name -> [Node BKey (LHsBind Name)]
mkEdges sig_fn binds
= [ (bind, key, [key | n <- nameSetElems (bind_fvs (unLoc bind)),
Just key <- [lookupNameEnv key_map n], no_sig n ])
| (bind, key) <- keyd_binds
]
where
no_sig :: Name -> Bool
no_sig n = ... | 631 | mkEdges sig_fn binds
= [ (bind, key, [key | n <- nameSetElems (bind_fvs (unLoc bind)),
Just key <- [lookupNameEnv key_map n], no_sig n ])
| (bind, key) <- keyd_binds
]
where
no_sig :: Name -> Bool
no_sig n = noCompleteSig (sig_fn n)
keyd_binds = bagToList binds `zip` [0... | 564 | true | true | 8 | 14 | 196 | 213 | 115 | 98 | null | null |
yairchu/ad | src/Numeric/AD/Internal/Sparse.hs | bsd-3-clause | {-
vvars :: Num a => Vector a -> Vector (AD Sparse a)
vvars = Vector.imap (\n a -> AD $ Sparse a $ singleton n $ lift 1)
{-# INLINE vvars #-}
vapply :: Num a => (Vector (AD Sparse a) -> b) -> Vector a -> b
vapply f = f . vvars
{-# INLINE vapply #-}
vd :: Num a => Int -> AD Sparse a -> Vector a
vd n (AD (Sparse _ da)... | 901 | partial :: Num a => [Int] -> Sparse a -> a
partial [] (Sparse a _) = a | 75 | partial [] (Sparse a _) = a | 32 | true | true | 0 | 11 | 238 | 54 | 25 | 29 | null | null |
dgvncsz0f/nws | src/Jerimum/Storage/LMDB/Device.hs | bsd-3-clause | close_ :: DeviceSegments -> IO ()
close_ = mapM_ (S.close . snd) . fst | 70 | close_ :: DeviceSegments -> IO ()
close_ = mapM_ (S.close . snd) . fst | 70 | close_ = mapM_ (S.close . snd) . fst | 36 | false | true | 0 | 9 | 13 | 36 | 18 | 18 | null | null |
Gabriel439/Haskell-Dhall-Library | dhall/src/Dhall/Map.hs | bsd-3-clause | {-| Combine two `Map`s on their shared keys, using the supplied function to
combine values from the first and second `Map`
>>> intersectionWith (+) (fromList [("C",1),("B",2)]) (fromList [("B",3),("A",4)])
fromList [("B",5)]
-}
intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c
intersectio... | 532 | intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c
intersectionWith combine (Map mL ksL) (Map mR _) = Map m ks
where
m = Data.Map.intersectionWith combine mL mR
-- Or forget order unless both maps are ordered?!
ks = filterKeys (\k -> Data.Map.member k m) ksL
| 299 | intersectionWith combine (Map mL ksL) (Map mR _) = Map m ks
where
m = Data.Map.intersectionWith combine mL mR
-- Or forget order unless both maps are ordered?!
ks = filterKeys (\k -> Data.Map.member k m) ksL
| 223 | true | true | 2 | 12 | 110 | 141 | 66 | 75 | null | null |
RaminHAL9001/inf-interval | src/Numeric/Interval/Infinite.hs | gpl-3.0 | -- | Retrieve the value contained in an 'Inf', if it exists.
toFinite :: Inf c -> Maybe c
toFinite c = case c of
Finite c -> Just c
_ -> Nothing
-- | This is a data type specifying an inclusive interval between exactly two points (which may be
-- the same point). This is the building block of an 'Interval' ... | 326 | toFinite :: Inf c -> Maybe c
toFinite c = case c of
Finite c -> Just c
_ -> Nothing
-- | This is a data type specifying an inclusive interval between exactly two points (which may be
-- the same point). This is the building block of an 'Interval' 'Set'. | 265 | toFinite c = case c of
Finite c -> Just c
_ -> Nothing
-- | This is a data type specifying an inclusive interval between exactly two points (which may be
-- the same point). This is the building block of an 'Interval' 'Set'. | 236 | true | true | 3 | 6 | 75 | 46 | 24 | 22 | null | null |
bamos/snowglobe | analysis/SnowGlobe/Time.hs | apache-2.0 | getWeeksEvents:: TimeZone -> LocalTime -> [EnrichedEvent] ->
[(String,[EnrichedEvent])]
getWeeksEvents tz now events = zip days groupedEvents
where
days = map (getNDaysAgoDate now) r
groupedEvents = map (\n -> filter (isNDaysAgo tz now n) events) r
r = [0..6] | 298 | getWeeksEvents:: TimeZone -> LocalTime -> [EnrichedEvent] ->
[(String,[EnrichedEvent])]
getWeeksEvents tz now events = zip days groupedEvents
where
days = map (getNDaysAgoDate now) r
groupedEvents = map (\n -> filter (isNDaysAgo tz now n) events) r
r = [0..6] | 298 | getWeeksEvents tz now events = zip days groupedEvents
where
days = map (getNDaysAgoDate now) r
groupedEvents = map (\n -> filter (isNDaysAgo tz now n) events) r
r = [0..6] | 193 | false | true | 2 | 10 | 76 | 119 | 59 | 60 | null | null |
simhu/cubical | Eval.hs | mit | com u@(Kan Com VU _) box@(Box dir i _ _) = fill u box `face` (i,dir) | 69 | com u@(Kan Com VU _) box@(Box dir i _ _) = fill u box `face` (i,dir) | 69 | com u@(Kan Com VU _) box@(Box dir i _ _) = fill u box `face` (i,dir) | 69 | false | false | 1 | 9 | 16 | 64 | 30 | 34 | null | null |
acowley/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | pprTickCts _ = Outputable.empty | 58 | pprTickCts _ = Outputable.empty | 58 | pprTickCts _ = Outputable.empty | 58 | false | false | 0 | 5 | 30 | 12 | 5 | 7 | null | null |
cdepillabout/ssh | test/Test/Util.hs | bsd-3-clause | -- | Return the contents of the the public/private key pair file @keyName@
-- from the @test/keys/client/@ directory.
getClientPrivateKeyPair :: String -> KeyPair
getClientPrivateKeyPair keyName = parseKeyPair . getFile $ getEntry keyName clientKeysDirectory | 258 | getClientPrivateKeyPair :: String -> KeyPair
getClientPrivateKeyPair keyName = parseKeyPair . getFile $ getEntry keyName clientKeysDirectory | 140 | getClientPrivateKeyPair keyName = parseKeyPair . getFile $ getEntry keyName clientKeysDirectory | 95 | true | true | 0 | 7 | 32 | 38 | 18 | 20 | null | null |
acowley/ghc | compiler/basicTypes/Literal.hs | bsd-3-clause | litTag (MachWord64 _) = 7 | 30 | litTag (MachWord64 _) = 7 | 30 | litTag (MachWord64 _) = 7 | 30 | false | false | 0 | 6 | 9 | 16 | 7 | 9 | null | null |
DavidAlphaFox/ghc | libraries/bytestring/bench/BenchAll.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- Benchmark
------------------------------------------------------------------------------
-- input data (NOINLINE to ensure memoization)
----------------------------------------------
-- | Few-enough repetitions to avoid making GC too ex... | 355 | nRepl :: Int
nRepl = 10000 | 26 | nRepl = 10000 | 13 | true | true | 0 | 4 | 29 | 17 | 12 | 5 | null | null |
leksah/leksah-server | src/IDE/Metainfo/InterfaceCollector.hs | gpl-2.0 | filterExtras [] = [] | 46 | filterExtras [] = [] | 46 | filterExtras [] = [] | 46 | false | false | 0 | 6 | 29 | 13 | 6 | 7 | null | null |
robmcl4/Glug | app/Main.hs | bsd-3-clause | chooseMode ("--cli":_) = CLI.main | 33 | chooseMode ("--cli":_) = CLI.main | 33 | chooseMode ("--cli":_) = CLI.main | 33 | false | false | 0 | 7 | 3 | 18 | 9 | 9 | null | null |
spechub/Hets | Isabelle/IsaConsts.hs | gpl-2.0 | -- * HOLCF
liftString :: Term
liftString = conDouble "liftList" | 64 | liftString :: Term
liftString = conDouble "liftList" | 52 | liftString = conDouble "liftList" | 33 | true | true | 0 | 5 | 10 | 15 | 8 | 7 | null | null |
dolio/vector | Data/Vector/Unboxed.hs | bsd-3-clause | concat = G.concat | 17 | concat = G.concat | 17 | concat = G.concat | 17 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
ChShersh/rogue-lang | src/Rogue/LLVM/Emitter.hs | bsd-3-clause | genBlockBody False [] = return () | 59 | genBlockBody False [] = return () | 59 | genBlockBody False [] = return () | 59 | false | false | 0 | 6 | 31 | 18 | 8 | 10 | null | null |
stefanjaax/omega-automata | src/OmegaAutomata/Hoa.hs | gpl-3.0 | maybeBlank :: (a -> String) -> Maybe a -> String
maybeBlank _ Nothing = " " | 75 | maybeBlank :: (a -> String) -> Maybe a -> String
maybeBlank _ Nothing = " " | 75 | maybeBlank _ Nothing = " " | 26 | false | true | 0 | 7 | 15 | 34 | 17 | 17 | null | null |
benweitzman/DivisionOfLabor | src/lib/DivisionOfLabor/Worker.hs | mit | standard :: Worker
standard = undefined | 39 | standard :: Worker
standard = undefined | 39 | standard = undefined | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
mreider/kinda-might-work | src/Synchro.hs | mit | toTaskNameId :: Text -> Text -> Text -> Text
toTaskNameId groupName name taskId = "{{ "<> groupName<> " }} "
<> name
<> "[["<>taskId<>"]]" | 213 | toTaskNameId :: Text -> Text -> Text -> Text
toTaskNameId groupName name taskId = "{{ "<> groupName<> " }} "
<> name
<> "[["<>taskId<>"]]" | 213 | toTaskNameId groupName name taskId = "{{ "<> groupName<> " }} "
<> name
<> "[["<>taskId<>"]]" | 166 | false | true | 0 | 10 | 98 | 54 | 27 | 27 | null | null |
ibabushkin/morgue | src/Data/Morgue/Agenda/Time.hs | bsd-3-clause | getDay :: Timestamp -> Day
getDay (Timestamp (LocalTime day _) _ _ _) = day | 75 | getDay :: Timestamp -> Day
getDay (Timestamp (LocalTime day _) _ _ _) = day | 75 | getDay (Timestamp (LocalTime day _) _ _ _) = day | 48 | false | true | 0 | 9 | 14 | 38 | 19 | 19 | null | null |
nevrenato/HetsAlloy | CASL/OMDocImport.hs | gpl-2.0 | symbolToOp s = error $ "symbolToOp: Nonop encountered: " ++ show s | 66 | symbolToOp s = error $ "symbolToOp: Nonop encountered: " ++ show s | 66 | symbolToOp s = error $ "symbolToOp: Nonop encountered: " ++ show s | 66 | false | false | 3 | 6 | 11 | 24 | 9 | 15 | null | null |
mahrz/hit | src/Numeric/Information/Distribution.hs | mit | -- | Create a joint distribution of two independent discrete distributions
(<:>) :: (Num prob, Ord a) =>
Dist prob a -- ^
-> Dist prob [a]
-> Dist prob [a]
(<:>) = liftM2 (:) | 204 | (<:>) :: (Num prob, Ord a) =>
Dist prob a -- ^
-> Dist prob [a]
-> Dist prob [a]
(<:>) = liftM2 (:) | 129 | (<:>) = liftM2 (:) | 18 | true | true | 0 | 9 | 64 | 66 | 37 | 29 | null | null |
kmate/HaRe | old/testing/unfoldAsPatterns/B2_TokOut.hs | bsd-3-clause | main :: BTree Int
main = buildtree [3,1,2] | 42 | main :: BTree Int
main = buildtree [3,1,2] | 42 | main = buildtree [3,1,2] | 24 | false | true | 0 | 6 | 7 | 26 | 14 | 12 | null | null |
hesselink/stack | src/Stack/Package.hs | bsd-3-clause | generateBuildInfoOpts :: Maybe (Path Abs File) -> Path Abs Dir -> Path Abs Dir -> BuildInfo -> [String]
generateBuildInfoOpts mcabalmacros cabalDir distDir b =
nub (concat [ghcOpts b, extOpts b, srcOpts, macros, deps])
where
deps =
concat
[ ["-package=" <> display name]
| Depen... | 929 | generateBuildInfoOpts :: Maybe (Path Abs File) -> Path Abs Dir -> Path Abs Dir -> BuildInfo -> [String]
generateBuildInfoOpts mcabalmacros cabalDir distDir b =
nub (concat [ghcOpts b, extOpts b, srcOpts, macros, deps])
where
deps =
concat
[ ["-package=" <> display name]
| Depen... | 929 | generateBuildInfoOpts mcabalmacros cabalDir distDir b =
nub (concat [ghcOpts b, extOpts b, srcOpts, macros, deps])
where
deps =
concat
[ ["-package=" <> display name]
| Dependency name _ <- targetBuildDepends b]
macros =
case mcabalmacros of
Nothing -> [... | 825 | false | true | 6 | 13 | 305 | 324 | 154 | 170 | null | null |
jaapweel/piffle | src/Syntax/PPrint.hs | gpl-2.0 | colored i d = sgr i <> d <> sgr 0 | 33 | colored i d = sgr i <> d <> sgr 0 | 33 | colored i d = sgr i <> d <> sgr 0 | 33 | false | false | 0 | 7 | 10 | 25 | 11 | 14 | null | null |
brendanhay/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Services/ServiceLevelObjectives/Create.hs | mpl-2.0 | -- | JSONP
sslocCallback :: Lens' ServicesServiceLevelObjectivesCreate (Maybe Text)
sslocCallback
= lens _sslocCallback
(\ s a -> s{_sslocCallback = a}) | 160 | sslocCallback :: Lens' ServicesServiceLevelObjectivesCreate (Maybe Text)
sslocCallback
= lens _sslocCallback
(\ s a -> s{_sslocCallback = a}) | 149 | sslocCallback
= lens _sslocCallback
(\ s a -> s{_sslocCallback = a}) | 76 | true | true | 0 | 8 | 27 | 49 | 25 | 24 | null | null |
copton/hgdbmi | tests/io.hs | bsd-3-clause | test :: IO ()
test = do
_ <- setup
mv <- newEmptyMVar
ctx <- G.setup config (callback mv)
let cmd = command ctx
_ <- cmd R.RCDone $ C.cli_command "tty /dev/null"
_ <- cmd R.RCDone $ C.file_exec_and_symbols (Just "example")
let loc = C.file_... | 1,075 | test :: IO ()
test = do
_ <- setup
mv <- newEmptyMVar
ctx <- G.setup config (callback mv)
let cmd = command ctx
_ <- cmd R.RCDone $ C.cli_command "tty /dev/null"
_ <- cmd R.RCDone $ C.file_exec_and_symbols (Just "example")
let loc = C.file_... | 1,075 | test = do
_ <- setup
mv <- newEmptyMVar
ctx <- G.setup config (callback mv)
let cmd = command ctx
_ <- cmd R.RCDone $ C.cli_command "tty /dev/null"
_ <- cmd R.RCDone $ C.file_exec_and_symbols (Just "example")
let loc = C.file_function_locati... | 1,060 | false | true | 0 | 17 | 317 | 399 | 180 | 219 | null | null |
Helium4Haskell/helium | src/Helium/Syntax/UHA_Utils.hs | gpl-3.0 | addQualified _ (Name_Operator range _ orig []) = Name_Operator range [] orig [] | 86 | addQualified _ (Name_Operator range _ orig []) = Name_Operator range [] orig [] | 86 | addQualified _ (Name_Operator range _ orig []) = Name_Operator range [] orig [] | 86 | false | false | 0 | 8 | 19 | 38 | 18 | 20 | null | null |
luigy/stack | src/Stack/Config.hs | bsd-3-clause | getProjectConfig :: (MonadIO m, MonadThrow m, MonadLogger m)
=> Maybe (Path Abs File)
-- ^ Override stack.yaml
-> m (Maybe (Path Abs File))
getProjectConfig (Just stackYaml) = return $ Just stackYaml | 250 | getProjectConfig :: (MonadIO m, MonadThrow m, MonadLogger m)
=> Maybe (Path Abs File)
-- ^ Override stack.yaml
-> m (Maybe (Path Abs File))
getProjectConfig (Just stackYaml) = return $ Just stackYaml | 250 | getProjectConfig (Just stackYaml) = return $ Just stackYaml | 59 | false | true | 0 | 11 | 81 | 81 | 40 | 41 | null | null |
Raveline/FQuoter | lib/FQuoter/Serialize/SerializedTypes.hs | gpl-3.0 | unsqlizeST DBSource [pk,t] =
DBValue (fromSql' pk) (SSource $ sqlValuesToSource t) | 87 | unsqlizeST DBSource [pk,t] =
DBValue (fromSql' pk) (SSource $ sqlValuesToSource t) | 87 | unsqlizeST DBSource [pk,t] =
DBValue (fromSql' pk) (SSource $ sqlValuesToSource t) | 87 | false | false | 0 | 7 | 15 | 41 | 19 | 22 | null | null |
GaloisInc/ivory | ivory-examples/examples/String.hs | bsd-3-clause | -- Don't collide with string.h (case-insensitive on Mac)
cmodule :: Module
cmodule = package "String_ex" $ do
incl printf
incl test | 135 | cmodule :: Module
cmodule = package "String_ex" $ do
incl printf
incl test | 78 | cmodule = package "String_ex" $ do
incl printf
incl test | 60 | true | true | 2 | 8 | 24 | 39 | 15 | 24 | null | null |
GaloisInc/galua | galua-spec/src/Galua/Spec/CFG.hs | mit | rwBlank :: RW
rwBlank = RW
{ prevScopes = []
, curScope = emptyScope
, upvalues = []
, globals = []
, curBlock = Nothing
, finishedBlocks = Map.empty
, nextBlockId = 0
, nextNameId = 0
, loopStack = []
} | 264 | rwBlank :: RW
rwBlank = RW
{ prevScopes = []
, curScope = emptyScope
, upvalues = []
, globals = []
, curBlock = Nothing
, finishedBlocks = Map.empty
, nextBlockId = 0
, nextNameId = 0
, loopStack = []
} | 264 | rwBlank = RW
{ prevScopes = []
, curScope = emptyScope
, upvalues = []
, globals = []
, curBlock = Nothing
, finishedBlocks = Map.empty
, nextBlockId = 0
, nextNameId = 0
, loopStack = []
} | 250 | false | true | 0 | 8 | 103 | 87 | 50 | 37 | null | null |
gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Types/Refinements.hs | bsd-3-clause | relReft :: (Expression a) => Brel -> a -> Reft
relReft r e = Reft (vv_, PAtom r (eVar vv_) (expr e)) | 103 | relReft :: (Expression a) => Brel -> a -> Reft
relReft r e = Reft (vv_, PAtom r (eVar vv_) (expr e)) | 103 | relReft r e = Reft (vv_, PAtom r (eVar vv_) (expr e)) | 56 | false | true | 0 | 9 | 24 | 66 | 32 | 34 | null | null |
olwrapper/olwrapper | web/Tutorial/Traffic.hs | bsd-3-clause | u2_01 = Coordinate 16.36910 48.20028 wgs84proj | 46 | u2_01 = Coordinate 16.36910 48.20028 wgs84proj | 46 | u2_01 = Coordinate 16.36910 48.20028 wgs84proj | 46 | false | false | 1 | 5 | 5 | 17 | 6 | 11 | null | null |
themoritz/cabal | Cabal/Distribution/Simple/Haddock.hs | bsd-3-clause | fromPackageDescription :: HaddockTarget -> PackageDescription -> HaddockArgs
fromPackageDescription haddockTarget pkg_descr =
mempty { argInterfaceFile = Flag $ haddockName pkg_descr,
argPackageName = Flag $ packageId $ pkg_descr,
argOutputDir = Dir $
"doc" </> "ht... | 779 | fromPackageDescription :: HaddockTarget -> PackageDescription -> HaddockArgs
fromPackageDescription haddockTarget pkg_descr =
mempty { argInterfaceFile = Flag $ haddockName pkg_descr,
argPackageName = Flag $ packageId $ pkg_descr,
argOutputDir = Dir $
"doc" </> "ht... | 779 | fromPackageDescription haddockTarget pkg_descr =
mempty { argInterfaceFile = Flag $ haddockName pkg_descr,
argPackageName = Flag $ packageId $ pkg_descr,
argOutputDir = Dir $
"doc" </> "html" </> haddockDirName haddockTarget pkg_descr,
argPrologue = ... | 702 | false | true | 0 | 12 | 278 | 176 | 90 | 86 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.