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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sisirkoppaka/brick
|
programs/ViewportScrollDemo.hs
|
bsd-3-clause
|
vp3Scroll :: M.ViewportScroll
vp3Scroll = M.viewportScroll vp3Name
| 66
|
vp3Scroll :: M.ViewportScroll
vp3Scroll = M.viewportScroll vp3Name
| 66
|
vp3Scroll = M.viewportScroll vp3Name
| 36
| false
| true
| 0
| 6
| 6
| 18
| 9
| 9
| null | null |
Megaleo/Minehack
|
src/Action.hs
|
bsd-3-clause
|
onAction (Action a (Just (c, (T.Above t1 _))) (Hit w)) = onAction $ Action a (Just (c,t1)) (Hit w)
| 110
|
onAction (Action a (Just (c, (T.Above t1 _))) (Hit w)) = onAction $ Action a (Just (c,t1)) (Hit w)
| 110
|
onAction (Action a (Just (c, (T.Above t1 _))) (Hit w)) = onAction $ Action a (Just (c,t1)) (Hit w)
| 110
| false
| false
| 0
| 13
| 30
| 76
| 39
| 37
| null | null |
facebookincubator/duckling
|
Duckling/Rules/CS.hs
|
bsd-3-clause
|
defaultRules :: Seal Dimension -> [Rule]
defaultRules = langRules
| 65
|
defaultRules :: Seal Dimension -> [Rule]
defaultRules = langRules
| 65
|
defaultRules = langRules
| 24
| false
| true
| 0
| 6
| 8
| 21
| 11
| 10
| null | null |
iblumenfeld/cryptol
|
src/Cryptol/TypeCheck/Solver/Numeric/NonLin.hs
|
bsd-3-clause
|
trie_delete :: Expr -> Map Expr a -> Map Expr a
trie_delete = Map.delete
| 72
|
trie_delete :: Expr -> Map Expr a -> Map Expr a
trie_delete = Map.delete
| 72
|
trie_delete = Map.delete
| 24
| false
| true
| 0
| 7
| 13
| 31
| 15
| 16
| null | null |
ghorn/classy-dvda
|
src/Classy/System.hs
|
bsd-3-clause
|
generalizedEffectiveForce gspeed (Particle mass pos) =
partialV vel gspeed `dot` scale mass accel
where
vel = ddtNp pos
accel = ddtN vel
| 148
|
generalizedEffectiveForce gspeed (Particle mass pos) =
partialV vel gspeed `dot` scale mass accel
where
vel = ddtNp pos
accel = ddtN vel
| 148
|
generalizedEffectiveForce gspeed (Particle mass pos) =
partialV vel gspeed `dot` scale mass accel
where
vel = ddtNp pos
accel = ddtN vel
| 148
| false
| false
| 1
| 7
| 33
| 54
| 26
| 28
| null | null |
mathhun/stack
|
src/Path/Find.hs
|
bsd-3-clause
|
findFiles :: Path Abs Dir -- ^ Root directory to begin with.
-> (Path Abs File -> Bool) -- ^ Predicate to match files.
-> (Path Abs Dir -> Bool) -- ^ Predicate for which directories to traverse.
-> IO [Path Abs File] -- ^ List of matching files.
findFiles dir p traversep =
do (dirs,files) <- catchJust (\ e -> if isPermissionError e
then Just ()
else Nothing)
(listDirectory dir)
(\ _ -> return ([], []))
subResults <-
forM dirs
(\entry ->
if traversep entry
then findFiles entry p traversep
else return [])
return (concat (filter p files : subResults))
| 827
|
findFiles :: Path Abs Dir -- ^ Root directory to begin with.
-> (Path Abs File -> Bool) -- ^ Predicate to match files.
-> (Path Abs Dir -> Bool) -- ^ Predicate for which directories to traverse.
-> IO [Path Abs File]
findFiles dir p traversep =
do (dirs,files) <- catchJust (\ e -> if isPermissionError e
then Just ()
else Nothing)
(listDirectory dir)
(\ _ -> return ([], []))
subResults <-
forM dirs
(\entry ->
if traversep entry
then findFiles entry p traversep
else return [])
return (concat (filter p files : subResults))
| 793
|
findFiles dir p traversep =
do (dirs,files) <- catchJust (\ e -> if isPermissionError e
then Just ()
else Nothing)
(listDirectory dir)
(\ _ -> return ([], []))
subResults <-
forM dirs
(\entry ->
if traversep entry
then findFiles entry p traversep
else return [])
return (concat (filter p files : subResults))
| 534
| true
| true
| 0
| 13
| 373
| 212
| 108
| 104
| null | null |
athanclark/Idris-dev
|
src/Idris/Delaborate.hs
|
bsd-3-clause
|
annName' :: Name -> String -> Doc OutputAnnotation
annName' n str = annotate (AnnName n Nothing Nothing Nothing) (text str)
| 123
|
annName' :: Name -> String -> Doc OutputAnnotation
annName' n str = annotate (AnnName n Nothing Nothing Nothing) (text str)
| 123
|
annName' n str = annotate (AnnName n Nothing Nothing Nothing) (text str)
| 72
| false
| true
| 0
| 7
| 19
| 50
| 24
| 26
| null | null |
adarqui/Complexity
|
examples/simple.hs
|
bsd-3-clause
|
main :: IO ()
main = do
cmdLine "nums" expNums
cmdLine "sums" expSums
cmdLine "sorts" expSorts
cmdLine "maps" expMaps
cmdLine "fibs" expFibs
| 145
|
main :: IO ()
main = do
cmdLine "nums" expNums
cmdLine "sums" expSums
cmdLine "sorts" expSorts
cmdLine "maps" expMaps
cmdLine "fibs" expFibs
| 145
|
main = do
cmdLine "nums" expNums
cmdLine "sums" expSums
cmdLine "sorts" expSorts
cmdLine "maps" expMaps
cmdLine "fibs" expFibs
| 131
| false
| true
| 0
| 8
| 26
| 62
| 24
| 38
| null | null |
beni55/ghcjs
|
src/Gen2/Rts.hs
|
mit
|
resetRegister :: StgReg -> JStat
resetRegister r = [j| `r` = null; |]
| 69
|
resetRegister :: StgReg -> JStat
resetRegister r = [j| `r` = null; |]
| 69
|
resetRegister r = [j| `r` = null; |]
| 36
| false
| true
| 0
| 5
| 12
| 22
| 13
| 9
| null | null |
fluffynukeit/FNIStash
|
src/FNIStash/Logic/DB.hs
|
bsd-3-clause
|
-- Returns all items in the database with status not equal to ELSEWHERE or INSERTED.
allDBItems env = do
allItemResults <- allItemsSatisfying env " where STATUS<>? and STATUS<>?" [toSql Inserted, toSql Elsewhere] -- returns all items in DB (not inserted)
return $ flip map allItemResults $ \r -> r >>= return . snd -- toss out the location data but keep errors
| 368
|
allDBItems env = do
allItemResults <- allItemsSatisfying env " where STATUS<>? and STATUS<>?" [toSql Inserted, toSql Elsewhere] -- returns all items in DB (not inserted)
return $ flip map allItemResults $ \r -> r >>= return . snd -- toss out the location data but keep errors
| 283
|
allDBItems env = do
allItemResults <- allItemsSatisfying env " where STATUS<>? and STATUS<>?" [toSql Inserted, toSql Elsewhere] -- returns all items in DB (not inserted)
return $ flip map allItemResults $ \r -> r >>= return . snd -- toss out the location data but keep errors
| 283
| true
| false
| 0
| 10
| 69
| 67
| 33
| 34
| null | null |
FranklinChen/reddit
|
src/Reddit/Actions/Post.hs
|
bsd-2-clause
|
submitSelfPostWithCaptcha :: Monad m
=> SubredditName -- ^ The subreddit to which you're posting the selfpost
-> Text -- ^ The title of the selfpost
-> Text -- ^ The body of the selfpost
-> CaptchaID -- ^ The ID of the captcha we're answering
-> Text -- ^ The answer to the provided captcha
-> RedditT m PostID
submitSelfPostWithCaptcha r title postBody iden captcha = do
POSTWrapped res <- runRoute $ Route.submitSelfPost r title postBody `withCaptcha` (iden, captcha)
return res
-- | Deletes one of your own posts. Note that this is different from
-- removing a post as a moderator action.
| 754
|
submitSelfPostWithCaptcha :: Monad m
=> SubredditName -- ^ The subreddit to which you're posting the selfpost
-> Text -- ^ The title of the selfpost
-> Text -- ^ The body of the selfpost
-> CaptchaID -- ^ The ID of the captcha we're answering
-> Text -- ^ The answer to the provided captcha
-> RedditT m PostID
submitSelfPostWithCaptcha r title postBody iden captcha = do
POSTWrapped res <- runRoute $ Route.submitSelfPost r title postBody `withCaptcha` (iden, captcha)
return res
-- | Deletes one of your own posts. Note that this is different from
-- removing a post as a moderator action.
| 754
|
submitSelfPostWithCaptcha r title postBody iden captcha = do
POSTWrapped res <- runRoute $ Route.submitSelfPost r title postBody `withCaptcha` (iden, captcha)
return res
-- | Deletes one of your own posts. Note that this is different from
-- removing a post as a moderator action.
| 287
| false
| true
| 0
| 11
| 265
| 102
| 53
| 49
| null | null |
brendanhay/gogol
|
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
|
mpl-2.0
|
-- | Optional. Description of the expression. This is a longer text which
-- describes the expression, e.g. when hovered over it in a UI.
eDescription :: Lens' Expr (Maybe Text)
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
| 245
|
eDescription :: Lens' Expr (Maybe Text)
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
| 107
|
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
| 67
| true
| true
| 0
| 9
| 43
| 49
| 26
| 23
| null | null |
brendanhay/gogol
|
gogol-books/gen/Network/Google/Books/Types/Product.hs
|
mpl-2.0
|
dciSubTitle :: Lens' DiscoveryclustersClustersItem (Maybe Text)
dciSubTitle
= lens _dciSubTitle (\ s a -> s{_dciSubTitle = a})
| 128
|
dciSubTitle :: Lens' DiscoveryclustersClustersItem (Maybe Text)
dciSubTitle
= lens _dciSubTitle (\ s a -> s{_dciSubTitle = a})
| 128
|
dciSubTitle
= lens _dciSubTitle (\ s a -> s{_dciSubTitle = a})
| 64
| false
| true
| 0
| 9
| 18
| 47
| 24
| 23
| null | null |
brendanhay/gogol
|
gogol-serviceusage/gen/Network/Google/ServiceUsage/Types/Product.hs
|
mpl-2.0
|
-- | Defines a set of authentication providers that a service supports.
aProviders :: Lens' Authentication [AuthProvider]
aProviders
= lens _aProviders (\ s a -> s{_aProviders = a}) .
_Default
. _Coerce
| 216
|
aProviders :: Lens' Authentication [AuthProvider]
aProviders
= lens _aProviders (\ s a -> s{_aProviders = a}) .
_Default
. _Coerce
| 144
|
aProviders
= lens _aProviders (\ s a -> s{_aProviders = a}) .
_Default
. _Coerce
| 94
| true
| true
| 0
| 11
| 45
| 53
| 28
| 25
| null | null |
uuhan/Idris-dev
|
src/Idris/Delaborate.hs
|
bsd-3-clause
|
showPart ist (SubReport rs) = indented . hsep . map (showPart ist) $ rs
| 71
|
showPart ist (SubReport rs) = indented . hsep . map (showPart ist) $ rs
| 71
|
showPart ist (SubReport rs) = indented . hsep . map (showPart ist) $ rs
| 71
| false
| false
| 0
| 9
| 13
| 40
| 18
| 22
| null | null |
chwthewke/hackup
|
src/Hackup/Config/Parser.hs
|
mit
|
fileSelectorFromJSON :: AsValue s => s -> V FileSelector
fileSelectorFromJSON =
asV "string matching (glob:|regex:)?.+ expected" .
parseRawFileSelector
| 157
|
fileSelectorFromJSON :: AsValue s => s -> V FileSelector
fileSelectorFromJSON =
asV "string matching (glob:|regex:)?.+ expected" .
parseRawFileSelector
| 157
|
fileSelectorFromJSON =
asV "string matching (glob:|regex:)?.+ expected" .
parseRawFileSelector
| 100
| false
| true
| 0
| 7
| 23
| 32
| 15
| 17
| null | null |
Skyfold/postgrest
|
src/PostgREST/Error.hs
|
mit
|
httpStatus authed (P.SessionError (H.ResultError (H.ServerError c _ _ _))) =
case toS c of
'0':'8':_ -> HT.status503 -- pg connection err
'0':'9':_ -> HT.status500 -- triggered action exception
'0':'L':_ -> HT.status403 -- invalid grantor
'0':'P':_ -> HT.status403 -- invalid role specification
"23503" -> HT.status409 -- foreign_key_violation
"23505" -> HT.status409 -- unique_violation
'2':'5':_ -> HT.status500 -- invalid tx state
'2':'8':_ -> HT.status403 -- invalid auth specification
'2':'D':_ -> HT.status500 -- invalid tx termination
'3':'8':_ -> HT.status500 -- external routine exception
'3':'9':_ -> HT.status500 -- external routine invocation
'3':'B':_ -> HT.status500 -- savepoint exception
'4':'0':_ -> HT.status500 -- tx rollback
'5':'3':_ -> HT.status503 -- insufficient resources
'5':'4':_ -> HT.status413 -- too complex
'5':'5':_ -> HT.status500 -- obj not on prereq state
'5':'7':_ -> HT.status500 -- operator intervention
'5':'8':_ -> HT.status500 -- system error
'F':'0':_ -> HT.status500 -- conf file error
'H':'V':_ -> HT.status500 -- foreign data wrapper error
"P0001" -> HT.status400 -- default code for "raise"
'P':'0':_ -> HT.status500 -- PL/pgSQL Error
'X':'X':_ -> HT.status500 -- internal Error
"42883" -> HT.status404 -- undefined function
"42P01" -> HT.status404 -- undefined table
"42501" -> if authed then HT.status403 else HT.status401 -- insufficient privilege
_ -> HT.status400
| 1,544
|
httpStatus authed (P.SessionError (H.ResultError (H.ServerError c _ _ _))) =
case toS c of
'0':'8':_ -> HT.status503 -- pg connection err
'0':'9':_ -> HT.status500 -- triggered action exception
'0':'L':_ -> HT.status403 -- invalid grantor
'0':'P':_ -> HT.status403 -- invalid role specification
"23503" -> HT.status409 -- foreign_key_violation
"23505" -> HT.status409 -- unique_violation
'2':'5':_ -> HT.status500 -- invalid tx state
'2':'8':_ -> HT.status403 -- invalid auth specification
'2':'D':_ -> HT.status500 -- invalid tx termination
'3':'8':_ -> HT.status500 -- external routine exception
'3':'9':_ -> HT.status500 -- external routine invocation
'3':'B':_ -> HT.status500 -- savepoint exception
'4':'0':_ -> HT.status500 -- tx rollback
'5':'3':_ -> HT.status503 -- insufficient resources
'5':'4':_ -> HT.status413 -- too complex
'5':'5':_ -> HT.status500 -- obj not on prereq state
'5':'7':_ -> HT.status500 -- operator intervention
'5':'8':_ -> HT.status500 -- system error
'F':'0':_ -> HT.status500 -- conf file error
'H':'V':_ -> HT.status500 -- foreign data wrapper error
"P0001" -> HT.status400 -- default code for "raise"
'P':'0':_ -> HT.status500 -- PL/pgSQL Error
'X':'X':_ -> HT.status500 -- internal Error
"42883" -> HT.status404 -- undefined function
"42P01" -> HT.status404 -- undefined table
"42501" -> if authed then HT.status403 else HT.status401 -- insufficient privilege
_ -> HT.status400
| 1,544
|
httpStatus authed (P.SessionError (H.ResultError (H.ServerError c _ _ _))) =
case toS c of
'0':'8':_ -> HT.status503 -- pg connection err
'0':'9':_ -> HT.status500 -- triggered action exception
'0':'L':_ -> HT.status403 -- invalid grantor
'0':'P':_ -> HT.status403 -- invalid role specification
"23503" -> HT.status409 -- foreign_key_violation
"23505" -> HT.status409 -- unique_violation
'2':'5':_ -> HT.status500 -- invalid tx state
'2':'8':_ -> HT.status403 -- invalid auth specification
'2':'D':_ -> HT.status500 -- invalid tx termination
'3':'8':_ -> HT.status500 -- external routine exception
'3':'9':_ -> HT.status500 -- external routine invocation
'3':'B':_ -> HT.status500 -- savepoint exception
'4':'0':_ -> HT.status500 -- tx rollback
'5':'3':_ -> HT.status503 -- insufficient resources
'5':'4':_ -> HT.status413 -- too complex
'5':'5':_ -> HT.status500 -- obj not on prereq state
'5':'7':_ -> HT.status500 -- operator intervention
'5':'8':_ -> HT.status500 -- system error
'F':'0':_ -> HT.status500 -- conf file error
'H':'V':_ -> HT.status500 -- foreign data wrapper error
"P0001" -> HT.status400 -- default code for "raise"
'P':'0':_ -> HT.status500 -- PL/pgSQL Error
'X':'X':_ -> HT.status500 -- internal Error
"42883" -> HT.status404 -- undefined function
"42P01" -> HT.status404 -- undefined table
"42501" -> if authed then HT.status403 else HT.status401 -- insufficient privilege
_ -> HT.status400
| 1,544
| false
| false
| 48
| 12
| 321
| 383
| 213
| 170
| null | null |
christiaanb/ghc
|
compiler/typecheck/TcGenDeriv.hs
|
bsd-3-clause
|
gtInt_RDR = varQual_RDR gHC_PRIM (fsLit ">#" )
| 52
|
gtInt_RDR = varQual_RDR gHC_PRIM (fsLit ">#" )
| 52
|
gtInt_RDR = varQual_RDR gHC_PRIM (fsLit ">#" )
| 52
| false
| false
| 0
| 7
| 12
| 17
| 8
| 9
| null | null |
mikeizbicki/dominion
|
src/Dominion/Policy/Simple.hs
|
bsd-3-clause
|
numCards :: Card -> PlayerState -> Int
numCards c ps = sum $ map (\c' -> if c==c' then 1 else 0) $ getAllCards ps
| 113
|
numCards :: Card -> PlayerState -> Int
numCards c ps = sum $ map (\c' -> if c==c' then 1 else 0) $ getAllCards ps
| 113
|
numCards c ps = sum $ map (\c' -> if c==c' then 1 else 0) $ getAllCards ps
| 74
| false
| true
| 2
| 9
| 24
| 64
| 31
| 33
| null | null |
jgm/HeX
|
Text/HeX/Standard/Xml.hs
|
bsd-3-clause
|
inTags :: String -> [(String, String)] -> Doc -> Doc
inTags s attrs x = tagOpen s attrs +++ x +++ tagClose s
| 108
|
inTags :: String -> [(String, String)] -> Doc -> Doc
inTags s attrs x = tagOpen s attrs +++ x +++ tagClose s
| 108
|
inTags s attrs x = tagOpen s attrs +++ x +++ tagClose s
| 55
| false
| true
| 0
| 8
| 22
| 55
| 28
| 27
| null | null |
cblp/haskell-telegram-api
|
src/Web/Telegram/API/Bot/Requests.hs
|
bsd-3-clause
|
chatIdToPart (ChatChannel text) = text
| 38
|
chatIdToPart (ChatChannel text) = text
| 38
|
chatIdToPart (ChatChannel text) = text
| 38
| false
| false
| 0
| 7
| 4
| 15
| 7
| 8
| null | null |
fmapfmapfmap/amazonka
|
amazonka-elb/test/Test/AWS/Gen/ELB.hs
|
mpl-2.0
|
testDeleteLoadBalancerPolicy :: DeleteLoadBalancerPolicy -> TestTree
testDeleteLoadBalancerPolicy = req
"DeleteLoadBalancerPolicy"
"fixture/DeleteLoadBalancerPolicy.yaml"
| 178
|
testDeleteLoadBalancerPolicy :: DeleteLoadBalancerPolicy -> TestTree
testDeleteLoadBalancerPolicy = req
"DeleteLoadBalancerPolicy"
"fixture/DeleteLoadBalancerPolicy.yaml"
| 178
|
testDeleteLoadBalancerPolicy = req
"DeleteLoadBalancerPolicy"
"fixture/DeleteLoadBalancerPolicy.yaml"
| 109
| false
| true
| 0
| 5
| 17
| 21
| 10
| 11
| null | null |
Bodigrim/katas
|
src/haskell/4-Roman-Numerals-Decoder.hs
|
bsd-2-clause
|
solution ('D':xs) = 500 + solution xs
| 37
|
solution ('D':xs) = 500 + solution xs
| 37
|
solution ('D':xs) = 500 + solution xs
| 37
| false
| false
| 0
| 7
| 6
| 23
| 11
| 12
| null | null |
gangsterveggies/duck-analyzer
|
Duck/Statistics.hs
|
bsd-3-clause
|
genInstances :: (Cased a) => [Int] -> IO [a]
genInstances [] = return []
| 72
|
genInstances :: (Cased a) => [Int] -> IO [a]
genInstances [] = return []
| 72
|
genInstances [] = return []
| 27
| false
| true
| 0
| 8
| 13
| 43
| 22
| 21
| null | null |
brendanhay/gogol
|
gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'OperationResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'orAddtional'
operationResponse
:: HashMap Text JSONValue -- ^ 'orAddtional'
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse' {_orAddtional = _Coerce # pOrAddtional_}
| 378
|
operationResponse
:: HashMap Text JSONValue -- ^ 'orAddtional'
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse' {_orAddtional = _Coerce # pOrAddtional_}
| 187
|
operationResponse pOrAddtional_ =
OperationResponse' {_orAddtional = _Coerce # pOrAddtional_}
| 95
| true
| true
| 0
| 8
| 62
| 47
| 25
| 22
| null | null |
diku-dk/futhark
|
src/Futhark/CodeGen/Backends/GenericWASM.hs
|
isc
|
makeResult :: Int -> String -> String
makeResult i typ =
" var result" ++ show i ++ " = "
++ if isArray typ
then "this.new_" ++ signature ++ "_from_ptr(" ++ readout ++ ");"
else
if isOpaque typ
then "new FutharkOpaque(this, " ++ readout ++ ", this.wasm._futhark_free_" ++ typ ++ ");"
else readout ++ if typ == "bool" then "!==0;" else ";"
where
res = "out[" ++ show i ++ "]"
readout = typeHeap typ ++ "[" ++ res ++ " >> " ++ show (typeShift typ) ++ "]"
signature = baseType typ ++ "_" ++ show (dim typ) ++ "d"
| 570
|
makeResult :: Int -> String -> String
makeResult i typ =
" var result" ++ show i ++ " = "
++ if isArray typ
then "this.new_" ++ signature ++ "_from_ptr(" ++ readout ++ ");"
else
if isOpaque typ
then "new FutharkOpaque(this, " ++ readout ++ ", this.wasm._futhark_free_" ++ typ ++ ");"
else readout ++ if typ == "bool" then "!==0;" else ";"
where
res = "out[" ++ show i ++ "]"
readout = typeHeap typ ++ "[" ++ res ++ " >> " ++ show (typeShift typ) ++ "]"
signature = baseType typ ++ "_" ++ show (dim typ) ++ "d"
| 570
|
makeResult i typ =
" var result" ++ show i ++ " = "
++ if isArray typ
then "this.new_" ++ signature ++ "_from_ptr(" ++ readout ++ ");"
else
if isOpaque typ
then "new FutharkOpaque(this, " ++ readout ++ ", this.wasm._futhark_free_" ++ typ ++ ");"
else readout ++ if typ == "bool" then "!==0;" else ";"
where
res = "out[" ++ show i ++ "]"
readout = typeHeap typ ++ "[" ++ res ++ " >> " ++ show (typeShift typ) ++ "]"
signature = baseType typ ++ "_" ++ show (dim typ) ++ "d"
| 532
| false
| true
| 3
| 10
| 162
| 199
| 97
| 102
| null | null |
kajigor/uKanren_transformations
|
test/resources/Program/Bridge2.hs
|
bsd-3-clause
|
checkStepDef :: Def
checkStepDef =
Def "checkStep" ["Env", "step", "q55"] (
(fresh ["p"] (
(V "step" === C "one" [V "p"]) &&&
(call "checkPerson" [V "Env", V "p", V "q55"]))) |||
(fresh ["p", "q"] (
(V "step" === C "two" [V "p", V "q"]) &&&
(fresh ["q56", "q57"] (
(call "checkPerson" [V "Env", V "p", V "q56"]) &&&
(fresh ["q62", "q63"] (
(call "checkPerson" [V "Env", V "q", V "q62"]) &&&
(call "grForPerson" [V "p", V "q", V "q63"]) &&&
(((V "q62" === C "false" []) &&&
(V "q57" === C "false" [])) |||
((V "q62" === C "true" []) &&&
(V "q57" === V "q63"))))) &&&
(((V "q56" === C "false" []) &&&
(V "q55" === C "false" [])) |||
((V "q56" === C "true" []) &&&
(V "q55" === V "q57")))))))
)
| 919
|
checkStepDef :: Def
checkStepDef =
Def "checkStep" ["Env", "step", "q55"] (
(fresh ["p"] (
(V "step" === C "one" [V "p"]) &&&
(call "checkPerson" [V "Env", V "p", V "q55"]))) |||
(fresh ["p", "q"] (
(V "step" === C "two" [V "p", V "q"]) &&&
(fresh ["q56", "q57"] (
(call "checkPerson" [V "Env", V "p", V "q56"]) &&&
(fresh ["q62", "q63"] (
(call "checkPerson" [V "Env", V "q", V "q62"]) &&&
(call "grForPerson" [V "p", V "q", V "q63"]) &&&
(((V "q62" === C "false" []) &&&
(V "q57" === C "false" [])) |||
((V "q62" === C "true" []) &&&
(V "q57" === V "q63"))))) &&&
(((V "q56" === C "false" []) &&&
(V "q55" === C "false" [])) |||
((V "q56" === C "true" []) &&&
(V "q55" === V "q57")))))))
)
| 919
|
checkStepDef =
Def "checkStep" ["Env", "step", "q55"] (
(fresh ["p"] (
(V "step" === C "one" [V "p"]) &&&
(call "checkPerson" [V "Env", V "p", V "q55"]))) |||
(fresh ["p", "q"] (
(V "step" === C "two" [V "p", V "q"]) &&&
(fresh ["q56", "q57"] (
(call "checkPerson" [V "Env", V "p", V "q56"]) &&&
(fresh ["q62", "q63"] (
(call "checkPerson" [V "Env", V "q", V "q62"]) &&&
(call "grForPerson" [V "p", V "q", V "q63"]) &&&
(((V "q62" === C "false" []) &&&
(V "q57" === C "false" [])) |||
((V "q62" === C "true" []) &&&
(V "q57" === V "q63"))))) &&&
(((V "q56" === C "false" []) &&&
(V "q55" === C "false" [])) |||
((V "q56" === C "true" []) &&&
(V "q55" === V "q57")))))))
)
| 899
| false
| true
| 0
| 28
| 361
| 445
| 228
| 217
| null | null |
bergmannf/gitit
|
src/Network/Gitit/Interface.hs
|
gpl-2.0
|
-- | Returns @Just@ the logged in user, or @Nothing@ if nobody is logged in.
askUser :: PluginM (Maybe User)
askUser = liftM pluginUser ask
| 139
|
askUser :: PluginM (Maybe User)
askUser = liftM pluginUser ask
| 62
|
askUser = liftM pluginUser ask
| 30
| true
| true
| 2
| 6
| 24
| 33
| 13
| 20
| null | null |
music-suite/music-score
|
src/Music/Score/Meta/Tempo.hs
|
bsd-3-clause
|
-- | Get the number of beats per minute indicated by a tempo.
tempoBeatsPerMinute :: Tempo -> Bpm
tempoBeatsPerMinute = snd . getTempo
| 134
|
tempoBeatsPerMinute :: Tempo -> Bpm
tempoBeatsPerMinute = snd . getTempo
| 72
|
tempoBeatsPerMinute = snd . getTempo
| 36
| true
| true
| 0
| 5
| 22
| 20
| 11
| 9
| null | null |
circuithub/haskell-filepicker-policy
|
Network/Filepicker/Policy.hs
|
mit
|
-- | Set the handle of the policy
setHandle :: FilepickerHandle -> Policy -> Policy
setHandle h p = p {handle = Just h}
| 119
|
setHandle :: FilepickerHandle -> Policy -> Policy
setHandle h p = p {handle = Just h}
| 85
|
setHandle h p = p {handle = Just h}
| 35
| true
| true
| 0
| 7
| 23
| 36
| 19
| 17
| null | null |
eryx67/haskell-libtorrent
|
src/Network/Libtorrent/PeerInfo.hs
|
bsd-3-clause
|
getFailcount :: MonadIO m => PeerInfo -> m CInt
getFailcount ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| int { $(peer_info * hoPtr)->failcount } |]
| 153
|
getFailcount :: MonadIO m => PeerInfo -> m CInt
getFailcount ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| int { $(peer_info * hoPtr)->failcount } |]
| 153
|
getFailcount ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| int { $(peer_info * hoPtr)->failcount } |]
| 105
| false
| true
| 3
| 8
| 30
| 57
| 27
| 30
| null | null |
kojiromike/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
isPostulateName :: Name -> IState -> Bool
isPostulateName n ist = S.member n (idris_postulates ist)
| 99
|
isPostulateName :: Name -> IState -> Bool
isPostulateName n ist = S.member n (idris_postulates ist)
| 99
|
isPostulateName n ist = S.member n (idris_postulates ist)
| 57
| false
| true
| 0
| 8
| 14
| 42
| 19
| 23
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/BasicTypes/DataCon.hs
|
bsd-3-clause
|
eqHsBang HsStrict HsStrict = True
| 56
|
eqHsBang HsStrict HsStrict = True
| 56
|
eqHsBang HsStrict HsStrict = True
| 56
| false
| false
| 0
| 5
| 27
| 11
| 5
| 6
| null | null |
gspindles/rftg-cards
|
src/Game/RftG/Cards/XI.hs
|
mit
|
antiXenoLeague :: Card
antiXenoLeague = Card
Development
"ANTI-XENO LEAGUE"
(Cost 6)
QuestionMark
Nothing
[AntiXeno]
[Settle, Produce]
| 148
|
antiXenoLeague :: Card
antiXenoLeague = Card
Development
"ANTI-XENO LEAGUE"
(Cost 6)
QuestionMark
Nothing
[AntiXeno]
[Settle, Produce]
| 148
|
antiXenoLeague = Card
Development
"ANTI-XENO LEAGUE"
(Cost 6)
QuestionMark
Nothing
[AntiXeno]
[Settle, Produce]
| 125
| false
| true
| 0
| 6
| 29
| 47
| 22
| 25
| null | null |
markus-git/imperative-edsl-vhdl
|
src/Language/Embedded/VHDL/Monad/Util.hs
|
bsd-3-clause
|
width :: SubtypeIndication -> Primary
width = literal . number . show . typeWidth
| 81
|
width :: SubtypeIndication -> Primary
width = literal . number . show . typeWidth
| 81
|
width = literal . number . show . typeWidth
| 43
| false
| true
| 0
| 7
| 13
| 27
| 14
| 13
| null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/List.hs
|
mpl-2.0
|
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
cUploadType :: Lens' CreativesList (Maybe Text)
cUploadType
= lens _cUploadType (\ s a -> s{_cUploadType = a})
| 183
|
cUploadType :: Lens' CreativesList (Maybe Text)
cUploadType
= lens _cUploadType (\ s a -> s{_cUploadType = a})
| 112
|
cUploadType
= lens _cUploadType (\ s a -> s{_cUploadType = a})
| 64
| true
| true
| 1
| 9
| 28
| 52
| 25
| 27
| null | null |
mkaput/janus
|
src/Language/Janus/Parser/Lexer.hs
|
mit
|
naturalOrFloat = T.naturalOrFloat lexer
| 41
|
naturalOrFloat = T.naturalOrFloat lexer
| 41
|
naturalOrFloat = T.naturalOrFloat lexer
| 41
| false
| false
| 1
| 6
| 5
| 14
| 5
| 9
| null | null |
madelgi/hs-bot
|
src/Bot/BaseFunctions.hs
|
mit
|
uptime :: Net String
uptime = do
now <- liftIO getClockTime
zero <- asks starttime
return . show $ diffClockTimes now zero
| 135
|
uptime :: Net String
uptime = do
now <- liftIO getClockTime
zero <- asks starttime
return . show $ diffClockTimes now zero
| 135
|
uptime = do
now <- liftIO getClockTime
zero <- asks starttime
return . show $ diffClockTimes now zero
| 114
| false
| true
| 0
| 8
| 34
| 50
| 22
| 28
| null | null |
chreekat/yesod
|
yesod-routes/Yesod/Routes/Parse.hs
|
bsd-2-clause
|
-- FIXME handle more complicated stuff
pieceFromString :: String -> Either String (CheckOverlap, Piece String)
pieceFromString ('#':'!':x) = Right $ (False, Dynamic x)
| 168
|
pieceFromString :: String -> Either String (CheckOverlap, Piece String)
pieceFromString ('#':'!':x) = Right $ (False, Dynamic x)
| 128
|
pieceFromString ('#':'!':x) = Right $ (False, Dynamic x)
| 56
| true
| true
| 0
| 8
| 23
| 57
| 30
| 27
| null | null |
j-rock/lambduh
|
src/Language/Parse.hs
|
mit
|
failed = either (const True) (const False)
| 42
|
failed = either (const True) (const False)
| 42
|
failed = either (const True) (const False)
| 42
| false
| false
| 1
| 7
| 6
| 27
| 11
| 16
| null | null |
tjakway/ghcjvm
|
compiler/prelude/TysWiredIn.hs
|
bsd-3-clause
|
charTyCon_RDR = nameRdrName charTyConName
| 43
|
charTyCon_RDR = nameRdrName charTyConName
| 43
|
charTyCon_RDR = nameRdrName charTyConName
| 43
| false
| false
| 1
| 5
| 5
| 12
| 4
| 8
| null | null |
bgamari/text
|
tests/Tests/Properties.hs
|
bsd-2-clause
|
t_chunksOf_length k t = len == T.length t || (k <= 0 && len == 0)
where len = L.sum . L.map T.length $ T.chunksOf k t
| 119
|
t_chunksOf_length k t = len == T.length t || (k <= 0 && len == 0)
where len = L.sum . L.map T.length $ T.chunksOf k t
| 119
|
t_chunksOf_length k t = len == T.length t || (k <= 0 && len == 0)
where len = L.sum . L.map T.length $ T.chunksOf k t
| 119
| false
| false
| 0
| 9
| 28
| 71
| 34
| 37
| null | null |
hsinhuang/codebase
|
h99/H3.hs
|
gpl-2.0
|
elementAt (x : _) 0 = x
| 23
|
elementAt (x : _) 0 = x
| 23
|
elementAt (x : _) 0 = x
| 23
| false
| false
| 0
| 7
| 6
| 18
| 9
| 9
| null | null |
diku-dk/futhark
|
src/Language/Futhark/Interpreter.hs
|
isc
|
lookupType :: QualName VName -> Env -> Maybe T.TypeBinding
lookupType = lookupInEnv envType
| 91
|
lookupType :: QualName VName -> Env -> Maybe T.TypeBinding
lookupType = lookupInEnv envType
| 91
|
lookupType = lookupInEnv envType
| 32
| false
| true
| 0
| 8
| 12
| 30
| 14
| 16
| null | null |
dmcclean/kaos
|
src/Kaos/Signals/SignalFunctions.hs
|
mit
|
interpret Integral = undefined
| 30
|
interpret Integral = undefined
| 30
|
interpret Integral = undefined
| 30
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
cglazner/ibd_stitch
|
src/ParseMorg.hs
|
bsd-3-clause
|
makeModelInfo :: Config -> DV.Vector (Maybe Double, Double) -> DV.Vector Double -> [Indiv] -> ModelInfo
makeModelInfo cfg marks pos inds = let pk = popKin cfg
hss = hapSetSize cfg
sts = allStates hss
marg = margDist pk sts
pmap = makePolyMap (genoError cfg) hss
(tm, rv) = makeWeirdMat hss (nullFrac cfg) pk marg
mkEmits p = Map.map (NC.fromList . map (`evalPoly` p)) pmap
mkTrans Nothing = NC.ident (length sts)
mkTrans (Just d) = makeTrans tm rv (changeRate cfg) d
in ModelInfo { states = sts
, nStates = length sts
, changeRateMI = changeRate cfg
, priorMarkers = fmap (fromList . map (+ (-1))) (priMarks cfg) -- the program is zero-indexed but input is one-indexed!
, phaseMode = phaseFlag cfg
, markers = DV.map (uncurry Marker . (mkTrans *** mkEmits)) $ marks
, markerPos = pos
, marginal = marg
, prior = Nothing
, hapIntMap = makeHapIntMap inds }
| 1,365
|
makeModelInfo :: Config -> DV.Vector (Maybe Double, Double) -> DV.Vector Double -> [Indiv] -> ModelInfo
makeModelInfo cfg marks pos inds = let pk = popKin cfg
hss = hapSetSize cfg
sts = allStates hss
marg = margDist pk sts
pmap = makePolyMap (genoError cfg) hss
(tm, rv) = makeWeirdMat hss (nullFrac cfg) pk marg
mkEmits p = Map.map (NC.fromList . map (`evalPoly` p)) pmap
mkTrans Nothing = NC.ident (length sts)
mkTrans (Just d) = makeTrans tm rv (changeRate cfg) d
in ModelInfo { states = sts
, nStates = length sts
, changeRateMI = changeRate cfg
, priorMarkers = fmap (fromList . map (+ (-1))) (priMarks cfg) -- the program is zero-indexed but input is one-indexed!
, phaseMode = phaseFlag cfg
, markers = DV.map (uncurry Marker . (mkTrans *** mkEmits)) $ marks
, markerPos = pos
, marginal = marg
, prior = Nothing
, hapIntMap = makeHapIntMap inds }
| 1,364
|
makeModelInfo cfg marks pos inds = let pk = popKin cfg
hss = hapSetSize cfg
sts = allStates hss
marg = margDist pk sts
pmap = makePolyMap (genoError cfg) hss
(tm, rv) = makeWeirdMat hss (nullFrac cfg) pk marg
mkEmits p = Map.map (NC.fromList . map (`evalPoly` p)) pmap
mkTrans Nothing = NC.ident (length sts)
mkTrans (Just d) = makeTrans tm rv (changeRate cfg) d
in ModelInfo { states = sts
, nStates = length sts
, changeRateMI = changeRate cfg
, priorMarkers = fmap (fromList . map (+ (-1))) (priMarks cfg) -- the program is zero-indexed but input is one-indexed!
, phaseMode = phaseFlag cfg
, markers = DV.map (uncurry Marker . (mkTrans *** mkEmits)) $ marks
, markerPos = pos
, marginal = marg
, prior = Nothing
, hapIntMap = makeHapIntMap inds }
| 1,260
| false
| true
| 0
| 15
| 661
| 353
| 186
| 167
| null | null |
dmjio/Hello-HaLVM
|
linux-src/Device.hs
|
bsd-3-clause
|
getDevice :: NetworkStack -> IO Device
getDevice ns =
listToMaybe <$> getArgs >>= \case
Nothing -> error "Please enter tap device name (example: ./hello-halvm-tap tap0)"
Just deviceName -> addDevice ns (pack deviceName) defaultDeviceConfig
| 249
|
getDevice :: NetworkStack -> IO Device
getDevice ns =
listToMaybe <$> getArgs >>= \case
Nothing -> error "Please enter tap device name (example: ./hello-halvm-tap tap0)"
Just deviceName -> addDevice ns (pack deviceName) defaultDeviceConfig
| 249
|
getDevice ns =
listToMaybe <$> getArgs >>= \case
Nothing -> error "Please enter tap device name (example: ./hello-halvm-tap tap0)"
Just deviceName -> addDevice ns (pack deviceName) defaultDeviceConfig
| 210
| false
| true
| 0
| 11
| 42
| 62
| 29
| 33
| null | null |
trbauer/hpath
|
HPath.hs
|
mit
|
hPutColored, hPutColoredLn :: S.Handle -> SCA.ColorIntensity -> SCA.Color -> String -> IO ()
hPutColored h i c s = do
SCA.hSetSGR h [SCA.SetColor SCA.Foreground i c]
S.hPutStr h s
SCA.hSetSGR h [SCA.Reset]
| 211
|
hPutColored, hPutColoredLn :: S.Handle -> SCA.ColorIntensity -> SCA.Color -> String -> IO ()
hPutColored h i c s = do
SCA.hSetSGR h [SCA.SetColor SCA.Foreground i c]
S.hPutStr h s
SCA.hSetSGR h [SCA.Reset]
| 211
|
hPutColored h i c s = do
SCA.hSetSGR h [SCA.SetColor SCA.Foreground i c]
S.hPutStr h s
SCA.hSetSGR h [SCA.Reset]
| 118
| false
| true
| 0
| 10
| 37
| 98
| 47
| 51
| null | null |
AntoineSavage/haskell
|
turninH/dist/build/autogen/Paths_turnin.hs
|
gpl-2.0
|
getDataDir = catchIO (getEnv "turnin_datadir") (\_ -> return datadir)
| 69
|
getDataDir = catchIO (getEnv "turnin_datadir") (\_ -> return datadir)
| 69
|
getDataDir = catchIO (getEnv "turnin_datadir") (\_ -> return datadir)
| 69
| false
| false
| 0
| 8
| 8
| 28
| 14
| 14
| null | null |
jarmar/change-instrument
|
src/Main.hs
|
bsd-3-clause
|
main = do
args <- execParser (info parseArgs mempty)
before <- L.fromFile (infile args)
let instrumentMap = mapFromArgs args
after <- return $ modifyFileWithMap instrumentMap before
S.toSeekableFile (outfile args) after
| 229
|
main = do
args <- execParser (info parseArgs mempty)
before <- L.fromFile (infile args)
let instrumentMap = mapFromArgs args
after <- return $ modifyFileWithMap instrumentMap before
S.toSeekableFile (outfile args) after
| 229
|
main = do
args <- execParser (info parseArgs mempty)
before <- L.fromFile (infile args)
let instrumentMap = mapFromArgs args
after <- return $ modifyFileWithMap instrumentMap before
S.toSeekableFile (outfile args) after
| 229
| false
| false
| 0
| 10
| 39
| 86
| 38
| 48
| null | null |
spechub/Hets
|
OWL2/MedusaToJson.hs
|
gpl-2.0
|
-- convert a relation to JSON
relToJson :: (IRI, IRI, IRI, IRI) -> Json
relToJson (i1, p1, i2, p2) =
JObject [("Individual1", JString $ show $ iriPath i1),
("Point1", JString $ show $ iriPath p1),
("Individual2", JString $ show $ iriPath i2),
("Point2", JString $ show $ iriPath p2)]
| 314
|
relToJson :: (IRI, IRI, IRI, IRI) -> Json
relToJson (i1, p1, i2, p2) =
JObject [("Individual1", JString $ show $ iriPath i1),
("Point1", JString $ show $ iriPath p1),
("Individual2", JString $ show $ iriPath i2),
("Point2", JString $ show $ iriPath p2)]
| 284
|
relToJson (i1, p1, i2, p2) =
JObject [("Individual1", JString $ show $ iriPath i1),
("Point1", JString $ show $ iriPath p1),
("Individual2", JString $ show $ iriPath i2),
("Point2", JString $ show $ iriPath p2)]
| 242
| true
| true
| 0
| 9
| 79
| 126
| 71
| 55
| null | null |
brendanhay/gogol
|
gogol-file/gen/Network/Google/File/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'GoogleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gcsmpvimsAddtional'
googleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules
:: HashMap Text GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule -- ^ 'gcsmpvimsAddtional'
-> GoogleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules
googleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules pGcsmpvimsAddtional_ =
GoogleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules'
{_gcsmpvimsAddtional = _Coerce # pGcsmpvimsAddtional_}
| 764
|
googleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules
:: HashMap Text GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule -- ^ 'gcsmpvimsAddtional'
-> GoogleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules
googleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules pGcsmpvimsAddtional_ =
GoogleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules'
{_gcsmpvimsAddtional = _Coerce # pGcsmpvimsAddtional_}
| 508
|
googleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules pGcsmpvimsAddtional_ =
GoogleCloudSaasacceleratorManagementProvidersV1InstanceMaintenanceSchedules'
{_gcsmpvimsAddtional = _Coerce # pGcsmpvimsAddtional_}
| 236
| true
| true
| 0
| 7
| 66
| 41
| 24
| 17
| null | null |
raymoo/pins-ps
|
Pins/Handle/Triggers.hs
|
gpl-3.0
|
topic :: Trigger
topic = Trigger (startsWith "!topic" <&&> typeIs "c" <&&> rankIn "%@#&~")
doTopic
| 114
|
topic :: Trigger
topic = Trigger (startsWith "!topic" <&&> typeIs "c" <&&> rankIn "%@#&~")
doTopic
| 114
|
topic = Trigger (startsWith "!topic" <&&> typeIs "c" <&&> rankIn "%@#&~")
doTopic
| 97
| false
| true
| 0
| 8
| 30
| 44
| 18
| 26
| null | null |
arekfu/grammar-haskell
|
src/Grammar/Regex.hs
|
bsd-3-clause
|
(QuestionMark _) `needsBracketsWithin` (Star _) = True
| 54
|
(QuestionMark _) `needsBracketsWithin` (Star _) = True
| 54
|
(QuestionMark _) `needsBracketsWithin` (Star _) = True
| 54
| false
| false
| 0
| 7
| 6
| 26
| 13
| 13
| null | null |
Eckankar/picross-solver
|
picross.hs
|
mit
|
processFile :: FilePath -> IO ()
processFile fileName = do b <- loadFile fileName
s <- solve b
traceShowM s
unless (isSolved s) $ putStrLn "Board could not be solved using known methods."
return ()
| 301
|
processFile :: FilePath -> IO ()
processFile fileName = do b <- loadFile fileName
s <- solve b
traceShowM s
unless (isSolved s) $ putStrLn "Board could not be solved using known methods."
return ()
| 301
|
processFile fileName = do b <- loadFile fileName
s <- solve b
traceShowM s
unless (isSolved s) $ putStrLn "Board could not be solved using known methods."
return ()
| 268
| false
| true
| 0
| 11
| 138
| 80
| 33
| 47
| null | null |
apyrgio/snf-ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
-- | The set of drbd-like disk types
dtsDrbd :: FrozenSet String
dtsDrbd = ConstantUtils.mkSet [Types.diskTemplateToRaw DTDrbd8]
| 128
|
dtsDrbd :: FrozenSet String
dtsDrbd = ConstantUtils.mkSet [Types.diskTemplateToRaw DTDrbd8]
| 91
|
dtsDrbd = ConstantUtils.mkSet [Types.diskTemplateToRaw DTDrbd8]
| 63
| true
| true
| 0
| 8
| 16
| 28
| 14
| 14
| null | null |
mariefarrell/Hets
|
Common/ProofUtils.hs
|
gpl-2.0
|
-- | name unlabeled axioms with "Axnnn"
nameSens :: [Named a] -> [Named a]
nameSens =
map (\ (sen, no) ->
if senAttr sen == "" then reName (const $ "Ax" ++ show no) sen else sen)
. number
| 200
|
nameSens :: [Named a] -> [Named a]
nameSens =
map (\ (sen, no) ->
if senAttr sen == "" then reName (const $ "Ax" ++ show no) sen else sen)
. number
| 160
|
nameSens =
map (\ (sen, no) ->
if senAttr sen == "" then reName (const $ "Ax" ++ show no) sen else sen)
. number
| 125
| true
| true
| 0
| 13
| 51
| 83
| 44
| 39
| null | null |
da-x/ghc
|
compiler/hsSyn/HsExpr.hs
|
bsd-3-clause
|
isAtomicHsExpr :: HsExpr id -> Bool
-- True of a single token
isAtomicHsExpr (HsVar {}) = True
| 101
|
isAtomicHsExpr :: HsExpr id -> Bool
isAtomicHsExpr (HsVar {}) = True
| 75
|
isAtomicHsExpr (HsVar {}) = True
| 39
| true
| true
| 1
| 8
| 23
| 34
| 16
| 18
| null | null |
iostreamer-X/FuncShell
|
src/Main.hs
|
mit
|
mapArgToIO :: Arguments -> IO ()
mapArgToIO argument =
case argument of
Arguments (Just H) _ _ -> showHelp
Arguments (Just P) (Just parser) (Just function) -> interpret parser function
Arguments Nothing Nothing (Just function) -> interpret "default" function
_ -> putStrLn "Invalid arguments!" >> showHelp >> exitFailure
| 343
|
mapArgToIO :: Arguments -> IO ()
mapArgToIO argument =
case argument of
Arguments (Just H) _ _ -> showHelp
Arguments (Just P) (Just parser) (Just function) -> interpret parser function
Arguments Nothing Nothing (Just function) -> interpret "default" function
_ -> putStrLn "Invalid arguments!" >> showHelp >> exitFailure
| 343
|
mapArgToIO argument =
case argument of
Arguments (Just H) _ _ -> showHelp
Arguments (Just P) (Just parser) (Just function) -> interpret parser function
Arguments Nothing Nothing (Just function) -> interpret "default" function
_ -> putStrLn "Invalid arguments!" >> showHelp >> exitFailure
| 310
| false
| true
| 0
| 10
| 70
| 128
| 59
| 69
| null | null |
noteed/snaplet-postgresql-simple
|
src/Snap/Snaplet/PostgresqlSimple.hs
|
bsd-3-clause
|
------------------------------------------------------------------------------
-- | See 'P.query_'
query_ :: (HasPostgres m, FromRow r) => P.Query -> m [r]
query_ q = liftPG (`P.query_` q)
| 188
|
query_ :: (HasPostgres m, FromRow r) => P.Query -> m [r]
query_ q = liftPG (`P.query_` q)
| 89
|
query_ q = liftPG (`P.query_` q)
| 32
| true
| true
| 0
| 8
| 21
| 54
| 30
| 24
| null | null |
danr/hipspec
|
testsuite/prod/zeno_version/PropT17.hs
|
gpl-3.0
|
subset (x:xs) ys = x `elem` xs && subset xs ys
| 46
|
subset (x:xs) ys = x `elem` xs && subset xs ys
| 46
|
subset (x:xs) ys = x `elem` xs && subset xs ys
| 46
| false
| false
| 0
| 6
| 10
| 34
| 17
| 17
| null | null |
leshchevds/ganeti
|
test/hs/Test/Ganeti/Query/Network.hs
|
bsd-2-clause
|
-- | Tests whether instances that are not connected to a network are
-- correctly classified as such.
prop_instIsConnected_notFound :: ConfigData -> String -> Property
prop_instIsConnected_notFound cfg network_uuid =
let nets = (fromContainer . configNetworks) cfg
net_keys = map UTF8.toString $ Map.keys nets
in notElem network_uuid net_keys ==>
forAll (genInstWithNets net_keys) $ \inst ->
not (instIsConnected network_uuid inst)
| 456
|
prop_instIsConnected_notFound :: ConfigData -> String -> Property
prop_instIsConnected_notFound cfg network_uuid =
let nets = (fromContainer . configNetworks) cfg
net_keys = map UTF8.toString $ Map.keys nets
in notElem network_uuid net_keys ==>
forAll (genInstWithNets net_keys) $ \inst ->
not (instIsConnected network_uuid inst)
| 354
|
prop_instIsConnected_notFound cfg network_uuid =
let nets = (fromContainer . configNetworks) cfg
net_keys = map UTF8.toString $ Map.keys nets
in notElem network_uuid net_keys ==>
forAll (genInstWithNets net_keys) $ \inst ->
not (instIsConnected network_uuid inst)
| 288
| true
| true
| 4
| 11
| 82
| 107
| 52
| 55
| null | null |
paulp/unison
|
parser-typechecker/src/Unison/Codecs.hs
|
mit
|
serializeFoldable :: (MonadPut m, Foldable f) => (a -> m ()) -> f a -> m ()
serializeFoldable f fa = do
putLength $ length fa
traverse_ f fa
| 144
|
serializeFoldable :: (MonadPut m, Foldable f) => (a -> m ()) -> f a -> m ()
serializeFoldable f fa = do
putLength $ length fa
traverse_ f fa
| 144
|
serializeFoldable f fa = do
putLength $ length fa
traverse_ f fa
| 68
| false
| true
| 0
| 10
| 32
| 77
| 36
| 41
| null | null |
oldmanmike/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
checkValidClsArgs :: Bool -> Class -> [KindOrType] -> Bool
-- If the Bool is True (flexible contexts), return True (i.e. ok)
-- Otherwise, check that the type (not kind) args are all headed by a tyvar
-- E.g. (Eq a) accepted, (Eq (f a)) accepted, but (Eq Int) rejected
-- This function is here rather than in TcValidity because it is
-- called from TcSimplify, which itself is imported by TcValidity
checkValidClsArgs flexible_contexts cls kts
| flexible_contexts = True
| otherwise = all hasTyVarHead tys
where
tys = filterOutInvisibleTypes (classTyCon cls) kts
| 582
|
checkValidClsArgs :: Bool -> Class -> [KindOrType] -> Bool
checkValidClsArgs flexible_contexts cls kts
| flexible_contexts = True
| otherwise = all hasTyVarHead tys
where
tys = filterOutInvisibleTypes (classTyCon cls) kts
| 239
|
checkValidClsArgs flexible_contexts cls kts
| flexible_contexts = True
| otherwise = all hasTyVarHead tys
where
tys = filterOutInvisibleTypes (classTyCon cls) kts
| 180
| true
| true
| 1
| 8
| 111
| 86
| 41
| 45
| null | null |
fibsifan/pandoc
|
src/Text/Pandoc/Readers/MediaWiki.hs
|
gpl-2.0
|
collapseUnderscores ('_':'_':xs) = collapseUnderscores ('_':xs)
| 63
|
collapseUnderscores ('_':'_':xs) = collapseUnderscores ('_':xs)
| 63
|
collapseUnderscores ('_':'_':xs) = collapseUnderscores ('_':xs)
| 63
| false
| false
| 0
| 8
| 4
| 30
| 15
| 15
| null | null |
blacktaxi/inversion
|
src/TemplateParse.hs
|
bsd-3-clause
|
(<??>) = flip (<?>)
| 19
|
(<??>) = flip (<?>)
| 19
|
(<??>) = flip (<?>)
| 19
| false
| false
| 0
| 5
| 3
| 13
| 8
| 5
| null | null |
Andrey-Sisoyev/haskell-PCLT
|
Text/PCLT/Catalog.hs
|
lgpl-2.1
|
catDfltLng :: PCLT_Catalog -> LanguageName
catDfltLng = pcsDefaultLanguage . pcltcInnerConfig
| 93
|
catDfltLng :: PCLT_Catalog -> LanguageName
catDfltLng = pcsDefaultLanguage . pcltcInnerConfig
| 93
|
catDfltLng = pcsDefaultLanguage . pcltcInnerConfig
| 50
| false
| true
| 0
| 5
| 9
| 19
| 10
| 9
| null | null |
johanneshilden/principle
|
Trombone/Dispatch/Db.hs
|
bsd-3-clause
|
catchDbErrors :: SqlError -> RouteResponse
catchDbErrors SqlError{ sqlState = sqls } =
case sqls of
"23503" -> errorResponse ErrorSqlConstraintViolation
"Foreign key constraint violation."
"23505" -> errorResponse ErrorSqlUniqueViolation
"Unique constraint violation."
"42P01" -> errorResponse ErrorSqlGeneric
"Undefined table."
-- @todo: Add more error types here!
_ -> errorResponse ErrorSqlGeneric
"SQL error."
| 566
|
catchDbErrors :: SqlError -> RouteResponse
catchDbErrors SqlError{ sqlState = sqls } =
case sqls of
"23503" -> errorResponse ErrorSqlConstraintViolation
"Foreign key constraint violation."
"23505" -> errorResponse ErrorSqlUniqueViolation
"Unique constraint violation."
"42P01" -> errorResponse ErrorSqlGeneric
"Undefined table."
-- @todo: Add more error types here!
_ -> errorResponse ErrorSqlGeneric
"SQL error."
| 566
|
catchDbErrors SqlError{ sqlState = sqls } =
case sqls of
"23503" -> errorResponse ErrorSqlConstraintViolation
"Foreign key constraint violation."
"23505" -> errorResponse ErrorSqlUniqueViolation
"Unique constraint violation."
"42P01" -> errorResponse ErrorSqlGeneric
"Undefined table."
-- @todo: Add more error types here!
_ -> errorResponse ErrorSqlGeneric
"SQL error."
| 523
| false
| true
| 3
| 8
| 201
| 81
| 38
| 43
| null | null |
GRACeFUL-project/haskelzinc
|
src/Interfaces/MZAST.hs
|
bsd-3-clause
|
-- | Represents an output item in the MiniZinc model. The elements in the list argument
-- represent the elements of the MiniZinc array passed to the output item.
--
-- Example:
--
-- >>> output [string "x = ", mz_show[var "x"]]
-- output ["x = ", show(x)];
--
-- If the represented model contains an @output@ item that changes the default format of
-- the solver's solutions, then a custom parser will be needed to get the solver's results
-- back in Haskell. See "Interfaces.FZSolutionParser".
output :: [Expr] -> GItem 'OK
output = Output'
| 546
|
output :: [Expr] -> GItem 'OK
output = Output'
| 46
|
output = Output'
| 16
| true
| true
| 0
| 7
| 98
| 34
| 23
| 11
| null | null |
travitch/llvm-base-types
|
src/Data/LLVM/Internal/DataLayout.hs
|
bsd-3-clause
|
parseAlignPref :: String -> Maybe AlignmentPref
parseAlignPref s =
case splitOn ':' s of
[ssz, sabi, spref] ->
case (parseInt ssz, parseInt sabi, parseInt spref) of
(Just sz, Just abi, Just pref) -> Just $! AlignmentPref sz abi pref
_ -> Nothing
_ -> Nothing
| 290
|
parseAlignPref :: String -> Maybe AlignmentPref
parseAlignPref s =
case splitOn ':' s of
[ssz, sabi, spref] ->
case (parseInt ssz, parseInt sabi, parseInt spref) of
(Just sz, Just abi, Just pref) -> Just $! AlignmentPref sz abi pref
_ -> Nothing
_ -> Nothing
| 290
|
parseAlignPref s =
case splitOn ':' s of
[ssz, sabi, spref] ->
case (parseInt ssz, parseInt sabi, parseInt spref) of
(Just sz, Just abi, Just pref) -> Just $! AlignmentPref sz abi pref
_ -> Nothing
_ -> Nothing
| 242
| false
| true
| 0
| 12
| 76
| 119
| 58
| 61
| null | null |
FranklinChen/twenty-four-days2015-of-hackage
|
src/MonadLoopsExample.hs
|
bsd-3-clause
|
notQuit :: String -> Maybe String
notQuit line =
if line /= "quit"
then Just line
else Nothing
| 104
|
notQuit :: String -> Maybe String
notQuit line =
if line /= "quit"
then Just line
else Nothing
| 104
|
notQuit line =
if line /= "quit"
then Just line
else Nothing
| 70
| false
| true
| 0
| 7
| 27
| 41
| 19
| 22
| null | null |
phischu/fragnix
|
tests/packages/scotty/Data.UUID.Types.Internal.hs
|
bsd-3-clause
|
makeFromWords :: Word32 -> Word32 -> Word32 -> Word32 -> UUID
makeFromWords = UUID
| 82
|
makeFromWords :: Word32 -> Word32 -> Word32 -> Word32 -> UUID
makeFromWords = UUID
| 82
|
makeFromWords = UUID
| 20
| false
| true
| 0
| 8
| 13
| 27
| 14
| 13
| null | null |
jean-edouard/manager
|
xenmgr/Vm/Policies.hs
|
gpl-2.0
|
policyQueryPrintScreen uuid = not <$> dbReadWithDefault False ("/vm/" ++ show uuid ++ "/policies/print-screen-disallowed")
| 128
|
policyQueryPrintScreen uuid = not <$> dbReadWithDefault False ("/vm/" ++ show uuid ++ "/policies/print-screen-disallowed")
| 128
|
policyQueryPrintScreen uuid = not <$> dbReadWithDefault False ("/vm/" ++ show uuid ++ "/policies/print-screen-disallowed")
| 128
| false
| false
| 0
| 10
| 18
| 32
| 15
| 17
| null | null |
np/umm
|
UMMData.hs
|
gpl-3.0
|
-- Remove leading and trailing whitespace from a string.
trimspace :: String -> String
trimspace str = f (f str)
where f = dropWhile isSpace . reverse
-- A version of 'lines' which deals with all combinations of '\r' and '\n'.
-- It drops blank lines and trims leading and trailing whitespace from
-- lines, which is all perfectly fine here, but which might be a problem
-- elsewhere.
| 388
|
trimspace :: String -> String
trimspace str = f (f str)
where f = dropWhile isSpace . reverse
-- A version of 'lines' which deals with all combinations of '\r' and '\n'.
-- It drops blank lines and trims leading and trailing whitespace from
-- lines, which is all perfectly fine here, but which might be a problem
-- elsewhere.
| 330
|
trimspace str = f (f str)
where f = dropWhile isSpace . reverse
-- A version of 'lines' which deals with all combinations of '\r' and '\n'.
-- It drops blank lines and trims leading and trailing whitespace from
-- lines, which is all perfectly fine here, but which might be a problem
-- elsewhere.
| 300
| true
| true
| 0
| 7
| 72
| 47
| 25
| 22
| null | null |
atupal/xmonad-mirror
|
xmonad/tests/Properties/Delete.hs
|
mit
|
prop_delete_local (x :: T) =
case peek x of
Nothing -> True
Just i -> hidden_spaces x == hidden_spaces (delete i x)
-- delete should not affect focus unless the focused element is what is being deleted
| 223
|
prop_delete_local (x :: T) =
case peek x of
Nothing -> True
Just i -> hidden_spaces x == hidden_spaces (delete i x)
-- delete should not affect focus unless the focused element is what is being deleted
| 223
|
prop_delete_local (x :: T) =
case peek x of
Nothing -> True
Just i -> hidden_spaces x == hidden_spaces (delete i x)
-- delete should not affect focus unless the focused element is what is being deleted
| 223
| false
| false
| 0
| 11
| 58
| 57
| 27
| 30
| null | null |
plaimi/blubber-server
|
src/Blubber/Server/Vector.hs
|
agpl-3.0
|
-- | Divide a 'Vector' by a scalar.
(^/^) :: Vector -> Double -> Vector
(Vec x y) ^/^ n = Vec (n / x) (n / y)
| 109
|
(^/^) :: Vector -> Double -> Vector
(Vec x y) ^/^ n = Vec (n / x) (n / y)
| 73
|
(Vec x y) ^/^ n = Vec (n / x) (n / y)
| 37
| true
| true
| 0
| 7
| 27
| 58
| 30
| 28
| null | null |
acowley/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
pprTcTyVarDetails :: TcTyVarDetails -> SDoc
-- For debugging
pprTcTyVarDetails (SkolemTv True) = ptext (sLit "ssk")
| 116
|
pprTcTyVarDetails :: TcTyVarDetails -> SDoc
pprTcTyVarDetails (SkolemTv True) = ptext (sLit "ssk")
| 99
|
pprTcTyVarDetails (SkolemTv True) = ptext (sLit "ssk")
| 55
| true
| true
| 0
| 7
| 15
| 38
| 18
| 20
| null | null |
amccausl/Swish
|
Swish/HaskellUtils/Network/URI.hs
|
lgpl-2.1
|
host :: UriParser String
host = ipv6reference <|> try ipv4address <|> hostname
| 79
|
host :: UriParser String
host = ipv6reference <|> try ipv4address <|> hostname
| 78
|
host = ipv6reference <|> try ipv4address <|> hostname
| 53
| false
| true
| 1
| 7
| 12
| 29
| 12
| 17
| null | null |
scott-fleischman/greek-grammar
|
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
|
mit
|
decomposeChar '\x1EBE' = "\x0045\x0302\x0301"
| 45
|
decomposeChar '\x1EBE' = "\x0045\x0302\x0301"
| 45
|
decomposeChar '\x1EBE' = "\x0045\x0302\x0301"
| 45
| false
| false
| 0
| 4
| 3
| 10
| 4
| 6
| null | null |
m-alvarez/jhc
|
src/FrontEnd/Tc/Class.hs
|
mit
|
supersOf :: ClassHierarchy -> Class -> [Class]
supersOf ch c = asksClassRecord ch c classSupers
| 95
|
supersOf :: ClassHierarchy -> Class -> [Class]
supersOf ch c = asksClassRecord ch c classSupers
| 95
|
supersOf ch c = asksClassRecord ch c classSupers
| 48
| false
| true
| 0
| 7
| 14
| 34
| 17
| 17
| null | null |
forked-upstream-packages-for-ghcjs/ghc
|
compiler/utils/UniqFM.hs
|
bsd-3-clause
|
elemUFM k (UFM m) = M.member (getKey $ getUnique k) m
| 53
|
elemUFM k (UFM m) = M.member (getKey $ getUnique k) m
| 53
|
elemUFM k (UFM m) = M.member (getKey $ getUnique k) m
| 53
| false
| false
| 0
| 8
| 10
| 34
| 16
| 18
| null | null |
HJvT/hdirect
|
src/Parser.hs
|
bsd-3-clause
|
action_276 (120#) = happyShift action_195
| 41
|
action_276 (120#) = happyShift action_195
| 41
|
action_276 (120#) = happyShift action_195
| 41
| false
| false
| 0
| 6
| 4
| 15
| 7
| 8
| null | null |
elginer/snm_math
|
Text/Syntax/Math.hs
|
gpl-3.0
|
syms :: [(String, String, String)]
syms = map (\(inp, cls, out) -> (inp, cls, concatMap html_sym out)) $
[ m "forall" "∀"
, m "unique" "∃!"
, m "forsome" "∃"
, m "member" "∈"
, m "!member" "∉"
, m "subset" "⊆"
, m "ssubset" "⊂"
, m "superset" "⊇"
, m "ssuperset" "⊃"
, m "union" "∪"
, m "intersection" "∩"
, m "implies" "⇒"
, m "derives" "⊢"
, m "=>" "⇒"
, m "->" "→"
, m "|->" "↦"
, m "therefore" "∴"
, m "because" "∵"
, m "{}" "∅"
, m "empty" "∅"
, m "root" "√"
, m "!=" "≠"
, m ">=" "≥"
, m "<=" "≤"
, m "orthogonal" "⊥"
, m "or" "∨"
, m "xor" "⊕"
, m "(+)" "⊕"
, m "and" "∧"
, m "iff" "⇔"
, m "<=>" "⇔"
, m "top" "⊤"
, m "bottom" "⊥"
, m "coprime" "⊥"
, m "*" "·"
, m "<<" "≪"
, m ">>" "≫"
, m "karp" "≺"
, m "varies" "∝"
, m "o<" "∝"
, m "/" "÷"
, m "+-" "±"
, m "-+" "∓"
, m "!|" "∤"
, m "aleph" "ℵ"
, m "beth" "ℶ"
, m "approx" "≈"
, m "wreath" "≀"
, m "ideal" "◅"
, m "antijoin" "▻"
, m "semidirect_product" "⋉"
, m "semijoin" "⋊"
, m "natural_join" "⋈"
, m "|><|" "⋈"
, m "|><" "⋉"
, m "><|" "⋊"
, m "<|" "◅"
, m "|>" "▻"
, m "qed" "∎"
, m "congruent" "≅"
, m "(.)" "∘"
, m "infinity" "∞"
, m "sum" "∑"
, m "product" "∏"
, m "coproduct" "∐"
, m "integral" "∫"
, m "contour_integral" "∮"
, m "gradient" "∇"
, m "@" "∂"
, m "delta" "Δ"
, m "dirac" "δ"
, m "projection" "π"
, m "pi" "π"
, m "O~" "σ"
, m "selection" "σ"
, m "transpose" "†"
, m "entails" "⊧"
, m "|=" "⊧"
, m "(x)" "⊗"
, m "tensor_product" "⊗"
, m "(*)" "*"
]
| 1,677
|
syms :: [(String, String, String)]
syms = map (\(inp, cls, out) -> (inp, cls, concatMap html_sym out)) $
[ m "forall" "∀"
, m "unique" "∃!"
, m "forsome" "∃"
, m "member" "∈"
, m "!member" "∉"
, m "subset" "⊆"
, m "ssubset" "⊂"
, m "superset" "⊇"
, m "ssuperset" "⊃"
, m "union" "∪"
, m "intersection" "∩"
, m "implies" "⇒"
, m "derives" "⊢"
, m "=>" "⇒"
, m "->" "→"
, m "|->" "↦"
, m "therefore" "∴"
, m "because" "∵"
, m "{}" "∅"
, m "empty" "∅"
, m "root" "√"
, m "!=" "≠"
, m ">=" "≥"
, m "<=" "≤"
, m "orthogonal" "⊥"
, m "or" "∨"
, m "xor" "⊕"
, m "(+)" "⊕"
, m "and" "∧"
, m "iff" "⇔"
, m "<=>" "⇔"
, m "top" "⊤"
, m "bottom" "⊥"
, m "coprime" "⊥"
, m "*" "·"
, m "<<" "≪"
, m ">>" "≫"
, m "karp" "≺"
, m "varies" "∝"
, m "o<" "∝"
, m "/" "÷"
, m "+-" "±"
, m "-+" "∓"
, m "!|" "∤"
, m "aleph" "ℵ"
, m "beth" "ℶ"
, m "approx" "≈"
, m "wreath" "≀"
, m "ideal" "◅"
, m "antijoin" "▻"
, m "semidirect_product" "⋉"
, m "semijoin" "⋊"
, m "natural_join" "⋈"
, m "|><|" "⋈"
, m "|><" "⋉"
, m "><|" "⋊"
, m "<|" "◅"
, m "|>" "▻"
, m "qed" "∎"
, m "congruent" "≅"
, m "(.)" "∘"
, m "infinity" "∞"
, m "sum" "∑"
, m "product" "∏"
, m "coproduct" "∐"
, m "integral" "∫"
, m "contour_integral" "∮"
, m "gradient" "∇"
, m "@" "∂"
, m "delta" "Δ"
, m "dirac" "δ"
, m "projection" "π"
, m "pi" "π"
, m "O~" "σ"
, m "selection" "σ"
, m "transpose" "†"
, m "entails" "⊧"
, m "|=" "⊧"
, m "(x)" "⊗"
, m "tensor_product" "⊗"
, m "(*)" "*"
]
| 1,677
|
syms = map (\(inp, cls, out) -> (inp, cls, concatMap html_sym out)) $
[ m "forall" "∀"
, m "unique" "∃!"
, m "forsome" "∃"
, m "member" "∈"
, m "!member" "∉"
, m "subset" "⊆"
, m "ssubset" "⊂"
, m "superset" "⊇"
, m "ssuperset" "⊃"
, m "union" "∪"
, m "intersection" "∩"
, m "implies" "⇒"
, m "derives" "⊢"
, m "=>" "⇒"
, m "->" "→"
, m "|->" "↦"
, m "therefore" "∴"
, m "because" "∵"
, m "{}" "∅"
, m "empty" "∅"
, m "root" "√"
, m "!=" "≠"
, m ">=" "≥"
, m "<=" "≤"
, m "orthogonal" "⊥"
, m "or" "∨"
, m "xor" "⊕"
, m "(+)" "⊕"
, m "and" "∧"
, m "iff" "⇔"
, m "<=>" "⇔"
, m "top" "⊤"
, m "bottom" "⊥"
, m "coprime" "⊥"
, m "*" "·"
, m "<<" "≪"
, m ">>" "≫"
, m "karp" "≺"
, m "varies" "∝"
, m "o<" "∝"
, m "/" "÷"
, m "+-" "±"
, m "-+" "∓"
, m "!|" "∤"
, m "aleph" "ℵ"
, m "beth" "ℶ"
, m "approx" "≈"
, m "wreath" "≀"
, m "ideal" "◅"
, m "antijoin" "▻"
, m "semidirect_product" "⋉"
, m "semijoin" "⋊"
, m "natural_join" "⋈"
, m "|><|" "⋈"
, m "|><" "⋉"
, m "><|" "⋊"
, m "<|" "◅"
, m "|>" "▻"
, m "qed" "∎"
, m "congruent" "≅"
, m "(.)" "∘"
, m "infinity" "∞"
, m "sum" "∑"
, m "product" "∏"
, m "coproduct" "∐"
, m "integral" "∫"
, m "contour_integral" "∮"
, m "gradient" "∇"
, m "@" "∂"
, m "delta" "Δ"
, m "dirac" "δ"
, m "projection" "π"
, m "pi" "π"
, m "O~" "σ"
, m "selection" "σ"
, m "transpose" "†"
, m "entails" "⊧"
, m "|=" "⊧"
, m "(x)" "⊗"
, m "tensor_product" "⊗"
, m "(*)" "*"
]
| 1,642
| false
| true
| 0
| 9
| 589
| 716
| 361
| 355
| null | null |
bionikspoon/playing-with-haskell---oreilly
|
ch05/Prettify.hs
|
mit
|
punctuate p (d:ds) = (d <> p) : punctuate p ds
| 47
|
punctuate p (d:ds) = (d <> p) : punctuate p ds
| 47
|
punctuate p (d:ds) = (d <> p) : punctuate p ds
| 47
| false
| false
| 0
| 7
| 11
| 36
| 17
| 19
| null | null |
geophf/1HaskellADay
|
exercises/HAD/Y2018/M01/D04/Exercise.hs
|
mit
|
fetchAuthorStmt :: Query
fetchAuthorStmt =
[sql|SELECT id,uuid,screen_name,given_name,family_name from author|]
| 114
|
fetchAuthorStmt :: Query
fetchAuthorStmt =
[sql|SELECT id,uuid,screen_name,given_name,family_name from author|]
| 114
|
fetchAuthorStmt =
[sql|SELECT id,uuid,screen_name,given_name,family_name from author|]
| 89
| false
| true
| 0
| 6
| 11
| 22
| 11
| 11
| null | null |
snoyberg/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
clsQual_RDR mod str = mkOrig mod (mkOccNameFS clsName str)
| 59
|
clsQual_RDR mod str = mkOrig mod (mkOccNameFS clsName str)
| 59
|
clsQual_RDR mod str = mkOrig mod (mkOccNameFS clsName str)
| 59
| false
| false
| 0
| 7
| 9
| 24
| 11
| 13
| null | null |
ezrakilty/narc
|
Database/Narc/SQL.hs
|
bsd-2-clause
|
serializeOp Eq = "="
| 29
|
serializeOp Eq = "="
| 29
|
serializeOp Eq = "="
| 29
| false
| false
| 0
| 5
| 12
| 9
| 4
| 5
| null | null |
massysett/penny
|
penny/lib/Penny/BalanceCheck.hs
|
bsd-3-clause
|
resultChunk :: Bool -> Chunk Text
resultChunk b
| b = Rainbow.chunk "[ OK ]" & Rainbow.fore Rainbow.green
| otherwise = Rainbow.chunk "[FAIL]" & Rainbow.fore Rainbow.red
| 173
|
resultChunk :: Bool -> Chunk Text
resultChunk b
| b = Rainbow.chunk "[ OK ]" & Rainbow.fore Rainbow.green
| otherwise = Rainbow.chunk "[FAIL]" & Rainbow.fore Rainbow.red
| 173
|
resultChunk b
| b = Rainbow.chunk "[ OK ]" & Rainbow.fore Rainbow.green
| otherwise = Rainbow.chunk "[FAIL]" & Rainbow.fore Rainbow.red
| 139
| false
| true
| 1
| 8
| 29
| 66
| 30
| 36
| null | null |
adituv/qbscript
|
src/Compiler/QbScript/AST.hs
|
bsd-3-clause
|
compressNegs (Repeat (Just x) body) = Repeat (Just $ negLit x) (fmap compressNegs body)
| 87
|
compressNegs (Repeat (Just x) body) = Repeat (Just $ negLit x) (fmap compressNegs body)
| 87
|
compressNegs (Repeat (Just x) body) = Repeat (Just $ negLit x) (fmap compressNegs body)
| 87
| false
| false
| 0
| 9
| 13
| 46
| 22
| 24
| null | null |
jcristovao/persistent
|
persistent-sqlite/Database/Persist/Sqlite.hs
|
mit
|
withSqlitePool :: (MonadBaseControl IO m, MonadIO m, MonadLogger m)
=> Text
-> Int -- ^ number of connections to open
-> (ConnectionPool -> m a) -> m a
withSqlitePool s = withSqlPool $ open' s
| 237
|
withSqlitePool :: (MonadBaseControl IO m, MonadIO m, MonadLogger m)
=> Text
-> Int -- ^ number of connections to open
-> (ConnectionPool -> m a) -> m a
withSqlitePool s = withSqlPool $ open' s
| 237
|
withSqlitePool s = withSqlPool $ open' s
| 40
| false
| true
| 0
| 11
| 79
| 70
| 35
| 35
| null | null |
mark-watson/kbnlp.hs
|
Entities.hs
|
agpl-3.0
|
main = do
let s = "As read in the San Francisco Chronicle, the company is owned by John Smith, Betty Sanders, and Dr. Ben Jones. Ben Jones and Mr. John Smith are childhood friends who grew up in Brazil, Canada, Buenos Aires, and the British Virgin Islands. Apple Computer relased a new version of OS X yesterday. Brazil Brazil Brazil. John Smith bought stock in ConocoPhillips, Heinz, Hasbro, and General Motors, Fox Sports Radio. I listen to B J Cole. Awami National Party is a political party. ALAEA is a trade union. She went to Brandeis University."
--print $ humanNames s
print $ peopleNames $ splitWordsKeepCase s
print $ countryNames $ splitWordsKeepCase s
print $ companyNames $ splitWordsKeepCase s
print $ cityNames $ splitWordsKeepCase s
print $ broadcastNetworkNames $ splitWordsKeepCase s
print $ musicGroupNames $ splitWordsKeepCase s
print $ politicalPartyNames $ splitWordsKeepCase s
print $ tradeUnionNames $ splitWordsKeepCase s
print $ universityNames $ splitWordsKeepCase s
| 1,037
|
main = do
let s = "As read in the San Francisco Chronicle, the company is owned by John Smith, Betty Sanders, and Dr. Ben Jones. Ben Jones and Mr. John Smith are childhood friends who grew up in Brazil, Canada, Buenos Aires, and the British Virgin Islands. Apple Computer relased a new version of OS X yesterday. Brazil Brazil Brazil. John Smith bought stock in ConocoPhillips, Heinz, Hasbro, and General Motors, Fox Sports Radio. I listen to B J Cole. Awami National Party is a political party. ALAEA is a trade union. She went to Brandeis University."
--print $ humanNames s
print $ peopleNames $ splitWordsKeepCase s
print $ countryNames $ splitWordsKeepCase s
print $ companyNames $ splitWordsKeepCase s
print $ cityNames $ splitWordsKeepCase s
print $ broadcastNetworkNames $ splitWordsKeepCase s
print $ musicGroupNames $ splitWordsKeepCase s
print $ politicalPartyNames $ splitWordsKeepCase s
print $ tradeUnionNames $ splitWordsKeepCase s
print $ universityNames $ splitWordsKeepCase s
| 1,037
|
main = do
let s = "As read in the San Francisco Chronicle, the company is owned by John Smith, Betty Sanders, and Dr. Ben Jones. Ben Jones and Mr. John Smith are childhood friends who grew up in Brazil, Canada, Buenos Aires, and the British Virgin Islands. Apple Computer relased a new version of OS X yesterday. Brazil Brazil Brazil. John Smith bought stock in ConocoPhillips, Heinz, Hasbro, and General Motors, Fox Sports Radio. I listen to B J Cole. Awami National Party is a political party. ALAEA is a trade union. She went to Brandeis University."
--print $ humanNames s
print $ peopleNames $ splitWordsKeepCase s
print $ countryNames $ splitWordsKeepCase s
print $ companyNames $ splitWordsKeepCase s
print $ cityNames $ splitWordsKeepCase s
print $ broadcastNetworkNames $ splitWordsKeepCase s
print $ musicGroupNames $ splitWordsKeepCase s
print $ politicalPartyNames $ splitWordsKeepCase s
print $ tradeUnionNames $ splitWordsKeepCase s
print $ universityNames $ splitWordsKeepCase s
| 1,037
| false
| false
| 1
| 10
| 199
| 146
| 62
| 84
| null | null |
eccstartup/afewproblems
|
solutions/addlist.hs
|
gpl-2.0
|
list2Int' n [] = n
| 18
|
list2Int' n [] = n
| 18
|
list2Int' n [] = n
| 18
| false
| false
| 0
| 6
| 4
| 13
| 6
| 7
| null | null |
vikraman/ghc
|
compiler/coreSyn/CoreSyn.hs
|
bsd-3-clause
|
-- | The 'Name' of the 'Id.Id' at the head of the rule left hand side
ruleIdName :: CoreRule -> Name
ruleIdName = ru_fn
| 119
|
ruleIdName :: CoreRule -> Name
ruleIdName = ru_fn
| 49
|
ruleIdName = ru_fn
| 18
| true
| true
| 0
| 7
| 23
| 23
| 10
| 13
| null | null |
cbpark/GluinoStopPolarization
|
exe/Jet/CutFlow.hs
|
gpl-3.0
|
signalLH :: Map String Double
signalLH = M.fromList [("Gluino_LHStop_semileptonic", 1.5380866629110083e-3)]
| 107
|
signalLH :: Map String Double
signalLH = M.fromList [("Gluino_LHStop_semileptonic", 1.5380866629110083e-3)]
| 107
|
signalLH = M.fromList [("Gluino_LHStop_semileptonic", 1.5380866629110083e-3)]
| 77
| false
| true
| 0
| 7
| 9
| 30
| 16
| 14
| null | null |
olorin/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
|
mpl-2.0
|
-- | The root device name (for example, '\/dev\/sda1' or '\/dev\/xvda').
insRootDeviceName :: Lens' Instance (Maybe Text)
insRootDeviceName = lens _insRootDeviceName (\ s a -> s{_insRootDeviceName = a})
| 202
|
insRootDeviceName :: Lens' Instance (Maybe Text)
insRootDeviceName = lens _insRootDeviceName (\ s a -> s{_insRootDeviceName = a})
| 129
|
insRootDeviceName = lens _insRootDeviceName (\ s a -> s{_insRootDeviceName = a})
| 80
| true
| true
| 0
| 9
| 27
| 46
| 25
| 21
| null | null |
uduki/hsQt
|
Qtc/Enums/Gui/QPaintDevice.hs
|
bsd-2-clause
|
ePdmDpiX :: PaintDeviceMetric
ePdmDpiX
= iePaintDeviceMetric $ 7
| 66
|
ePdmDpiX :: PaintDeviceMetric
ePdmDpiX
= iePaintDeviceMetric $ 7
| 66
|
ePdmDpiX
= iePaintDeviceMetric $ 7
| 36
| false
| true
| 2
| 6
| 9
| 23
| 9
| 14
| null | null |
harrisi/on-being-better
|
list-expansion/Haskell/course/src/Course/MonadTutorial.hs
|
cc0-1.0
|
bindIntReaderFree ::
(a -> IntReaderFree b)
-> IntReaderFree a
-> IntReaderFree b
bindIntReaderFree f (IntReaderDone a) =
f a
| 133
|
bindIntReaderFree ::
(a -> IntReaderFree b)
-> IntReaderFree a
-> IntReaderFree b
bindIntReaderFree f (IntReaderDone a) =
f a
| 133
|
bindIntReaderFree f (IntReaderDone a) =
f a
| 45
| false
| true
| 0
| 10
| 26
| 50
| 23
| 27
| null | null |
ajnsit/react-flux
|
src/React/Flux/DOM.hs
|
bsd-3-clause
|
radialGradient_ :: Term eventHandler arg result => arg -> result; radialGradient_ = term "radialGradient"
| 105
|
radialGradient_ :: Term eventHandler arg result => arg -> result
radialGradient_ = term "radialGradient"
| 104
|
radialGradient_ = term "radialGradient"
| 39
| false
| true
| 0
| 6
| 13
| 30
| 15
| 15
| null | null |
mcnestrb/ShapeServer
|
app/Main.hs
|
bsd-3-clause
|
transformToTransformList (Translate vector) list = ((Translate vector):list)
| 76
|
transformToTransformList (Translate vector) list = ((Translate vector):list)
| 76
|
transformToTransformList (Translate vector) list = ((Translate vector):list)
| 76
| false
| false
| 0
| 8
| 6
| 30
| 15
| 15
| null | null |
traeger/fol-solver
|
Folsolver/Proofer.hs
|
gpl-3.0
|
conjecturesFromInput [] = []
| 28
|
conjecturesFromInput [] = []
| 28
|
conjecturesFromInput [] = []
| 28
| false
| false
| 0
| 6
| 3
| 13
| 6
| 7
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.