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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enolan/emp-pl-site | Foundation.hs | agpl-3.0 | -- Note: Some functionality previously present in the scaffolding has been
-- moved to documentation in the Wiki. Following are some hopefully helpful
-- links:
--
-- https://github.com/yesodweb/yesod/wiki/Sending-email
-- https://github.com/yesodweb/yesod/wiki/Serve-static-files-from-a-separate-domain
-- https://githu... | 492 | isAjax :: MonadHandler f => f Bool
isAjax = maybe False (=="XMLHttpRequest") <$> lookupHeader "X-Requested-With" | 112 | isAjax = maybe False (=="XMLHttpRequest") <$> lookupHeader "X-Requested-With" | 77 | true | true | 0 | 7 | 47 | 44 | 25 | 19 | null | null |
beni55/cryptol | src/Cryptol/Symbolic/Prims.hs | bsd-3-clause | selectV :: (Integer -> Value) -> Value -> Value
selectV f v = sel 0 bits
where
bits = map fromVBit (fromSeq v) -- index bits in big-endian order
sel :: Integer -> [SBool] -> Value
sel offset [] = f offset
sel offset (b : bs) = iteValue b m1 m2
where m1 = sel (offset + 2 ^ length bs) bs
... | 348 | selectV :: (Integer -> Value) -> Value -> Value
selectV f v = sel 0 bits
where
bits = map fromVBit (fromSeq v) -- index bits in big-endian order
sel :: Integer -> [SBool] -> Value
sel offset [] = f offset
sel offset (b : bs) = iteValue b m1 m2
where m1 = sel (offset + 2 ^ length bs) bs
... | 348 | selectV f v = sel 0 bits
where
bits = map fromVBit (fromSeq v) -- index bits in big-endian order
sel :: Integer -> [SBool] -> Value
sel offset [] = f offset
sel offset (b : bs) = iteValue b m1 m2
where m1 = sel (offset + 2 ^ length bs) bs
m2 = sel offset bs | 300 | false | true | 1 | 8 | 110 | 157 | 76 | 81 | null | null |
sjpet/quark | src/Main.hs | mit | resizeLayout :: (QFE.Layout -> Project -> IO ())
-> QFE.Layout -> Project -> IO ()
resizeLayout continueFunction layout' project = do
QFE.onResize
let lnOffset = lnWidth $ ebContents activeBuffer
let ((Buffer _ _ crs _), _) = activeBuffer
layout <- fmap (firstL (updateOffset crs lnOffset)) ... | 1,156 | resizeLayout :: (QFE.Layout -> Project -> IO ())
-> QFE.Layout -> Project -> IO ()
resizeLayout continueFunction layout' project = do
QFE.onResize
let lnOffset = lnWidth $ ebContents activeBuffer
let ((Buffer _ _ crs _), _) = activeBuffer
layout <- fmap (firstL (updateOffset crs lnOffset)) ... | 1,156 | resizeLayout continueFunction layout' project = do
QFE.onResize
let lnOffset = lnWidth $ ebContents activeBuffer
let ((Buffer _ _ crs _), _) = activeBuffer
layout <- fmap (firstL (updateOffset crs lnOffset)) $ QFE.defaultLayout w
refreshText layout project
refreshTree layout project
continue... | 1,060 | false | true | 1 | 13 | 281 | 189 | 86 | 103 | null | null |
aretoky/egison2 | hs-src/Language/Egison/Parser.hs | mit | parseMacroVarExpr :: Parser EgisonExpr
parseMacroVarExpr = do
char '%'
name <- identifier
return $ MacroVarExpr name | 122 | parseMacroVarExpr :: Parser EgisonExpr
parseMacroVarExpr = do
char '%'
name <- identifier
return $ MacroVarExpr name | 122 | parseMacroVarExpr = do
char '%'
name <- identifier
return $ MacroVarExpr name | 83 | false | true | 0 | 8 | 21 | 37 | 16 | 21 | null | null |
manutuero/PdeP | Funcional (Haskell)/Modelado de informacion.hs | mit | cantidadPreguntas :: Parcial -> Int
cantidadPreguntas (Parcial _ cantidadPreguntas) = cantidadPreguntas | 103 | cantidadPreguntas :: Parcial -> Int
cantidadPreguntas (Parcial _ cantidadPreguntas) = cantidadPreguntas | 103 | cantidadPreguntas (Parcial _ cantidadPreguntas) = cantidadPreguntas | 67 | false | true | 0 | 9 | 10 | 32 | 14 | 18 | null | null |
kyk0704/haskell-test | src/Function.hs | bsd-3-clause | -- when a length > 0
length' [] = 0 | 37 | length' [] = 0 | 14 | length' [] = 0 | 14 | true | false | 1 | 5 | 11 | 16 | 6 | 10 | null | null |
razvan9310/barrelfish | hake/RuleDefs.hs | mit | applicationBuildFn tdb tf args =
Rules [ appBuildArch tdb tf args arch | arch <- Args.architectures args ] | 110 | applicationBuildFn tdb tf args =
Rules [ appBuildArch tdb tf args arch | arch <- Args.architectures args ] | 110 | applicationBuildFn tdb tf args =
Rules [ appBuildArch tdb tf args arch | arch <- Args.architectures args ] | 110 | false | false | 0 | 10 | 21 | 41 | 19 | 22 | null | null |
mit-plv/riscv-semantics | src/Spec/Machine.hs | bsd-3-clause | setCSRField :: (RiscvMachine p t, Integral s) => CSRField -> s -> p ()
setCSRField field value = do
let ty = fieldType field
if (ty == WLRL || ty == WARL) then do
p <- getPlatform
v <- (writePlatformCSRField p) field (fromIntegral value)
unsafeSetCSRField field v
else unsafeSetCSRField field value | 316 | setCSRField :: (RiscvMachine p t, Integral s) => CSRField -> s -> p ()
setCSRField field value = do
let ty = fieldType field
if (ty == WLRL || ty == WARL) then do
p <- getPlatform
v <- (writePlatformCSRField p) field (fromIntegral value)
unsafeSetCSRField field v
else unsafeSetCSRField field value | 316 | setCSRField field value = do
let ty = fieldType field
if (ty == WLRL || ty == WARL) then do
p <- getPlatform
v <- (writePlatformCSRField p) field (fromIntegral value)
unsafeSetCSRField field v
else unsafeSetCSRField field value | 245 | false | true | 0 | 13 | 68 | 128 | 61 | 67 | null | null |
jrclogic/SMCDEL | src/SMCDEL/Symbolic/K.hs | gpl-2.0 | reduce _ Ck {} = Nothing | 31 | reduce _ Ck {} = Nothing | 31 | reduce _ Ck {} = Nothing | 31 | false | false | 0 | 6 | 12 | 15 | 7 | 8 | null | null |
zinfra/khan | khan/src/Khan/Internal/Options.hs | mpl-2.0 | checkFile :: MonadIO m => FilePath -> String -> ExceptT AWSError m ()
checkFile p e = check p msg >> checkIO (not <$> FS.isFile p) msg
where
msg = Text.unpack ("file '" <> toTextIgnore p <> "'") ++ e | 205 | checkFile :: MonadIO m => FilePath -> String -> ExceptT AWSError m ()
checkFile p e = check p msg >> checkIO (not <$> FS.isFile p) msg
where
msg = Text.unpack ("file '" <> toTextIgnore p <> "'") ++ e | 205 | checkFile p e = check p msg >> checkIO (not <$> FS.isFile p) msg
where
msg = Text.unpack ("file '" <> toTextIgnore p <> "'") ++ e | 135 | false | true | 3 | 10 | 45 | 107 | 47 | 60 | null | null |
purebred-mua/purebred | src/Purebred/UI/Actions.hs | agpl-3.0 | -- | Pipe the selected entity to the command given from the editor widget.
--
pipeToCommand :: Action 'ViewMail 'MailAttachmentPipeToEditor (T.Next AppState)
pipeToCommand =
Action
{ _aDescription = ["pipe to external command"]
, _aAction = do
cmd <- uses (asMailView . mvPipeCommand . E.editContentsL) (T.un... | 390 | pipeToCommand :: Action 'ViewMail 'MailAttachmentPipeToEditor (T.Next AppState)
pipeToCommand =
Action
{ _aDescription = ["pipe to external command"]
, _aAction = do
cmd <- uses (asMailView . mvPipeCommand . E.editContentsL) (T.unpack . currentLine)
stateSuspendAndResume (pipeCommand' cmd)
} | 312 | pipeToCommand =
Action
{ _aDescription = ["pipe to external command"]
, _aAction = do
cmd <- uses (asMailView . mvPipeCommand . E.editContentsL) (T.unpack . currentLine)
stateSuspendAndResume (pipeCommand' cmd)
} | 232 | true | true | 0 | 14 | 70 | 104 | 52 | 52 | null | null |
zachsully/hakaru | haskell/Language/Hakaru/Syntax/Gensym.hs | bsd-3-clause | varForExpr
:: (Functor m, Gensym m, ABT Term abt)
=> abt '[] a -> m (Variable a)
varForExpr v = fmap (\n -> Variable "" n (typeOf v)) freshVarId | 152 | varForExpr
:: (Functor m, Gensym m, ABT Term abt)
=> abt '[] a -> m (Variable a)
varForExpr v = fmap (\n -> Variable "" n (typeOf v)) freshVarId | 152 | varForExpr v = fmap (\n -> Variable "" n (typeOf v)) freshVarId | 63 | false | true | 0 | 10 | 36 | 90 | 43 | 47 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | supplicatingly = id | 19 | supplicatingly = id | 19 | supplicatingly = id | 19 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
homam/fsm-conversational-ui | src/TestFSM5.hs | bsd-3-clause | -- globalFlow
globalApp = Await {
name = "start",
message = "What do you want to do?",
parser = \ i -> case i of
"quit" -> Just UIActionQuit
"sum" -> Just UIActionSumTwoNumbers
_ -> Nothing
,
handler = \e -> case e of
UIActionSumTwoNumbers -> return $ AOLink YieldFlower { withFlow = ("arithFl... | 414 | globalApp = Await {
name = "start",
message = "What do you want to do?",
parser = \ i -> case i of
"quit" -> Just UIActionQuit
"sum" -> Just UIActionSumTwoNumbers
_ -> Nothing
,
handler = \e -> case e of
UIActionSumTwoNumbers -> return $ AOLink YieldFlower { withFlow = ("arithFlow", USArithOpe... | 399 | globalApp = Await {
name = "start",
message = "What do you want to do?",
parser = \ i -> case i of
"quit" -> Just UIActionQuit
"sum" -> Just UIActionSumTwoNumbers
_ -> Nothing
,
handler = \e -> case e of
UIActionSumTwoNumbers -> return $ AOLink YieldFlower { withFlow = ("arithFlow", USArithOpe... | 399 | true | false | 0 | 18 | 96 | 128 | 70 | 58 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/Resource/AndroidManagement/Enterprises/Devices/Operations/Get.hs | mpl-2.0 | -- | OAuth access token.
edogAccessToken :: Lens' EnterprisesDevicesOperationsGet (Maybe Text)
edogAccessToken
= lens _edogAccessToken
(\ s a -> s{_edogAccessToken = a}) | 177 | edogAccessToken :: Lens' EnterprisesDevicesOperationsGet (Maybe Text)
edogAccessToken
= lens _edogAccessToken
(\ s a -> s{_edogAccessToken = a}) | 152 | edogAccessToken
= lens _edogAccessToken
(\ s a -> s{_edogAccessToken = a}) | 82 | true | true | 1 | 9 | 29 | 51 | 25 | 26 | null | null |
snowleopard/alga | test/Algebra/Graph/Test/Generic.hs | mit | testVertexIntSet :: TestsuiteInt g -> IO ()
testVertexIntSet (prefix, API{..}) = do
putStrLn $ "\n============ " ++ prefix ++ "vertexIntSet ============"
test "vertexIntSet empty == IntSet.empty" $
vertexIntSet empty == IntSet.empty
test "vertexIntSet . vertex == IntSet.singleton" $ \... | 627 | testVertexIntSet :: TestsuiteInt g -> IO ()
testVertexIntSet (prefix, API{..}) = do
putStrLn $ "\n============ " ++ prefix ++ "vertexIntSet ============"
test "vertexIntSet empty == IntSet.empty" $
vertexIntSet empty == IntSet.empty
test "vertexIntSet . vertex == IntSet.singleton" $ \... | 627 | testVertexIntSet (prefix, API{..}) = do
putStrLn $ "\n============ " ++ prefix ++ "vertexIntSet ============"
test "vertexIntSet empty == IntSet.empty" $
vertexIntSet empty == IntSet.empty
test "vertexIntSet . vertex == IntSet.singleton" $ \x ->
(vertexIntSet . vertex) x == I... | 583 | false | true | 0 | 12 | 152 | 174 | 82 | 92 | null | null |
bergmark/hlint | src/Hint/List.hs | bsd-3-clause | useCons _ _ = Nothing | 21 | useCons _ _ = Nothing | 21 | useCons _ _ = Nothing | 21 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
lspitzner/brittany | source/library/Language/Haskell/Brittany/Internal/LayouterBasics.hs | agpl-3.0 | hasAnyRegularCommentsRest :: Data ast => GHC.Located ast -> ToBriDocM Bool
hasAnyRegularCommentsRest ast = astAnn ast <&> \case
Nothing -> False
Just ann -> any isRegularComment (extractRestComments ann) | 207 | hasAnyRegularCommentsRest :: Data ast => GHC.Located ast -> ToBriDocM Bool
hasAnyRegularCommentsRest ast = astAnn ast <&> \case
Nothing -> False
Just ann -> any isRegularComment (extractRestComments ann) | 207 | hasAnyRegularCommentsRest ast = astAnn ast <&> \case
Nothing -> False
Just ann -> any isRegularComment (extractRestComments ann) | 132 | false | true | 3 | 8 | 30 | 67 | 31 | 36 | null | null |
robbertkrebbers/fewdigits | Data/Real/CReal.hs | bsd-2-clause | real2Pi = scalePi 2 | 19 | real2Pi = scalePi 2 | 19 | real2Pi = scalePi 2 | 19 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
HaskellForCats/HaskellForCats | MenaBeginning/Ch010/2014-0329ch10.hs | mit | eval (Mul x y) = eval x * eval y | 32 | eval (Mul x y) = eval x * eval y | 32 | eval (Mul x y) = eval x * eval y | 32 | false | false | 0 | 6 | 9 | 28 | 12 | 16 | null | null |
comonoidial/ALFIN | Simulate/DEvalTypes.hs | mit | dropRefs :: Lens' RCState (Fifo (NodeSize,HeapAddr))
dropRefs = lens _dropRefs (\s x -> s {_dropRefs = x}) | 106 | dropRefs :: Lens' RCState (Fifo (NodeSize,HeapAddr))
dropRefs = lens _dropRefs (\s x -> s {_dropRefs = x}) | 106 | dropRefs = lens _dropRefs (\s x -> s {_dropRefs = x}) | 53 | false | true | 0 | 9 | 16 | 58 | 29 | 29 | null | null |
phi16/RayMarch | RayMarch/Primitive.hs | gpl-3.0 | rect :: (Float,Float) -> Field
rect v p = let
d = each abs p <-> v
in 0`min`fold max d + len (each (max 0) d) - delta | 124 | rect :: (Float,Float) -> Field
rect v p = let
d = each abs p <-> v
in 0`min`fold max d + len (each (max 0) d) - delta | 124 | rect v p = let
d = each abs p <-> v
in 0`min`fold max d + len (each (max 0) d) - delta | 93 | false | true | 0 | 13 | 35 | 82 | 41 | 41 | null | null |
swift-nav/plover | relics/Reduce.hs | mit | unifyMany :: UnifyMethod -> Bindings -> [Type] -> [Type] -> M Bindings
unifyMany u bs ts1 ts2 = do
assert (length ts1 == length ts2) $ "unifyMany failure:\n" ++ sep ts1 ts2
foldM (uncurry . unifyType u) bs $ zip ts1 ts2
-- Used by typeCheck whenever types should be equal | 276 | unifyMany :: UnifyMethod -> Bindings -> [Type] -> [Type] -> M Bindings
unifyMany u bs ts1 ts2 = do
assert (length ts1 == length ts2) $ "unifyMany failure:\n" ++ sep ts1 ts2
foldM (uncurry . unifyType u) bs $ zip ts1 ts2
-- Used by typeCheck whenever types should be equal | 276 | unifyMany u bs ts1 ts2 = do
assert (length ts1 == length ts2) $ "unifyMany failure:\n" ++ sep ts1 ts2
foldM (uncurry . unifyType u) bs $ zip ts1 ts2
-- Used by typeCheck whenever types should be equal | 205 | false | true | 0 | 13 | 55 | 112 | 51 | 61 | null | null |
glutamate/probably-base | Math/Probably/PDF.hs | bsd-3-clause | zipPdfs :: Num a => PDF a -> PDF b -> PDF (a,b)
zipPdfs fx fy (x,y) = fx x + fy y | 81 | zipPdfs :: Num a => PDF a -> PDF b -> PDF (a,b)
zipPdfs fx fy (x,y) = fx x + fy y | 81 | zipPdfs fx fy (x,y) = fx x + fy y | 33 | false | true | 0 | 10 | 22 | 68 | 32 | 36 | null | null |
forste/haReFork | refactorer/RefacFunDef.hs | bsd-3-clause | rewritePatsInEnv env (pat1@(Pat (HsPId (HsVar (PNT (PN (UnQual i) _) _ _)))))
= if findRewrites i == []
then nameToExp "undefined"
else snd (head (findRewrites i))
where
findRewrites i = filter (checkPat i) env
checkPat i (Exp (HsId (HsVar (PNT (PN (UnQual i2) _) _ _))), (Exp z))
=... | 479 | rewritePatsInEnv env (pat1@(Pat (HsPId (HsVar (PNT (PN (UnQual i) _) _ _)))))
= if findRewrites i == []
then nameToExp "undefined"
else snd (head (findRewrites i))
where
findRewrites i = filter (checkPat i) env
checkPat i (Exp (HsId (HsVar (PNT (PN (UnQual i2) _) _ _))), (Exp z))
=... | 479 | rewritePatsInEnv env (pat1@(Pat (HsPId (HsVar (PNT (PN (UnQual i) _) _ _)))))
= if findRewrites i == []
then nameToExp "undefined"
else snd (head (findRewrites i))
where
findRewrites i = filter (checkPat i) env
checkPat i (Exp (HsId (HsVar (PNT (PN (UnQual i2) _) _ _))), (Exp z))
=... | 479 | false | false | 0 | 19 | 118 | 192 | 96 | 96 | null | null |
olsner/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | trueDataCon = pcDataCon trueDataConName [] [] boolTyCon | 57 | trueDataCon = pcDataCon trueDataConName [] [] boolTyCon | 57 | trueDataCon = pcDataCon trueDataConName [] [] boolTyCon | 57 | false | false | 1 | 6 | 8 | 22 | 9 | 13 | null | null |
glguy/irc-core | src/Client/Commands/Queries.hs | isc | cmdUsers :: NetworkCommand (Maybe String)
cmdUsers cs st arg =
do sendMsg cs $ ircUsers $ maybe "" Text.pack arg
commandSuccess st | 137 | cmdUsers :: NetworkCommand (Maybe String)
cmdUsers cs st arg =
do sendMsg cs $ ircUsers $ maybe "" Text.pack arg
commandSuccess st | 137 | cmdUsers cs st arg =
do sendMsg cs $ ircUsers $ maybe "" Text.pack arg
commandSuccess st | 95 | false | true | 1 | 10 | 28 | 62 | 25 | 37 | null | null |
alexander-at-github/eta | compiler/ETA/StgSyn/CoreToStg.hs | bsd-3-clause | is_join_var :: Id -> Bool
-- A hack (used only for compiler debuggging) to tell if
-- a variable started life as a join point ($j)
is_join_var j = occNameString (getOccName j) == "$j" | 183 | is_join_var :: Id -> Bool
is_join_var j = occNameString (getOccName j) == "$j" | 78 | is_join_var j = occNameString (getOccName j) == "$j" | 52 | true | true | 0 | 7 | 33 | 39 | 18 | 21 | null | null |
lynnard/cocos2d-hs | src/Graphics/UI/Cocos2d/Std.hs | bsd-3-clause | stdString_new :: HoppyP.IO StdString
stdString_new =
HoppyP.fmap StdString
(stdString_new') | 96 | stdString_new :: HoppyP.IO StdString
stdString_new =
HoppyP.fmap StdString
(stdString_new') | 96 | stdString_new =
HoppyP.fmap StdString
(stdString_new') | 58 | false | true | 0 | 7 | 13 | 32 | 14 | 18 | null | null |
TheGreenMachine/Scouting-Backend | src/Website/Team.hs | bsd-3-clause | genTeamPages :: PartialToken -> IO ()
genTeamPages partial = mapM_ (makePage token) $ teamList token
where token = partial "./" | 150 | genTeamPages :: PartialToken -> IO ()
genTeamPages partial = mapM_ (makePage token) $ teamList token
where token = partial "./" | 150 | genTeamPages partial = mapM_ (makePage token) $ teamList token
where token = partial "./" | 112 | false | true | 0 | 8 | 42 | 49 | 23 | 26 | null | null |
recursion-ninja/megaparsec | tests/Text/Megaparsec/ErrorSpec.hs | bsd-2-clause | spec :: Spec
spec = do
describe "Semigroup instance of ParseError" $
it "associativity" $
property $ \x y z ->
(x S.<> y) S.<> z === (x S.<> (y S.<> z) :: PE)
describe "Monoid instance of ParseError" $ do
it "left identity" $
property $ \x ->
mempty <> x === (x :: PE)
it "r... | 7,947 | spec :: Spec
spec = do
describe "Semigroup instance of ParseError" $
it "associativity" $
property $ \x y z ->
(x S.<> y) S.<> z === (x S.<> (y S.<> z) :: PE)
describe "Monoid instance of ParseError" $ do
it "left identity" $
property $ \x ->
mempty <> x === (x :: PE)
it "r... | 7,947 | spec = do
describe "Semigroup instance of ParseError" $
it "associativity" $
property $ \x y z ->
(x S.<> y) S.<> z === (x S.<> (y S.<> z) :: PE)
describe "Monoid instance of ParseError" $ do
it "left identity" $
property $ \x ->
mempty <> x === (x :: PE)
it "right identity... | 7,934 | false | true | 0 | 21 | 2,306 | 2,188 | 1,043 | 1,145 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1187 = 1186 | 11 | 1187 = 1186 | 11 | 1187 = 1186 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | gHC_PARR' :: Module
gHC_PARR' = mkBaseModule (fsLit "GHC.PArr") | 63 | gHC_PARR' :: Module
gHC_PARR' = mkBaseModule (fsLit "GHC.PArr") | 63 | gHC_PARR' = mkBaseModule (fsLit "GHC.PArr") | 43 | false | true | 0 | 7 | 7 | 27 | 11 | 16 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLOutputElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLOutputElement.setCustomValidity Mozilla HTMLOutputElement.setCustomValidity documentation>
setCustomValidity ::
(MonadDOM m, ToJSString error) =>
HTMLOutputElement -> error -> m ()
setCustomValidity self error
= liftDOM ... | 376 | setCustomValidity ::
(MonadDOM m, ToJSString error) =>
HTMLOutputElement -> error -> m ()
setCustomValidity self error
= liftDOM (void (self ^. jsf "setCustomValidity" [toJSVal error])) | 225 | setCustomValidity self error
= liftDOM (void (self ^. jsf "setCustomValidity" [toJSVal error])) | 97 | true | true | 0 | 12 | 71 | 72 | 36 | 36 | null | null |
mmachenry/final-fortune | src/Deck.hs | bsd-2-clause | -- ^ Read the deck file but produce a list of the pairs of card counts and
-- names instead of an expanded list of card names with duplicates. This is
-- useful for turning a deck file into HTML or manipulating and analyzing it
-- in a way that does not require drawing one by one from it.
readCardCounts :: String -> [C... | 373 | readCardCounts :: String -> [CardCount]
readCardCounts = fmap readCardCount . lines | 83 | readCardCounts = fmap readCardCount . lines | 43 | true | true | 1 | 8 | 69 | 37 | 18 | 19 | null | null |
wherkendell/diagrams-contrib | src/Diagrams/Example/Logo.hs | bsd-3-clause | a1 = sierpinski (4 :: Integer)
# fc navy
# lwG 0
# scale (1/2) | 77 | a1 = sierpinski (4 :: Integer)
# fc navy
# lwG 0
# scale (1/2) | 77 | a1 = sierpinski (4 :: Integer)
# fc navy
# lwG 0
# scale (1/2) | 77 | false | false | 0 | 9 | 29 | 43 | 21 | 22 | null | null |
jmptable/mnist-classifier | src/Main.hs | mit | -- Agh how do monads actually work!?
imagesFromIDXFile :: String -> IO [ImageMatrix]
imagesFromIDXFile path = do
idxData <- decodeIDXFile path
let [imageCount, width, height] = DU.toList (idxDimensions $ fromJust idxData)
let imageData = idxIntContent $ fromJust idxData
let imageMatrices = chunksOf (width * hei... | 542 | imagesFromIDXFile :: String -> IO [ImageMatrix]
imagesFromIDXFile path = do
idxData <- decodeIDXFile path
let [imageCount, width, height] = DU.toList (idxDimensions $ fromJust idxData)
let imageData = idxIntContent $ fromJust idxData
let imageMatrices = chunksOf (width * height) (DU.toList imageData)
let imag... | 505 | imagesFromIDXFile path = do
idxData <- decodeIDXFile path
let [imageCount, width, height] = DU.toList (idxDimensions $ fromJust idxData)
let imageData = idxIntContent $ fromJust idxData
let imageMatrices = chunksOf (width * height) (DU.toList imageData)
let images = map (\pixels -> ImageMatrix { width = width... | 457 | true | true | 1 | 12 | 92 | 156 | 82 | 74 | null | null |
halfaya/cis341 | haskell/src/X86.hs | bsd-3-clause | ppData :: Data -> String
ppData d = case d of
Asciz s -> "\t.asciz\t" ++ "\"" ++ s ++ "\""
Quad i -> "\t.quad\t" ++ ppImm i | 128 | ppData :: Data -> String
ppData d = case d of
Asciz s -> "\t.asciz\t" ++ "\"" ++ s ++ "\""
Quad i -> "\t.quad\t" ++ ppImm i | 128 | ppData d = case d of
Asciz s -> "\t.asciz\t" ++ "\"" ++ s ++ "\""
Quad i -> "\t.quad\t" ++ ppImm i | 103 | false | true | 6 | 6 | 32 | 48 | 25 | 23 | null | null |
elieux/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprGInstr _ = panic "X86.Ppr.pprGInstr: no match" | 49 | pprGInstr _ = panic "X86.Ppr.pprGInstr: no match" | 49 | pprGInstr _ = panic "X86.Ppr.pprGInstr: no match" | 49 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
facebookincubator/duckling | Duckling/AmountOfMoney/ZH/Rules.hs | bsd-3-clause | ruleIntersect :: Rule
ruleIntersect = Rule
{ name = "intersect (implicit 0 delimited cents)"
, pattern =
[ Predicate $ and . sequence [isSimpleAmountOfMoney, isWithoutCents]
, regex "0|零|〇"
, oneOf [1..9]
]
, prod = \case
(Token AmountOfMoney fd:_:
Token Numeral NumeralData{TNumeral.v... | 410 | ruleIntersect :: Rule
ruleIntersect = Rule
{ name = "intersect (implicit 0 delimited cents)"
, pattern =
[ Predicate $ and . sequence [isSimpleAmountOfMoney, isWithoutCents]
, regex "0|零|〇"
, oneOf [1..9]
]
, prod = \case
(Token AmountOfMoney fd:_:
Token Numeral NumeralData{TNumeral.v... | 410 | ruleIntersect = Rule
{ name = "intersect (implicit 0 delimited cents)"
, pattern =
[ Predicate $ and . sequence [isSimpleAmountOfMoney, isWithoutCents]
, regex "0|零|〇"
, oneOf [1..9]
]
, prod = \case
(Token AmountOfMoney fd:_:
Token Numeral NumeralData{TNumeral.value = c}:
_) -... | 388 | false | true | 0 | 18 | 107 | 138 | 72 | 66 | null | null |
badp/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | runpartsSkip :: Int
runpartsSkip = 0 | 36 | runpartsSkip :: Int
runpartsSkip = 0 | 36 | runpartsSkip = 0 | 16 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
roldugin/LiveFusion | Data/LiveFusion/Scalar/DeBruijn.hs | bsd-3-clause | prj :: Idx env t -> Val env -> t
prj ZeroIdx (Push val v) = v | 67 | prj :: Idx env t -> Val env -> t
prj ZeroIdx (Push val v) = v | 67 | prj ZeroIdx (Push val v) = v | 34 | false | true | 0 | 7 | 22 | 45 | 20 | 25 | null | null |
np/umm | UMMEval.hs | gpl-3.0 | xferTrans _ _ r _ = intErr "xferTrans" r | 40 | xferTrans _ _ r _ = intErr "xferTrans" r | 40 | xferTrans _ _ r _ = intErr "xferTrans" r | 40 | false | false | 1 | 5 | 8 | 21 | 8 | 13 | null | null |
gcross/error-message | tests/runtests.hs | bsd-3-clause | -- @-node:gcross.20091202203048.7020:sumWithError_4
-- @-node:gcross.20091202203048.7013:sumWithError
-- @+node:gcross.20091202203048.7014:showSumOrErrorOf
-- @+node:gcross.20091202203048.6997:showSumOrErrorOf
showSumOrErrorOf :: Float -> Float -> String
showSumOrErrorOf x y =
case sumWithError (sqrtWithError x) (s... | 566 | showSumOrErrorOf :: Float -> Float -> String
showSumOrErrorOf x y =
case sumWithError (sqrtWithError x) (sqrtWithError y) of
Right value -> "The value is " ++ show value
Left error -> show . formatErrorMessage $ error
-- @nonl
-- @-node:gcross.20091202203048.6997:showSumOrErrorOf
-- @+node:gcross.20... | 356 | showSumOrErrorOf x y =
case sumWithError (sqrtWithError x) (sqrtWithError y) of
Right value -> "The value is " ++ show value
Left error -> show . formatErrorMessage $ error
-- @nonl
-- @-node:gcross.20091202203048.6997:showSumOrErrorOf
-- @+node:gcross.20091202203048.7016:showSumOrErrorOf_2 | 311 | true | true | 0 | 9 | 69 | 91 | 45 | 46 | null | null |
nushio3/ghc | compiler/typecheck/TcAnnotations.hs | bsd-3-clause | annCtxt :: OutputableBndr id => AnnDecl id -> SDoc
annCtxt ann
= hang (text "In the annotation:") 2 (ppr ann) | 111 | annCtxt :: OutputableBndr id => AnnDecl id -> SDoc
annCtxt ann
= hang (text "In the annotation:") 2 (ppr ann) | 111 | annCtxt ann
= hang (text "In the annotation:") 2 (ppr ann) | 60 | false | true | 0 | 7 | 21 | 47 | 22 | 25 | null | null |
jacekm-git/HsPredictor | library/HsPredictor/SQL/Raw.hs | gpl-3.0 | getMinStatQuery dbname stat = runSqlite (pack dbname)
$ E.select
$ E.from $ \t -> return $ E.min_ $ t ^. stat | 153 | getMinStatQuery dbname stat = runSqlite (pack dbname)
$ E.select
$ E.from $ \t -> return $ E.min_ $ t ^. stat | 153 | getMinStatQuery dbname stat = runSqlite (pack dbname)
$ E.select
$ E.from $ \t -> return $ E.min_ $ t ^. stat | 153 | false | false | 4 | 10 | 64 | 59 | 27 | 32 | null | null |
TomMD/irc-core | src/Irc/Model.hs | bsd-3-clause | doUserModeChanges ::
[(Bool, Char, ByteString)] {- ^ [(+/-,mode,argument)] -} ->
IrcConnection -> IrcConnection
doUserModeChanges ms =
over connUmode addModes
where
addModes bs = B.sort (foldl' aux bs ms)
aux bs (polarity,m,_)
| polarity && B8.elem m bs = bs
| polarity = B8.cons m bs... | 373 | doUserModeChanges ::
[(Bool, Char, ByteString)] {- ^ [(+/-,mode,argument)] -} ->
IrcConnection -> IrcConnection
doUserModeChanges ms =
over connUmode addModes
where
addModes bs = B.sort (foldl' aux bs ms)
aux bs (polarity,m,_)
| polarity && B8.elem m bs = bs
| polarity = B8.cons m bs... | 373 | doUserModeChanges ms =
over connUmode addModes
where
addModes bs = B.sort (foldl' aux bs ms)
aux bs (polarity,m,_)
| polarity && B8.elem m bs = bs
| polarity = B8.cons m bs
| otherwise = B8.filter (/= m) bs | 257 | false | true | 2 | 10 | 106 | 134 | 69 | 65 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo PopCnt16Op = mkMonadic (fsLit "popCnt16#") wordPrimTy | 64 | primOpInfo PopCnt16Op = mkMonadic (fsLit "popCnt16#") wordPrimTy | 64 | primOpInfo PopCnt16Op = mkMonadic (fsLit "popCnt16#") wordPrimTy | 64 | false | false | 1 | 7 | 6 | 23 | 9 | 14 | null | null |
continuouspi/cpiwb | profileSig1.hs | gpl-3.0 | f22 = Pos (0,25) f18 | 20 | f22 = Pos (0,25) f18 | 20 | f22 = Pos (0,25) f18 | 20 | false | false | 1 | 5 | 4 | 22 | 9 | 13 | null | null |
zerobuzz/webtest | examples/quickcheck.hs | agpl-3.0 | -- FIXME: make use of withCaps from hspec-webdriver package for
-- session pooling.
session :: WDSession
session = defaultSession | 131 | session :: WDSession
session = defaultSession | 45 | session = defaultSession | 24 | true | true | 0 | 6 | 20 | 20 | 9 | 11 | null | null |
ashgti/DTI | src/Language/Perl/Types.hs | mit | showError (BadSpecialForm message form) = message ++ ": " ++ show form | 70 | showError (BadSpecialForm message form) = message ++ ": " ++ show form | 70 | showError (BadSpecialForm message form) = message ++ ": " ++ show form | 70 | false | false | 0 | 7 | 11 | 28 | 13 | 15 | null | null |
copland/cmdargs | System/Console/CmdArgs/Implicit/Local.hs | bsd-3-clause | flagAnn (FlagOptional a) x@Arg_{} = x{flagArgOpt=Just a} | 56 | flagAnn (FlagOptional a) x@Arg_{} = x{flagArgOpt=Just a} | 56 | flagAnn (FlagOptional a) x@Arg_{} = x{flagArgOpt=Just a} | 56 | false | false | 0 | 7 | 6 | 35 | 18 | 17 | null | null |
GaloisInc/galua | galua-jit/src/Galua/Micro/Translate/ExplicitRefs.hs | mit | emit :: Stmt -> R ()
emit s = doM (M.emit s) | 44 | emit :: Stmt -> R ()
emit s = doM (M.emit s) | 44 | emit s = doM (M.emit s) | 23 | false | true | 0 | 8 | 11 | 38 | 17 | 21 | null | null |
allonsy/chatServer | Server.hs | mit | {-Main: call runServer
the runServer function is in the Chat module so that it can be exposed
as a library function to the test suite which allows it to be called and
thoroughly tested from hspec. If all the socket stuff is put in here,
the test suite would not be able to call it since the test-suite is
already in a Ma... | 505 | main :: IO ()
main = runServer | 30 | main = runServer | 16 | true | true | 0 | 7 | 96 | 23 | 10 | 13 | null | null |
sru-systems/protobuf-simple | src/Parser/ProtoParser.hs | mit | fieldNumber :: Parsec String u Int32
fieldNumber = int32 | 56 | fieldNumber :: Parsec String u Int32
fieldNumber = int32 | 56 | fieldNumber = int32 | 19 | false | true | 1 | 5 | 8 | 23 | 9 | 14 | null | null |
yu-i9/HaSS | src/MifParser.hs | mit | colon :: Parser String
colon = P.colon lexer | 44 | colon :: Parser String
colon = P.colon lexer | 44 | colon = P.colon lexer | 21 | false | true | 1 | 6 | 7 | 22 | 9 | 13 | null | null |
fhaust/kdtree | src/Data/KDTree.hs | mit | toVecF (NodeF _ _ l r) = l G.++ r | 33 | toVecF (NodeF _ _ l r) = l G.++ r | 33 | toVecF (NodeF _ _ l r) = l G.++ r | 33 | false | false | 0 | 6 | 9 | 28 | 13 | 15 | null | null |
jwiegley/hnix | src/Nix/Value.hs | bsd-3-clause | hoistNValue'
:: (Functor m, Functor n, Functor f)
=> (forall x . n x -> m x)
-> (forall x . m x -> n x)
-> NValue' t f m a
-> NValue' t f n a
hoistNValue' run lft (NValue v) =
NValue (fmap (lmapNValueF (hoistNValue lft run) . hoistNValueF lft) v) | 260 | hoistNValue'
:: (Functor m, Functor n, Functor f)
=> (forall x . n x -> m x)
-> (forall x . m x -> n x)
-> NValue' t f m a
-> NValue' t f n a
hoistNValue' run lft (NValue v) =
NValue (fmap (lmapNValueF (hoistNValue lft run) . hoistNValueF lft) v) | 260 | hoistNValue' run lft (NValue v) =
NValue (fmap (lmapNValueF (hoistNValue lft run) . hoistNValueF lft) v) | 108 | false | true | 0 | 12 | 67 | 147 | 71 | 76 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | conference/2018-05-lambdaconf/telegram-bot-in-haskell/app/Main6.hs | unlicense | -- | Remove an item from todo list
removeItem :: Text -> Model -> Model
removeItem title model = model { todoItems = filter p (todoItems model) }
where
p item = todoItemTitle item /= title
-- | Pretty print a single todo item. | 233 | removeItem :: Text -> Model -> Model
removeItem title model = model { todoItems = filter p (todoItems model) }
where
p item = todoItemTitle item /= title
-- | Pretty print a single todo item. | 198 | removeItem title model = model { todoItems = filter p (todoItems model) }
where
p item = todoItemTitle item /= title
-- | Pretty print a single todo item. | 161 | true | true | 0 | 9 | 50 | 63 | 32 | 31 | null | null |
thomasjm/ot.hs | src/Control/OperationalTransformation/JSON/Util.hs | mit | replaceIndex obj at newIndex = setFullPath path' obj where
path = getFullPath obj
path' = (take at path) ++ [Pos newIndex] ++ (drop (at + 1) path) | 150 | replaceIndex obj at newIndex = setFullPath path' obj where
path = getFullPath obj
path' = (take at path) ++ [Pos newIndex] ++ (drop (at + 1) path) | 150 | replaceIndex obj at newIndex = setFullPath path' obj where
path = getFullPath obj
path' = (take at path) ++ [Pos newIndex] ++ (drop (at + 1) path) | 150 | false | false | 0 | 12 | 30 | 76 | 36 | 40 | null | null |
asivitz/Hickory | iOS/Platforms/IOS.hs | mit | mkDrawInit
:: RenderInit resources -- Loads assets from a given folder and provides data for use in game/render loop
-> DrawInit resources gamedata -- Initializes logic/draw system
-> CDrawInit
mkDrawInit ri di w h = do
rp <- resourcesPath
resources <- newIORef
=<< ri rp
td ... | 673 | mkDrawInit
:: RenderInit resources -- Loads assets from a given folder and provides data for use in game/render loop
-> DrawInit resources gamedata -- Initializes logic/draw system
-> CDrawInit
mkDrawInit ri di w h = do
rp <- resourcesPath
resources <- newIORef
=<< ri rp
td ... | 673 | mkDrawInit ri di w h = do
rp <- resourcesPath
resources <- newIORef
=<< ri rp
td <- initTouchData
inputPoller <- makeInputPoller (touchFunc td)
timePoller <- makeTimePoller
wSizeRef <- newIORef (Size (fromIntegral w) (fromIntegral h))
(coreEvProc, evGens) <- coreEventGenerat... | 466 | false | true | 0 | 13 | 148 | 181 | 83 | 98 | null | null |
brownsys/pane | src/Base.hs | bsd-3-clause | liftChan :: (a -> b -> IO c) -> (a, Chan a) -> (b, Chan b) -> IO (Chan c)
liftChan fn (initA, chanA) (initB, chanB) = do
merged <- mergeChan chanA chanB
result <- newChan
let loop a b = do
v <- readChan merged
case v of
Left a' -> do
r <- fn a' b
writeChan result ... | 490 | liftChan :: (a -> b -> IO c) -> (a, Chan a) -> (b, Chan b) -> IO (Chan c)
liftChan fn (initA, chanA) (initB, chanB) = do
merged <- mergeChan chanA chanB
result <- newChan
let loop a b = do
v <- readChan merged
case v of
Left a' -> do
r <- fn a' b
writeChan result ... | 490 | liftChan fn (initA, chanA) (initB, chanB) = do
merged <- mergeChan chanA chanB
result <- newChan
let loop a b = do
v <- readChan merged
case v of
Left a' -> do
r <- fn a' b
writeChan result r
loop a' b
Right b' -> do
r <- fn a b'
... | 416 | false | true | 0 | 19 | 202 | 232 | 104 | 128 | null | null |
dan-t/layers | src/Main.hs | bsd-3-clause | clearGLState :: AP.AppST ()
clearGLState = io $ do
GL.glClear (fromIntegral GL.GL_COLOR_BUFFER_BIT)
GL.glMatrixMode GL.GL_MODELVIEW
GL.glLoadIdentity | 158 | clearGLState :: AP.AppST ()
clearGLState = io $ do
GL.glClear (fromIntegral GL.GL_COLOR_BUFFER_BIT)
GL.glMatrixMode GL.GL_MODELVIEW
GL.glLoadIdentity | 158 | clearGLState = io $ do
GL.glClear (fromIntegral GL.GL_COLOR_BUFFER_BIT)
GL.glMatrixMode GL.GL_MODELVIEW
GL.glLoadIdentity | 130 | false | true | 0 | 11 | 23 | 53 | 24 | 29 | null | null |
gaeldeest/NaBot | src/NaBot/Core.hs | mit | joinChan :: Chan -> BotMonad ()
joinChan chan = writeMessage $ IRCMessage Nothing $ JOIN chan Nothing | 101 | joinChan :: Chan -> BotMonad ()
joinChan chan = writeMessage $ IRCMessage Nothing $ JOIN chan Nothing | 101 | joinChan chan = writeMessage $ IRCMessage Nothing $ JOIN chan Nothing | 69 | false | true | 0 | 7 | 16 | 39 | 18 | 21 | null | null |
toonn/wyah | src/PolyInfer.hs | bsd-2-clause | occursCheck :: Substitutable a => TVar -> a -> Bool
occursCheck a t = a `Set.member` ftv t | 90 | occursCheck :: Substitutable a => TVar -> a -> Bool
occursCheck a t = a `Set.member` ftv t | 90 | occursCheck a t = a `Set.member` ftv t | 38 | false | true | 0 | 7 | 17 | 42 | 21 | 21 | null | null |
plow-technologies/simple-cell | test/TestImport.hs | bsd-3-clause | fullDecodeFcn :: ( Serialize datetime
, Serialize destination
, Serialize source
, Serialize key)
=> T.Text
-> Either T.Text (DirectedKeyRaw key source destination datetime)
fullDecodeFcn akey = case (decodeKey $ TE.encodeUtf8 $ akey) ... | 415 | fullDecodeFcn :: ( Serialize datetime
, Serialize destination
, Serialize source
, Serialize key)
=> T.Text
-> Either T.Text (DirectedKeyRaw key source destination datetime)
fullDecodeFcn akey = case (decodeKey $ TE.encodeUtf8 $ akey) ... | 415 | fullDecodeFcn akey = case (decodeKey $ TE.encodeUtf8 $ akey) of
Left e -> Left . T.pack $ e
Right r -> Right r | 156 | false | true | 0 | 10 | 177 | 114 | 56 | 58 | null | null |
Melvar/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | annotationColour ist (AnnName n _ _ _) =
let ctxt = tt_ctxt ist
theme = idris_colourTheme ist
in case () of
_ | isDConName n ctxt -> Just $ dataColour theme
_ | isFnName n ctxt -> Just $ functionColour theme
_ | isTConName n ctxt -> Just $ typeColour theme
_ | isPostu... | 443 | annotationColour ist (AnnName n _ _ _) =
let ctxt = tt_ctxt ist
theme = idris_colourTheme ist
in case () of
_ | isDConName n ctxt -> Just $ dataColour theme
_ | isFnName n ctxt -> Just $ functionColour theme
_ | isTConName n ctxt -> Just $ typeColour theme
_ | isPostu... | 443 | annotationColour ist (AnnName n _ _ _) =
let ctxt = tt_ctxt ist
theme = idris_colourTheme ist
in case () of
_ | isDConName n ctxt -> Just $ dataColour theme
_ | isFnName n ctxt -> Just $ functionColour theme
_ | isTConName n ctxt -> Just $ typeColour theme
_ | isPostu... | 443 | false | false | 0 | 13 | 141 | 162 | 70 | 92 | null | null |
sorki/odrive | src/LDrive/Types.hs | bsd-3-clause | ldriveTowerDeps :: Tower e ()
ldriveTowerDeps = do
towerDepends ldriveTypes
towerModule ldriveTypes
mapM_ towerDepends LDTypes.typeModules
mapM_ towerModule LDTypes.typeModules
mapM_ towerDepends COTypes.typeModules
mapM_ towerModule COTypes.typeModules
towerDepends serializeModule
towerModule seria... | 371 | ldriveTowerDeps :: Tower e ()
ldriveTowerDeps = do
towerDepends ldriveTypes
towerModule ldriveTypes
mapM_ towerDepends LDTypes.typeModules
mapM_ towerModule LDTypes.typeModules
mapM_ towerDepends COTypes.typeModules
mapM_ towerModule COTypes.typeModules
towerDepends serializeModule
towerModule seria... | 371 | ldriveTowerDeps = do
towerDepends ldriveTypes
towerModule ldriveTypes
mapM_ towerDepends LDTypes.typeModules
mapM_ towerModule LDTypes.typeModules
mapM_ towerDepends COTypes.typeModules
mapM_ towerModule COTypes.typeModules
towerDepends serializeModule
towerModule serializeModule
mapM_ towerArtifa... | 341 | false | true | 0 | 8 | 52 | 90 | 36 | 54 | null | null |
lkitching/PScheme | src/PScheme/Reader.hs | bsd-3-clause | parsedValue _ = Nothing | 23 | parsedValue _ = Nothing | 23 | parsedValue _ = Nothing | 23 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
siddhanathan/ghc | compiler/cmm/CmmSwitch.hs | bsd-3-clause | divideSL :: SeparatedList b a -> (SeparatedList b a, b, SeparatedList b a)
divideSL (_,[]) = error "divideSL: Singleton SeparatedList" | 134 | divideSL :: SeparatedList b a -> (SeparatedList b a, b, SeparatedList b a)
divideSL (_,[]) = error "divideSL: Singleton SeparatedList" | 134 | divideSL (_,[]) = error "divideSL: Singleton SeparatedList" | 59 | false | true | 0 | 7 | 19 | 53 | 27 | 26 | null | null |
YtGz/Analyzing-the-Complexity-of-Monotone-Prolog | src/TRS/Encoding.hs | lgpl-3.0 | generateRewriteRules
:: BTree (AbstractState, (String, Int))
-> Control.Monad.State.StateT (Map (String, Int, [Int]) [Int]) (StateT (Map Int Subst') IO) [Rule']
generateRewriteRules graph =
let iCs = instanceChildren graph graph
in generateRewriteRules_ graph iCs | 279 | generateRewriteRules
:: BTree (AbstractState, (String, Int))
-> Control.Monad.State.StateT (Map (String, Int, [Int]) [Int]) (StateT (Map Int Subst') IO) [Rule']
generateRewriteRules graph =
let iCs = instanceChildren graph graph
in generateRewriteRules_ graph iCs | 279 | generateRewriteRules graph =
let iCs = instanceChildren graph graph
in generateRewriteRules_ graph iCs | 110 | false | true | 0 | 10 | 47 | 107 | 57 | 50 | null | null |
mrmonday/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | -- | Delaborate a term without resugaring
delab :: IState -> Term -> PTerm
delab i tm = delab' i tm False False | 111 | delab :: IState -> Term -> PTerm
delab i tm = delab' i tm False False | 69 | delab i tm = delab' i tm False False | 36 | true | true | 0 | 8 | 22 | 39 | 18 | 21 | null | null |
JustinUnger/haskell-book | ch11/exp.hs | mit | convert2 Yes = False | 20 | convert2 Yes = False | 20 | convert2 Yes = False | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Purchases/Voidedpurchases/List.hs | mpl-2.0 | -- | The type of voided purchases that you want to see in the response.
-- Possible values are: 0. Only voided in-app product purchases will be
-- returned in the response. This is the default value. 1. Both voided
-- in-app purchases and voided subscription purchases will be returned in
-- the response. Note: Before r... | 783 | pvlType :: Lens' PurchasesVoidedpurchasesList (Maybe Int32)
pvlType
= lens _pvlType (\ s a -> s{_pvlType = a}) .
mapping _Coerce | 136 | pvlType
= lens _pvlType (\ s a -> s{_pvlType = a}) .
mapping _Coerce | 76 | true | true | 0 | 10 | 128 | 63 | 36 | 27 | null | null |
mpickering/hlint-refactor | src/Refact/Fixity.hs | bsd-3-clause | mkOpAppRn _ loc e1 op _fix e2 -- Default case, no rearrangment
= return $ L loc (OpApp noExt e1 op e2) | 121 | mkOpAppRn _ loc e1 op _fix e2 -- Default case, no rearrangment
= return $ L loc (OpApp noExt e1 op e2) | 121 | mkOpAppRn _ loc e1 op _fix e2 -- Default case, no rearrangment
= return $ L loc (OpApp noExt e1 op e2) | 121 | false | false | 0 | 8 | 40 | 41 | 20 | 21 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | esActionSnapshot :: String
esActionSnapshot = "snapshot" | 56 | esActionSnapshot :: String
esActionSnapshot = "snapshot" | 56 | esActionSnapshot = "snapshot" | 29 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/Graphics/UI/GLUT/Constants.hs | bsd-3-clause | glut_ELAPSED_TIME = 700 | 44 | glut_ELAPSED_TIME = 700 | 44 | glut_ELAPSED_TIME = 700 | 44 | false | false | 0 | 4 | 23 | 6 | 3 | 3 | null | null |
kwangkim/pigment | src-web/hs/Cochon/Reactify.hs | mit | -- The `Elim` functor is straightforward.
elimLayout_ :: (Text, Maybe (ReactNode TermTransition)) -> ReactNode TermTransition
elimLayout_ = undefined | 150 | elimLayout_ :: (Text, Maybe (ReactNode TermTransition)) -> ReactNode TermTransition
elimLayout_ = undefined | 107 | elimLayout_ = undefined | 23 | true | true | 2 | 8 | 18 | 33 | 17 | 16 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT26.hs | gpl-3.0 | qrevflat ([]:xss) acc = qrevflat xss acc | 44 | qrevflat ([]:xss) acc = qrevflat xss acc | 44 | qrevflat ([]:xss) acc = qrevflat xss acc | 44 | false | false | 0 | 8 | 10 | 25 | 12 | 13 | null | null |
holdenlee/notebook | src/Utilities.hs | mit | listUpdate :: Int -> a -> [a] -> [a]
listUpdate n x li = replaceSublist n (n+1) [x] li | 86 | listUpdate :: Int -> a -> [a] -> [a]
listUpdate n x li = replaceSublist n (n+1) [x] li | 86 | listUpdate n x li = replaceSublist n (n+1) [x] li | 49 | false | true | 0 | 8 | 18 | 55 | 29 | 26 | null | null |
MarchM4/Milkyway-home-server-expansion | tools/nbody_run_times/FindNBodyTimes.hs | gpl-3.0 | arguments :: Int -> FilePath -> FilePath -> Workunit -> [String]
arguments seed file histogram wu = [ "-t",
"-f", file,
"-h", histogram,
"-e", show seed,
"-u", show (nbody ... | 648 | arguments :: Int -> FilePath -> FilePath -> Workunit -> [String]
arguments seed file histogram wu = [ "-t",
"-f", file,
"-h", histogram,
"-e", show seed,
"-u", show (nbody ... | 648 | arguments seed file histogram wu = [ "-t",
"-f", file,
"-h", histogram,
"-e", show seed,
"-u", show (nbody wu),
"-np", show (length par... | 583 | false | true | 2 | 9 | 304 | 158 | 80 | 78 | null | null |
mightymoose/liquidhaskell | tests/pos/deppair0.hs | bsd-3-clause | incr x = x + 1 | 14 | incr x = x + 1 | 14 | incr x = x + 1 | 14 | false | false | 3 | 5 | 5 | 18 | 6 | 12 | null | null |
trin-cz/glxgears-haskell | heart/QuadCommon.hs | mit | drawSmoothQuadStrip [] [] = return () | 37 | drawSmoothQuadStrip [] [] = return () | 37 | drawSmoothQuadStrip [] [] = return () | 37 | false | false | 0 | 6 | 5 | 22 | 9 | 13 | null | null |
iteloo/tsuru-sample | iteratee-0.8.9.6/bench/BenchBase.hs | bsd-3-clause | takeBenches = [take1, take2, take3, take4, take5, take6] | 56 | takeBenches = [take1, take2, take3, take4, take5, take6] | 56 | takeBenches = [take1, take2, take3, take4, take5, take6] | 56 | false | false | 1 | 5 | 7 | 27 | 15 | 12 | null | null |
edgarklerks/dotfiles | .xmonad/xmonad.hs | bsd-2-clause | -- promoteWarp
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = dynamicLogWithPP xmobarPP | 291 | myLogHook = dynamicLogWithPP xmobarPP | 37 | myLogHook = dynamicLogWithPP xmobarPP | 37 | true | false | 1 | 5 | 34 | 19 | 10 | 9 | null | null |
timveitch/Gobble | src/SLM/Gobble/GobbleDataWriterText.hs | bsd-3-clause | renderCell (StringC cs) = renderString cs | 41 | renderCell (StringC cs) = renderString cs | 41 | renderCell (StringC cs) = renderString cs | 41 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#activity\".
aKind :: Lens' Activity Text
aKind = lens _aKind (\ s a -> s{_aKind = a}) | 169 | aKind :: Lens' Activity Text
aKind = lens _aKind (\ s a -> s{_aKind = a}) | 73 | aKind = lens _aKind (\ s a -> s{_aKind = a}) | 44 | true | true | 0 | 9 | 30 | 41 | 23 | 18 | null | null |
bgamari/shaking-up-ghc | src/GHC/Packages.hs | bsd-3-clause | parsec = hsLib "parsec" | 37 | parsec = hsLib "parsec" | 37 | parsec = hsLib "parsec" | 37 | false | false | 1 | 5 | 17 | 12 | 4 | 8 | null | null |
nevrenato/HetsAlloy | OWL2/Extract.hs | gpl-2.0 | fromLiteral :: Literal -> State Sign ()
fromLiteral l = case l of
Literal _ ty -> case ty of
Typed u -> addEntity $ Entity Datatype u
_ -> return ()
_ -> return () | 187 | fromLiteral :: Literal -> State Sign ()
fromLiteral l = case l of
Literal _ ty -> case ty of
Typed u -> addEntity $ Entity Datatype u
_ -> return ()
_ -> return () | 187 | fromLiteral l = case l of
Literal _ ty -> case ty of
Typed u -> addEntity $ Entity Datatype u
_ -> return ()
_ -> return () | 147 | false | true | 0 | 12 | 59 | 88 | 40 | 48 | null | null |
mzini/hosa | src/HoSA/SizeType/SOConstraint.hs | mit | skolemise :: (MonadUnique m, MonadIO m) => SOCS -> m FOCS
skolemise (SOCS cs ds) = do
svs <- skolemiseVars cs
let mvs = concat [ metaVars l ++ metaVars r | l :>=: r <- cs]
svars (MetaVar u _) = fromMaybe [] (Set.toList <$> Map.lookup u svs)
forM_ mvs $ \ mv -> do
unset <- isUnset mv
when unset $ do ... | 450 | skolemise :: (MonadUnique m, MonadIO m) => SOCS -> m FOCS
skolemise (SOCS cs ds) = do
svs <- skolemiseVars cs
let mvs = concat [ metaVars l ++ metaVars r | l :>=: r <- cs]
svars (MetaVar u _) = fromMaybe [] (Set.toList <$> Map.lookup u svs)
forM_ mvs $ \ mv -> do
unset <- isUnset mv
when unset $ do ... | 450 | skolemise (SOCS cs ds) = do
svs <- skolemiseVars cs
let mvs = concat [ metaVars l ++ metaVars r | l :>=: r <- cs]
svars (MetaVar u _) = fromMaybe [] (Set.toList <$> Map.lookup u svs)
forM_ mvs $ \ mv -> do
unset <- isUnset mv
when unset $ do
f <- Sym Nothing <$> unique
void (substituteM... | 392 | false | true | 0 | 23 | 122 | 233 | 107 | 126 | null | null |
scottgw/language-eiffel | Language/Eiffel/Parser/Statement.hs | bsd-3-clause | ifStmt :: Parser UnPosStmt
ifStmt = do
b <- keyword TokIf >> expr
body <- attachTokenPos (keyword TokThen >> fmap Block stmts)
ifelses <- many ifelseP
elseMb <- optionMaybe elseP
elseMb' <- maybe (return Nothing) (fmap Just . attachTokenPos . return) elseMb
keyword TokEnd
return (If b body ifelses elseMb... | 387 | ifStmt :: Parser UnPosStmt
ifStmt = do
b <- keyword TokIf >> expr
body <- attachTokenPos (keyword TokThen >> fmap Block stmts)
ifelses <- many ifelseP
elseMb <- optionMaybe elseP
elseMb' <- maybe (return Nothing) (fmap Just . attachTokenPos . return) elseMb
keyword TokEnd
return (If b body ifelses elseMb... | 387 | ifStmt = do
b <- keyword TokIf >> expr
body <- attachTokenPos (keyword TokThen >> fmap Block stmts)
ifelses <- many ifelseP
elseMb <- optionMaybe elseP
elseMb' <- maybe (return Nothing) (fmap Just . attachTokenPos . return) elseMb
keyword TokEnd
return (If b body ifelses elseMb')
-- elsePart :: Parser U... | 360 | false | true | 0 | 12 | 76 | 133 | 60 | 73 | null | null |
energyflowanalysis/efa-2.1 | examples/elementary/optimisingStorage/Main.hs | bsd-3-clause | -- 10 bis 100 kW
batteryResistance :: Double
batteryResistance = 0.2 | 69 | batteryResistance :: Double
batteryResistance = 0.2 | 51 | batteryResistance = 0.2 | 23 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
alexander-at-github/eta | compiler/ETA/BasicTypes/Id.hs | bsd-3-clause | -- Note [Free type variables]
-- | Create a local 'Id' that is marked as exported.
-- This prevents things attached to it from being removed as dead code.
-- See Note [Exported LocalIds]
mkExportedLocalId :: IdDetails -> Name -> Type -> Id
mkExportedLocalId details name ty = Var.mkExportedLocalVar details name ty vani... | 329 | mkExportedLocalId :: IdDetails -> Name -> Type -> Id
mkExportedLocalId details name ty = Var.mkExportedLocalVar details name ty vanillaIdInfo | 141 | mkExportedLocalId details name ty = Var.mkExportedLocalVar details name ty vanillaIdInfo | 88 | true | true | 0 | 7 | 53 | 45 | 24 | 21 | null | null |
rueshyna/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | Properties to update.
udprProperties :: Lens' UpdateDimensionPropertiesRequest (Maybe DimensionProperties)
udprProperties
= lens _udprProperties
(\ s a -> s{_udprProperties = a}) | 191 | udprProperties :: Lens' UpdateDimensionPropertiesRequest (Maybe DimensionProperties)
udprProperties
= lens _udprProperties
(\ s a -> s{_udprProperties = a}) | 164 | udprProperties
= lens _udprProperties
(\ s a -> s{_udprProperties = a}) | 79 | true | true | 1 | 9 | 29 | 51 | 25 | 26 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkIndirectExpansion5 = verifyNot checkIndirectExpansion "${bar}" | 72 | prop_checkIndirectExpansion5 = verifyNot checkIndirectExpansion "${bar}" | 72 | prop_checkIndirectExpansion5 = verifyNot checkIndirectExpansion "${bar}" | 72 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
kim/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types.hs | mpl-2.0 | -- | /Optional./ If set, specifies the maximum duration the activity task can wait
-- to be assigned to a worker. This overrides the default schedule-to-start
-- timeout specified when registering the activity type using 'RegisterActivityType'.
--
-- The duration is specified in seconds; an integer greater than or equa... | 888 | satdaScheduleToStartTimeout :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe Text)
satdaScheduleToStartTimeout =
lens _satdaScheduleToStartTimeout
(\s a -> s { _satdaScheduleToStartTimeout = a }) | 213 | satdaScheduleToStartTimeout =
lens _satdaScheduleToStartTimeout
(\s a -> s { _satdaScheduleToStartTimeout = a }) | 124 | true | true | 0 | 9 | 142 | 56 | 35 | 21 | null | null |
peterokagey/haskellOEIS | src/Helpers/ChessSequences.hs | apache-2.0 | kingNW n k = [(n - 1, k - 1) | k > 1, n > 1] | 44 | kingNW n k = [(n - 1, k - 1) | k > 1, n > 1] | 44 | kingNW n k = [(n - 1, k - 1) | k > 1, n > 1] | 44 | false | false | 1 | 8 | 16 | 49 | 23 | 26 | null | null |
AndreasVoellmy/nettle-openflow | src/Network/Data/OpenFlow/Action.hs | bsd-3-clause | allPhysicalPorts = send AllPhysicalPorts | 40 | allPhysicalPorts = send AllPhysicalPorts | 40 | allPhysicalPorts = send AllPhysicalPorts | 40 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ulricha/dsh | src/Database/DSH/Frontend/Externals.hs | bsd-3-clause | true :: Q Bool
true = Q (BoolE True) | 36 | true :: Q Bool
true = Q (BoolE True) | 36 | true = Q (BoolE True) | 21 | false | true | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
sdiehl/ghc | libraries/base/GHC/Ptr.hs | bsd-3-clause | -- |Casts a 'FunPtr' to a 'Ptr'.
--
-- /Note:/ this is valid only on architectures where data and function
-- pointers range over the same set of addresses, and should only be used
-- for bindings to external libraries whose interface already relies on
-- this assumption.
castFunPtrToPtr :: FunPtr a -> Ptr b
castFunPtr... | 350 | castFunPtrToPtr :: FunPtr a -> Ptr b
castFunPtrToPtr (FunPtr addr) = Ptr addr | 77 | castFunPtrToPtr (FunPtr addr) = Ptr addr | 40 | true | true | 0 | 6 | 60 | 43 | 22 | 21 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.