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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
frp-arduino/frp-arduino | src/Arduino/DSL.hs | gpl-3.0 | delay :: Stream (a, DAG.Word) -> Stream a
delay stream = Stream $ do
streamName <- unStream stream
expressionStreamName <- addAnonymousStream expression
addDependency streamName expressionStreamName
where
expression = DAG.DelayMicroseconds (DAG.TupleValue 1 (DAG.Input 0))
... | 372 | delay :: Stream (a, DAG.Word) -> Stream a
delay stream = Stream $ do
streamName <- unStream stream
expressionStreamName <- addAnonymousStream expression
addDependency streamName expressionStreamName
where
expression = DAG.DelayMicroseconds (DAG.TupleValue 1 (DAG.Input 0))
... | 372 | delay stream = Stream $ do
streamName <- unStream stream
expressionStreamName <- addAnonymousStream expression
addDependency streamName expressionStreamName
where
expression = DAG.DelayMicroseconds (DAG.TupleValue 1 (DAG.Input 0))
(DAG.TupleValue 0 (DAG... | 330 | false | true | 3 | 10 | 103 | 123 | 55 | 68 | null | null |
ajm188/advent_of_code | 2016/19/Main.hs | mit | next :: [a] -> [a]
next [] = [] | 31 | next :: [a] -> [a]
next [] = [] | 31 | next [] = [] | 12 | false | true | 0 | 6 | 8 | 28 | 15 | 13 | null | null |
mzero/plush | src/Plush/Parser/Base.hs | apache-2.0 | baseShellParseState :: ShellParseState
baseShellParseState =
SPS { spsQueuedHereDocParsers = []
, spsHereDocs = []
, spsKnottedHereDocs = []
} | 170 | baseShellParseState :: ShellParseState
baseShellParseState =
SPS { spsQueuedHereDocParsers = []
, spsHereDocs = []
, spsKnottedHereDocs = []
} | 170 | baseShellParseState =
SPS { spsQueuedHereDocParsers = []
, spsHereDocs = []
, spsKnottedHereDocs = []
} | 131 | false | true | 0 | 7 | 46 | 37 | 22 | 15 | null | null |
keithodulaigh/Hets | Common/Lib/Pretty.hs | gpl-2.0 | best _ w0 r p0
= get w0 p0
where
get :: Int -- (Remaining) width of line
-> Doc -> Doc
get w _ | w == 0 && False = undefined
get _ Empty = Empty
get _ NoDoc = NoDoc
get w (NilAbove p) = nilAbove_ (get w p)
get w (TextBeside s sl p) = textBeside_ s sl (get1 w sl p)
get w ... | 1,241 | best _ w0 r p0
= get w0 p0
where
get :: Int -- (Remaining) width of line
-> Doc -> Doc
get w _ | w == 0 && False = undefined
get _ Empty = Empty
get _ NoDoc = NoDoc
get w (NilAbove p) = nilAbove_ (get w p)
get w (TextBeside s sl p) = textBeside_ s sl (get1 w sl p)
get w ... | 1,241 | best _ w0 r p0
= get w0 p0
where
get :: Int -- (Remaining) width of line
-> Doc -> Doc
get w _ | w == 0 && False = undefined
get _ Empty = Empty
get _ NoDoc = NoDoc
get w (NilAbove p) = nilAbove_ (get w p)
get w (TextBeside s sl p) = textBeside_ s sl (get1 w sl p)
get w ... | 1,241 | false | false | 9 | 9 | 464 | 578 | 268 | 310 | null | null |
christiaanb/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | d_Pat = nlVarPat d_RDR | 32 | d_Pat = nlVarPat d_RDR | 32 | d_Pat = nlVarPat d_RDR | 32 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
relrod/isysuclosed.com | Main.hs | bsd-3-clause | headerHtml :: HtmlT Identity a -> ActionM ()
headerHtml content =
html $ renderText $
doctypehtml_ $ do
head_ $ do
meta_ [charset_ "utf-8"]
meta_ [name_ "viewport", content_ "width=device-width, initial-scale=1"]
link_ [href_ "//fonts.googleapis.com/css?family=Open+Sans", rel_ "style... | 605 | headerHtml :: HtmlT Identity a -> ActionM ()
headerHtml content =
html $ renderText $
doctypehtml_ $ do
head_ $ do
meta_ [charset_ "utf-8"]
meta_ [name_ "viewport", content_ "width=device-width, initial-scale=1"]
link_ [href_ "//fonts.googleapis.com/css?family=Open+Sans", rel_ "style... | 605 | headerHtml content =
html $ renderText $
doctypehtml_ $ do
head_ $ do
meta_ [charset_ "utf-8"]
meta_ [name_ "viewport", content_ "width=device-width, initial-scale=1"]
link_ [href_ "//fonts.googleapis.com/css?family=Open+Sans", rel_ "stylesheet", type_ "text/css"]
link_ [ hre... | 560 | false | true | 0 | 13 | 170 | 140 | 62 | 78 | null | null |
fmapfmapfmap/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/CreateEvaluation.hs | mpl-2.0 | -- | A user-supplied ID that uniquely identifies the 'Evaluation'.
ceEvaluationId :: Lens' CreateEvaluation Text
ceEvaluationId = lens _ceEvaluationId (\ s a -> s{_ceEvaluationId = a}) | 184 | ceEvaluationId :: Lens' CreateEvaluation Text
ceEvaluationId = lens _ceEvaluationId (\ s a -> s{_ceEvaluationId = a}) | 117 | ceEvaluationId = lens _ceEvaluationId (\ s a -> s{_ceEvaluationId = a}) | 71 | true | true | 1 | 9 | 25 | 44 | 22 | 22 | null | null |
jvranish/TheExperiment | src/Control/Monad/GraphT.hs | bsd-3-clause | mapGraphT :: (m (a, ContextT.ContextData (f (GraphRef f))) -> n (b, ContextT.ContextData (f (GraphRef f)))) -> GraphT f m a -> GraphT f n b
mapGraphT f (GraphT m) = GraphT $ ContextT.mapContextT f m | 198 | mapGraphT :: (m (a, ContextT.ContextData (f (GraphRef f))) -> n (b, ContextT.ContextData (f (GraphRef f)))) -> GraphT f m a -> GraphT f n b
mapGraphT f (GraphT m) = GraphT $ ContextT.mapContextT f m | 198 | mapGraphT f (GraphT m) = GraphT $ ContextT.mapContextT f m | 58 | false | true | 0 | 14 | 34 | 114 | 56 | 58 | null | null |
halarnold2000/cis194 | test/Cis194/Hw/AcceptHanoi.hs | bsd-3-clause | -- transition from a given state to a new state given a list of moves
evolveHanoi :: HanoiState -> [Move] -> Maybe HanoiState
evolveHanoi initialState moves = foldl applyMove (Just initialState) moves | 200 | evolveHanoi :: HanoiState -> [Move] -> Maybe HanoiState
evolveHanoi initialState moves = foldl applyMove (Just initialState) moves | 130 | evolveHanoi initialState moves = foldl applyMove (Just initialState) moves | 74 | true | true | 0 | 7 | 31 | 48 | 23 | 25 | null | null |
sol/markdown | Text/Markdown/Block.hs | bsd-3-clause | stripSeparator :: Text -> Maybe Text
stripSeparator x =
case T.uncons x of
Nothing -> Nothing
Just ('.', y) -> Just y
Just (')', y) -> Just y
_ -> Nothing | 190 | stripSeparator :: Text -> Maybe Text
stripSeparator x =
case T.uncons x of
Nothing -> Nothing
Just ('.', y) -> Just y
Just (')', y) -> Just y
_ -> Nothing | 190 | stripSeparator x =
case T.uncons x of
Nothing -> Nothing
Just ('.', y) -> Just y
Just (')', y) -> Just y
_ -> Nothing | 153 | false | true | 5 | 7 | 66 | 75 | 38 | 37 | null | null |
8l/barrelfish | hake/ARMv8.hs | mit | compiler = toolprefix ++ "gcc" | 30 | compiler = toolprefix ++ "gcc" | 30 | compiler = toolprefix ++ "gcc" | 30 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
fmthoma/ghc | compiler/rename/RnBinds.hs | bsd-3-clause | rnMethodBind _ _ (L loc bind@(PatBind {})) = do
addErrAt loc (methodBindErr bind)
return (emptyBag, emptyFVs)
-- Associated pattern synonyms are not implemented yet | 173 | rnMethodBind _ _ (L loc bind@(PatBind {})) = do
addErrAt loc (methodBindErr bind)
return (emptyBag, emptyFVs)
-- Associated pattern synonyms are not implemented yet | 173 | rnMethodBind _ _ (L loc bind@(PatBind {})) = do
addErrAt loc (methodBindErr bind)
return (emptyBag, emptyFVs)
-- Associated pattern synonyms are not implemented yet | 173 | false | false | 1 | 10 | 32 | 59 | 28 | 31 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | -- | Displays a themed border where possible. Currently this has an effect
-- on Windows XP and above only. For more information on themed borders,
-- please see Themed borders on Windows
-- <http://docs.wxwidgets.org/2.8/wx_wxmswport.html#wxmswthemedborders>.
wxBORDER_THEME :: Int
wxBORDER_THEME = 0x10000000 | 312 | wxBORDER_THEME :: Int
wxBORDER_THEME = 0x10000000 | 51 | wxBORDER_THEME = 0x10000000 | 28 | true | true | 0 | 6 | 42 | 22 | 11 | 11 | null | null |
KevinCotrone/numeric-tools | benchmark/bench.hs | bsd-3-clause | main = defaultMain
[ bench "Trapeze[exp]" $ nf (quadRes . quadTrapezoid defQuad (0,2)) exp
, bench "Trapeze[blamg]" $ nf (quadRes . quadTrapezoid defQuad (0,2)) exp
, bench "Simpson[exp]" $ nf (quadRes . quadSimpson defQuad (0,2)) exp
, bench "Simpson[blamg]" $ nf (quadRes .... | 689 | main = defaultMain
[ bench "Trapeze[exp]" $ nf (quadRes . quadTrapezoid defQuad (0,2)) exp
, bench "Trapeze[blamg]" $ nf (quadRes . quadTrapezoid defQuad (0,2)) exp
, bench "Simpson[exp]" $ nf (quadRes . quadSimpson defQuad (0,2)) exp
, bench "Simpson[blamg]" $ nf (quadRes .... | 689 | main = defaultMain
[ bench "Trapeze[exp]" $ nf (quadRes . quadTrapezoid defQuad (0,2)) exp
, bench "Trapeze[blamg]" $ nf (quadRes . quadTrapezoid defQuad (0,2)) exp
, bench "Simpson[exp]" $ nf (quadRes . quadSimpson defQuad (0,2)) exp
, bench "Simpson[blamg]" $ nf (quadRes .... | 689 | false | false | 0 | 12 | 194 | 261 | 132 | 129 | null | null |
mariefarrell/Hets | OWL2/OWL22CASL.hs | gpl-2.0 | qualData :: Int -> TERM f
qualData = toQualVar . dataDecl | 57 | qualData :: Int -> TERM f
qualData = toQualVar . dataDecl | 57 | qualData = toQualVar . dataDecl | 31 | false | true | 1 | 7 | 10 | 29 | 12 | 17 | null | null |
sdiehl/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | -- Note [aBSENT_SUM_FIELD_ERROR_ID]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Absent argument error for unused unboxed sum fields are different than absent
-- error used in dummy worker functions (see `mkAbsentErrorApp`):
--
-- - `absentSumFieldError` can't take arguments because it's used in unarise for
-- unused point... | 1,361 | aBSENT_SUM_FIELD_ERROR_ID
= mkVanillaGlobalWithInfo absentSumFieldErrorName
(mkSpecForAllTys [alphaTyVar] (mkTyVarTy alphaTyVar)) -- forall a . a
(vanillaIdInfo `setStrictnessInfo` mkClosedStrictSig [] botRes
`setArityInfo` 0
`setCafInfo` NoCafRefs) | 305 | aBSENT_SUM_FIELD_ERROR_ID
= mkVanillaGlobalWithInfo absentSumFieldErrorName
(mkSpecForAllTys [alphaTyVar] (mkTyVarTy alphaTyVar)) -- forall a . a
(vanillaIdInfo `setStrictnessInfo` mkClosedStrictSig [] botRes
`setArityInfo` 0
`setCafInfo` NoCafRefs) | 305 | true | false | 1 | 11 | 266 | 83 | 54 | 29 | null | null |
ghc-android/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | typeNatTypeRepKey = mkPreludeMiscIdUnique 506 | 49 | typeNatTypeRepKey = mkPreludeMiscIdUnique 506 | 49 | typeNatTypeRepKey = mkPreludeMiscIdUnique 506 | 49 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
pheaver/BitVector | Data/BitVector/BitVector1.hs | bsd-3-clause | append (Bits v1) (Bits v2)
= Bits $ case internal_endianness of
BigEndian -> v1 Prelude.++ v2
LittleEndian -> v2 Prelude.++ v1 | 155 | append (Bits v1) (Bits v2)
= Bits $ case internal_endianness of
BigEndian -> v1 Prelude.++ v2
LittleEndian -> v2 Prelude.++ v1 | 155 | append (Bits v1) (Bits v2)
= Bits $ case internal_endianness of
BigEndian -> v1 Prelude.++ v2
LittleEndian -> v2 Prelude.++ v1 | 155 | false | false | 2 | 9 | 49 | 59 | 27 | 32 | null | null |
chreekat/vim-haskell-syntax | test/golden/toplevel/arg.hs | mit | bar = baz | 9 | bar = baz | 9 | bar = baz | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
AlexeyReshetnyak/ar_wpage_source | Main.hs | mit | postList :: Pattern -> ([Item String] -> Compiler [Item String]) -> Compiler String
postList dir sortFilter = do
posts <- sortFilter =<< loadAll dir
itemTpl <- loadBody "templates/post-item.html"
list <- applyTemplateList itemTpl postCtx posts
return list | 268 | postList :: Pattern -> ([Item String] -> Compiler [Item String]) -> Compiler String
postList dir sortFilter = do
posts <- sortFilter =<< loadAll dir
itemTpl <- loadBody "templates/post-item.html"
list <- applyTemplateList itemTpl postCtx posts
return list | 268 | postList dir sortFilter = do
posts <- sortFilter =<< loadAll dir
itemTpl <- loadBody "templates/post-item.html"
list <- applyTemplateList itemTpl postCtx posts
return list | 184 | false | true | 0 | 11 | 48 | 93 | 42 | 51 | null | null |
urbanslug/ghc | compiler/main/HscTypes.hs | bsd-3-clause | implicitTyThings (ATyCon tc) = implicitTyConThings tc | 56 | implicitTyThings (ATyCon tc) = implicitTyConThings tc | 56 | implicitTyThings (ATyCon tc) = implicitTyConThings tc | 56 | false | false | 0 | 6 | 8 | 19 | 8 | 11 | null | null |
egonSchiele/rdioh | src/rdioh.hs | mit | -- TODO this should also have an extras field but how to implement that and
-- still be able to return a generic type?
-- | Takes: a query, a type (\"Artist\", \"Album\", \"Track\", \"Playlist\", or
-- \"User\")
--
-- This method can return any of those types, so you need to specify what
-- you want returned. Example:
... | 532 | search :: (Show a, FromJSON a) => String -> String -> Rdio (Either String [a])
search query types = search' query types Nothing Nothing Nothing | 143 | search query types = search' query types Nothing Nothing Nothing | 64 | true | true | 0 | 11 | 94 | 73 | 41 | 32 | null | null |
rueshyna/gogol | gogol-autoscaler/gen/Network/Google/Autoscaler/Types/Product.hs | mpl-2.0 | oOperationType :: Lens' Operation (Maybe Text)
oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a}) | 126 | oOperationType :: Lens' Operation (Maybe Text)
oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a}) | 126 | oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a}) | 79 | false | true | 0 | 9 | 24 | 47 | 24 | 23 | null | null |
a4099181/LearningHaskell | src/Data/LightSwitch.hs | mit | -- | Gets closed light switch.
getDefaultLightSwitch :: LightSwitch
getDefaultLightSwitch = SwitchClosed | 104 | getDefaultLightSwitch :: LightSwitch
getDefaultLightSwitch = SwitchClosed | 73 | getDefaultLightSwitch = SwitchClosed | 36 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
diflying/logitext | ClassicalFOL.hs | bsd-3-clause | -- hack to allow higher-order terms
freeU' b f = freeU b f | 58 | freeU' b f = freeU b f | 22 | freeU' b f = freeU b f | 22 | true | false | 1 | 5 | 12 | 23 | 8 | 15 | null | null |
keera-studios/hsQt | Qtc/Enums/Opengl/QGL.hs | bsd-2-clause | eNoStereoBuffers :: FormatOption
eNoStereoBuffers
= ieFormatOption $ 4194304 | 78 | eNoStereoBuffers :: FormatOption
eNoStereoBuffers
= ieFormatOption $ 4194304 | 78 | eNoStereoBuffers
= ieFormatOption $ 4194304 | 45 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
ajnsit/snap-routes | src/Routes/ContentTypes.hs | mit | -- | The request header for accpetable content types
acceptContentType :: HeaderName
acceptContentType = "Accept" | 113 | acceptContentType :: HeaderName
acceptContentType = "Accept" | 60 | acceptContentType = "Accept" | 28 | true | true | 0 | 4 | 14 | 12 | 7 | 5 | null | null |
printedheart/Dao | src/Dao/Lens.hs | agpl-3.0 | -- | Use a 'Lens' to read an element @e@ within a container @c@.
fetch :: Monad m => Lens m c e -> c -> m e
fetch (Lens lens) = evalStateT (lens Nothing) | 153 | fetch :: Monad m => Lens m c e -> c -> m e
fetch (Lens lens) = evalStateT (lens Nothing) | 88 | fetch (Lens lens) = evalStateT (lens Nothing) | 45 | true | true | 0 | 8 | 34 | 55 | 26 | 29 | null | null |
fmapfmapfmap/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/Types/Product.hs | mpl-2.0 | -- | An array of custom recipe names to be run following a 'deploy' event.
rDeploy :: Lens' Recipes [Text]
rDeploy = lens _rDeploy (\ s a -> s{_rDeploy = a}) . _Default . _Coerce | 178 | rDeploy :: Lens' Recipes [Text]
rDeploy = lens _rDeploy (\ s a -> s{_rDeploy = a}) . _Default . _Coerce | 103 | rDeploy = lens _rDeploy (\ s a -> s{_rDeploy = a}) . _Default . _Coerce | 71 | true | true | 0 | 11 | 34 | 51 | 28 | 23 | null | null |
GaloisInc/tower | tower-aadl/src/Tower/AADL/Build/Common.hs | bsd-3-clause | export :: MkStmt -> MkStmt
export (Var _ var assign val) = Var Export var assign val | 84 | export :: MkStmt -> MkStmt
export (Var _ var assign val) = Var Export var assign val | 84 | export (Var _ var assign val) = Var Export var assign val | 57 | false | true | 0 | 9 | 16 | 44 | 20 | 24 | null | null |
brendanhay/gogol | gogol-securitycenter/gen/Network/Google/Resource/SecurityCenter/Organizations/Sources/Findings/SetState.hs | mpl-2.0 | -- | Required. The relative resource name of the finding. See:
-- https:\/\/cloud.google.com\/apis\/design\/resource_names#relative_resource_name
-- Example:
-- \"organizations\/{organization_id}\/sources\/{source_id}\/finding\/{finding_id}\".
osfssName :: Lens' OrganizationsSourcesFindingsSetState Text
osfssName
= l... | 363 | osfssName :: Lens' OrganizationsSourcesFindingsSetState Text
osfssName
= lens _osfssName (\ s a -> s{_osfssName = a}) | 119 | osfssName
= lens _osfssName (\ s a -> s{_osfssName = a}) | 58 | true | true | 0 | 9 | 34 | 45 | 25 | 20 | null | null |
aristidb/GameOfLife | Core.hs | bsd-3-clause | neighborsOf :: Coord -> World
neighborsOf c = S.mapMonotonic (c .+.) dNeighbors | 79 | neighborsOf :: Coord -> World
neighborsOf c = S.mapMonotonic (c .+.) dNeighbors | 79 | neighborsOf c = S.mapMonotonic (c .+.) dNeighbors | 49 | false | true | 0 | 6 | 11 | 29 | 15 | 14 | null | null |
rumblesan/improviz | test/Tests/Language/Parser/Lists.hs | bsd-3-clause | test_parses_accessor_parsing :: Assertion
test_parses_accessor_parsing =
let program = "a = [1,2,3]\nb = a[2 + 1]"
list = EList [EVal $ Number 1, EVal $ Number 2, EVal $ Number 3]
access = EAccess (EVar $ LocalVariable "a")
(BinaryOp "+" (EVal $ Number 2) (EVal $ Number 1))
... | 485 | test_parses_accessor_parsing :: Assertion
test_parses_accessor_parsing =
let program = "a = [1,2,3]\nb = a[2 + 1]"
list = EList [EVal $ Number 1, EVal $ Number 2, EVal $ Number 3]
access = EAccess (EVar $ LocalVariable "a")
(BinaryOp "+" (EVal $ Number 2) (EVal $ Number 1))
... | 485 | test_parses_accessor_parsing =
let program = "a = [1,2,3]\nb = a[2 + 1]"
list = EList [EVal $ Number 1, EVal $ Number 2, EVal $ Number 3]
access = EAccess (EVar $ LocalVariable "a")
(BinaryOp "+" (EVal $ Number 2) (EVal $ Number 1))
expected = Program
[ StAssign $... | 443 | false | true | 0 | 14 | 141 | 155 | 74 | 81 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | diskDtParameters :: FrozenSet String
diskDtParameters = ConstantUtils.mkSet (Map.keys diskDtTypes) | 98 | diskDtParameters :: FrozenSet String
diskDtParameters = ConstantUtils.mkSet (Map.keys diskDtTypes) | 98 | diskDtParameters = ConstantUtils.mkSet (Map.keys diskDtTypes) | 61 | false | true | 0 | 8 | 8 | 27 | 13 | 14 | null | null |
athanclark/contact-logger | src/Main.hs | bsd-3-clause | appOptsToEnv :: AppOpts -> Env
appOptsToEnv (AppOpts (Just p) (Just h) (Just c) (Just s)) =
Env (UrlAuthority "http" True Nothing h $
p <$ guard (p /= 80)
) c s | 177 | appOptsToEnv :: AppOpts -> Env
appOptsToEnv (AppOpts (Just p) (Just h) (Just c) (Just s)) =
Env (UrlAuthority "http" True Nothing h $
p <$ guard (p /= 80)
) c s | 177 | appOptsToEnv (AppOpts (Just p) (Just h) (Just c) (Just s)) =
Env (UrlAuthority "http" True Nothing h $
p <$ guard (p /= 80)
) c s | 146 | false | true | 0 | 11 | 48 | 99 | 46 | 53 | null | null |
brendanhay/gogol | gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ContextAttribute' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'caValues'
--
-- * 'caName'
contextAttribute
:: ContextAttribute
contextAttribute = ContextAttribute' {_caValues = Nothing, _caName = Nothin... | 322 | contextAttribute
:: ContextAttribute
contextAttribute = ContextAttribute' {_caValues = Nothing, _caName = Nothing} | 118 | contextAttribute = ContextAttribute' {_caValues = Nothing, _caName = Nothing} | 77 | true | true | 0 | 7 | 53 | 39 | 23 | 16 | null | null |
wjt/bustle | Bustle/UI.hs | lgpl-2.1 | onMenuItemActivate :: MenuItemClass menuItem
=> menuItem
-> IO ()
-> IO (ConnectId menuItem)
onMenuItemActivate mi = on mi menuItemActivate | 196 | onMenuItemActivate :: MenuItemClass menuItem
=> menuItem
-> IO ()
-> IO (ConnectId menuItem)
onMenuItemActivate mi = on mi menuItemActivate | 196 | onMenuItemActivate mi = on mi menuItemActivate | 46 | false | true | 0 | 11 | 75 | 54 | 23 | 31 | null | null |
cartazio/permutations-perrry | tests/STPermute.hs | bsd-3-clause | implements :: (Eq a, Show a) =>
(forall s . STPermute s -> ST s a) ->
(Permute -> (a,Permute)) ->
Property
a `implements` f =
forAll arbitrary $ \(Nat n) ->
implementsFor n a f | 205 | implements :: (Eq a, Show a) =>
(forall s . STPermute s -> ST s a) ->
(Permute -> (a,Permute)) ->
Property
a `implements` f =
forAll arbitrary $ \(Nat n) ->
implementsFor n a f | 205 | a `implements` f =
forAll arbitrary $ \(Nat n) ->
implementsFor n a f | 81 | false | true | 3 | 11 | 64 | 105 | 51 | 54 | null | null |
pascal-knodel/haskell-craft | Examples/· Recursion/· Primitive Recursion/Calculations/Factorial.hs | mit | factorial :: Integer -> Integer
factorial factor
| factor < 0 = error "Negative factor."
| otherwise = factorial' factor
where
factorial' :: Integer -> Integer
factorial' 0 = 1
factorial' 1 = 1
factorial' factor = factor * factorial' (factor - 1)
{- GHCi>
factorial (-1)
factorial 0
... | 417 | factorial :: Integer -> Integer
factorial factor
| factor < 0 = error "Negative factor."
| otherwise = factorial' factor
where
factorial' :: Integer -> Integer
factorial' 0 = 1
factorial' 1 = 1
factorial' factor = factor * factorial' (factor - 1)
{- GHCi>
factorial (-1)
factorial 0
... | 417 | factorial factor
| factor < 0 = error "Negative factor."
| otherwise = factorial' factor
where
factorial' :: Integer -> Integer
factorial' 0 = 1
factorial' 1 = 1
factorial' factor = factor * factorial' (factor - 1)
{- GHCi>
factorial (-1)
factorial 0
factorial 1
factorial 2
factor... | 385 | false | true | 2 | 8 | 109 | 117 | 53 | 64 | null | null |
ganeti/ganeti | src/Ganeti/WConfd/ConfigModifications.hs | bsd-2-clause | addTcpUdpPort :: Int -> WConfdMonad Bool
addTcpUdpPort port =
let pL = csConfigDataL . configClusterL . clusterTcpudpPortPoolL
f :: Monad m => ConfigState -> m ConfigState
f = mapMOf pL (return . (port:) . filter (/= port))
in isJust <$> modifyConfigWithLock (const f) (return ()) | 296 | addTcpUdpPort :: Int -> WConfdMonad Bool
addTcpUdpPort port =
let pL = csConfigDataL . configClusterL . clusterTcpudpPortPoolL
f :: Monad m => ConfigState -> m ConfigState
f = mapMOf pL (return . (port:) . filter (/= port))
in isJust <$> modifyConfigWithLock (const f) (return ()) | 296 | addTcpUdpPort port =
let pL = csConfigDataL . configClusterL . clusterTcpudpPortPoolL
f :: Monad m => ConfigState -> m ConfigState
f = mapMOf pL (return . (port:) . filter (/= port))
in isJust <$> modifyConfigWithLock (const f) (return ()) | 255 | false | true | 0 | 13 | 60 | 114 | 57 | 57 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter_14_my_note.hs | mit | eval (Div val1 val2) = if eval val2 == 0
then error "divide 0?"
else div (eval val1) (eval val2) | 151 | eval (Div val1 val2) = if eval val2 == 0
then error "divide 0?"
else div (eval val1) (eval val2) | 151 | eval (Div val1 val2) = if eval val2 == 0
then error "divide 0?"
else div (eval val1) (eval val2) | 151 | false | false | 0 | 8 | 74 | 53 | 25 | 28 | null | null |
hvr/jhc | src/FrontEnd/KindInfer.hs | mit | getConstructorKinds :: KindEnv -> Map.Map Name Kind
getConstructorKinds ke = kindEnv ke | 87 | getConstructorKinds :: KindEnv -> Map.Map Name Kind
getConstructorKinds ke = kindEnv ke | 87 | getConstructorKinds ke = kindEnv ke | 35 | false | true | 0 | 7 | 11 | 28 | 13 | 15 | null | null |
dysinger/amazonka | amazonka-lambda/gen/Network/AWS/Lambda/UpdateFunctionConfiguration.hs | mpl-2.0 | -- | The function that Lambda calls to begin executing your function. For Node.js,
-- it is the /module-name.export/ value in your function.
ufcHandler :: Lens' UpdateFunctionConfiguration (Maybe Text)
ufcHandler = lens _ufcHandler (\s a -> s { _ufcHandler = a }) | 263 | ufcHandler :: Lens' UpdateFunctionConfiguration (Maybe Text)
ufcHandler = lens _ufcHandler (\s a -> s { _ufcHandler = a }) | 122 | ufcHandler = lens _ufcHandler (\s a -> s { _ufcHandler = a }) | 61 | true | true | 0 | 9 | 41 | 47 | 26 | 21 | null | null |
mimi1vx/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkUuoeCmd2 = verify checkUuoeCmd "echo `date`" | 54 | prop_checkUuoeCmd2 = verify checkUuoeCmd "echo `date`" | 54 | prop_checkUuoeCmd2 = verify checkUuoeCmd "echo `date`" | 54 | false | false | 1 | 5 | 5 | 15 | 5 | 10 | null | null |
nishiuramakoto/logiku | app/DBFS.hs | gpl-3.0 | isDirectoryWritableBy :: MonadIO m => DirectoryId -> UserAccountId -> SqlPersistT m Bool
isDirectoryWritableBy dir him = orM [ dir `isDirectoryOwnerWritableBy` him
, dir `isDirectoryEveryoneWritableBy` him
, dir `isDirectoryGroupWritableBy` him
... | 357 | isDirectoryWritableBy :: MonadIO m => DirectoryId -> UserAccountId -> SqlPersistT m Bool
isDirectoryWritableBy dir him = orM [ dir `isDirectoryOwnerWritableBy` him
, dir `isDirectoryEveryoneWritableBy` him
, dir `isDirectoryGroupWritableBy` him
... | 357 | isDirectoryWritableBy dir him = orM [ dir `isDirectoryOwnerWritableBy` him
, dir `isDirectoryEveryoneWritableBy` him
, dir `isDirectoryGroupWritableBy` him
] | 267 | false | true | 0 | 8 | 140 | 66 | 36 | 30 | null | null |
sdiehl/ghc | compiler/utils/Pretty.hs | bsd-3-clause | sep1 _ (NilAbove p) k ys = nilAbove_
(aboveNest p False k (reduceDoc (vcat ys))) | 121 | sep1 _ (NilAbove p) k ys = nilAbove_
(aboveNest p False k (reduceDoc (vcat ys))) | 121 | sep1 _ (NilAbove p) k ys = nilAbove_
(aboveNest p False k (reduceDoc (vcat ys))) | 121 | false | false | 0 | 11 | 55 | 48 | 23 | 25 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-printers/Language/Drasil/Plain/Print.hs | bsd-2-clause | pExprDoc f (Row es) = hcat $ map (pExprDoc f) es | 48 | pExprDoc f (Row es) = hcat $ map (pExprDoc f) es | 48 | pExprDoc f (Row es) = hcat $ map (pExprDoc f) es | 48 | false | false | 0 | 8 | 10 | 32 | 15 | 17 | null | null |
atzedijkstra/uhc-doc | src/text2text/Text/Parser/DocLaTeX.hs | bsd-3-clause | pTextItemSpace2 :: T2TPr TextItem
pTextItemSpace2 = pTextItemSpace1
<|> TextItem_LineFeed <$ pNl
<|> TextItem_CommentLF <$> pCmtLF
<|> TextItem_ParBreak <$ pPar | 235 | pTextItemSpace2 :: T2TPr TextItem
pTextItemSpace2 = pTextItemSpace1
<|> TextItem_LineFeed <$ pNl
<|> TextItem_CommentLF <$> pCmtLF
<|> TextItem_ParBreak <$ pPar | 235 | pTextItemSpace2 = pTextItemSpace1
<|> TextItem_LineFeed <$ pNl
<|> TextItem_CommentLF <$> pCmtLF
<|> TextItem_ParBreak <$ pPar | 196 | false | true | 0 | 10 | 93 | 38 | 19 | 19 | null | null |
mchakravarty/gloss-game | Graphics/Gloss/Game.hs | bsd-3-clause | boundingBox (G.Rotate _ang _p) = error "Graphics.Gloss.Game.boundingbox: Rotate not implemented yet" | 108 | boundingBox (G.Rotate _ang _p) = error "Graphics.Gloss.Game.boundingbox: Rotate not implemented yet" | 108 | boundingBox (G.Rotate _ang _p) = error "Graphics.Gloss.Game.boundingbox: Rotate not implemented yet" | 108 | false | false | 0 | 8 | 18 | 22 | 10 | 12 | null | null |
franrogers/pam | Codec/Image/PAM.hs | bsd-3-clause | splitPlainSample :: Int -> Int -> String
-> Maybe ([Int], String)
splitPlainSample 0 _ s
= return ([], s) | 126 | splitPlainSample :: Int -> Int -> String
-> Maybe ([Int], String)
splitPlainSample 0 _ s
= return ([], s) | 126 | splitPlainSample 0 _ s
= return ([], s) | 43 | false | true | 0 | 10 | 39 | 53 | 28 | 25 | null | null |
NotBrianZach/postgrest | src/PostgREST/DbStructure.hs | mit | addSynonymousRelations :: [(Column,Column)] -> [Relation] -> [Relation]
addSynonymousRelations _ [] = [] | 104 | addSynonymousRelations :: [(Column,Column)] -> [Relation] -> [Relation]
addSynonymousRelations _ [] = [] | 104 | addSynonymousRelations _ [] = [] | 32 | false | true | 0 | 7 | 11 | 43 | 24 | 19 | null | null |
urbanslug/ghc | testsuite/tests/deSugar/should_compile/ds051.hs | bsd-3-clause | f3 _ = [] | 9 | f3 _ = [] | 9 | f3 _ = [] | 9 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
eklavya/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | pEraseType t = t | 16 | pEraseType t = t | 16 | pEraseType t = t | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sleepomeno/TForth | src/TF/Util.hs | apache-2.0 | -- compExecIso :: Simple Iso (CompiledExecutedOrBoth StackEffect) CompExecEffect
-- compExecIso = iso fromThree toThree
fromThree :: CompiledExecutedOrBoth StackEffect -> StackEffectPair
fromThree (One' z) = (z, emptySt) | 222 | fromThree :: CompiledExecutedOrBoth StackEffect -> StackEffectPair
fromThree (One' z) = (z, emptySt) | 100 | fromThree (One' z) = (z, emptySt) | 33 | true | true | 0 | 7 | 27 | 35 | 19 | 16 | null | null |
truls/almique | src/Almique/Analyzer.hs | gpl-3.0 | newState :: AnState
newState = AnState { currentBlock = Nothing
, funStates = mempty
, busses = mempty
, classesSeen = mempty
, instances = mempty
, netName = ""
, comments = mempty
-- , n... | 353 | newState :: AnState
newState = AnState { currentBlock = Nothing
, funStates = mempty
, busses = mempty
, classesSeen = mempty
, instances = mempty
, netName = ""
, comments = mempty
-- , n... | 353 | newState = AnState { currentBlock = Nothing
, funStates = mempty
, busses = mempty
, classesSeen = mempty
, instances = mempty
, netName = ""
, comments = mempty
-- , nameState = 0
... | 333 | false | true | 0 | 7 | 190 | 66 | 38 | 28 | null | null |
nathyong/microghc-ghc | compiler/typecheck/TcType.hs | bsd-3-clause | legalOutgoingTyCon :: DynFlags -> Safety -> TyCon -> Bool
-- Checks validity of types going from Haskell -> external world
legalOutgoingTyCon dflags _ tc
= marshalableTyCon dflags tc | 184 | legalOutgoingTyCon :: DynFlags -> Safety -> TyCon -> Bool
legalOutgoingTyCon dflags _ tc
= marshalableTyCon dflags tc | 119 | legalOutgoingTyCon dflags _ tc
= marshalableTyCon dflags tc | 61 | true | true | 0 | 9 | 29 | 43 | 19 | 24 | null | null |
KaliszAd/programmierung2012 | aufgabe12_17.hs | gpl-2.0 | weiblich :: Person -> Bool
weiblich (PER _ Weiblich _) = True | 61 | weiblich :: Person -> Bool
weiblich (PER _ Weiblich _) = True | 61 | weiblich (PER _ Weiblich _) = True | 34 | false | true | 0 | 7 | 11 | 28 | 14 | 14 | null | null |
GaloisInc/mistral | src/Mistral/Parser/LexerCore.hs | bsd-3-clause | alexInputPrevChar :: AlexInput -> Char
alexInputPrevChar = aiChar | 66 | alexInputPrevChar :: AlexInput -> Char
alexInputPrevChar = aiChar | 66 | alexInputPrevChar = aiChar | 27 | false | true | 0 | 5 | 8 | 15 | 8 | 7 | null | null |
ezyang/ghc | compiler/basicTypes/IdInfo.hs | bsd-3-clause | ppArityInfo n = hsep [text "Arity", int n] | 42 | ppArityInfo n = hsep [text "Arity", int n] | 42 | ppArityInfo n = hsep [text "Arity", int n] | 42 | false | false | 1 | 7 | 7 | 27 | 11 | 16 | null | null |
nayosx/postgrest | test/Feature/AuthSpec.hs | mit | -- }}}
spec :: Spec
spec = beforeAll
(clearTable "postgrest.auth") . afterAll_ (clearTable "postgrest.auth")
$ around withApp
$ describe "authorization" $ do
it "hides tables that anonymous does not own" $
get "/authors_only" `shouldRespondWith` 404
it "indicates login failure (BasicAuth)" $ do
let... | 2,203 | spec :: Spec
spec = beforeAll
(clearTable "postgrest.auth") . afterAll_ (clearTable "postgrest.auth")
$ around withApp
$ describe "authorization" $ do
it "hides tables that anonymous does not own" $
get "/authors_only" `shouldRespondWith` 404
it "indicates login failure (BasicAuth)" $ do
let auth = ... | 2,195 | spec = beforeAll
(clearTable "postgrest.auth") . afterAll_ (clearTable "postgrest.auth")
$ around withApp
$ describe "authorization" $ do
it "hides tables that anonymous does not own" $
get "/authors_only" `shouldRespondWith` 404
it "indicates login failure (BasicAuth)" $ do
let auth = authHeaderBas... | 2,182 | true | true | 4 | 15 | 418 | 395 | 206 | 189 | null | null |
hferreiro/replay | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprImm (ImmFloat _) = ptext (sLit "naughty float immediate") | 61 | pprImm (ImmFloat _) = ptext (sLit "naughty float immediate") | 61 | pprImm (ImmFloat _) = ptext (sLit "naughty float immediate") | 61 | false | false | 0 | 7 | 9 | 24 | 11 | 13 | null | null |
prt2121/haskell-practice | parconc/other/BingTranslate.hs | apache-2.0 | -- Simon Marlow's AppId, please get your own from http://msdn.microsoft.com/en-us/library/ff512386.aspx
myAppId = "3157F269F56493B5581BAA4AE7B99C35052DA38B" | 156 | myAppId = "3157F269F56493B5581BAA4AE7B99C35052DA38B" | 52 | myAppId = "3157F269F56493B5581BAA4AE7B99C35052DA38B" | 52 | true | false | 1 | 5 | 12 | 11 | 4 | 7 | null | null |
nushio3/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickHsExpr e@(HsTcBracketOut {}) = return e | 47 | addTickHsExpr e@(HsTcBracketOut {}) = return e | 47 | addTickHsExpr e@(HsTcBracketOut {}) = return e | 47 | false | false | 0 | 8 | 6 | 22 | 11 | 11 | null | null |
adbrowne/dynamodb-eventstore | dynamodb-eventstore/tests/DynamoDbEventStore/GlobalFeedWriterSpec.hs | mit | globalFeedFromUploadList :: [UploadItem] -> Map.Map Text (Seq.Seq Int64)
globalFeedFromUploadList = foldl' acc Map.empty
where
acc :: Map.Map Text (Seq.Seq Int64)
-> UploadItem
-> Map.Map Text (Seq.Seq Int64)
acc s (stream,expectedVersion,bodies) =
let eventVersions =
... | 542 | globalFeedFromUploadList :: [UploadItem] -> Map.Map Text (Seq.Seq Int64)
globalFeedFromUploadList = foldl' acc Map.empty
where
acc :: Map.Map Text (Seq.Seq Int64)
-> UploadItem
-> Map.Map Text (Seq.Seq Int64)
acc s (stream,expectedVersion,bodies) =
let eventVersions =
... | 542 | globalFeedFromUploadList = foldl' acc Map.empty
where
acc :: Map.Map Text (Seq.Seq Int64)
-> UploadItem
-> Map.Map Text (Seq.Seq Int64)
acc s (stream,expectedVersion,bodies) =
let eventVersions =
Seq.fromList $ take (length bodies) [expectedVersion + 1 ..]
... | 469 | false | true | 3 | 12 | 162 | 175 | 89 | 86 | null | null |
jmitchell/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | extractPTermNames (PRunElab _ p _) = extract p | 48 | extractPTermNames (PRunElab _ p _) = extract p | 48 | extractPTermNames (PRunElab _ p _) = extract p | 48 | false | false | 0 | 7 | 9 | 22 | 10 | 12 | null | null |
tjakway/blackjack-simulator | src/Jakway/Blackjack/Result.hs | mit | foldOverResults startingRecords results = map (uncurry addResult) zippedArgs
where zippedArgs = zip startingRecords results
-- ^ TODO: come up with a better name... | 210 | foldOverResults startingRecords results = map (uncurry addResult) zippedArgs
where zippedArgs = zip startingRecords results
-- ^ TODO: come up with a better name... | 210 | foldOverResults startingRecords results = map (uncurry addResult) zippedArgs
where zippedArgs = zip startingRecords results
-- ^ TODO: come up with a better name... | 210 | false | false | 0 | 7 | 68 | 37 | 17 | 20 | null | null |
fmthoma/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | isTypeHoleCt _ = False | 22 | isTypeHoleCt _ = False | 22 | isTypeHoleCt _ = False | 22 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ezyang/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | arrayArrayPrimTyConKey = mkPreludeTyConUnique 40 | 65 | arrayArrayPrimTyConKey = mkPreludeTyConUnique 40 | 65 | arrayArrayPrimTyConKey = mkPreludeTyConUnique 40 | 65 | false | false | 0 | 5 | 20 | 9 | 4 | 5 | null | null |
johnbcoughlin/mucalc | test/MuCalc/Generators.hs | gpl-2.0 | iffActions :: Int -> Gen (PState -> [PState])
iffActions n = ((mapMasks n) `fmap` listOf (iffMaskGen n)) | 104 | iffActions :: Int -> Gen (PState -> [PState])
iffActions n = ((mapMasks n) `fmap` listOf (iffMaskGen n)) | 104 | iffActions n = ((mapMasks n) `fmap` listOf (iffMaskGen n)) | 58 | false | true | 0 | 9 | 16 | 55 | 29 | 26 | null | null |
mithrandi/ssh-key-generator | SSH/Agent.hs | mit | putMessage (SignResponse d) = do
putWord8 ssh2_agent_sign_response
putString d | 82 | putMessage (SignResponse d) = do
putWord8 ssh2_agent_sign_response
putString d | 82 | putMessage (SignResponse d) = do
putWord8 ssh2_agent_sign_response
putString d | 82 | false | false | 0 | 7 | 12 | 27 | 11 | 16 | null | null |
Jonplussed/midi-free | src/Sound/MIDI/Values/Note.hs | gpl-3.0 | dFlat9 = Note 109 | 19 | dFlat9 = Note 109 | 19 | dFlat9 = Note 109 | 19 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
silky/Tidal | Sound/Tidal/Dirt.hs | gpl-3.0 | kriole :: OscShape
kriole = OscShape {path = "/trigger",
params = [ I "ksymbol" Nothing,
F "kpitch" (Just 1)
],
cpsStamp = False,
timestamp = MessageStamp,
latency = 0.04,
namedPara... | 380 | kriole :: OscShape
kriole = OscShape {path = "/trigger",
params = [ I "ksymbol" Nothing,
F "kpitch" (Just 1)
],
cpsStamp = False,
timestamp = MessageStamp,
latency = 0.04,
namedPara... | 380 | kriole = OscShape {path = "/trigger",
params = [ I "ksymbol" Nothing,
F "kpitch" (Just 1)
],
cpsStamp = False,
timestamp = MessageStamp,
latency = 0.04,
namedParams = False,
... | 361 | false | true | 0 | 11 | 207 | 89 | 49 | 40 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | alternativeClassKey = mkPreludeMiscIdUnique 753 | 47 | alternativeClassKey = mkPreludeMiscIdUnique 753 | 47 | alternativeClassKey = mkPreludeMiscIdUnique 753 | 47 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
np/ling | Ling/Check/Base.hs | bsd-3-clause | checkPrefWellFormness :: MonadError TCErr m => Pref -> m ()
checkPrefWellFormness (Prll pref) = do
checkDisjointness "free channels" freeChans pref
checkDisjointness "bound channels" boundChans pref
checkDisjointness "bound names" boundVars pref | 257 | checkPrefWellFormness :: MonadError TCErr m => Pref -> m ()
checkPrefWellFormness (Prll pref) = do
checkDisjointness "free channels" freeChans pref
checkDisjointness "bound channels" boundChans pref
checkDisjointness "bound names" boundVars pref | 257 | checkPrefWellFormness (Prll pref) = do
checkDisjointness "free channels" freeChans pref
checkDisjointness "bound channels" boundChans pref
checkDisjointness "bound names" boundVars pref | 197 | false | true | 0 | 8 | 41 | 68 | 30 | 38 | null | null |
rfranek/duckling | Duckling/Time/Helpers.hs | bsd-3-clause | isGrainOfTime _ _ = False | 25 | isGrainOfTime _ _ = False | 25 | isGrainOfTime _ _ = False | 25 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
mbakke/ganeti | src/Ganeti/HTools/Program/Harep.hs | bsd-2-clause | -- | Return the 'AutoRepairData' element of an 'AutoRepairStatus' type.
getArData :: AutoRepairStatus -> Maybe AutoRepairData
getArData status =
case status of
ArHealthy (Just d) -> Just d
ArFailedRepair d -> Just d
ArPendingRepair d -> Just d
ArNeedsRepair d -> Just d
_ -> ... | 530 | getArData :: AutoRepairStatus -> Maybe AutoRepairData
getArData status =
case status of
ArHealthy (Just d) -> Just d
ArFailedRepair d -> Just d
ArPendingRepair d -> Just d
ArNeedsRepair d -> Just d
_ -> Nothing
-- | Return a short name for each auto-repair status.
--
-- Thi... | 458 | getArData status =
case status of
ArHealthy (Just d) -> Just d
ArFailedRepair d -> Just d
ArPendingRepair d -> Just d
ArNeedsRepair d -> Just d
_ -> Nothing
-- | Return a short name for each auto-repair status.
--
-- This is a more concise representation of the status, beca... | 404 | true | true | 0 | 10 | 124 | 90 | 43 | 47 | null | null |
energyflowanalysis/efa-2.1 | test/EFA/Test/EquationSystem/Given.hs | bsd-3-clause | solvedGraph =
mapFst (fmap numericGraph) $
EqSys.solveTracked flowGraph partialGiven | 90 | solvedGraph =
mapFst (fmap numericGraph) $
EqSys.solveTracked flowGraph partialGiven | 90 | solvedGraph =
mapFst (fmap numericGraph) $
EqSys.solveTracked flowGraph partialGiven | 90 | false | false | 3 | 6 | 14 | 31 | 12 | 19 | null | null |
lennart/coriolis | Math/Coriolis/Coriolis.hs | mit | getParamValue (RS x) = 0.0 | 26 | getParamValue (RS x) = 0.0 | 26 | getParamValue (RS x) = 0.0 | 26 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | readList_RDR, readListDefault_RDR, readListPrec_RDR, readListPrecDefault_RDR,
readPrec_RDR, parens_RDR, choose_RDR, lexP_RDR, expectP_RDR :: RdrName
readList_RDR = varQual_RDR gHC_READ (fsLit "readList") | 218 | readList_RDR, readListDefault_RDR, readListPrec_RDR, readListPrecDefault_RDR,
readPrec_RDR, parens_RDR, choose_RDR, lexP_RDR, expectP_RDR :: RdrName
readList_RDR = varQual_RDR gHC_READ (fsLit "readList") | 218 | readList_RDR = varQual_RDR gHC_READ (fsLit "readList") | 65 | false | true | 0 | 7 | 31 | 38 | 27 | 11 | null | null |
CulpaBS/wbBach | src/Futhark/Analysis/ScalExp.hs | bsd-3-clause | expandScalExp look (SAbs se) = SAbs $ expandScalExp look se | 59 | expandScalExp look (SAbs se) = SAbs $ expandScalExp look se | 59 | expandScalExp look (SAbs se) = SAbs $ expandScalExp look se | 59 | false | false | 0 | 6 | 9 | 28 | 12 | 16 | null | null |
tpsinnem/Idris-dev | src/Idris/Docstrings.hs | bsd-3-clause | renderInline :: (a -> String -> Doc OutputAnnotation) -> Inline a -> Doc OutputAnnotation
renderInline pp (Str s) = text $ T.unpack s | 133 | renderInline :: (a -> String -> Doc OutputAnnotation) -> Inline a -> Doc OutputAnnotation
renderInline pp (Str s) = text $ T.unpack s | 133 | renderInline pp (Str s) = text $ T.unpack s | 43 | false | true | 0 | 9 | 22 | 59 | 28 | 31 | null | null |
GaloisInc/halvm-ghc | utils/genapply/Main.hs | bsd-3-clause | enterFastPath _ _ _ _ = empty | 29 | enterFastPath _ _ _ _ = empty | 29 | enterFastPath _ _ _ _ = empty | 29 | false | false | 1 | 5 | 6 | 15 | 6 | 9 | null | null |
spechub/Hets | Comorphisms/Hs2HOLCFaux.hs | gpl-2.0 | getDepSent :: [[Named Sentence]] -> [[Named Sentence]]
getDepSent = abGetDep sentDepOn | 86 | getDepSent :: [[Named Sentence]] -> [[Named Sentence]]
getDepSent = abGetDep sentDepOn | 86 | getDepSent = abGetDep sentDepOn | 31 | false | true | 0 | 10 | 10 | 43 | 20 | 23 | null | null |
parapluu/encore | src/ir/AST/PrettyPrinter.hs | bsd-3-clause | ppExpr UIntLiteral {intLit} = int intLit <> "u" | 47 | ppExpr UIntLiteral {intLit} = int intLit <> "u" | 47 | ppExpr UIntLiteral {intLit} = int intLit <> "u" | 47 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
mariefarrell/Hets | Temporal/ModalCaslToMu.hs | gpl-2.0 | convert' (Casl.Pand phi psi) = liftM2 Mu.Pand (convert' phi) (convert' psi) | 75 | convert' (Casl.Pand phi psi) = liftM2 Mu.Pand (convert' phi) (convert' psi) | 75 | convert' (Casl.Pand phi psi) = liftM2 Mu.Pand (convert' phi) (convert' psi) | 75 | false | false | 0 | 8 | 10 | 40 | 19 | 21 | null | null |
CrazyMerlyn/99problems-haskell | 55-60.hs | mit | evenTrees = [concat [[Branch 'x' l r, Branch 'x' r l] | l <- left, r <- right] | (left, right) <- (zip trees (tail trees))] | 124 | evenTrees = [concat [[Branch 'x' l r, Branch 'x' r l] | l <- left, r <- right] | (left, right) <- (zip trees (tail trees))] | 124 | evenTrees = [concat [[Branch 'x' l r, Branch 'x' r l] | l <- left, r <- right] | (left, right) <- (zip trees (tail trees))] | 124 | false | false | 0 | 11 | 26 | 79 | 41 | 38 | null | null |
genos/online_problems | advent_of_code_2020/day09/Main.hs | mit | part1 :: [Int] -> Maybe Int
part1 xmas = viaNonEmpty (fst . head) . filter (not . f) $ zip (drop 25 xmas)
(windows 25 xmas)
where
f (x, xs) =
let ys = fromList xs in I.foldl' (\b y -> b || I.member (x - y) ys) False ys | 288 | part1 :: [Int] -> Maybe Int
part1 xmas = viaNonEmpty (fst . head) . filter (not . f) $ zip (drop 25 xmas)
(windows 25 xmas)
where
f (x, xs) =
let ys = fromList xs in I.foldl' (\b y -> b || I.member (x - y) ys) False ys | 288 | part1 xmas = viaNonEmpty (fst . head) . filter (not . f) $ zip (drop 25 xmas)
(windows 25 xmas)
where
f (x, xs) =
let ys = fromList xs in I.foldl' (\b y -> b || I.member (x - y) ys) False ys | 260 | false | true | 0 | 13 | 119 | 146 | 71 | 75 | null | null |
ribag/ganeti-experiments | src/Ganeti/HTools/Program/Hspace.hs | gpl-2.0 | -- | List holding 'Cluster.CStats' formatting information.
clusterData :: [(String, Cluster.CStats -> String)]
clusterData = [ ("MEM", printf "%.0f" . Cluster.csTmem)
, ("DSK", printf "%.0f" . Cluster.csTdsk)
, ("CPU", printf "%.0f" . Cluster.csTcpu)
, ("VCPU", printf "%d" . Cl... | 349 | clusterData :: [(String, Cluster.CStats -> String)]
clusterData = [ ("MEM", printf "%.0f" . Cluster.csTmem)
, ("DSK", printf "%.0f" . Cluster.csTdsk)
, ("CPU", printf "%.0f" . Cluster.csTcpu)
, ("VCPU", printf "%d" . Cluster.csVcpu)
] | 290 | clusterData = [ ("MEM", printf "%.0f" . Cluster.csTmem)
, ("DSK", printf "%.0f" . Cluster.csTdsk)
, ("CPU", printf "%.0f" . Cluster.csTcpu)
, ("VCPU", printf "%d" . Cluster.csVcpu)
] | 238 | true | true | 0 | 8 | 95 | 99 | 56 | 43 | null | null |
antarestrader/sapphire | Parser.hs | gpl-3.0 | functionBlockExtend (EVar var) = functionBlock >>= (\x -> return $ Apply var [x] Private) | 89 | functionBlockExtend (EVar var) = functionBlock >>= (\x -> return $ Apply var [x] Private) | 89 | functionBlockExtend (EVar var) = functionBlock >>= (\x -> return $ Apply var [x] Private) | 89 | false | false | 0 | 10 | 13 | 41 | 21 | 20 | null | null |
snoyberg/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | ---------------- Template Haskell -------------------
-- THNames.hs: USES DataUniques 100-150
-----------------------------------------------------
{-
************************************************************************
* *
\subsubsection[U... | 1,079 | wildCardKey, absentErrorIdKey, augmentIdKey, appendIdKey,
buildIdKey, errorIdKey, foldrIdKey, recSelErrorIdKey,
seqIdKey, irrefutPatErrorIdKey, eqStringIdKey,
noMethodBindingErrorIdKey, nonExhaustiveGuardsErrorIdKey,
runtimeErrorIdKey, patErrorIdKey, voidPrimIdKey,
realWorldPrimIdKey, recConErrorIdK... | 538 | wildCardKey = mkPreludeMiscIdUnique 0 | 56 | true | true | 0 | 5 | 252 | 66 | 59 | 7 | null | null |
rueshyna/gogol | gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs | mpl-2.0 | -- | The font files (with all supported scripts) for each one of the
-- available variants, as a key : value map.
wFiles :: Lens' Webfont (Maybe WebfontFiles)
wFiles = lens _wFiles (\ s a -> s{_wFiles = a}) | 206 | wFiles :: Lens' Webfont (Maybe WebfontFiles)
wFiles = lens _wFiles (\ s a -> s{_wFiles = a}) | 92 | wFiles = lens _wFiles (\ s a -> s{_wFiles = a}) | 47 | true | true | 0 | 9 | 39 | 47 | 26 | 21 | null | null |
swift-nav/wolf | src/Network/AWS/Wolf/Decide.hs | mit | completed :: MonadAmazonDecision c m => HistoryEvent -> m Decision
completed he = do
traceInfo "completed" mempty
hes <- view adcEvents
(input, priority, name) <- maybeThrowIO' "No Completed Information" $ do
atcea <- he ^. heActivityTaskCompletedEventAttributes
he' <- flip find hes $ (== atcea ^. atcea... | 712 | completed :: MonadAmazonDecision c m => HistoryEvent -> m Decision
completed he = do
traceInfo "completed" mempty
hes <- view adcEvents
(input, priority, name) <- maybeThrowIO' "No Completed Information" $ do
atcea <- he ^. heActivityTaskCompletedEventAttributes
he' <- flip find hes $ (== atcea ^. atcea... | 712 | completed he = do
traceInfo "completed" mempty
hes <- view adcEvents
(input, priority, name) <- maybeThrowIO' "No Completed Information" $ do
atcea <- he ^. heActivityTaskCompletedEventAttributes
he' <- flip find hes $ (== atcea ^. atceaScheduledEventId) . view heEventId
atsea <- he' ^. heActivityTa... | 645 | false | true | 0 | 15 | 133 | 235 | 112 | 123 | null | null |
sdiehl/ghc | compiler/basicTypes/Var.hs | bsd-3-clause | -- | Exported 'Var's will not be removed as dead code
mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
mkExportedLocalVar details name ty info
= mk_id name ty (LocalId Exported) details info | 207 | mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
mkExportedLocalVar details name ty info
= mk_id name ty (LocalId Exported) details info | 153 | mkExportedLocalVar details name ty info
= mk_id name ty (LocalId Exported) details info | 89 | true | true | 0 | 8 | 36 | 54 | 27 | 27 | null | null |
takagi/SimulationDSL | SimulationDSL/SimulationDSL/Compiler/CodeGen.hs | bsd-3-clause | -- ... (x,v,a) = let x' = ...
-- in (x',v,a)
updateOneDecClause :: Machine -> [String] -> String -> ClauseQ
updateOneDecClause m xs x = clause [updateOneDecClausePat xs]
(updateOneDecClauseBody m xs x)
[] | 288 | updateOneDecClause :: Machine -> [String] -> String -> ClauseQ
updateOneDecClause m xs x = clause [updateOneDecClausePat xs]
(updateOneDecClauseBody m xs x)
[] | 229 | updateOneDecClause m xs x = clause [updateOneDecClausePat xs]
(updateOneDecClauseBody m xs x)
[] | 166 | true | true | 0 | 7 | 116 | 60 | 31 | 29 | null | null |
sopvop/snap | src/Snap/Snaplet/Internal/Types.hs | bsd-3-clause | getRoutePattern :: Handler b v (Maybe ByteString)
getRoutePattern =
withTop' id $ liftM _scRoutePattern getOpaqueConfig | 123 | getRoutePattern :: Handler b v (Maybe ByteString)
getRoutePattern =
withTop' id $ liftM _scRoutePattern getOpaqueConfig | 123 | getRoutePattern =
withTop' id $ liftM _scRoutePattern getOpaqueConfig | 73 | false | true | 0 | 7 | 18 | 36 | 17 | 19 | null | null |
ribag/ganeti-experiments | src/Ganeti/Config.hs | gpl-2.0 | -- | Builds link -> ip -> instname map.
--
-- TODO: improve this by splitting it into multiple independent functions:
--
-- * abstract the \"fetch instance with filled params\" functionality
--
-- * abstsract the [instance] -> [(nic, instance_name)] part
--
-- * etc.
buildLinkIpInstnameMap :: ConfigData -> LinkIpMap
bu... | 1,170 | buildLinkIpInstnameMap :: ConfigData -> LinkIpMap
buildLinkIpInstnameMap cfg =
let cluster = configCluster cfg
instances = M.elems . fromContainer . configInstances $ cfg
defparams = (M.!) (fromContainer $ clusterNicparams cluster) C.ppDefault
nics = concatMap (\i -> [(instName i, nic) | nic <- inst... | 902 | buildLinkIpInstnameMap cfg =
let cluster = configCluster cfg
instances = M.elems . fromContainer . configInstances $ cfg
defparams = (M.!) (fromContainer $ clusterNicparams cluster) C.ppDefault
nics = concatMap (\i -> [(instName i, nic) | nic <- instNics i])
instances
in foldl' (\accu... | 852 | true | true | 0 | 17 | 408 | 257 | 131 | 126 | null | null |
brendanhay/gogol | gogol-storage/gen/Network/Google/Resource/Storage/Projects/HmacKeys/List.hs | mpl-2.0 | -- | Creates a value of 'ProjectsHmacKeysList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'phklShowDeletedKeys'
--
-- * 'phklUserProject'
--
-- * 'phklServiceAccountEmail'
--
-- * 'phklPageToken'
--
-- * 'phklProjectId'
--
-- * 'p... | 694 | projectsHmacKeysList
:: Text -- ^ 'phklProjectId'
-> ProjectsHmacKeysList
projectsHmacKeysList pPhklProjectId_ =
ProjectsHmacKeysList'
{ _phklShowDeletedKeys = Nothing
, _phklUserProject = Nothing
, _phklServiceAccountEmail = Nothing
, _phklPageToken = Nothing
, _phklProjectId = pPhklProje... | 359 | projectsHmacKeysList pPhklProjectId_ =
ProjectsHmacKeysList'
{ _phklShowDeletedKeys = Nothing
, _phklUserProject = Nothing
, _phklServiceAccountEmail = Nothing
, _phklPageToken = Nothing
, _phklProjectId = pPhklProjectId_
, _phklMaxResults = 250
} | 277 | true | true | 0 | 7 | 128 | 81 | 52 | 29 | null | null |
forked-upstream-packages-for-ghcjs/ghcjs | ghcjs/src/Gen2/Base.hs | mit | newLocals :: [Ident]
newLocals = filter (not . isKeyword) $ map (TxtI . T.pack) $ (map (:[]) chars0) ++ concatMap mkIdents [1..]
where
mkIdents n = [c0:cs | c0 <- chars0, cs <- replicateM n chars]
chars0 = ['a'..'z']++['A'..'Z']
chars = chars0++['0'..'9']
isKeyword (TxtI i) = i `HS.member` kwSet
k... | 931 | newLocals :: [Ident]
newLocals = filter (not . isKeyword) $ map (TxtI . T.pack) $ (map (:[]) chars0) ++ concatMap mkIdents [1..]
where
mkIdents n = [c0:cs | c0 <- chars0, cs <- replicateM n chars]
chars0 = ['a'..'z']++['A'..'Z']
chars = chars0++['0'..'9']
isKeyword (TxtI i) = i `HS.member` kwSet
k... | 931 | newLocals = filter (not . isKeyword) $ map (TxtI . T.pack) $ (map (:[]) chars0) ++ concatMap mkIdents [1..]
where
mkIdents n = [c0:cs | c0 <- chars0, cs <- replicateM n chars]
chars0 = ['a'..'z']++['A'..'Z']
chars = chars0++['0'..'9']
isKeyword (TxtI i) = i `HS.member` kwSet
kwSet = HS.fromList ke... | 910 | false | true | 9 | 11 | 270 | 340 | 186 | 154 | null | null |
norm2782/uuagc | tools/loopbreaker/LoopBreaker.hs | bsd-3-clause | defaultOptions :: Options
defaultOptions
= Options { attrFileInitial = "initial.attrs"
, attrFileIntermediate = "intermediate.attrs"
, builderScript = "./builder.sh"
, runnerScript = "./tester.sh"
, maxWaitTime = 3
, logFile ... | 454 | defaultOptions :: Options
defaultOptions
= Options { attrFileInitial = "initial.attrs"
, attrFileIntermediate = "intermediate.attrs"
, builderScript = "./builder.sh"
, runnerScript = "./tester.sh"
, maxWaitTime = 3
, logFile ... | 454 | defaultOptions
= Options { attrFileInitial = "initial.attrs"
, attrFileIntermediate = "intermediate.attrs"
, builderScript = "./builder.sh"
, runnerScript = "./tester.sh"
, maxWaitTime = 3
, logFile = "execution.log"... | 428 | false | true | 0 | 6 | 197 | 64 | 39 | 25 | null | null |
gnn/Hets | Proofs/AbstractState.hs | gpl-2.0 | recalculateSublogicAndSelectedTheory :: ProofState -> ProofState
recalculateSublogicAndSelectedTheory st = let
sTh = makeSelectedTheory st
sLo = sublogicOfTh sTh
in st
{ selectedTheory = sTh
, proversMap = shrinkKnownProvers sLo $ proversMap st } | 260 | recalculateSublogicAndSelectedTheory :: ProofState -> ProofState
recalculateSublogicAndSelectedTheory st = let
sTh = makeSelectedTheory st
sLo = sublogicOfTh sTh
in st
{ selectedTheory = sTh
, proversMap = shrinkKnownProvers sLo $ proversMap st } | 260 | recalculateSublogicAndSelectedTheory st = let
sTh = makeSelectedTheory st
sLo = sublogicOfTh sTh
in st
{ selectedTheory = sTh
, proversMap = shrinkKnownProvers sLo $ proversMap st } | 195 | false | true | 0 | 10 | 45 | 64 | 32 | 32 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.