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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- * V1beta1StatefulSetCondition
-- | 'v1beta1StatefulSetConditionLastTransitionTime' Lens
v1beta1StatefulSetConditionLastTransitionTimeL :: Lens_' V1beta1StatefulSetCondition (Maybe DateTime)
v1beta1StatefulSetConditionLastTransitionTimeL f V1beta1StatefulSetCondition{..} = (\v1beta1StatefulSetConditionLastTransition... | 462 | v1beta1StatefulSetConditionLastTransitionTimeL :: Lens_' V1beta1StatefulSetCondition (Maybe DateTime)
v1beta1StatefulSetConditionLastTransitionTimeL f V1beta1StatefulSetCondition{..} = (\v1beta1StatefulSetConditionLastTransitionTime -> V1beta1StatefulSetCondition { v1beta1StatefulSetConditionLastTransitionTime, ..} ) <... | 370 | v1beta1StatefulSetConditionLastTransitionTimeL f V1beta1StatefulSetCondition{..} = (\v1beta1StatefulSetConditionLastTransitionTime -> V1beta1StatefulSetCondition { v1beta1StatefulSetConditionLastTransitionTime, ..} ) <$> f v1beta1StatefulSetConditionLastTransitionTime | 268 | true | true | 0 | 8 | 27 | 58 | 31 | 27 | null | null |
ygale/yesod | yesod-core/Yesod/Core/Handler.hs | mit | getMessage :: MonadHandler m => m (Maybe Html)
getMessage = do
mmsg <- liftM (fmap preEscapedToMarkup) $ lookupSession msgKey
deleteSession msgKey
return mmsg
-- | Bypass remaining handler code and output the given file.
--
-- For some backends, this is more efficient than reading in the file to
-- memory,... | 388 | getMessage :: MonadHandler m => m (Maybe Html)
getMessage = do
mmsg <- liftM (fmap preEscapedToMarkup) $ lookupSession msgKey
deleteSession msgKey
return mmsg
-- | Bypass remaining handler code and output the given file.
--
-- For some backends, this is more efficient than reading in the file to
-- memory,... | 388 | getMessage = do
mmsg <- liftM (fmap preEscapedToMarkup) $ lookupSession msgKey
deleteSession msgKey
return mmsg
-- | Bypass remaining handler code and output the given file.
--
-- For some backends, this is more efficient than reading in the file to
-- memory, since they can optimize file sending via a sys... | 341 | false | true | 0 | 12 | 75 | 72 | 32 | 40 | null | null |
ianthehenry/basilica | Mailer.hs | mit | emailForm :: Email -> [FormParam]
emailForm Email{..} = [ "to" := emailTo
, "from" := intercalate "" [emailFromName, " <", emailFromEmail, ">"]
, "h:Reply-To" := emailReplyTo
, "subject" := emailSubject
, "text" := emailBody
... | 336 | emailForm :: Email -> [FormParam]
emailForm Email{..} = [ "to" := emailTo
, "from" := intercalate "" [emailFromName, " <", emailFromEmail, ">"]
, "h:Reply-To" := emailReplyTo
, "subject" := emailSubject
, "text" := emailBody
... | 336 | emailForm Email{..} = [ "to" := emailTo
, "from" := intercalate "" [emailFromName, " <", emailFromEmail, ">"]
, "h:Reply-To" := emailReplyTo
, "subject" := emailSubject
, "text" := emailBody
] | 302 | false | true | 0 | 8 | 144 | 79 | 44 | 35 | null | null |
ml9951/ThreadScope | papers/haskell_symposium_2009/bsort/BSort.hs | bsd-3-clause | ilvN n r = ilv (ilvN (n-1) r) | 29 | ilvN n r = ilv (ilvN (n-1) r) | 29 | ilvN n r = ilv (ilvN (n-1) r) | 29 | false | false | 0 | 9 | 7 | 29 | 14 | 15 | null | null |
athanclark/cassowary-haskell | bench/Linear/Constraints/Data.hs | bsd-3-clause | ineqStd1 = standardForm $
ineqStdChunk1
.<=. ineqStdChunk2 | 81 | ineqStd1 = standardForm $
ineqStdChunk1
.<=. ineqStdChunk2 | 81 | ineqStd1 = standardForm $
ineqStdChunk1
.<=. ineqStdChunk2 | 81 | false | false | 0 | 6 | 29 | 14 | 7 | 7 | null | null |
CaptainPatate/xmonad-contrib | XMonad/Prompt.hs | bsd-3-clause | setCommand :: String -> XPState -> XPState
setCommand xs s = s { commandHistory = (commandHistory s) { W.focus = xs }} | 118 | setCommand :: String -> XPState -> XPState
setCommand xs s = s { commandHistory = (commandHistory s) { W.focus = xs }} | 118 | setCommand xs s = s { commandHistory = (commandHistory s) { W.focus = xs }} | 75 | false | true | 0 | 9 | 21 | 48 | 26 | 22 | null | null |
bergmark/feedtorrent | Main.hs | gpl-3.0 | -- | Prints error messages. For now it is only putStrLn.
displayError :: String -> IO ()
displayError = putStrLn | 112 | displayError :: String -> IO ()
displayError = putStrLn | 55 | displayError = putStrLn | 23 | true | true | 0 | 8 | 19 | 27 | 12 | 15 | null | null |
Dobiasd/Knapsack | src/Main.hs | mit | solveNaive :: Items -> Weight -> Result
solveNaive items = solveNaiveGo items 0 | 79 | solveNaive :: Items -> Weight -> Result
solveNaive items = solveNaiveGo items 0 | 79 | solveNaive items = solveNaiveGo items 0 | 39 | false | true | 0 | 6 | 12 | 27 | 13 | 14 | null | null |
creichert/disque.hs | src/Database/Disque.hs | bsd-3-clause | nfo' :: Disque (Either Reply ByteString)
info' = Disque $ sendRequest ["INFO"]
| 79 | info' :: Disque (Either Reply ByteString)
info' = Disque $ sendRequest ["INFO"] | 79 | info' = Disque $ sendRequest ["INFO"] | 37 | false | true | 1 | 7 | 12 | 35 | 16 | 19 | null | null |
jekor/vocabulink | hs/Vocabulink/CGI.hs | agpl-3.0 | bodyVarDefault name def' = fromMaybe def' `liftM` bodyVar name | 62 | bodyVarDefault name def' = fromMaybe def' `liftM` bodyVar name | 62 | bodyVarDefault name def' = fromMaybe def' `liftM` bodyVar name | 62 | false | false | 0 | 6 | 8 | 23 | 11 | 12 | null | null |
mcmaniac/ghc | compiler/llvmGen/LlvmCodeGen/Base.hs | bsd-3-clause | -- | Lookup functions in the environment.
funLookup :: Uniquable key => key -> LlvmEnv -> Maybe LlvmType
funLookup s (LlvmEnv (e1, _, _, _)) = {-# SCC "llvm_env_flookup" #-}
lookupUFM e1 s | 192 | funLookup :: Uniquable key => key -> LlvmEnv -> Maybe LlvmType
funLookup s (LlvmEnv (e1, _, _, _)) = {-# SCC "llvm_env_flookup" #-}
lookupUFM e1 s | 150 | funLookup s (LlvmEnv (e1, _, _, _)) = {-# SCC "llvm_env_flookup" #-}
lookupUFM e1 s | 87 | true | true | 0 | 8 | 36 | 59 | 31 | 28 | null | null |
aartifact/aartifact-verifier | src/ValidationSearch.hs | mit | ----------------------------------------------------------------
-- | Check that substitution actually captures all variables?
search :: [Name] -> [(Exp,Subst->Subst)] -> Exp -> Exp -> [Exp]
search ns gs e (App (C And) (T[e1,e2])) = search ns gs e e1 ++ search ns gs e e2 | 272 | search :: [Name] -> [(Exp,Subst->Subst)] -> Exp -> Exp -> [Exp]
search ns gs e (App (C And) (T[e1,e2])) = search ns gs e e1 ++ search ns gs e e2 | 144 | search ns gs e (App (C And) (T[e1,e2])) = search ns gs e e1 ++ search ns gs e e2 | 80 | true | true | 0 | 10 | 41 | 105 | 56 | 49 | null | null |
rahulmutt/ghcvm | compiler/Eta/CodeGen/Utils.hs | bsd-3-clause | cgLit (MachInt64 i) = (jlong, lconst $ fromIntegral i) | 62 | cgLit (MachInt64 i) = (jlong, lconst $ fromIntegral i) | 62 | cgLit (MachInt64 i) = (jlong, lconst $ fromIntegral i) | 62 | false | false | 0 | 7 | 16 | 28 | 14 | 14 | null | null |
abbradar/aeson | tests/Encoders.hs | bsd-3-clause | thSomeTypeParseJSON2ElemArray :: Value -> Parser (SomeType Int)
thSomeTypeParseJSON2ElemArray = $(mkParseJSON opts2ElemArray ''SomeType) | 136 | thSomeTypeParseJSON2ElemArray :: Value -> Parser (SomeType Int)
thSomeTypeParseJSON2ElemArray = $(mkParseJSON opts2ElemArray ''SomeType) | 136 | thSomeTypeParseJSON2ElemArray = $(mkParseJSON opts2ElemArray ''SomeType) | 72 | false | true | 0 | 8 | 11 | 35 | 17 | 18 | null | null |
amccausl/Swish | Swish/HaskellUtils/PartOrderedCollection.hs | lgpl-2.1 | ------------------------------------------------------------
-- Functions for minima and maxima of a part-ordered list
------------------------------------------------------------
-- |This function finds the maxima in a list of partially
-- ordered values, preserving the sequence of retained
-- values from th... | 1,003 | maxima :: PartCompare a -> [a] -> [a]
maxima cmp as = foldl add [] as
where
add [] e = [e]
add ms@(m:mr) e = case cmp m e of
Nothing -> m:(add mr e)
Just GT -> ms
Just EQ -> ms
Just LT -> add mr e
-- |This function finds the minima in a l... | 547 | maxima cmp as = foldl add [] as
where
add [] e = [e]
add ms@(m:mr) e = case cmp m e of
Nothing -> m:(add mr e)
Just GT -> ms
Just EQ -> ms
Just LT -> add mr e
-- |This function finds the minima in a list of partially
-- ordered values, ... | 509 | true | true | 0 | 12 | 267 | 155 | 85 | 70 | null | null |
DanielRS/marquee | app/Minimal.hs | mit | main :: IO ()
main = do
markdown <- T.readFile sourceMarkdown
let cst = renderCST markdown
ast = renderAST markdown
html = renderHtml . writeHtmlDocument "Minimal" (Just sourceCss) $ ast
putStrLn "\n-- GENERATED AST --\n"
mapM_ (putStrLn . show) cst
putStrLn "\n-- END OF AST --\n"
writeFile t... | 383 | main :: IO ()
main = do
markdown <- T.readFile sourceMarkdown
let cst = renderCST markdown
ast = renderAST markdown
html = renderHtml . writeHtmlDocument "Minimal" (Just sourceCss) $ ast
putStrLn "\n-- GENERATED AST --\n"
mapM_ (putStrLn . show) cst
putStrLn "\n-- END OF AST --\n"
writeFile t... | 383 | main = do
markdown <- T.readFile sourceMarkdown
let cst = renderCST markdown
ast = renderAST markdown
html = renderHtml . writeHtmlDocument "Minimal" (Just sourceCss) $ ast
putStrLn "\n-- GENERATED AST --\n"
mapM_ (putStrLn . show) cst
putStrLn "\n-- END OF AST --\n"
writeFile targetHtml html... | 369 | false | true | 0 | 14 | 85 | 122 | 55 | 67 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Assoc/PatriciaLoMap.hs | mit | partitionWithKey g (B p m t0 t1) =
let (t0',t0'') = partitionWithKey g t0
(t1',t1'') = partitionWithKey g t1
in (makeB p m t0' t1', makeB p m t0'' t1'') | 162 | partitionWithKey g (B p m t0 t1) =
let (t0',t0'') = partitionWithKey g t0
(t1',t1'') = partitionWithKey g t1
in (makeB p m t0' t1', makeB p m t0'' t1'') | 162 | partitionWithKey g (B p m t0 t1) =
let (t0',t0'') = partitionWithKey g t0
(t1',t1'') = partitionWithKey g t1
in (makeB p m t0' t1', makeB p m t0'' t1'') | 162 | false | false | 0 | 9 | 39 | 87 | 43 | 44 | null | null |
green-haskell/ghc | compiler/basicTypes/MkId.hs | bsd-3-clause | oneShotId :: Id -- See Note [The oneShot function]
oneShotId = pcMiscPrelId oneShotName ty info
where
info = noCafIdInfo `setInlinePragInfo` alwaysInlinePragma
`setUnfoldingInfo` mkCompulsoryUnfolding rhs
ty = mkForAllTys [alphaTyVar, betaTyVar] (mkFunTy fun_ty fun_ty)
fun_ty = mk... | 576 | oneShotId :: Id
oneShotId = pcMiscPrelId oneShotName ty info
where
info = noCafIdInfo `setInlinePragInfo` alwaysInlinePragma
`setUnfoldingInfo` mkCompulsoryUnfolding rhs
ty = mkForAllTys [alphaTyVar, betaTyVar] (mkFunTy fun_ty fun_ty)
fun_ty = mkFunTy alphaTy betaTy
[body, x] ... | 541 | oneShotId = pcMiscPrelId oneShotName ty info
where
info = noCafIdInfo `setInlinePragInfo` alwaysInlinePragma
`setUnfoldingInfo` mkCompulsoryUnfolding rhs
ty = mkForAllTys [alphaTyVar, betaTyVar] (mkFunTy fun_ty fun_ty)
fun_ty = mkFunTy alphaTy betaTy
[body, x] = mkTemplateLoca... | 525 | true | true | 5 | 10 | 113 | 141 | 78 | 63 | null | null |
KommuSoft/vty-ui | src/Graphics/Vty/Widgets/Edit.hs | bsd-3-clause | indicatorChar :: Char
indicatorChar = '$' | 41 | indicatorChar :: Char
indicatorChar = '$' | 41 | indicatorChar = '$' | 19 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Centril/DATX02-17-26 | libsrc/Util/Debug.hs | gpl-2.0 | -- | Partial function for extracting the Right value of an Either.
fromRight :: Either e a -> a
fromRight = either undefined id | 127 | fromRight :: Either e a -> a
fromRight = either undefined id | 60 | fromRight = either undefined id | 31 | true | true | 0 | 6 | 23 | 26 | 13 | 13 | null | null |
olorin/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/CreateLaunchConfiguration.hs | mpl-2.0 | -- | Creates a value of 'CreateLaunchConfiguration' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'clcInstanceId'
--
-- * 'clcAssociatePublicIPAddress'
--
-- * 'clcSecurityGroups'
--
-- * 'clcSpotPrice'
--
-- * 'clcInstanceMonitoring... | 1,536 | createLaunchConfiguration
:: Text -- ^ 'clcLaunchConfigurationName'
-> CreateLaunchConfiguration
createLaunchConfiguration pLaunchConfigurationName_ =
CreateLaunchConfiguration'
{ _clcInstanceId = Nothing
, _clcAssociatePublicIPAddress = Nothing
, _clcSecurityGroups = Nothing
, _clcSpotPrice... | 849 | createLaunchConfiguration pLaunchConfigurationName_ =
CreateLaunchConfiguration'
{ _clcInstanceId = Nothing
, _clcAssociatePublicIPAddress = Nothing
, _clcSecurityGroups = Nothing
, _clcSpotPrice = Nothing
, _clcInstanceMonitoring = Nothing
, _clcKeyName = Nothing
, _clcClassicLinkVPCSec... | 744 | true | true | 0 | 6 | 274 | 168 | 122 | 46 | null | null |
themattchan/core | src/Core/Parser.hs | mit | operator = P.operator coreLexer | 34 | operator = P.operator coreLexer | 34 | operator = P.operator coreLexer | 34 | false | false | 1 | 6 | 6 | 14 | 5 | 9 | null | null |
noinia/hsync-server | src/HSync/Server/LocalAuth.hs | bsd-3-clause | registerForm :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m)
=> Html -> MForm m (FormResult RegisterUser, WidgetT (HandlerSite m) IO ())
registerForm = renderDivs $ do mkUser
<$> areq userNameField "userName" Nothing
<*> areq textField "rea... | 585 | registerForm :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m)
=> Html -> MForm m (FormResult RegisterUser, WidgetT (HandlerSite m) IO ())
registerForm = renderDivs $ do mkUser
<$> areq userNameField "userName" Nothing
<*> areq textField "rea... | 585 | registerForm = renderDivs $ do mkUser
<$> areq userNameField "userName" Nothing
<*> areq textField "realName" Nothing
<*> areq passwordField "password" Nothing
where
mkUser n rn p = RegisterUser n (RealName rn) (hashPassword $ Password p)... | 420 | false | true | 0 | 11 | 155 | 147 | 72 | 75 | null | null |
rahulmutt/ghcvm | libraries/eta-meta/Language/Eta/Meta/Ppr.hs | bsd-3-clause | -- Takes a list of things and prints them with the given pretty-printing
-- function, separated by commas followed by space.
commaSepWith :: (a -> Doc) -> [a] -> Doc
commaSepWith pprFun = sep . punctuate comma . map pprFun | 222 | commaSepWith :: (a -> Doc) -> [a] -> Doc
commaSepWith pprFun = sep . punctuate comma . map pprFun | 97 | commaSepWith pprFun = sep . punctuate comma . map pprFun | 56 | true | true | 2 | 8 | 39 | 56 | 26 | 30 | null | null |
intolerable/reddit | src/Reddit/Routes/Captcha.hs | bsd-2-clause | getCaptcha :: CaptchaID -> Route
getCaptcha (CaptchaID c) =
Route [ "captcha", c ]
[ ]
"GET" | 110 | getCaptcha :: CaptchaID -> Route
getCaptcha (CaptchaID c) =
Route [ "captcha", c ]
[ ]
"GET" | 110 | getCaptcha (CaptchaID c) =
Route [ "captcha", c ]
[ ]
"GET" | 77 | false | true | 0 | 9 | 34 | 47 | 21 | 26 | null | null |
sdiehl/ghc | compiler/GHC/Hs/Extension.hs | bsd-3-clause | noExtCon :: NoExtCon -> a
noExtCon x = case x of {} | 51 | noExtCon :: NoExtCon -> a
noExtCon x = case x of {} | 51 | noExtCon x = case x of {} | 25 | false | true | 0 | 5 | 11 | 24 | 13 | 11 | null | null |
kojiromike/Idris-dev | src/IRTS/LangOpts.hs | bsd-3-clause | eval stk env rec defs (LCase ty e alts)
= do e' <- eval [] env rec defs e
case evalAlts e' alts of
Just (env', tm) -> eval stk env' rec defs tm
Nothing ->
do alts' <- mapM (evalAlt stk env rec defs) alts
-- If they're all lambdas, bind the lamb... | 1,120 | eval stk env rec defs (LCase ty e alts)
= do e' <- eval [] env rec defs e
case evalAlts e' alts of
Just (env', tm) -> eval stk env' rec defs tm
Nothing ->
do alts' <- mapM (evalAlt stk env rec defs) alts
-- If they're all lambdas, bind the lamb... | 1,120 | eval stk env rec defs (LCase ty e alts)
= do e' <- eval [] env rec defs e
case evalAlts e' alts of
Just (env', tm) -> eval stk env' rec defs tm
Nothing ->
do alts' <- mapM (evalAlt stk env rec defs) alts
-- If they're all lambdas, bind the lamb... | 1,120 | false | false | 0 | 23 | 453 | 451 | 217 | 234 | null | null |
bendmorris/scotch | Scotch/Types/Show.hs | gpl-3.0 | formatString (h:t) = if h == '"' then "\\\"" ++ formatString t
else h : formatString t | 107 | formatString (h:t) = if h == '"' then "\\\"" ++ formatString t
else h : formatString t | 107 | formatString (h:t) = if h == '"' then "\\\"" ++ formatString t
else h : formatString t | 107 | false | false | 0 | 7 | 37 | 42 | 21 | 21 | null | null |
TomMD/ghc | compiler/types/InstEnv.hs | bsd-3-clause | instanceHead :: ClsInst -> ([TyVar], Class, [Type])
-- Returns the head, using the fresh tyavs from the ClsInst
instanceHead (ClsInst { is_tvs = tvs, is_tys = tys, is_dfun = dfun })
= (tvs, cls, tys)
where
(_, _, cls, _) = tcSplitDFunTy (idType dfun) | 261 | instanceHead :: ClsInst -> ([TyVar], Class, [Type])
instanceHead (ClsInst { is_tvs = tvs, is_tys = tys, is_dfun = dfun })
= (tvs, cls, tys)
where
(_, _, cls, _) = tcSplitDFunTy (idType dfun) | 201 | instanceHead (ClsInst { is_tvs = tvs, is_tys = tys, is_dfun = dfun })
= (tvs, cls, tys)
where
(_, _, cls, _) = tcSplitDFunTy (idType dfun) | 149 | true | true | 0 | 9 | 54 | 96 | 57 | 39 | null | null |
rueshyna/gogol | gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ConfigFile' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cfContent'
configFile
:: ConfigFile
configFile =
ConfigFile'
{ _cfContent = Nothing
} | 272 | configFile
:: ConfigFile
configFile =
ConfigFile'
{ _cfContent = Nothing
} | 90 | configFile =
ConfigFile'
{ _cfContent = Nothing
} | 61 | true | true | 0 | 6 | 60 | 24 | 16 | 8 | null | null |
alanz/htelehash | src/Network/TeleHash/SwitchApi.hs | bsd-3-clause | hn_nat_punch :: HashName -> String -> String -> TeleHash ()
hn_nat_punch hn ipStr portStr = do
logT $ "peer_send:must still send NAT punch to" ++ show (ipStr,portStr)
let punch = packet_new hn
path = PathIPv4 (read ipStr) (read portStr)
punch2 = punch { tOut = PIPv4 path }
punch3 = punch2 { tLp = ... | 602 | hn_nat_punch :: HashName -> String -> String -> TeleHash ()
hn_nat_punch hn ipStr portStr = do
logT $ "peer_send:must still send NAT punch to" ++ show (ipStr,portStr)
let punch = packet_new hn
path = PathIPv4 (read ipStr) (read portStr)
punch2 = punch { tOut = PIPv4 path }
punch3 = punch2 { tLp = ... | 602 | hn_nat_punch hn ipStr portStr = do
logT $ "peer_send:must still send NAT punch to" ++ show (ipStr,portStr)
let punch = packet_new hn
path = PathIPv4 (read ipStr) (read portStr)
punch2 = punch { tOut = PIPv4 path }
punch3 = punch2 { tLp = Just (toLinePacket newPacket) }
void $ path_get hn (PIPv4 ... | 542 | false | true | 0 | 14 | 108 | 155 | 78 | 77 | null | null |
nlim/portfolio-quote | src/HtmlParsing.hs | mit | isDataClass :: (Show a) => a -> Bool
isDataClass t = s == "\"yfnc_tabledata1\"" where
s = show t | 102 | isDataClass :: (Show a) => a -> Bool
isDataClass t = s == "\"yfnc_tabledata1\"" where
s = show t | 100 | isDataClass t = s == "\"yfnc_tabledata1\"" where
s = show t | 63 | false | true | 0 | 7 | 24 | 41 | 21 | 20 | null | null |
GaloisInc/tower | tower-aadl/src/Tower/AADL/Render.hs | bsd-3-clause | renderInput :: Input -> Doc
renderInput rx = stmt
$ mkRxChan (inputLabel rx) <> colon
<+> text "in"
<+> edp
<+> renderTypeNS Other (inputType rx)
<$$> chanSrc (vsep $ entry : src ++ snds ++ queue ++ sndsEvents)
where
(fps, syms) = unzip $ inputCallback rx
entry = renderEntryPoint syms
src = if emptyS... | 691 | renderInput :: Input -> Doc
renderInput rx = stmt
$ mkRxChan (inputLabel rx) <> colon
<+> text "in"
<+> edp
<+> renderTypeNS Other (inputType rx)
<$$> chanSrc (vsep $ entry : src ++ snds ++ queue ++ sndsEvents)
where
(fps, syms) = unzip $ inputCallback rx
entry = renderEntryPoint syms
src = if emptyS... | 691 | renderInput rx = stmt
$ mkRxChan (inputLabel rx) <> colon
<+> text "in"
<+> edp
<+> renderTypeNS Other (inputType rx)
<$$> chanSrc (vsep $ entry : src ++ snds ++ queue ++ sndsEvents)
where
(fps, syms) = unzip $ inputCallback rx
entry = renderEntryPoint syms
src = if emptyStrs fps then []
el... | 663 | false | true | 8 | 11 | 179 | 248 | 123 | 125 | null | null |
fffej/Yahtzee | src/Game/Yahtzee/Player.hs | bsd-2-clause | {-
The better player
-- chooses the best roll based on the average score they'll get
-- holds only the things that contribute to the roll and tries again
-}
betterPlayer :: Player
betterPlayer = Player
{
chooseScore = chooseBest
, chooseInitialHolds = holdContributors
, chooseFinalHolds = holdContributo... | 326 | betterPlayer :: Player
betterPlayer = Player
{
chooseScore = chooseBest
, chooseInitialHolds = holdContributors
, chooseFinalHolds = holdContributors
} | 163 | betterPlayer = Player
{
chooseScore = chooseBest
, chooseInitialHolds = holdContributors
, chooseFinalHolds = holdContributors
} | 140 | true | true | 0 | 7 | 66 | 36 | 21 | 15 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1684 = 1683 | 11 | 1684 = 1683 | 11 | 1684 = 1683 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ddssff/pandoc | src/Text/Pandoc/Writers/AsciiDoc.hs | gpl-2.0 | inlineToAsciiDoc opts (Image alternate (src, tit)) = do
-- image:images/logo.png[Company logo, title="blah"]
let txt = if (null alternate) || (alternate == [Str ""])
then [Str "image"]
else alternate
linktext <- inlineListToAsciiDoc opts txt
let linktitle = if null tit
... | 468 | inlineToAsciiDoc opts (Image alternate (src, tit)) = do
-- image:images/logo.png[Company logo, title="blah"]
let txt = if (null alternate) || (alternate == [Str ""])
then [Str "image"]
else alternate
linktext <- inlineListToAsciiDoc opts txt
let linktitle = if null tit
... | 468 | inlineToAsciiDoc opts (Image alternate (src, tit)) = do
-- image:images/logo.png[Company logo, title="blah"]
let txt = if (null alternate) || (alternate == [Str ""])
then [Str "image"]
else alternate
linktext <- inlineListToAsciiDoc opts txt
let linktitle = if null tit
... | 468 | false | false | 0 | 15 | 142 | 146 | 73 | 73 | null | null |
nebuta/dom-selector | examples/example2.hs | bsd-3-clause | axes :: [Axis]
axes = map queryT [
[jq| ul > li|]
, [jq| div div li|]
, [jq| ul|]
, [jq| ul + ul|]
, [jq| li.Japan ~ li|]
, [jq| [marked] |]
, [jq| li[favorite='1'] |]
] ++
map query ["ul > li", "div div li"] | 226 | axes :: [Axis]
axes = map queryT [
[jq| ul > li|]
, [jq| div div li|]
, [jq| ul|]
, [jq| ul + ul|]
, [jq| li.Japan ~ li|]
, [jq| [marked] |]
, [jq| li[favorite='1'] |]
] ++
map query ["ul > li", "div div li"] | 226 | axes = map queryT [
[jq| ul > li|]
, [jq| div div li|]
, [jq| ul|]
, [jq| ul + ul|]
, [jq| li.Japan ~ li|]
, [jq| [marked] |]
, [jq| li[favorite='1'] |]
] ++
map query ["ul > li", "div div li"] | 211 | false | true | 2 | 7 | 65 | 92 | 61 | 31 | null | null |
jberryman/shapely-data | test/Main.hs | bsd-3-clause | mb_1 :: Either (String,(Char,())) ()
mb_1 = massageNormal () | 60 | mb_1 :: Either (String,(Char,())) ()
mb_1 = massageNormal () | 60 | mb_1 = massageNormal () | 23 | false | true | 0 | 8 | 8 | 37 | 20 | 17 | null | null |
lisphacker/codewars | MoleculeToAtoms.hs | bsd-2-clause | unpack (Element s) = s | 22 | unpack (Element s) = s | 22 | unpack (Element s) = s | 22 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
sifmelcara/pgdl | src/DList.hs | unlicense | renderDList :: DList -> (Bool -> DNode -> T.Widget String) -> T.Widget String
renderDList (DList sDn (x:_)) render = L.renderList render True actualList
where
actualList = x & listElementsL %~ V.map (S.index sDn) | 220 | renderDList :: DList -> (Bool -> DNode -> T.Widget String) -> T.Widget String
renderDList (DList sDn (x:_)) render = L.renderList render True actualList
where
actualList = x & listElementsL %~ V.map (S.index sDn) | 220 | renderDList (DList sDn (x:_)) render = L.renderList render True actualList
where
actualList = x & listElementsL %~ V.map (S.index sDn) | 142 | false | true | 0 | 11 | 40 | 98 | 48 | 50 | null | null |
amulcahy/LambdaMC | src/LambdaMC.hs | mit | onBtnClk3 :: JNIEnv
-> JObject
-> JObject
-> IO ()
onBtnClk3 env activity view = runJNI env $ do
getOutputText activity >>= clipboardSaveText activity
getStringById activity "copyMsg" >>= toastShow activity | 241 | onBtnClk3 :: JNIEnv
-> JObject
-> JObject
-> IO ()
onBtnClk3 env activity view = runJNI env $ do
getOutputText activity >>= clipboardSaveText activity
getStringById activity "copyMsg" >>= toastShow activity | 241 | onBtnClk3 env activity view = runJNI env $ do
getOutputText activity >>= clipboardSaveText activity
getStringById activity "copyMsg" >>= toastShow activity | 160 | false | true | 0 | 10 | 64 | 75 | 32 | 43 | null | null |
nkpart/score-writer | src/Score/Prelude.hs | bsd-3-clause | rest16 = restn (1/16) | 21 | rest16 = restn (1/16) | 21 | rest16 = restn (1/16) | 21 | false | false | 1 | 7 | 3 | 19 | 8 | 11 | null | null |
limaner2002/EPC-tools | USACScripts/src/Scripts/ReviewCommon.hs | bsd-3-clause | appealSolix2017 :: ReviewBaseConf
appealSolix2017 = ReviewBaseConf RevAppeals RevSolix FY2017 | 93 | appealSolix2017 :: ReviewBaseConf
appealSolix2017 = ReviewBaseConf RevAppeals RevSolix FY2017 | 93 | appealSolix2017 = ReviewBaseConf RevAppeals RevSolix FY2017 | 59 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
RefactoringTools/HaRe | old/testing/evalAddEvalMon/Scope1_TokOut.hs | bsd-3-clause | -- should fail, as there are two possible qualifiers...
f x = let (n1, n22_2)
= S.runEval
(do n1' <- S.rpar n11
n22_2 <- S.rpar n22
return (n1', n22_2))
in n1 + n22_2
where
n11 = f (x+1)
n22 = f (x+2... | 321 | f x = let (n1, n22_2)
= S.runEval
(do n1' <- S.rpar n11
n22_2 <- S.rpar n22
return (n1', n22_2))
in n1 + n22_2
where
n11 = f (x+1)
n22 = f (x+2) | 264 | f x = let (n1, n22_2)
= S.runEval
(do n1' <- S.rpar n11
n22_2 <- S.rpar n22
return (n1', n22_2))
in n1 + n22_2
where
n11 = f (x+1)
n22 = f (x+2) | 264 | true | false | 0 | 15 | 162 | 108 | 53 | 55 | null | null |
begriffs/hscope | HScope.hs | bsd-3-clause | handleQuery cdb ('3':str) = findInfo Call cdb str | 49 | handleQuery cdb ('3':str) = findInfo Call cdb str | 49 | handleQuery cdb ('3':str) = findInfo Call cdb str | 49 | false | false | 0 | 7 | 7 | 25 | 12 | 13 | null | null |
gilith/hol | src/HOL/Theory.hs | mit | -------------------------------------------------------------------------------
-- Constructors and destructors
-------------------------------------------------------------------------------
empty :: Theory
empty = Theory {typeOpMap = Map.empty, constMap = Map.empty, thmMap = Map.empty} | 289 | empty :: Theory
empty = Theory {typeOpMap = Map.empty, constMap = Map.empty, thmMap = Map.empty} | 96 | empty = Theory {typeOpMap = Map.empty, constMap = Map.empty, thmMap = Map.empty} | 80 | true | true | 0 | 7 | 21 | 40 | 25 | 15 | null | null |
alray2569/SoundChange | Condition.hs | mit | applicable (IfNot cond) sgs str pos =
not $ applicable (If cond) sgs str pos | 78 | applicable (IfNot cond) sgs str pos =
not $ applicable (If cond) sgs str pos | 78 | applicable (IfNot cond) sgs str pos =
not $ applicable (If cond) sgs str pos | 78 | false | false | 2 | 7 | 16 | 41 | 19 | 22 | null | null |
rahulmutt/ghcvm | compiler/Eta/TypeCheck/TcType.hs | bsd-3-clause | isTauTy (AppTy a b) = isTauTy a && isTauTy b | 50 | isTauTy (AppTy a b) = isTauTy a && isTauTy b | 50 | isTauTy (AppTy a b) = isTauTy a && isTauTy b | 50 | false | false | 0 | 6 | 15 | 28 | 12 | 16 | null | null |
phischu/fragnix | tests/packages/scotty/Data.IntSet.Internal.hs | bsd-3-clause | {--------------------------------------------------------------------
Big endian operations
--------------------------------------------------------------------}
maskW :: Nat -> Nat -> Prefix
maskW i m
= intFromNat (i .&. (complement (m-1) `xor` m)) | 253 | maskW :: Nat -> Nat -> Prefix
maskW i m
= intFromNat (i .&. (complement (m-1) `xor` m)) | 89 | maskW i m
= intFromNat (i .&. (complement (m-1) `xor` m)) | 59 | true | true | 0 | 12 | 26 | 58 | 30 | 28 | null | null |
kojiromike/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | showDeclImp o (PImplementation _ _ _ _ cs _ acc _ n _ _ _ t _ ds)
= text "implementation" <+> text (show cs) <+> text (show n) <+> prettyImp o t <> line <> showDecls o ds | 173 | showDeclImp o (PImplementation _ _ _ _ cs _ acc _ n _ _ _ t _ ds)
= text "implementation" <+> text (show cs) <+> text (show n) <+> prettyImp o t <> line <> showDecls o ds | 173 | showDeclImp o (PImplementation _ _ _ _ cs _ acc _ n _ _ _ t _ ds)
= text "implementation" <+> text (show cs) <+> text (show n) <+> prettyImp o t <> line <> showDecls o ds | 173 | false | false | 2 | 11 | 41 | 99 | 45 | 54 | null | null |
tphyahoo/haskoin | haskoin-node/Network/Haskoin/Node/STM.hs | unlicense | withNodeT :: (MonadIO m, MonadLogger m)
=> FilePath
-> L.Options
-> NodeT m a
-> m a
withNodeT fp opts action = flip runNodeT action =<< getNodeState fp opts | 197 | withNodeT :: (MonadIO m, MonadLogger m)
=> FilePath
-> L.Options
-> NodeT m a
-> m a
withNodeT fp opts action = flip runNodeT action =<< getNodeState fp opts | 197 | withNodeT fp opts action = flip runNodeT action =<< getNodeState fp opts | 72 | false | true | 0 | 10 | 68 | 73 | 34 | 39 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | The list of custom floodlight variables the report should include.
rptccCustomFloodlightVariables :: Lens' ReportPathToConversionCriteria [SortedDimension]
rptccCustomFloodlightVariables
= lens _rptccCustomFloodlightVariables
(\ s a -> s{_rptccCustomFloodlightVariables = a})
. _Default
. _Coerc... | 321 | rptccCustomFloodlightVariables :: Lens' ReportPathToConversionCriteria [SortedDimension]
rptccCustomFloodlightVariables
= lens _rptccCustomFloodlightVariables
(\ s a -> s{_rptccCustomFloodlightVariables = a})
. _Default
. _Coerce | 249 | rptccCustomFloodlightVariables
= lens _rptccCustomFloodlightVariables
(\ s a -> s{_rptccCustomFloodlightVariables = a})
. _Default
. _Coerce | 160 | true | true | 0 | 11 | 51 | 51 | 28 | 23 | null | null |
perryleo/sicp | ch1/sicpc1e26.hs | mit | -- Test a number is a prime or not. Here we do fermat-test 20 times for
-- each number n. You can modify the number as you like.
isPrime n =
fastPrime n 20 $ mkStdGen 0 | 170 | isPrime n =
fastPrime n 20 $ mkStdGen 0 | 41 | isPrime n =
fastPrime n 20 $ mkStdGen 0 | 41 | true | false | 0 | 6 | 38 | 23 | 11 | 12 | null | null |
ksaveljev/hake-2 | src/Constants.hs | bsd-3-clause | -- RAFAEL
mzIonRipper = 16 :: Int | 41 | mzIonRipper = 16 :: Int | 31 | mzIonRipper = 16 :: Int | 31 | true | false | 0 | 4 | 14 | 10 | 6 | 4 | null | null |
alanz/Blobs | src/Graphics/Blobs/Colors.hs | lgpl-2.1 | lightGreen = RGB 144 238 144 | 28 | lightGreen = RGB 144 238 144 | 28 | lightGreen = RGB 144 238 144 | 28 | false | false | 1 | 5 | 5 | 19 | 6 | 13 | null | null |
jacendfeng/OpenJDK-7U-Research | src/macosx/native/jobjc/src/core/PrimitiveCoder.hs | gpl-2.0 | sizeof SINT64 = 8 | 17 | sizeof SINT64 = 8 | 17 | sizeof SINT64 = 8 | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sboosali/Earley | examples/OrderedResults.hs | bsd-3-clause | (<=>) :: e -> Prod r e t a -> Prod r e t a
(<=>) = flip (<?>) | 61 | (<=>) :: e -> Prod r e t a -> Prod r e t a
(<=>) = flip (<?>) | 61 | (<=>) = flip (<?>) | 18 | false | true | 0 | 7 | 18 | 46 | 25 | 21 | null | null |
jmitchell/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | safeForgetEnv env (Bind n b sc)
= do let n' = uniqueName n env
b' <- safeForgetEnvB env b
sc' <- safeForgetEnv (n':env) sc
Just $ RBind n' b' sc'
where safeForgetEnvB env (Let t v) = liftM2 Let (safeForgetEnv env t)
(safeForgetEnv en... | 608 | safeForgetEnv env (Bind n b sc)
= do let n' = uniqueName n env
b' <- safeForgetEnvB env b
sc' <- safeForgetEnv (n':env) sc
Just $ RBind n' b' sc'
where safeForgetEnvB env (Let t v) = liftM2 Let (safeForgetEnv env t)
(safeForgetEnv en... | 608 | safeForgetEnv env (Bind n b sc)
= do let n' = uniqueName n env
b' <- safeForgetEnvB env b
sc' <- safeForgetEnv (n':env) sc
Just $ RBind n' b' sc'
where safeForgetEnvB env (Let t v) = liftM2 Let (safeForgetEnv env t)
(safeForgetEnv en... | 608 | false | false | 0 | 10 | 267 | 214 | 100 | 114 | null | null |
Chrisr850/Villefort | src/Villefort/Util.hs | bsd-3-clause | makeRow :: [String] -> String
makeRow x = "<tr> <th>" ++ (intercalate "</th> <th> " x )++ "</th> </tr>" | 106 | makeRow :: [String] -> String
makeRow x = "<tr> <th>" ++ (intercalate "</th> <th> " x )++ "</th> </tr>" | 106 | makeRow x = "<tr> <th>" ++ (intercalate "</th> <th> " x )++ "</th> </tr>" | 76 | false | true | 2 | 7 | 21 | 44 | 20 | 24 | null | null |
j-a-k/suppr | app/Main.hs | bsd-3-clause | -- | render the Tables to a hastache template
render :: String -> Tables -> IO TL.Text
render template = hastacheStr defaultConfig (encodeStr template) . mkGenericContext | 170 | render :: String -> Tables -> IO TL.Text
render template = hastacheStr defaultConfig (encodeStr template) . mkGenericContext | 124 | render template = hastacheStr defaultConfig (encodeStr template) . mkGenericContext | 83 | true | true | 0 | 8 | 25 | 43 | 21 | 22 | null | null |
tpsinnem/Idris-dev | src/Idris/Core/ProofTerm.hs | bsd-3-clause | updateSolvedPath ns (InScope n b sc)
= InScope n (fmap (updateSolvedTerm ns) b) (updateSolvedPath ns sc) | 108 | updateSolvedPath ns (InScope n b sc)
= InScope n (fmap (updateSolvedTerm ns) b) (updateSolvedPath ns sc) | 108 | updateSolvedPath ns (InScope n b sc)
= InScope n (fmap (updateSolvedTerm ns) b) (updateSolvedPath ns sc) | 108 | false | false | 0 | 9 | 19 | 50 | 24 | 26 | null | null |
tnrangwi/grill | demo/demo_calc_trees.hs | mit | -- Fixme: How to treat different input types accordingly?
-- | Test all functions implemented currently. FIXME: There should be a unit test instead.
main :: IO ()
main = do
print "Evaluating raw formula tree"
let rawtree = T.Funcall (T.NamedFunction "add" NumFuncs.add) [T.Raw (P.PlInt 1), T.Raw (P.PlInt 2)]
prin... | 1,082 | main :: IO ()
main = do
print "Evaluating raw formula tree"
let rawtree = T.Funcall (T.NamedFunction "add" NumFuncs.add) [T.Raw (P.PlInt 1), T.Raw (P.PlInt 2)]
print (Eval.calcTree rawtree)
print "Done!"
print "Compiling and evaluating add tree with int - should give 6"
print . Eval.calcTree . Parse.compil... | 932 | main = do
print "Evaluating raw formula tree"
let rawtree = T.Funcall (T.NamedFunction "add" NumFuncs.add) [T.Raw (P.PlInt 1), T.Raw (P.PlInt 2)]
print (Eval.calcTree rawtree)
print "Done!"
print "Compiling and evaluating add tree with int - should give 6"
print . Eval.calcTree . Parse.compileTree $ "(add ... | 918 | true | true | 0 | 16 | 196 | 241 | 107 | 134 | null | null |
DavidAlphaFox/ghc | libraries/containers/Data/IntSet/Base.hs | bsd-3-clause | findMin (Bin _ m l r)
| m < 0 = find r
| otherwise = find l
where find (Tip kx bm) = kx + lowestBitSet bm
find (Bin _ _ l' _) = find l'
find Nil = error "findMin Nil"
-- | /O(min(n,W))/. The maximal element of a set. | 260 | findMin (Bin _ m l r)
| m < 0 = find r
| otherwise = find l
where find (Tip kx bm) = kx + lowestBitSet bm
find (Bin _ _ l' _) = find l'
find Nil = error "findMin Nil"
-- | /O(min(n,W))/. The maximal element of a set. | 260 | findMin (Bin _ m l r)
| m < 0 = find r
| otherwise = find l
where find (Tip kx bm) = kx + lowestBitSet bm
find (Bin _ _ l' _) = find l'
find Nil = error "findMin Nil"
-- | /O(min(n,W))/. The maximal element of a set. | 260 | false | false | 3 | 8 | 95 | 103 | 49 | 54 | null | null |
dolio/vector | Data/Vector/Unboxed.hs | bsd-3-clause | indexed = G.indexed | 19 | indexed = G.indexed | 19 | indexed = G.indexed | 19 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
poiuj/pfcc | src/Codegen.hs | bsd-3-clause | sdiv :: Operand -> Operand -> Instruction
sdiv op1 op2 = Instruction.SDiv False op1 op2 [] | 90 | sdiv :: Operand -> Operand -> Instruction
sdiv op1 op2 = Instruction.SDiv False op1 op2 [] | 90 | sdiv op1 op2 = Instruction.SDiv False op1 op2 [] | 48 | false | true | 0 | 8 | 15 | 42 | 19 | 23 | null | null |
ouanixi/order-deps | src/Main.hs | gpl-3.0 | main :: IO ()
main = do
-- Get JSON data and decode it
d <- (eitherDecode <$> B.getContents) :: IO (Either String [ASTId])
case d of
Left err -> putStrLn err
Right ps -> print $ stronglyConnComp $ map extractGraphable ps | 227 | main :: IO ()
main = do
-- Get JSON data and decode it
d <- (eitherDecode <$> B.getContents) :: IO (Either String [ASTId])
case d of
Left err -> putStrLn err
Right ps -> print $ stronglyConnComp $ map extractGraphable ps | 227 | main = do
-- Get JSON data and decode it
d <- (eitherDecode <$> B.getContents) :: IO (Either String [ASTId])
case d of
Left err -> putStrLn err
Right ps -> print $ stronglyConnComp $ map extractGraphable ps | 213 | false | true | 1 | 13 | 48 | 91 | 44 | 47 | null | null |
sdiehl/ghc | compiler/main/ErrUtils.hs | bsd-3-clause | printBagOfErrors :: DynFlags -> Bag ErrMsg -> IO ()
printBagOfErrors dflags bag_of_errors
= sequence_ [ let style = mkErrStyle dflags unqual
in putLogMsg dflags reason sev s style (formatErrDoc dflags doc)
| ErrMsg { errMsgSpan = s,
errMsgDoc = doc,
... | 578 | printBagOfErrors :: DynFlags -> Bag ErrMsg -> IO ()
printBagOfErrors dflags bag_of_errors
= sequence_ [ let style = mkErrStyle dflags unqual
in putLogMsg dflags reason sev s style (formatErrDoc dflags doc)
| ErrMsg { errMsgSpan = s,
errMsgDoc = doc,
... | 578 | printBagOfErrors dflags bag_of_errors
= sequence_ [ let style = mkErrStyle dflags unqual
in putLogMsg dflags reason sev s style (formatErrDoc dflags doc)
| ErrMsg { errMsgSpan = s,
errMsgDoc = doc,
errMsgSeverity = sev,
... | 526 | false | true | 0 | 11 | 270 | 127 | 65 | 62 | null | null |
purcell/vm5294 | src/Eval.hs | mit | eval (JGZ count) = jumpWhenA (> 0) count | 43 | eval (JGZ count) = jumpWhenA (> 0) count | 43 | eval (JGZ count) = jumpWhenA (> 0) count | 43 | false | false | 0 | 6 | 10 | 25 | 12 | 13 | null | null |
luisgepeto/HaskellLearning | 08 Own Types/04_derived_instances.hs | mit | person3 = Person {firstName = "Adam", lastName = "Yauch", age = 44} | 67 | person3 = Person {firstName = "Adam", lastName = "Yauch", age = 44} | 67 | person3 = Person {firstName = "Adam", lastName = "Yauch", age = 44} | 67 | false | false | 1 | 6 | 11 | 29 | 16 | 13 | null | null |
m4dc4p/haskelldb | test/old/th-field-test.hs | bsd-3-clause | test db = do
rs <- query db q
print rs | 44 | test db = do
rs <- query db q
print rs | 44 | test db = do
rs <- query db q
print rs | 44 | false | false | 0 | 8 | 16 | 27 | 11 | 16 | null | null |
toothbrush/diaspec | src/Diaspec/JTypeUtils.hs | gpl-3.0 | deployMethod nm v init =
methodDecl (modifs init)
(Just (RefType
(classRef [(Ident$"Abstract"++nm,[])])))
("get"++nm++"Instance") []
(impl init)
where impl True = stmts [BlockStmt (Return (Just (varAccess v)))]
impl False = Nothing
modifs True = [Public]
modifs False = ... | 338 | deployMethod nm v init =
methodDecl (modifs init)
(Just (RefType
(classRef [(Ident$"Abstract"++nm,[])])))
("get"++nm++"Instance") []
(impl init)
where impl True = stmts [BlockStmt (Return (Just (varAccess v)))]
impl False = Nothing
modifs True = [Public]
modifs False = ... | 338 | deployMethod nm v init =
methodDecl (modifs init)
(Just (RefType
(classRef [(Ident$"Abstract"++nm,[])])))
("get"++nm++"Instance") []
(impl init)
where impl True = stmts [BlockStmt (Return (Just (varAccess v)))]
impl False = Nothing
modifs True = [Public]
modifs False = ... | 338 | false | false | 0 | 14 | 88 | 161 | 80 | 81 | null | null |
Helium4Haskell/helium | src/Helium/Parser/ParseLibrary.hs | gpl-3.0 | lexASGASG = lexeme (LexResVarSym "==") | 43 | lexASGASG = lexeme (LexResVarSym "==") | 43 | lexASGASG = lexeme (LexResVarSym "==") | 43 | false | false | 0 | 7 | 9 | 15 | 7 | 8 | null | null |
ntc2/cryptol | src/Cryptol/TypeCheck/Unify.hs | bsd-3-clause | mgu (TCon (TF f1) ts1) (TCon (TF f2) ts2)
| f1 == f2 && ts1 == ts2 = return emptyMGU | 87 | mgu (TCon (TF f1) ts1) (TCon (TF f2) ts2)
| f1 == f2 && ts1 == ts2 = return emptyMGU | 87 | mgu (TCon (TF f1) ts1) (TCon (TF f2) ts2)
| f1 == f2 && ts1 == ts2 = return emptyMGU | 87 | false | false | 0 | 10 | 22 | 64 | 29 | 35 | null | null |
romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The specific AWS account ID that is to be added or removed from a volume's
-- list of create volume permissions.
cvpUserId :: Lens' CreateVolumePermission (Maybe Text)
cvpUserId = lens _cvpUserId (\s a -> s { _cvpUserId = a }) | 231 | cvpUserId :: Lens' CreateVolumePermission (Maybe Text)
cvpUserId = lens _cvpUserId (\s a -> s { _cvpUserId = a }) | 113 | cvpUserId = lens _cvpUserId (\s a -> s { _cvpUserId = a }) | 58 | true | true | 1 | 9 | 41 | 53 | 26 | 27 | null | null |
wafna/euler | Main.hs | unlicense | p23 :: Int
p23 =
let
ubound :: Int
ubound = 21823
abundants :: [Int]
-- we can knock 12 off because anything bigger could not be used in a sum to create another number less than the
-- limit.
abundants = filter (\ n -> perfection (fromIntegral n) == GT) [12..ubound]
absum... | 465 | p23 :: Int
p23 =
let
ubound :: Int
ubound = 21823
abundants :: [Int]
-- we can knock 12 off because anything bigger could not be used in a sum to create another number less than the
-- limit.
abundants = filter (\ n -> perfection (fromIntegral n) == GT) [12..ubound]
absum... | 465 | p23 =
let
ubound :: Int
ubound = 21823
abundants :: [Int]
-- we can knock 12 off because anything bigger could not be used in a sum to create another number less than the
-- limit.
abundants = filter (\ n -> perfection (fromIntegral n) == GT) [12..ubound]
absums = Set.fro... | 454 | false | true | 0 | 15 | 138 | 151 | 80 | 71 | null | null |
vasily-kirichenko/haskell-book | src/NonStricness.hs | bsd-3-clause | main = print (snd (t, u)) | 25 | main = print (snd (t, u)) | 25 | main = print (snd (t, u)) | 25 | false | false | 0 | 8 | 5 | 21 | 11 | 10 | null | null |
gspindles/rftg-cards | src/Game/RftG/Cards/Base.hs | mit | starNomadLair :: Card
starNomadLair = Card
(World $ Windfall NoveltyGoods)
"STAR NOMAD LAIR"
(Defense 1)
(VP 1)
Nothing
[]
[Explore, Trade] | 153 | starNomadLair :: Card
starNomadLair = Card
(World $ Windfall NoveltyGoods)
"STAR NOMAD LAIR"
(Defense 1)
(VP 1)
Nothing
[]
[Explore, Trade] | 153 | starNomadLair = Card
(World $ Windfall NoveltyGoods)
"STAR NOMAD LAIR"
(Defense 1)
(VP 1)
Nothing
[]
[Explore, Trade] | 131 | false | true | 0 | 7 | 34 | 62 | 29 | 33 | null | null |
wxwxwwxxx/ghc | compiler/nativeGen/SPARC/CodeGen/Base.hs | bsd-3-clause | getRegisterReg :: Platform -> CmmReg -> Reg
getRegisterReg _ (CmmLocal (LocalReg u pk))
= RegVirtual $ mkVirtualReg u (cmmTypeFormat pk) | 145 | getRegisterReg :: Platform -> CmmReg -> Reg
getRegisterReg _ (CmmLocal (LocalReg u pk))
= RegVirtual $ mkVirtualReg u (cmmTypeFormat pk) | 144 | getRegisterReg _ (CmmLocal (LocalReg u pk))
= RegVirtual $ mkVirtualReg u (cmmTypeFormat pk) | 100 | false | true | 2 | 12 | 28 | 61 | 27 | 34 | null | null |
badp/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | defaultDrbdHelper :: String
defaultDrbdHelper = "/bin/true" | 59 | defaultDrbdHelper :: String
defaultDrbdHelper = "/bin/true" | 59 | defaultDrbdHelper = "/bin/true" | 31 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The status of the import of this particular disk image.
iivdiStatus :: Lens' ImportInstanceVolumeDetailItem Text
iivdiStatus = lens _iivdiStatus (\s a -> s { _iivdiStatus = a }) | 182 | iivdiStatus :: Lens' ImportInstanceVolumeDetailItem Text
iivdiStatus = lens _iivdiStatus (\s a -> s { _iivdiStatus = a }) | 121 | iivdiStatus = lens _iivdiStatus (\s a -> s { _iivdiStatus = a }) | 64 | true | true | 1 | 9 | 29 | 46 | 22 | 24 | null | null |
ZacharyKamerling/Canvas | src/DataParsers.hs | mit | parseColors :: IO (Map.Map String (C.Color))
parseColors = mapParser "Colors.txt" . many $ do
whitespace
char '\"'
str <- some $ matchChar (/='\"')
char '\"'
whitespace >> char ',' >> whitespace
r <- fmap read number
whitespace >> char ',' >> whitespace
g <- fmap read number
whitespace >> char ',' >> whitespac... | 461 | parseColors :: IO (Map.Map String (C.Color))
parseColors = mapParser "Colors.txt" . many $ do
whitespace
char '\"'
str <- some $ matchChar (/='\"')
char '\"'
whitespace >> char ',' >> whitespace
r <- fmap read number
whitespace >> char ',' >> whitespace
g <- fmap read number
whitespace >> char ',' >> whitespac... | 461 | parseColors = mapParser "Colors.txt" . many $ do
whitespace
char '\"'
str <- some $ matchChar (/='\"')
char '\"'
whitespace >> char ',' >> whitespace
r <- fmap read number
whitespace >> char ',' >> whitespace
g <- fmap read number
whitespace >> char ',' >> whitespace
b <- fmap read number
whitespace >> char ... | 416 | false | true | 2 | 12 | 91 | 213 | 91 | 122 | null | null |
brendanhay/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | Indicates that this annotation is deleted.
volDeleted :: Lens' Volumeannotation (Maybe Bool)
volDeleted
= lens _volDeleted (\ s a -> s{_volDeleted = a}) | 159 | volDeleted :: Lens' Volumeannotation (Maybe Bool)
volDeleted
= lens _volDeleted (\ s a -> s{_volDeleted = a}) | 111 | volDeleted
= lens _volDeleted (\ s a -> s{_volDeleted = a}) | 61 | true | true | 0 | 9 | 26 | 48 | 25 | 23 | null | null |
JerryLeiDing/haskell-house-chores | Haskell-House-Chores.hs | gpl-3.0 | -- TODO get rid of me after testing is done!
parse ["-t"] = test | 64 | parse ["-t"] = test | 19 | parse ["-t"] = test | 19 | true | false | 0 | 6 | 13 | 13 | 7 | 6 | null | null |
phile314/tasty-silver | tests/test.hs | mit | testCheckRF :: TestTree
testCheckRF =
testGroup "Filter.checkRF"
[ testCase "empty1a" $ checkRF True [] "/" @?= True
, testCase "empty1b" $ checkRF False [] "/" @?= False
, testCase "empty2a" $ checkRF True [] "/sdfg" @?= True
, testCase "empty2b" $ checkRF False [] "/sdfg" @?= False
] | 318 | testCheckRF :: TestTree
testCheckRF =
testGroup "Filter.checkRF"
[ testCase "empty1a" $ checkRF True [] "/" @?= True
, testCase "empty1b" $ checkRF False [] "/" @?= False
, testCase "empty2a" $ checkRF True [] "/sdfg" @?= True
, testCase "empty2b" $ checkRF False [] "/sdfg" @?= False
] | 318 | testCheckRF =
testGroup "Filter.checkRF"
[ testCase "empty1a" $ checkRF True [] "/" @?= True
, testCase "empty1b" $ checkRF False [] "/" @?= False
, testCase "empty2a" $ checkRF True [] "/sdfg" @?= True
, testCase "empty2b" $ checkRF False [] "/sdfg" @?= False
] | 294 | false | true | 0 | 9 | 79 | 109 | 52 | 57 | null | null |
jyp/lp-diagrams | Graphics/Diagrams/Object.hs | agpl-3.0 | -- | Turn the orientation by 180 degrees
turn180 :: OVector -> OVector
turn180 (OVector p v) = OVector p (negate v) | 115 | turn180 :: OVector -> OVector
turn180 (OVector p v) = OVector p (negate v) | 74 | turn180 (OVector p v) = OVector p (negate v) | 44 | true | true | 0 | 7 | 21 | 38 | 19 | 19 | null | null |
tolysz/vector-algorithms | src/Data/Vector/Algorithms/Search.hs | bsd-3-clause | -- | Finds the greatest index in a given vector, which must be sorted with respect to
-- the given comparison function, at which the given element could be inserted
-- while preserving the sortedness.
binarySearchRBy :: (PrimMonad m, MVector v e)
=> Comparison e -> v (PrimState m) e -> e -> m Int
binary... | 388 | binarySearchRBy :: (PrimMonad m, MVector v e)
=> Comparison e -> v (PrimState m) e -> e -> m Int
binarySearchRBy cmp vec e = binarySearchRByBounds cmp vec e 0 (length vec) | 187 | binarySearchRBy cmp vec e = binarySearchRByBounds cmp vec e 0 (length vec) | 74 | true | true | 0 | 11 | 82 | 88 | 43 | 45 | null | null |
gustavoramos00/tecnicas-topdown | S8_3.hs | mit | succ8Tile :: Boards -> [Boards]
succ8Tile (BDS(n@(b:bs)))
= filter (notIn bs) [ BDS(b':n) | b' <- allMoves b]
where
notIn bs (BDS(b:_))
= not (elem (elems b) (map elems bs)) | 214 | succ8Tile :: Boards -> [Boards]
succ8Tile (BDS(n@(b:bs)))
= filter (notIn bs) [ BDS(b':n) | b' <- allMoves b]
where
notIn bs (BDS(b:_))
= not (elem (elems b) (map elems bs)) | 214 | succ8Tile (BDS(n@(b:bs)))
= filter (notIn bs) [ BDS(b':n) | b' <- allMoves b]
where
notIn bs (BDS(b:_))
= not (elem (elems b) (map elems bs)) | 178 | false | true | 0 | 11 | 70 | 125 | 64 | 61 | null | null |
glutamate/space | Vectors.hs | bsd-3-clause | scalarMul :: Double -> Vec n Double -> Vec n Double
scalarMul scalar v = fmap (*scalar) v | 89 | scalarMul :: Double -> Vec n Double -> Vec n Double
scalarMul scalar v = fmap (*scalar) v | 89 | scalarMul scalar v = fmap (*scalar) v | 37 | false | true | 0 | 7 | 17 | 43 | 21 | 22 | null | null |
marcellussiegburg/autotool | collection/src/Polynomial/Grobner/Compute.hs | gpl-2.0 | option0 = Option
{ max_steps = Just 100
, verbose = False
, use_criterion1 = True
, use_criterion2 = True
} | 127 | option0 = Option
{ max_steps = Just 100
, verbose = False
, use_criterion1 = True
, use_criterion2 = True
} | 127 | option0 = Option
{ max_steps = Just 100
, verbose = False
, use_criterion1 = True
, use_criterion2 = True
} | 127 | false | false | 0 | 7 | 40 | 35 | 21 | 14 | null | null |
tjakway/ghcjvm | compiler/types/Type.hs | bsd-3-clause | coreViewOneStarKind :: Type -> Maybe Type
coreViewOneStarKind ty
| Just ty' <- coreView ty = Just ty'
| TyConApp tc [] <- ty
, isStarKindSynonymTyCon tc = Just liftedTypeKind
| otherwise = Nothing | 222 | coreViewOneStarKind :: Type -> Maybe Type
coreViewOneStarKind ty
| Just ty' <- coreView ty = Just ty'
| TyConApp tc [] <- ty
, isStarKindSynonymTyCon tc = Just liftedTypeKind
| otherwise = Nothing | 222 | coreViewOneStarKind ty
| Just ty' <- coreView ty = Just ty'
| TyConApp tc [] <- ty
, isStarKindSynonymTyCon tc = Just liftedTypeKind
| otherwise = Nothing | 180 | false | true | 1 | 10 | 58 | 84 | 36 | 48 | null | null |
ezyang/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
composeTCvSubst (TCvSubst is1 tenv1 cenv1) (TCvSubst is2 tenv2 cenv2)
= TCvSubst is3 tenv3 cenv3
where
is3 = is1 `unionInScope` is2
(tenv3, cenv3) = composeTCvSubstEnv is3 (tenv1, cenv1) (tenv2, cenv2) | 265 | composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
composeTCvSubst (TCvSubst is1 tenv1 cenv1) (TCvSubst is2 tenv2 cenv2)
= TCvSubst is3 tenv3 cenv3
where
is3 = is1 `unionInScope` is2
(tenv3, cenv3) = composeTCvSubstEnv is3 (tenv1, cenv1) (tenv2, cenv2) | 265 | composeTCvSubst (TCvSubst is1 tenv1 cenv1) (TCvSubst is2 tenv2 cenv2)
= TCvSubst is3 tenv3 cenv3
where
is3 = is1 `unionInScope` is2
(tenv3, cenv3) = composeTCvSubstEnv is3 (tenv1, cenv1) (tenv2, cenv2) | 213 | false | true | 1 | 10 | 47 | 110 | 53 | 57 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | ddpPort :: String
ddpPort = "port" | 34 | ddpPort :: String
ddpPort = "port" | 34 | ddpPort = "port" | 16 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
hengchu/tiger-haskell | src/tigergensymlabtmp.hs | mit | getTempMapState :: (Monad m) => GenSymLabTmp m (Map.Map Temp Bool)
getTempMapState = do st <- get
return $ tmap st | 135 | getTempMapState :: (Monad m) => GenSymLabTmp m (Map.Map Temp Bool)
getTempMapState = do st <- get
return $ tmap st | 135 | getTempMapState = do st <- get
return $ tmap st | 68 | false | true | 0 | 9 | 40 | 52 | 25 | 27 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F26.hs | bsd-3-clause | ptr_glTexPageCommitmentARB :: FunPtr (GLenum -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLsizei -> GLboolean -> IO ())
ptr_glTexPageCommitmentARB = unsafePerformIO $ getCommand "glTexPageCommitmentARB" | 219 | ptr_glTexPageCommitmentARB :: FunPtr (GLenum -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLsizei -> GLboolean -> IO ())
ptr_glTexPageCommitmentARB = unsafePerformIO $ getCommand "glTexPageCommitmentARB" | 219 | ptr_glTexPageCommitmentARB = unsafePerformIO $ getCommand "glTexPageCommitmentARB" | 82 | false | true | 0 | 17 | 28 | 65 | 32 | 33 | null | null |
shayan-najd/QFeldspar | QFeldspar/Prelude/HaskellEnvironment.hs | gpl-3.0 | realPart :: Complex Float -> Float
realPart = PH.realPart | 57 | realPart :: Complex Float -> Float
realPart = PH.realPart | 57 | realPart = PH.realPart | 22 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
jsavatgy/dit-doo | too-old/too-old-01.hs | gpl-2.0 | main = do
--content <- readFile fileName
content <- S.readFile fileName
let
startAccum = take 6 content
pieces = chunksOf 20000 content
piece = concat (take 1 pieces)
mapM_ putCharF startAccum
cutGenerate piece startAccum | 243 | main = do
--content <- readFile fileName
content <- S.readFile fileName
let
startAccum = take 6 content
pieces = chunksOf 20000 content
piece = concat (take 1 pieces)
mapM_ putCharF startAccum
cutGenerate piece startAccum | 243 | main = do
--content <- readFile fileName
content <- S.readFile fileName
let
startAccum = take 6 content
pieces = chunksOf 20000 content
piece = concat (take 1 pieces)
mapM_ putCharF startAccum
cutGenerate piece startAccum | 243 | false | false | 0 | 12 | 55 | 75 | 34 | 41 | null | null |
esmolanka/struct-parse | Control/Parsing.hs | bsd-3-clause | traversing' :: (Parseable f, Traversable t) => Parsing f a b -> Parsing f (t a) (t b)
traversing' p = Parsing $ \i -> T.mapM (runParsing' p) i | 142 | traversing' :: (Parseable f, Traversable t) => Parsing f a b -> Parsing f (t a) (t b)
traversing' p = Parsing $ \i -> T.mapM (runParsing' p) i | 142 | traversing' p = Parsing $ \i -> T.mapM (runParsing' p) i | 56 | false | true | 0 | 9 | 28 | 81 | 40 | 41 | null | null |
hibou107/algocpp | euler.hs | mit | problem_31 = ways [1,2,5,10,20,50,100,200] !! 200 | 49 | problem_31 = ways [1,2,5,10,20,50,100,200] !! 200 | 49 | problem_31 = ways [1,2,5,10,20,50,100,200] !! 200 | 49 | false | false | 0 | 7 | 5 | 37 | 22 | 15 | null | null |
erahhal/dev-environment-setup | xmonad/xmonadctl.hs | mit | sendAll :: String -> [String] -> IO ()
sendAll addr ss = foldr (\a b -> sendCommand addr a >> b) (return ()) ss | 111 | sendAll :: String -> [String] -> IO ()
sendAll addr ss = foldr (\a b -> sendCommand addr a >> b) (return ()) ss | 111 | sendAll addr ss = foldr (\a b -> sendCommand addr a >> b) (return ()) ss | 72 | false | true | 0 | 9 | 23 | 70 | 34 | 36 | null | null |
mimi1vx/cabal-rpm | src/Commands/Depends.hs | gpl-3.0 | recurseMissing already (dep:deps) = do
miss <- missingDepsPkg dep
putMissing dep miss already
let accum = nub $ miss ++ already
deeper <- recurseMissing accum (miss \\ accum)
let accum2 = nub $ accum ++ deeper
more <- recurseMissing accum2 (deps \\ accum2)
return $ nub $ accum2 ++ more | 300 | recurseMissing already (dep:deps) = do
miss <- missingDepsPkg dep
putMissing dep miss already
let accum = nub $ miss ++ already
deeper <- recurseMissing accum (miss \\ accum)
let accum2 = nub $ accum ++ deeper
more <- recurseMissing accum2 (deps \\ accum2)
return $ nub $ accum2 ++ more | 300 | recurseMissing already (dep:deps) = do
miss <- missingDepsPkg dep
putMissing dep miss already
let accum = nub $ miss ++ already
deeper <- recurseMissing accum (miss \\ accum)
let accum2 = nub $ accum ++ deeper
more <- recurseMissing accum2 (deps \\ accum2)
return $ nub $ accum2 ++ more | 300 | false | false | 0 | 11 | 63 | 125 | 58 | 67 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.