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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tinco/nanc | Nanc/IR/Expression/Binary.hs | mit | iOpToPred True CLeOp = I.SLT | 28 | iOpToPred True CLeOp = I.SLT | 28 | iOpToPred True CLeOp = I.SLT | 28 | false | false | 0 | 5 | 4 | 13 | 6 | 7 | null | null |
urbanslug/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | -- We are not printing kind applications. If we wanted to do so, we should do
-- something like this:
{-
= go ctxt_prec kis ty
where
go ctxt_prec [] ty = ppr_mono_ty ctxt_prec ty
go ctxt_prec (ki:kis) ty
= maybeParen ctxt_prec TyConPrec $
hsep [ go FunPrec kis ty
, ptext (sLit "@"... | 495 | ppr_mono_ty ctxt_prec (HsEqTy ty1 ty2)
= maybeParen ctxt_prec TyOpPrec $
ppr_mono_lty TyOpPrec ty1 <+> char '~' <+> ppr_mono_lty TyOpPrec ty2 | 147 | ppr_mono_ty ctxt_prec (HsEqTy ty1 ty2)
= maybeParen ctxt_prec TyOpPrec $
ppr_mono_lty TyOpPrec ty1 <+> char '~' <+> ppr_mono_lty TyOpPrec ty2 | 147 | true | false | 0 | 7 | 124 | 55 | 25 | 30 | null | null |
sdiehl/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | findPushSeq (P: P: P: P: rest)
= (PUSH_APPLY_PPPP, 4, rest) | 61 | findPushSeq (P: P: P: P: rest)
= (PUSH_APPLY_PPPP, 4, rest) | 61 | findPushSeq (P: P: P: P: rest)
= (PUSH_APPLY_PPPP, 4, rest) | 61 | false | false | 0 | 9 | 11 | 38 | 20 | 18 | null | null |
themoritz/cabal | cabal-install/Distribution/Solver/Modular/Tree.hs | bsd-3-clause | -- | Approximates the number of active choices that are available in a node.
-- Note that we count goal choices as having one choice, always.
zeroOrOneChoices :: Tree d c -> Bool
zeroOrOneChoices (PChoice _ _ _ ts) = W.isZeroOrOne (W.filter active ts) | 260 | zeroOrOneChoices :: Tree d c -> Bool
zeroOrOneChoices (PChoice _ _ _ ts) = W.isZeroOrOne (W.filter active ts) | 118 | zeroOrOneChoices (PChoice _ _ _ ts) = W.isZeroOrOne (W.filter active ts) | 81 | true | true | 0 | 8 | 52 | 52 | 26 | 26 | null | null |
ryantm/ghc | libraries/base/Foreign/C/String.hs | bsd-3-clause | -- | Marshal a Haskell string into a C wide string (i.e. wide
-- character array) in temporary storage, with explicit length
-- information.
--
-- * the memory is freed when the subcomputation terminates (either
-- normally or via an exception), so the pointer to the temporary
-- storage must /not/ be used after th... | 484 | withCWStringLen :: String -> (CWStringLen -> IO a) -> IO a
withCWStringLen str f =
withArrayLen (charsToCWchars str) $ \ len ptr -> f (ptr, len) | 157 | withCWStringLen str f =
withArrayLen (charsToCWchars str) $ \ len ptr -> f (ptr, len) | 90 | true | true | 0 | 9 | 99 | 74 | 41 | 33 | null | null |
iljakuklic/eel-proto | src/Backend/Runtime.hs | bsd-3-clause | -- | LLVM stack type definition
llStackDef = llStruct [llStack, llRaw] | 70 | llStackDef = llStruct [llStack, llRaw] | 38 | llStackDef = llStruct [llStack, llRaw] | 38 | true | false | 0 | 6 | 10 | 16 | 9 | 7 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/Script/Concrete.hs | mit | toMaybeLetter (Unicode.Letter 'α') = Just C_α | 45 | toMaybeLetter (Unicode.Letter 'α') = Just C_α | 45 | toMaybeLetter (Unicode.Letter 'α') = Just C_α | 45 | false | false | 0 | 7 | 5 | 23 | 10 | 13 | null | null |
isovector/iwmag | src/ObjectParser.hs | bsd-3-clause | parseV2 :: String -> V2
parseV2 (fmap read . words -> [x, y]) = V2 x y | 70 | parseV2 :: String -> V2
parseV2 (fmap read . words -> [x, y]) = V2 x y | 70 | parseV2 (fmap read . words -> [x, y]) = V2 x y | 46 | false | true | 0 | 9 | 16 | 43 | 22 | 21 | null | null |
mathologist/hTestMaker | testmaker/src/TestMaker/Problems.hs | gpl-3.0 | shuffleChoices q = do
cs <- shuffleM (qChoices q)
return (modQuestion q (QChoices (qCols q, cs)))
-- | Helper function to randomize all the choices in a list of questions. | 180 | shuffleChoices q = do
cs <- shuffleM (qChoices q)
return (modQuestion q (QChoices (qCols q, cs)))
-- | Helper function to randomize all the choices in a list of questions. | 180 | shuffleChoices q = do
cs <- shuffleM (qChoices q)
return (modQuestion q (QChoices (qCols q, cs)))
-- | Helper function to randomize all the choices in a list of questions. | 180 | false | false | 1 | 14 | 38 | 59 | 26 | 33 | null | null |
spechub/Hets | Propositional/ProveWithTruthTable.hs | gpl-2.0 | {- |
Record for prover specific functions. This is used by both GUI and command
line interface.
-}
atpFun :: String -- ^ Theory name
-> ATPState.ATPFunctions Sig.Sign FORMULA PMorphism.Morphism ProofTree
PState.PropProverState
atpFun thName = ATPState.ATPFunctions
{ ATPState.initialProverStat... | 1,000 | atpFun :: String -- ^ Theory name
-> ATPState.ATPFunctions Sig.Sign FORMULA PMorphism.Morphism ProofTree
PState.PropProverState
atpFun thName = ATPState.ATPFunctions
{ ATPState.initialProverState = PState.propProverState
, ATPState.goalOutput = goalProblem thName
,... | 897 | atpFun thName = ATPState.ATPFunctions
{ ATPState.initialProverState = PState.propProverState
, ATPState.goalOutput = goalProblem thName
, ATPState.atpTransSenName = PState.transSenName
, ATPState.atpInsertSentence = PState.insertSentence
, ... | 762 | true | true | 0 | 8 | 316 | 153 | 88 | 65 | null | null |
alphaHeavy/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | trueArg, falseArg :: SFlags -> LFlags -> Description -> (b -> Flag Bool) ->
(Flag Bool -> (b -> b)) -> OptDescr b
trueArg = noArg (Flag True) | 163 | trueArg, falseArg :: SFlags -> LFlags -> Description -> (b -> Flag Bool) ->
(Flag Bool -> (b -> b)) -> OptDescr b
trueArg = noArg (Flag True) | 163 | trueArg = noArg (Flag True) | 28 | false | true | 2 | 14 | 49 | 81 | 38 | 43 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/List.hs | mpl-2.0 | -- | Optional. If present, then retrieve the next batch of results from the
-- preceding call to this method. pageToken must be the value of
-- nextPageToken from the previous response. The values of other method
-- parameters should be identical to those in the previous call.
baslPageToken :: Lens' BillingAccountsSink... | 415 | baslPageToken :: Lens' BillingAccountsSinksList (Maybe Text)
baslPageToken
= lens _baslPageToken
(\ s a -> s{_baslPageToken = a}) | 137 | baslPageToken
= lens _baslPageToken
(\ s a -> s{_baslPageToken = a}) | 76 | true | true | 0 | 9 | 72 | 51 | 28 | 23 | null | null |
hithroc/5chbot | src/Bot/Parse.hs | bsd-3-clause | cmdName Version = "version" | 27 | cmdName Version = "version" | 27 | cmdName Version = "version" | 27 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
dmort27/HsSPE | Data/Phonology/Rules.hs | bsd-3-clause | applyRule rule form = x : applyRule rule xs
where x:xs = maybe form (uncurry (++)) $ applyRule' rule ([], form) | 115 | applyRule rule form = x : applyRule rule xs
where x:xs = maybe form (uncurry (++)) $ applyRule' rule ([], form) | 115 | applyRule rule form = x : applyRule rule xs
where x:xs = maybe form (uncurry (++)) $ applyRule' rule ([], form) | 115 | false | false | 1 | 9 | 24 | 64 | 31 | 33 | null | null |
emilaxelsson/haskell-exp-parser | tests/ParseExp.hs | bsd-3-clause | fixNegLits :: Exp -> Exp
fixNegLits = everywhere (mkT trans)
where
trans (LitE (IntegerL l))
| l < 0 = AppE (VarE (mkName "negate")) (LitE (IntegerL (negate l)))
trans e = e | 191 | fixNegLits :: Exp -> Exp
fixNegLits = everywhere (mkT trans)
where
trans (LitE (IntegerL l))
| l < 0 = AppE (VarE (mkName "negate")) (LitE (IntegerL (negate l)))
trans e = e | 191 | fixNegLits = everywhere (mkT trans)
where
trans (LitE (IntegerL l))
| l < 0 = AppE (VarE (mkName "negate")) (LitE (IntegerL (negate l)))
trans e = e | 166 | false | true | 1 | 12 | 49 | 99 | 48 | 51 | null | null |
parapluu/encore | src/types/Typechecker/Typechecker.hs | bsd-3-clause | typecheckNotNull :: Expr -> TypecheckM Expr
typecheckNotNull expr = do
eExpr <- typecheck expr
let ty = AST.getType eExpr
if isNullType ty
then local (pushBT expr) $ coerceNull eExpr ty
else return eExpr | 213 | typecheckNotNull :: Expr -> TypecheckM Expr
typecheckNotNull expr = do
eExpr <- typecheck expr
let ty = AST.getType eExpr
if isNullType ty
then local (pushBT expr) $ coerceNull eExpr ty
else return eExpr | 213 | typecheckNotNull expr = do
eExpr <- typecheck expr
let ty = AST.getType eExpr
if isNullType ty
then local (pushBT expr) $ coerceNull eExpr ty
else return eExpr | 169 | false | true | 0 | 11 | 42 | 80 | 36 | 44 | null | null |
mohsen3/csv-conduit | src/Data/CSV/Conduit/Parser/Text.hs | bsd-3-clause | -------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- | Try to parse given string as CSV
parseCSV :: CSVSettings -> Text -> Either String [Row Text]
parseCSV s = parseOnly $ csv s | 289 | parseCSV :: CSVSettings -> Text -> Either String [Row Text]
parseCSV s = parseOnly $ csv s | 90 | parseCSV s = parseOnly $ csv s | 30 | true | true | 0 | 9 | 29 | 43 | 22 | 21 | null | null |
mtesseract/ingscale | src/Main.hs | bsd-3-clause | programVersion :: Text
programVersion = T.pack $ showVersion version | 68 | programVersion :: Text
programVersion = T.pack $ showVersion version | 68 | programVersion = T.pack $ showVersion version | 45 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
sdiehl/ghc | testsuite/tests/typecheck/should_fail/T15438.hs | bsd-3-clause | foo :: (forall a b. C a b => b -> b) -> Int
foo = error "urk" | 61 | foo :: (forall a b. C a b => b -> b) -> Int
foo = error "urk" | 61 | foo = error "urk" | 17 | false | true | 0 | 10 | 17 | 47 | 22 | 25 | null | null |
open-etcs/openetcs-dmi | src/ETCS/DMI/Windows/DataEntryWindow.hs | bsd-3-clause | mkDataValueKeyboard :: (DataValue a, IsNode n) => Proxy a -> Event r -> Behavior Bool -> n ->
MomentIO (Behavior Text, Behavior Text, Proxy a)
mkDataValueKeyboard t r v parent = do
kbd <- mkWidget parent $ mkKeyboard t v
kbd_buf <- fromKeyboardEvent t r (widgetEvent . fromWidgetInstance $ kbd)
retu... | 353 | mkDataValueKeyboard :: (DataValue a, IsNode n) => Proxy a -> Event r -> Behavior Bool -> n ->
MomentIO (Behavior Text, Behavior Text, Proxy a)
mkDataValueKeyboard t r v parent = do
kbd <- mkWidget parent $ mkKeyboard t v
kbd_buf <- fromKeyboardEvent t r (widgetEvent . fromWidgetInstance $ kbd)
retu... | 353 | mkDataValueKeyboard t r v parent = do
kbd <- mkWidget parent $ mkKeyboard t v
kbd_buf <- fromKeyboardEvent t r (widgetEvent . fromWidgetInstance $ kbd)
return (dataValueLabel t, kbd_buf, t) | 201 | false | true | 0 | 13 | 75 | 148 | 69 | 79 | null | null |
sdiehl/ghc | compiler/typecheck/Constraint.hs | bsd-3-clause | isWanted :: CtEvidence -> Bool
isWanted (CtWanted {}) = True | 60 | isWanted :: CtEvidence -> Bool
isWanted (CtWanted {}) = True | 60 | isWanted (CtWanted {}) = True | 29 | false | true | 1 | 8 | 9 | 30 | 14 | 16 | null | null |
forsyde/forsyde-shallow | src/ForSyDe/Shallow/Core/Vector.hs | bsd-3-clause | zipV _ _ = NullV | 20 | zipV _ _ = NullV | 20 | zipV _ _ = NullV | 20 | false | false | 1 | 5 | 8 | 12 | 5 | 7 | null | null |
shouya/poi | src/Lib.hs | gpl-3.0 | runPoi :: IO ()
runPoi = do
(cfg, command) <- parseOptions
loadConfig cfg
runCommand command
{-
data Subcommand = CmdDaemon
| CmdRun
| CmdGenConf
| CmdCheckConfig
deriving Show
-} | 250 | runPoi :: IO ()
runPoi = do
(cfg, command) <- parseOptions
loadConfig cfg
runCommand command
{-
data Subcommand = CmdDaemon
| CmdRun
| CmdGenConf
| CmdCheckConfig
deriving Show
-} | 250 | runPoi = do
(cfg, command) <- parseOptions
loadConfig cfg
runCommand command
{-
data Subcommand = CmdDaemon
| CmdRun
| CmdGenConf
| CmdCheckConfig
deriving Show
-} | 234 | false | true | 0 | 9 | 99 | 48 | 21 | 27 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Recursive do notation
mfixIdKey :: Unique
mfixIdKey = mkPreludeMiscIdUnique 175 | 88 | mfixIdKey :: Unique
mfixIdKey = mkPreludeMiscIdUnique 175 | 63 | mfixIdKey = mkPreludeMiscIdUnique 175 | 43 | true | true | 0 | 5 | 16 | 15 | 8 | 7 | null | null |
jmitchell/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | tfail :: Err -> TC a
tfail e = Error e | 38 | tfail :: Err -> TC a
tfail e = Error e | 38 | tfail e = Error e | 17 | false | true | 0 | 7 | 10 | 29 | 12 | 17 | null | null |
SAdams601/HaRe | old/testing/rmFromExport/A1_TokOut.hs | bsd-3-clause | in :: Tree Int ->Bool
main t = isSame (sumSquares (fringe t))
(sumSquares (B1.myFringe t)+sumSquares (C1.myFringe t))
| 136 | main :: Tree Int ->Bool
main t = isSame (sumSquares (fringe t))
(sumSquares (B1.myFringe t)+sumSquares (C1.myFringe t)) | 135 | main t = isSame (sumSquares (fringe t))
(sumSquares (B1.myFringe t)+sumSquares (C1.myFringe t)) | 111 | false | true | 0 | 10 | 35 | 73 | 33 | 40 | null | null |
ocean0yohsuke/Scheme | src/Scheme/DataType.hs | bsd-3-clause | initStackTrace :: StackTrace
initStackTrace = StackTrace [] [] 10 | 65 | initStackTrace :: StackTrace
initStackTrace = StackTrace [] [] 10 | 65 | initStackTrace = StackTrace [] [] 10 | 36 | false | true | 0 | 6 | 8 | 22 | 11 | 11 | null | null |
snoyberg/hackage-server | MirrorClient.hs | bsd-3-clause | setETag file (Just etag) = writeFile (file <.> "etag") etag | 60 | setETag file (Just etag) = writeFile (file <.> "etag") etag | 60 | setETag file (Just etag) = writeFile (file <.> "etag") etag | 60 | false | false | 0 | 7 | 10 | 31 | 14 | 17 | null | null |
juodaspaulius/bclafer_old | src/Language/Clafer/Intermediate/Analysis.hs | mit | suchThat :: Monad m => m [a] -> (a -> Bool) -> m [a]
suchThat = flip $ liftM . filter | 85 | suchThat :: Monad m => m [a] -> (a -> Bool) -> m [a]
suchThat = flip $ liftM . filter | 85 | suchThat = flip $ liftM . filter | 32 | false | true | 3 | 10 | 20 | 61 | 28 | 33 | null | null |
apyrgio/ganeti | src/Ganeti/Parsers.hs | bsd-2-clause | -- * Utility functions
-- | Our own space-skipping function, because A.skipSpace also skips
-- newline characters. It skips ZERO or more spaces, so it does not
-- fail if there are no spaces.
skipSpaces :: Parser ()
skipSpaces = A.skipWhile A.isHorizontalSpace | 261 | skipSpaces :: Parser ()
skipSpaces = A.skipWhile A.isHorizontalSpace | 68 | skipSpaces = A.skipWhile A.isHorizontalSpace | 44 | true | true | 0 | 7 | 42 | 33 | 16 | 17 | null | null |
kadena-io/pact | src/Pact/Native.hs | bsd-3-clause | where' :: NativeFun e
where' i as@[k',tLamToApp -> app@TApp{},r'] = gasUnreduced i as $ ((,) <$> reduce k' <*> reduce r') >>= \kr -> case kr of
(k,r@TObject {}) -> lookupObj k (_oObject $ _tObject r) >>= \v -> apply (_tApp app) [v]
_ -> argsError' i as | 256 | where' :: NativeFun e
where' i as@[k',tLamToApp -> app@TApp{},r'] = gasUnreduced i as $ ((,) <$> reduce k' <*> reduce r') >>= \kr -> case kr of
(k,r@TObject {}) -> lookupObj k (_oObject $ _tObject r) >>= \v -> apply (_tApp app) [v]
_ -> argsError' i as | 256 | where' i as@[k',tLamToApp -> app@TApp{},r'] = gasUnreduced i as $ ((,) <$> reduce k' <*> reduce r') >>= \kr -> case kr of
(k,r@TObject {}) -> lookupObj k (_oObject $ _tObject r) >>= \v -> apply (_tApp app) [v]
_ -> argsError' i as | 234 | false | true | 2 | 10 | 51 | 153 | 79 | 74 | null | null |
chengzh2008/hpffp | src/ch07-FunctionPattern/matchTuples1.hs | bsd-3-clause | f'' :: (a, b, c) -> (d, e, f) -> ((a, d), (c, f))
f'' (a, _, c) (d, _, f) = ((a, d), (c, f)) | 92 | f'' :: (a, b, c) -> (d, e, f) -> ((a, d), (c, f))
f'' (a, _, c) (d, _, f) = ((a, d), (c, f)) | 92 | f'' (a, _, c) (d, _, f) = ((a, d), (c, f)) | 42 | false | true | 0 | 10 | 25 | 102 | 61 | 41 | null | null |
brendanhay/gogol | gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/Operations/Get.hs | mpl-2.0 | -- | Creates a value of 'ProjectsDatabasesOperationsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pdogXgafv'
--
-- * 'pdogUploadProtocol'
--
-- * 'pdogAccessToken'
--
-- * 'pdogUploadType'
--
-- * 'pdogName'
--
-- * 'pdogCallba... | 691 | projectsDatabasesOperationsGet
:: Text -- ^ 'pdogName'
-> ProjectsDatabasesOperationsGet
projectsDatabasesOperationsGet pPdogName_ =
ProjectsDatabasesOperationsGet'
{ _pdogXgafv = Nothing
, _pdogUploadProtocol = Nothing
, _pdogAccessToken = Nothing
, _pdogUploadType = Nothing
, _pdogName =... | 367 | projectsDatabasesOperationsGet pPdogName_ =
ProjectsDatabasesOperationsGet'
{ _pdogXgafv = Nothing
, _pdogUploadProtocol = Nothing
, _pdogAccessToken = Nothing
, _pdogUploadType = Nothing
, _pdogName = pPdogName_
, _pdogCallback = Nothing
} | 270 | true | true | 0 | 7 | 128 | 81 | 52 | 29 | null | null |
aweinstock314/wscat | src/wscat.hs | apache-2.0 | applyLeftovers cfg [hostname, port] = applyLeftovers (cfg { cfgHostname = Just hostname }) [port] | 97 | applyLeftovers cfg [hostname, port] = applyLeftovers (cfg { cfgHostname = Just hostname }) [port] | 97 | applyLeftovers cfg [hostname, port] = applyLeftovers (cfg { cfgHostname = Just hostname }) [port] | 97 | false | false | 0 | 9 | 13 | 39 | 21 | 18 | null | null |
patperry/hs-linear-algebra | tests-old/STMatrix.hs | bsd-3-clause | modifyElem_S a ij f = writeElem_S a ij $ f (a!ij) | 49 | modifyElem_S a ij f = writeElem_S a ij $ f (a!ij) | 49 | modifyElem_S a ij f = writeElem_S a ij $ f (a!ij) | 49 | false | false | 0 | 8 | 10 | 32 | 15 | 17 | null | null |
ctford/Idris-Elba-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | execElab :: aux -> Elab' aux a -> ProofState -> TC (ElabState aux)
execElab a e ps = execStateT e (ES (ps, a) "" Nothing) | 121 | execElab :: aux -> Elab' aux a -> ProofState -> TC (ElabState aux)
execElab a e ps = execStateT e (ES (ps, a) "" Nothing) | 121 | execElab a e ps = execStateT e (ES (ps, a) "" Nothing) | 54 | false | true | 0 | 11 | 24 | 69 | 33 | 36 | null | null |
amcphail/hmatrix-gsl-stats | lib/Numeric/GSL/Distribution/Continuous.hs | bsd-3-clause | density_1p :: OneParamDist -- ^ density type
-> DistFunc -- ^ distribution function type
-> Double -- ^ parameter
-> Double -- ^ value
-> Double -- ^ result
density_1p d f p x = unsafePerformIO $ distribution_dist_one_param (fromei... | 338 | density_1p :: OneParamDist -- ^ density type
-> DistFunc -- ^ distribution function type
-> Double -- ^ parameter
-> Double -- ^ value
-> Double
density_1p d f p x = unsafePerformIO $ distribution_dist_one_param (fromei f) (fromei d... | 325 | density_1p d f p x = unsafePerformIO $ distribution_dist_one_param (fromei f) (fromei d) x p | 92 | true | true | 0 | 8 | 132 | 66 | 35 | 31 | null | null |
leshchevds/ganeti | src/Ganeti/BasicTypes.hs | bsd-2-clause | -- | Simple checker for whether a 'GenericResult' is OK.
isOk :: GenericResult a b -> Bool
isOk (Ok _) = True | 109 | isOk :: GenericResult a b -> Bool
isOk (Ok _) = True | 52 | isOk (Ok _) = True | 18 | true | true | 0 | 6 | 21 | 34 | 16 | 18 | null | null |
seereason/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ ReadOffAddrOp_Int32 [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getInt32(`o`+(`i`<<2),true); |] | 106 | genPrim _ _ ReadOffAddrOp_Int32 [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getInt32(`o`+(`i`<<2),true); |] | 106 | genPrim _ _ ReadOffAddrOp_Int32 [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getInt32(`o`+(`i`<<2),true); |] | 106 | false | false | 0 | 6 | 13 | 36 | 21 | 15 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/THNames.hs | bsd-3-clause | thLib = mkTHModule (fsLit "Language.Eta.Meta.Lib") | 50 | thLib = mkTHModule (fsLit "Language.Eta.Meta.Lib") | 50 | thLib = mkTHModule (fsLit "Language.Eta.Meta.Lib") | 50 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
Potregon/while | src/Parser/While.hs | gpl-3.0 | goto 54 8 = 38 | 14 | goto 54 8 = 38 | 14 | goto 54 8 = 38 | 14 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Linux/Internals/FileSystem.hs | bsd-3-clause | -- | BLKZEROOUT
ioctlZeroOut :: MonadInIO m => Range -> Handle -> FlowT '[ErrorCode] m()
ioctlZeroOut = ioctlWriteCmd (ioctlCommand None 0x12 127 0) | 148 | ioctlZeroOut :: MonadInIO m => Range -> Handle -> FlowT '[ErrorCode] m()
ioctlZeroOut = ioctlWriteCmd (ioctlCommand None 0x12 127 0) | 132 | ioctlZeroOut = ioctlWriteCmd (ioctlCommand None 0x12 127 0) | 59 | true | true | 0 | 10 | 22 | 56 | 28 | 28 | null | null |
meiersi/bytestring | Data/ByteString.hs | bsd-3-clause | mkBigPS :: Int -> [ByteString] -> IO ByteString
mkBigPS _ [ps] = return ps | 74 | mkBigPS :: Int -> [ByteString] -> IO ByteString
mkBigPS _ [ps] = return ps | 74 | mkBigPS _ [ps] = return ps | 26 | false | true | 0 | 9 | 13 | 40 | 19 | 21 | null | null |
dpieroux/euler | 0130.hs | mit | values = computeValues [n | i <- [1..], let n=2*i+1, rem n 5 > 0]
$ dropWhile (\n -> n<7) primes | 119 | values = computeValues [n | i <- [1..], let n=2*i+1, rem n 5 > 0]
$ dropWhile (\n -> n<7) primes | 119 | values = computeValues [n | i <- [1..], let n=2*i+1, rem n 5 > 0]
$ dropWhile (\n -> n<7) primes | 119 | false | false | 3 | 11 | 43 | 80 | 38 | 42 | null | null |
abuiles/turbinado-blog | tmp/dependencies/hsx-0.4.5/src/Trhsx.hs | bsd-3-clause | transformFile :: String -> String -> String -> IO ()
transformFile origfile infile outfile = do
f <- readFile infile
let fm = process origfile f
writeFile outfile fm | 189 | transformFile :: String -> String -> String -> IO ()
transformFile origfile infile outfile = do
f <- readFile infile
let fm = process origfile f
writeFile outfile fm | 189 | transformFile origfile infile outfile = do
f <- readFile infile
let fm = process origfile f
writeFile outfile fm | 136 | false | true | 0 | 11 | 52 | 72 | 31 | 41 | null | null |
spanners/cis194 | 11-applicative/AParser.hs | unlicense | abParser ∷ Parser (Char, Char)
abParser = (,) <$> (char 'a') <*> (char 'b') | 75 | abParser ∷ Parser (Char, Char)
abParser = (,) <$> (char 'a') <*> (char 'b') | 75 | abParser = (,) <$> (char 'a') <*> (char 'b') | 44 | false | true | 0 | 8 | 13 | 43 | 23 | 20 | null | null |
sergv/vector | tests/Utilities.hs | bsd-3-clause | -- Generators
index_value_pairs :: Arbitrary a => Int -> Gen [(Int,a)]
index_value_pairs 0 = return [] | 102 | index_value_pairs :: Arbitrary a => Int -> Gen [(Int,a)]
index_value_pairs 0 = return [] | 88 | index_value_pairs 0 = return [] | 31 | true | true | 0 | 10 | 15 | 47 | 23 | 24 | null | null |
krisajenkins/kashmir | src/Kashmir/Web.hs | epl-1.0 | handleError :: MonadSnap m => Int -> m b
handleError errorCode =
do modifyResponse $ setResponseCode errorCode
writeBS ""
getResponse >>= finishWith | 160 | handleError :: MonadSnap m => Int -> m b
handleError errorCode =
do modifyResponse $ setResponseCode errorCode
writeBS ""
getResponse >>= finishWith | 160 | handleError errorCode =
do modifyResponse $ setResponseCode errorCode
writeBS ""
getResponse >>= finishWith | 119 | false | true | 0 | 8 | 33 | 56 | 23 | 33 | null | null |
Shimuuar/mwc-random | tests/props.hs | bsd-2-clause | emptySeed :: IO ()
emptySeed = do
let seed = toSeed U.empty
seed' <- save =<< create
assertEqual "Seeds must be equal" seed' seed
-- First 513 values generated from seed made using create | 194 | emptySeed :: IO ()
emptySeed = do
let seed = toSeed U.empty
seed' <- save =<< create
assertEqual "Seeds must be equal" seed' seed
-- First 513 values generated from seed made using create | 194 | emptySeed = do
let seed = toSeed U.empty
seed' <- save =<< create
assertEqual "Seeds must be equal" seed' seed
-- First 513 values generated from seed made using create | 175 | false | true | 0 | 11 | 40 | 52 | 24 | 28 | null | null |
zmeadows/zwerg | lib/Zwerg/Util.hs | mit | takeUntil p (x:xs) = x : if p x then takeUntil p xs else [] | 59 | takeUntil p (x:xs) = x : if p x then takeUntil p xs else [] | 59 | takeUntil p (x:xs) = x : if p x then takeUntil p xs else [] | 59 | false | false | 0 | 7 | 14 | 40 | 20 | 20 | null | null |
prezi/itsitsdangerous | tests/Tests.hs | bsd-3-clause | signOrigWithSigner :: OrigSigner
-> Separator
-> Secret
-> ByteString
-> ByteString
signOrigWithSigner signer separator secret plain = unsafePerformIO $ do
signerInstance <- constructSignerInstance signer separator secret
plain' <- toPy... | 423 | signOrigWithSigner :: OrigSigner
-> Separator
-> Secret
-> ByteString
-> ByteString
signOrigWithSigner signer separator secret plain = unsafePerformIO $ do
signerInstance <- constructSignerInstance signer separator secret
plain' <- toPy... | 423 | signOrigWithSigner signer separator secret plain = unsafePerformIO $ do
signerInstance <- constructSignerInstance signer separator secret
plain' <- toPy plain
signMethod <- getAttr signerInstance "sign"
callObject signMethod [plain'] [] >>= fromPy | 263 | false | true | 0 | 10 | 132 | 95 | 44 | 51 | null | null |
neosam/esge | src/Esge/Core.hs | bsd-3-clause | storageToTuple :: Storage -> (String, Storage)
storageToTuple sto@(Storage key _ _) = (key, sto) | 96 | storageToTuple :: Storage -> (String, Storage)
storageToTuple sto@(Storage key _ _) = (key, sto) | 96 | storageToTuple sto@(Storage key _ _) = (key, sto) | 49 | false | true | 0 | 8 | 13 | 43 | 24 | 19 | null | null |
na4zagin3/uhim-dict | src/Language/UHIM/Dictionary/Keybind/Vim.hs | gpl-3.0 | escapeChar '\t' = "<Tab>" | 25 | escapeChar '\t' = "<Tab>" | 25 | escapeChar '\t' = "<Tab>" | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qSyntaxHighlighterFromPtr :: Ptr (TQSyntaxHighlighter a) -> IO (QSyntaxHighlighter a)
qSyntaxHighlighterFromPtr p
= objectFromPtr qtc_QSyntaxHighlighter_getFinalizer p | 169 | qSyntaxHighlighterFromPtr :: Ptr (TQSyntaxHighlighter a) -> IO (QSyntaxHighlighter a)
qSyntaxHighlighterFromPtr p
= objectFromPtr qtc_QSyntaxHighlighter_getFinalizer p | 169 | qSyntaxHighlighterFromPtr p
= objectFromPtr qtc_QSyntaxHighlighter_getFinalizer p | 83 | false | true | 0 | 8 | 16 | 42 | 19 | 23 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Coll/EnumSet.hs | mit | {--------------------------------------------------------------------
Construction
--------------------------------------------------------------------}
-- | /O(1)/. The empty set.
empty :: Set a
empty = Set 0 | 211 | empty :: Set a
empty = Set 0 | 28 | empty = Set 0 | 13 | true | true | 0 | 5 | 18 | 19 | 10 | 9 | null | null |
MP2E/XMonadContrib | XMonad/Actions/DynamicWorkspaceGroups.hs | bsd-3-clause | findScreenWS :: ScreenId -> X (Maybe WorkspaceId)
findScreenWS sid = withWindowSet $
return . fmap (W.tag . W.workspace) . find ((==sid) . W.screen) . W.screens | 162 | findScreenWS :: ScreenId -> X (Maybe WorkspaceId)
findScreenWS sid = withWindowSet $
return . fmap (W.tag . W.workspace) . find ((==sid) . W.screen) . W.screens | 162 | findScreenWS sid = withWindowSet $
return . fmap (W.tag . W.workspace) . find ((==sid) . W.screen) . W.screens | 112 | false | true | 1 | 10 | 26 | 81 | 39 | 42 | null | null |
brentonashworth/css-parser | src/Text/CSS/CSSParser.hs | bsd-3-clause | - | Parse an escape character.
--
-- > {unicode}|\\[^\r\n\f0-9a-f]
--
-- An escape character is either a unicode character or a backslash
-- followed by any character other than \\r, \\n, \\f or a hexadecimal
-- digit.
escape :: Parser String
escape = (try unicode) <|> (do a <- char '\\'
... | 416 | escape :: Parser String
escape = (try unicode) <|> (do a <- char '\\'
b <- noneOf ("\n\r\f"++hexDigits)
return $ (a:[b])) <?> "escape" | 196 | escape = (try unicode) <|> (do a <- char '\\'
b <- noneOf ("\n\r\f"++hexDigits)
return $ (a:[b])) <?> "escape" | 172 | true | true | 1 | 14 | 123 | 97 | 50 | 47 | null | null |
tjakway/ghcjvm | compiler/prelude/PrelNames.hs | bsd-3-clause | ratioTyConName = tcQual gHC_REAL (fsLit "Ratio") ratioTyConKey | 75 | ratioTyConName = tcQual gHC_REAL (fsLit "Ratio") ratioTyConKey | 75 | ratioTyConName = tcQual gHC_REAL (fsLit "Ratio") ratioTyConKey | 75 | false | false | 0 | 7 | 19 | 19 | 9 | 10 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/rangeAdt.hs | bsd-3-clause | prop_rng5 = liquidAssertB (0 <= sumTo n) | 40 | prop_rng5 = liquidAssertB (0 <= sumTo n) | 40 | prop_rng5 = liquidAssertB (0 <= sumTo n) | 40 | false | false | 0 | 8 | 6 | 19 | 9 | 10 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Constraint/Monad.hs | bsd-3-clause | addPost _ t
= return t | 24 | addPost _ t
= return t | 24 | addPost _ t
= return t | 24 | false | false | 0 | 5 | 7 | 14 | 6 | 8 | null | null |
keithodulaigh/Hets | CommonLogic/PredefinedCASLAxioms.hs | gpl-2.0 | mkCons :: TERM f -> TERM f -> TERM f
mkCons t1 t2 = mkAppl consOp [t1, t2] | 74 | mkCons :: TERM f -> TERM f -> TERM f
mkCons t1 t2 = mkAppl consOp [t1, t2] | 74 | mkCons t1 t2 = mkAppl consOp [t1, t2] | 37 | false | true | 0 | 7 | 17 | 48 | 22 | 26 | null | null |
plneappl/HaskellVectorsETC | Vn.hs | mit | v2 = fromList [2, 3, 4] :: V3 Int | 33 | v2 = fromList [2, 3, 4] :: V3 Int | 33 | v2 = fromList [2, 3, 4] :: V3 Int | 33 | false | false | 2 | 5 | 8 | 25 | 13 | 12 | null | null |
prasmussen/magmod | Magento/Module/Path.hs | mit | layoutBasePath' :: ModuleInfo -> String -> FilePath
layoutBasePath' info scope =
joinPath [
basePath info,
"app",
"design",
scope,
"base",
"default",
"layout"
] | 224 | layoutBasePath' :: ModuleInfo -> String -> FilePath
layoutBasePath' info scope =
joinPath [
basePath info,
"app",
"design",
scope,
"base",
"default",
"layout"
] | 224 | layoutBasePath' info scope =
joinPath [
basePath info,
"app",
"design",
scope,
"base",
"default",
"layout"
] | 172 | false | true | 0 | 7 | 85 | 51 | 28 | 23 | null | null |
blippy/sifi | src/Portfolio.hs | gpl-3.0 | createPorts (p:ps) fs acc =
createPorts ps fs' acc'
where
Port tgt srcs = p
(subFlows, agg) = createPort tgt srcs fs
fs' = agg:fs
acc' = acc ++ [(subFlows, agg)] | 181 | createPorts (p:ps) fs acc =
createPorts ps fs' acc'
where
Port tgt srcs = p
(subFlows, agg) = createPort tgt srcs fs
fs' = agg:fs
acc' = acc ++ [(subFlows, agg)] | 181 | createPorts (p:ps) fs acc =
createPorts ps fs' acc'
where
Port tgt srcs = p
(subFlows, agg) = createPort tgt srcs fs
fs' = agg:fs
acc' = acc ++ [(subFlows, agg)] | 181 | false | false | 3 | 8 | 50 | 89 | 45 | 44 | null | null |
facebookincubator/duckling | Duckling/Ordinal/FR/Rules.hs | bsd-3-clause | ruleOrdinalDigits :: Rule
ruleOrdinalDigits = Rule
{ name = "ordinal (digits)"
, pattern =
[ regex "0*(\\d+) ?(ere?|ère|ème|eme|e)"
]
, prod = \case
(Token RegexMatch (GroupMatch (match:_)):_) -> ordinal <$> parseInt match
_ -> Nothing
} | 265 | ruleOrdinalDigits :: Rule
ruleOrdinalDigits = Rule
{ name = "ordinal (digits)"
, pattern =
[ regex "0*(\\d+) ?(ere?|ère|ème|eme|e)"
]
, prod = \case
(Token RegexMatch (GroupMatch (match:_)):_) -> ordinal <$> parseInt match
_ -> Nothing
} | 265 | ruleOrdinalDigits = Rule
{ name = "ordinal (digits)"
, pattern =
[ regex "0*(\\d+) ?(ere?|ère|ème|eme|e)"
]
, prod = \case
(Token RegexMatch (GroupMatch (match:_)):_) -> ordinal <$> parseInt match
_ -> Nothing
} | 239 | false | true | 0 | 17 | 63 | 93 | 47 | 46 | null | null |
ennocramer/floskell | src/Floskell.hs | bsd-3-clause | withReducedLineLength :: Int -> Config -> Config
withReducedLineLength offset config = config { cfgPenalty = penalty }
where
penalty = (cfgPenalty config) { penaltyMaxLineLength =
penaltyMaxLineLength (cfgPenalty config)
- offset
... | 382 | withReducedLineLength :: Int -> Config -> Config
withReducedLineLength offset config = config { cfgPenalty = penalty }
where
penalty = (cfgPenalty config) { penaltyMaxLineLength =
penaltyMaxLineLength (cfgPenalty config)
- offset
... | 382 | withReducedLineLength offset config = config { cfgPenalty = penalty }
where
penalty = (cfgPenalty config) { penaltyMaxLineLength =
penaltyMaxLineLength (cfgPenalty config)
- offset
}
-- | Format the ... | 333 | false | true | 0 | 10 | 157 | 68 | 36 | 32 | null | null |
alphaHeavy/hlint | src/HSE/Util.hs | gpl-2.0 | eqMaybe Nothing Nothing = True | 30 | eqMaybe Nothing Nothing = True | 30 | eqMaybe Nothing Nothing = True | 30 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
prsteele/mdp | testsuite/tests/Algorithms/MDP/Ex_MM1_Test.hs | mit | test_scenario8Cost = assertBoolVerbose msg (abs (c - cc) < 8e3)
where
ctmdp = uniformize (mkInstance scenario8)
sol = solution (8e-4) ctmdp
c = costOf sol
cc = _scenarioCost scenario8
msg = unwords [show c, "/=", show cc] | 255 | test_scenario8Cost = assertBoolVerbose msg (abs (c - cc) < 8e3)
where
ctmdp = uniformize (mkInstance scenario8)
sol = solution (8e-4) ctmdp
c = costOf sol
cc = _scenarioCost scenario8
msg = unwords [show c, "/=", show cc] | 255 | test_scenario8Cost = assertBoolVerbose msg (abs (c - cc) < 8e3)
where
ctmdp = uniformize (mkInstance scenario8)
sol = solution (8e-4) ctmdp
c = costOf sol
cc = _scenarioCost scenario8
msg = unwords [show c, "/=", show cc] | 255 | false | false | 6 | 10 | 70 | 118 | 49 | 69 | null | null |
apyrgio/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- | Maximum UDP datagram size.
--
-- On IPv4: 64K - 20 (ip header size) - 8 (udp header size) = 65507
-- On IPv6: 64K - 40 (ip6 header size) - 8 (udp header size) = 65487
-- (assuming we can't use jumbo frames)
-- We just set this to 60K, which should be enough
maxUdpDataSize :: Int
maxUdpDataSize = 61440 | 309 | maxUdpDataSize :: Int
maxUdpDataSize = 61440 | 44 | maxUdpDataSize = 61440 | 22 | true | true | 0 | 4 | 64 | 17 | 12 | 5 | null | null |
frantisekfarka/ghc-dsi | compiler/main/DynFlags.hs | bsd-3-clause | wayGeneralFlags _ WayDyn = [Opt_PIC] | 41 | wayGeneralFlags _ WayDyn = [Opt_PIC] | 41 | wayGeneralFlags _ WayDyn = [Opt_PIC] | 41 | false | false | 0 | 5 | 9 | 14 | 7 | 7 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | int32TyConName = tcQual gHC_INT (fsLit "Int32") int32TyConKey | 65 | int32TyConName = tcQual gHC_INT (fsLit "Int32") int32TyConKey | 65 | int32TyConName = tcQual gHC_INT (fsLit "Int32") int32TyConKey | 65 | false | false | 0 | 7 | 10 | 19 | 9 | 10 | null | null |
sol/uu-parsinglib | src/Text/ParserCombinators/UU/Utils.hs | mit | pLetter:: Parser Char
pLetter = pUpper <|> pLower | 49 | pLetter:: Parser Char
pLetter = pUpper <|> pLower | 49 | pLetter = pUpper <|> pLower | 27 | false | true | 1 | 6 | 7 | 23 | 9 | 14 | null | null |
fmthoma/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
-- Split the type of a dictionary function
-- We don't use tcSplitSigmaTy, because a DFun may (with NDP)
-- have non-Pred arguments, such as
-- df :: forall m. (forall b. Eq b => Eq (m b)) -> C m
--
-- Also NB splitFunTys, not tcSplitFunTys;
-- the latter ... | 601 | tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
tcSplitDFunTy ty
= case tcSplitForAllTys ty of { (tvs, rho) ->
case splitFunTys rho of { (theta, tau) ->
case tcSplitDFunHead tau of { (clas, tys) ->
(tvs, theta, clas, tys) }}} | 262 | tcSplitDFunTy ty
= case tcSplitForAllTys ty of { (tvs, rho) ->
case splitFunTys rho of { (theta, tau) ->
case tcSplitDFunHead tau of { (clas, tys) ->
(tvs, theta, clas, tys) }}} | 204 | true | true | 0 | 14 | 137 | 127 | 76 | 51 | null | null |
rueshyna/gogol | gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs | mpl-2.0 | -- | An absolute link to the Google+ hangout associated with this event.
-- Read-only.
eHangoutLink :: Lens' Event (Maybe Text)
eHangoutLink
= lens _eHangoutLink (\ s a -> s{_eHangoutLink = a}) | 195 | eHangoutLink :: Lens' Event (Maybe Text)
eHangoutLink
= lens _eHangoutLink (\ s a -> s{_eHangoutLink = a}) | 108 | eHangoutLink
= lens _eHangoutLink (\ s a -> s{_eHangoutLink = a}) | 67 | true | true | 0 | 9 | 33 | 49 | 26 | 23 | null | null |
SKA-ScienceDataProcessor/RC | MS3/lib/DNA/Logging.hs | apache-2.0 | cudaMetricNames :: LoggerOpt -> [(String, String)]
cudaMetricNames opt = case logOptMeasure opt of
"fp-inst" -> [ ("cuda:gpu-double-instrs", "inst_fp_32")
, ("cuda:gpu-float-instrs", "inst_fp_64")
]
"float-ops" -> [ ("cuda:gpu-float-ops", "flop_count_sp")
, ("cuda:gpu-... | 813 | cudaMetricNames :: LoggerOpt -> [(String, String)]
cudaMetricNames opt = case logOptMeasure opt of
"fp-inst" -> [ ("cuda:gpu-double-instrs", "inst_fp_32")
, ("cuda:gpu-float-instrs", "inst_fp_64")
]
"float-ops" -> [ ("cuda:gpu-float-ops", "flop_count_sp")
, ("cuda:gpu-... | 813 | cudaMetricNames opt = case logOptMeasure opt of
"fp-inst" -> [ ("cuda:gpu-double-instrs", "inst_fp_32")
, ("cuda:gpu-float-instrs", "inst_fp_64")
]
"float-ops" -> [ ("cuda:gpu-float-ops", "flop_count_sp")
, ("cuda:gpu-float-ops-add", "flop_count_sp_add")
... | 762 | false | true | 0 | 9 | 233 | 150 | 91 | 59 | null | null |
elieux/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | floatFromIntegerIdKey = mkPreludeMiscIdUnique 85 | 56 | floatFromIntegerIdKey = mkPreludeMiscIdUnique 85 | 56 | floatFromIntegerIdKey = mkPreludeMiscIdUnique 85 | 56 | false | false | 0 | 5 | 11 | 9 | 4 | 5 | null | null |
scvalex/ltc | src/Ltc/Store/Simple.hs | gpl-3.0 | ----------------------
-- Simple store identifiers
----------------------
formatString :: String
formatString = "simple" | 121 | formatString :: String
formatString = "simple" | 46 | formatString = "simple" | 23 | true | true | 0 | 4 | 12 | 14 | 9 | 5 | null | null |
diku-kmc/repg | src/KMC/Kleenex/Parser.hs | mit | --------------------
---- Kleenex parsers
--------------------
-- Parsers ending in "P" consume trailing white space
-- | Parse an identifier
identifierP :: Parser Ident
identifierP = Ident <$> lexeme identifier
<?> "nonterminal" | 244 | identifierP :: Parser Ident
identifierP = Ident <$> lexeme identifier
<?> "nonterminal" | 101 | identifierP = Ident <$> lexeme identifier
<?> "nonterminal" | 73 | true | true | 4 | 6 | 45 | 38 | 18 | 20 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Protocol.hs | bsd-3-clause | addWriteRefCommand :: ExprType -> Int -> Expr a -> State CommandState B.ByteString
addWriteRefCommand t i e =
addCommand REF_CMD_WRITE ([toW8 t, toW8 EXPR_WORD8, toW8 EXPR_LIT, fromIntegral i] ++ packageExpr e) | 212 | addWriteRefCommand :: ExprType -> Int -> Expr a -> State CommandState B.ByteString
addWriteRefCommand t i e =
addCommand REF_CMD_WRITE ([toW8 t, toW8 EXPR_WORD8, toW8 EXPR_LIT, fromIntegral i] ++ packageExpr e) | 212 | addWriteRefCommand t i e =
addCommand REF_CMD_WRITE ([toW8 t, toW8 EXPR_WORD8, toW8 EXPR_LIT, fromIntegral i] ++ packageExpr e) | 129 | false | true | 0 | 9 | 31 | 79 | 38 | 41 | null | null |
SamirTalwar/advent-of-code | 2016/AOC_02_1.hs | mit | move MoveDown '3' = '6' | 23 | move MoveDown '3' = '6' | 23 | move MoveDown '3' = '6' | 23 | false | false | 0 | 5 | 4 | 13 | 5 | 8 | null | null |
noraesae/euler | src/Problem17.hs | bsd-3-clause | tenAndOneToString 5 0 = "fifty" | 31 | tenAndOneToString 5 0 = "fifty" | 31 | tenAndOneToString 5 0 = "fifty" | 31 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
lukexi/ghc-7.8-arm64 | compiler/cmm/MkGraph.hs | bsd-3-clause | lastWithArgs :: DynFlags -> Transfer -> Area -> Convention -> [CmmActual]
-> UpdFrameOffset
-> (ByteOff -> [GlobalReg] -> CmmAGraph)
-> CmmAGraph
lastWithArgs dflags transfer area conv actuals updfr_off last =
lastWithArgsAndExtraStack dflags transfer area conv actuals
... | 366 | lastWithArgs :: DynFlags -> Transfer -> Area -> Convention -> [CmmActual]
-> UpdFrameOffset
-> (ByteOff -> [GlobalReg] -> CmmAGraph)
-> CmmAGraph
lastWithArgs dflags transfer area conv actuals updfr_off last =
lastWithArgsAndExtraStack dflags transfer area conv actuals
... | 366 | lastWithArgs dflags transfer area conv actuals updfr_off last =
lastWithArgsAndExtraStack dflags transfer area conv actuals
updfr_off noExtraStack last | 181 | false | true | 0 | 15 | 107 | 88 | 45 | 43 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Elements/Embedded.hs | bsd-3-clause | -- | A short-hand notion for @ elDynAttr\' \"map\" ... @
mapD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Map → m a → m (Element EventResult (DomBuilderSpace m) t, a)
mapD' bm = elDynAttr' "map" (A.attrMap <$> bm) | 230 | mapD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Map → m a → m (Element EventResult (DomBuilderSpace m) t, a)
mapD' bm = elDynAttr' "map" (A.attrMap <$> bm) | 173 | mapD' bm = elDynAttr' "map" (A.attrMap <$> bm) | 46 | true | true | 0 | 13 | 45 | 93 | 48 | 45 | null | null |
DanielSchuessler/hstri | Tetrahedron/Tests.hs | gpl-3.0 | prop_link_nc_nq :: NormalCorner -> NormalQuad -> Property
prop_link_nc_nq nc nq =
isSubface nc nq ==>
let
(nc0,nc1) = link nc nq
in
conjoin' [
isSubface nc0 nq,
isSubface nc1 nq,
nc0 /= nc,
nc1 /= nc,
... | 350 | prop_link_nc_nq :: NormalCorner -> NormalQuad -> Property
prop_link_nc_nq nc nq =
isSubface nc nq ==>
let
(nc0,nc1) = link nc nq
in
conjoin' [
isSubface nc0 nq,
isSubface nc1 nq,
nc0 /= nc,
nc1 /= nc,
... | 350 | prop_link_nc_nq nc nq =
isSubface nc nq ==>
let
(nc0,nc1) = link nc nq
in
conjoin' [
isSubface nc0 nq,
isSubface nc1 nq,
nc0 /= nc,
nc1 /= nc,
nc0 /= nc1
] | 292 | false | true | 1 | 8 | 176 | 107 | 50 | 57 | null | null |
brendanhay/gogol | gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs | mpl-2.0 | -- | Requests containing any of these mobile carrier ids will match. Values
-- are from mobile-carriers.csv in the downloadable files section.
pcMobileCarriers :: Lens' PretargetingConfig [Int64]
pcMobileCarriers
= lens _pcMobileCarriers
(\ s a -> s{_pcMobileCarriers = a})
. _Default
. _Coerce | 314 | pcMobileCarriers :: Lens' PretargetingConfig [Int64]
pcMobileCarriers
= lens _pcMobileCarriers
(\ s a -> s{_pcMobileCarriers = a})
. _Default
. _Coerce | 171 | pcMobileCarriers
= lens _pcMobileCarriers
(\ s a -> s{_pcMobileCarriers = a})
. _Default
. _Coerce | 118 | true | true | 3 | 8 | 61 | 60 | 29 | 31 | null | null |
julmue/UntypedLambda | test/Language/Lambda/Semantics/Named/SmallStep/Tests.hs | bsd-3-clause | add_mlt_RelationTests = testGroup "add_mlt_RelationTests"
[ scProp "add_ mlt_ (distributivity)" 3 $
\n m o -> let cn = fromPositive n
cm = fromPositive m
co = fromPositive o
in normalOrder (mlt_ # (add_ # cn # cm) # co)
== normalOrd... | 373 | add_mlt_RelationTests = testGroup "add_mlt_RelationTests"
[ scProp "add_ mlt_ (distributivity)" 3 $
\n m o -> let cn = fromPositive n
cm = fromPositive m
co = fromPositive o
in normalOrder (mlt_ # (add_ # cn # cm) # co)
== normalOrd... | 373 | add_mlt_RelationTests = testGroup "add_mlt_RelationTests"
[ scProp "add_ mlt_ (distributivity)" 3 $
\n m o -> let cn = fromPositive n
cm = fromPositive m
co = fromPositive o
in normalOrder (mlt_ # (add_ # cn # cm) # co)
== normalOrd... | 373 | false | false | 1 | 18 | 146 | 132 | 64 | 68 | null | null |
cbpark/hep-kinematics | src/HEP/Particle/ID.hs | bsd-3-clause | muons :: [PdgID]
muons = [muon, antiMuon] | 41 | muons :: [PdgID]
muons = [muon, antiMuon] | 41 | muons = [muon, antiMuon] | 24 | false | true | 0 | 5 | 6 | 20 | 12 | 8 | null | null |
xpika/music-diatonic | Music/Diatonic/Degree.hs | bsd-3-clause | toNote Fifth = G | 17 | toNote Fifth = G | 17 | toNote Fifth = G | 17 | false | false | 0 | 4 | 4 | 10 | 4 | 6 | null | null |
DavidAlphaFox/ghc | libraries/haskeline/System/Console/Haskeline/Term.hs | bsd-3-clause | hWithBinaryMode h = bracket (liftIO $ hGetEncoding h)
(maybe (return ()) (liftIO . hSetEncoding h))
. const . (liftIO (hSetBinaryMode h True) >>) | 193 | hWithBinaryMode h = bracket (liftIO $ hGetEncoding h)
(maybe (return ()) (liftIO . hSetEncoding h))
. const . (liftIO (hSetBinaryMode h True) >>) | 193 | hWithBinaryMode h = bracket (liftIO $ hGetEncoding h)
(maybe (return ()) (liftIO . hSetEncoding h))
. const . (liftIO (hSetBinaryMode h True) >>) | 193 | false | false | 0 | 12 | 70 | 73 | 36 | 37 | null | null |
ony/Yampa-core | src/FRP/Yampa/InternalCore.hs | bsd-3-clause | spAux (SFArr _ fd1) = sfArrG (\(~(c, a)) -> (c, (fdFun fd1) a)) | 69 | spAux (SFArr _ fd1) = sfArrG (\(~(c, a)) -> (c, (fdFun fd1) a)) | 69 | spAux (SFArr _ fd1) = sfArrG (\(~(c, a)) -> (c, (fdFun fd1) a)) | 69 | false | false | 0 | 11 | 18 | 54 | 28 | 26 | null | null |
evolutics/haskell-formatter | src/library/Language/Haskell/Formatter/Process/DetachComments.hs | gpl-3.0 | commentShift :: Note.CommentBox -> LineTool.Shift
commentShift (Note.ActualComment comment)
= CommentCore.wrappedLineCount $ Note.commentCore comment | 151 | commentShift :: Note.CommentBox -> LineTool.Shift
commentShift (Note.ActualComment comment)
= CommentCore.wrappedLineCount $ Note.commentCore comment | 151 | commentShift (Note.ActualComment comment)
= CommentCore.wrappedLineCount $ Note.commentCore comment | 101 | false | true | 0 | 8 | 14 | 41 | 20 | 21 | null | null |
text-utf8/text | Data/Text/Lazy.hs | bsd-2-clause | -- | /O(n)/ The 'find' function takes a predicate and a 'Text', and
-- returns the first element in matching the predicate, or 'Nothing'
-- if there is no such element.
find :: (Char -> Bool) -> Text -> Maybe Char
find p t = S.findBy p (stream t) | 246 | find :: (Char -> Bool) -> Text -> Maybe Char
find p t = S.findBy p (stream t) | 77 | find p t = S.findBy p (stream t) | 32 | true | true | 0 | 7 | 48 | 50 | 26 | 24 | null | null |
romanb/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | Specifies the allocated storage size specified in gigabytes.
dbiAllocatedStorage :: Lens' DBInstance (Maybe Int)
dbiAllocatedStorage =
lens _dbiAllocatedStorage (\s a -> s { _dbiAllocatedStorage = a }) | 210 | dbiAllocatedStorage :: Lens' DBInstance (Maybe Int)
dbiAllocatedStorage =
lens _dbiAllocatedStorage (\s a -> s { _dbiAllocatedStorage = a }) | 144 | dbiAllocatedStorage =
lens _dbiAllocatedStorage (\s a -> s { _dbiAllocatedStorage = a }) | 92 | true | true | 0 | 9 | 32 | 46 | 25 | 21 | null | null |
nightscape/platform | editor/src/Unison/Signals.hs | mit | evaluate :: (MonadWidget t m, Reflex t) => (a -> IO b) -> Event t a -> m (Event t b)
evaluate f actions = performEvent $ fmap (liftIO . f) actions | 146 | evaluate :: (MonadWidget t m, Reflex t) => (a -> IO b) -> Event t a -> m (Event t b)
evaluate f actions = performEvent $ fmap (liftIO . f) actions | 146 | evaluate f actions = performEvent $ fmap (liftIO . f) actions | 61 | false | true | 0 | 11 | 31 | 87 | 42 | 45 | null | null |
nevrenato/Hets_Fork | Common/IRI.hs | gpl-2.0 | countMinMax _ n _ | n <= 0 = return [] | 38 | countMinMax _ n _ | n <= 0 = return [] | 38 | countMinMax _ n _ | n <= 0 = return [] | 38 | false | false | 0 | 8 | 10 | 28 | 12 | 16 | null | null |
leepike/copilot-c99 | src/Copilot/Compile/C99/Common.hs | bsd-3-clause | typeSpec C.Int8 = "int8_t" | 28 | typeSpec C.Int8 = "int8_t" | 28 | typeSpec C.Int8 = "int8_t" | 28 | false | false | 0 | 6 | 5 | 11 | 5 | 6 | null | null |
samscott89/tamarin-prover | lib/theory/src/Theory/Proof.hs | gpl-3.0 | cutOnSolvedBFSDiff :: DiffProof (Maybe a) -> DiffProof (Maybe a)
cutOnSolvedBFSDiff =
go (1::Int)
where
go l prf =
-- FIXME: See if that poor man's logging could be done better.
trace ("searching for attacks at depth: " ++ show l) $
case S.runState (checkLevel l prf) CompleteProof of
... | 1,587 | cutOnSolvedBFSDiff :: DiffProof (Maybe a) -> DiffProof (Maybe a)
cutOnSolvedBFSDiff =
go (1::Int)
where
go l prf =
-- FIXME: See if that poor man's logging could be done better.
trace ("searching for attacks at depth: " ++ show l) $
case S.runState (checkLevel l prf) CompleteProof of
... | 1,587 | cutOnSolvedBFSDiff =
go (1::Int)
where
go l prf =
-- FIXME: See if that poor man's logging could be done better.
trace ("searching for attacks at depth: " ++ show l) $
case S.runState (checkLevel l prf) CompleteProof of
(_, UndeterminedProof) -> error "cutOnSolvedBFS: impossible"... | 1,522 | false | true | 2 | 15 | 444 | 464 | 222 | 242 | null | null |
lenary/idris-erlang | src/IRTS/CodegenErlang/Foreign.hs | bsd-3-clause | check_t _ exp = Nothing | 23 | check_t _ exp = Nothing | 23 | check_t _ exp = Nothing | 23 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
mettekou/ghc | compiler/prelude/THNames.hs | bsd-3-clause | mkNameG_vName = thFun (fsLit "mkNameG_v") mkNameG_vIdKey | 58 | mkNameG_vName = thFun (fsLit "mkNameG_v") mkNameG_vIdKey | 58 | mkNameG_vName = thFun (fsLit "mkNameG_v") mkNameG_vIdKey | 58 | false | false | 0 | 7 | 7 | 17 | 8 | 9 | null | null |
Baranowski/SourceGraph | Parsing/ParseModule.hs | gpl-3.0 | getExp (Case e as) = do e' <- getExp e
as' <- mapM getAlt as
return $ MS.unions (e':as') | 137 | getExp (Case e as) = do e' <- getExp e
as' <- mapM getAlt as
return $ MS.unions (e':as') | 137 | getExp (Case e as) = do e' <- getExp e
as' <- mapM getAlt as
return $ MS.unions (e':as') | 137 | false | false | 0 | 10 | 67 | 59 | 26 | 33 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.