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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nevrenato/Hets_Fork | OWL2/XML.hs | gpl-2.0 | -- | parses one child with the given name
filterC :: String -> Element -> Element
filterC s e = fromMaybe (err "child not found")
$ filterChildName (isSmth s) e | 164 | filterC :: String -> Element -> Element
filterC s e = fromMaybe (err "child not found")
$ filterChildName (isSmth s) e | 122 | filterC s e = fromMaybe (err "child not found")
$ filterChildName (isSmth s) e | 82 | true | true | 0 | 8 | 33 | 49 | 24 | 25 | null | null |
lukexi/ghc-7.8-arm64 | compiler/cmm/CLabel.hs | bsd-3-clause | dynamicLinkerLabelInfo _ = Nothing | 41 | dynamicLinkerLabelInfo _ = Nothing | 41 | dynamicLinkerLabelInfo _ = Nothing | 41 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
mainland/nikola | examples/common/GUI/Commands.hs | bsd-3-clause | glutKeyToKey (GLUT.SpecialKey GLUT.KeyLeft) = SpecialKey KeyLeft | 78 | glutKeyToKey (GLUT.SpecialKey GLUT.KeyLeft) = SpecialKey KeyLeft | 78 | glutKeyToKey (GLUT.SpecialKey GLUT.KeyLeft) = SpecialKey KeyLeft | 78 | false | false | 0 | 8 | 19 | 22 | 10 | 12 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F14.hs | bsd-3-clause | -- glGetnColorTableARB ---------------------------------------------------------
glGetnColorTableARB
:: MonadIO m
=> GLenum -- ^ @target@ of type [ColorTableTarget](Graphics-GL-Groups.html#ColorTableTarget).
-> GLenum -- ^ @format@ of type [PixelFormat](Graphics-GL-Groups.html#PixelFormat).
-> GLenum -- ^ @typ... | 577 | glGetnColorTableARB
:: MonadIO m
=> GLenum -- ^ @target@ of type [ColorTableTarget](Graphics-GL-Groups.html#ColorTableTarget).
-> GLenum -- ^ @format@ of type [PixelFormat](Graphics-GL-Groups.html#PixelFormat).
-> GLenum -- ^ @type@ of type [PixelType](Graphics-GL-Groups.html#PixelType).
-> GLsizei -- ^ @bufS... | 495 | glGetnColorTableARB v1 v2 v3 v4 v5 = liftIO $ dyn468 ptr_glGetnColorTableARB v1 v2 v3 v4 v5 | 91 | true | true | 0 | 13 | 82 | 84 | 42 | 42 | null | null |
rsasse/tamarin-prover | lib/theory/src/Theory/Tools/EquationStore.hs | gpl-3.0 | performSplit :: EqStore -> SplitId -> Maybe [EqStore]
performSplit eqStore idx =
case break ((idx ==) . fst) (getConj $ L.get eqsConj eqStore) of
(_, []) -> Nothing
(before, (_, disj):after) -> Just $
mkNewEqStore before after <$> S.toList disj
where
mkNewEqStore ... | 590 | performSplit :: EqStore -> SplitId -> Maybe [EqStore]
performSplit eqStore idx =
case break ((idx ==) . fst) (getConj $ L.get eqsConj eqStore) of
(_, []) -> Nothing
(before, (_, disj):after) -> Just $
mkNewEqStore before after <$> S.toList disj
where
mkNewEqStore ... | 590 | performSplit eqStore idx =
case break ((idx ==) . fst) (getConj $ L.get eqsConj eqStore) of
(_, []) -> Nothing
(before, (_, disj):after) -> Just $
mkNewEqStore before after <$> S.toList disj
where
mkNewEqStore before after subst =
fst $ addDisj (set eqsCon... | 536 | false | true | 2 | 11 | 168 | 181 | 92 | 89 | null | null |
brendanhay/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Locations/Builds/Cancel.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
plbcUploadProtocol :: Lens' ProjectsLocationsBuildsCancel (Maybe Text)
plbcUploadProtocol
= lens _plbcUploadProtocol
(\ s a -> s{_plbcUploadProtocol = a}) | 224 | plbcUploadProtocol :: Lens' ProjectsLocationsBuildsCancel (Maybe Text)
plbcUploadProtocol
= lens _plbcUploadProtocol
(\ s a -> s{_plbcUploadProtocol = a}) | 162 | plbcUploadProtocol
= lens _plbcUploadProtocol
(\ s a -> s{_plbcUploadProtocol = a}) | 91 | true | true | 2 | 9 | 33 | 55 | 25 | 30 | null | null |
lukexi/ghc | compiler/main/DynFlags.hs | bsd-3-clause | getStgToDo :: DynFlags -> [StgToDo]
getStgToDo dflags
= todo2
where
stg_stats = gopt Opt_StgStats dflags
todo1 = if stg_stats then [D_stg_stats] else []
todo2 | WayProf `elem` ways dflags
= StgDoMassageForProfiling : todo1
| otherwise
= todo1
{- *... | 1,017 | getStgToDo :: DynFlags -> [StgToDo]
getStgToDo dflags
= todo2
where
stg_stats = gopt Opt_StgStats dflags
todo1 = if stg_stats then [D_stg_stats] else []
todo2 | WayProf `elem` ways dflags
= StgDoMassageForProfiling : todo1
| otherwise
= todo1
{- *... | 1,017 | getStgToDo dflags
= todo2
where
stg_stats = gopt Opt_StgStats dflags
todo1 = if stg_stats then [D_stg_stats] else []
todo2 | WayProf `elem` ways dflags
= StgDoMassageForProfiling : todo1
| otherwise
= todo1
{- *************************************... | 981 | false | true | 0 | 9 | 327 | 92 | 51 | 41 | null | null |
ShellShoccar-jpn/Open-usp-Tukubai | COMMANDS.HS/mdate.hs | mit | enumMonth :: BS.ByteString -> BS.ByteString
enumMonth str = BS.unwords $ filter (BS.isPrefixOf m) [ toDayStr d | d <- enumDiff (DayRange firstday 31) ]
where firstday = (BS.unpack m) ++ "01"
m = BS.take 6 str | 246 | enumMonth :: BS.ByteString -> BS.ByteString
enumMonth str = BS.unwords $ filter (BS.isPrefixOf m) [ toDayStr d | d <- enumDiff (DayRange firstday 31) ]
where firstday = (BS.unpack m) ++ "01"
m = BS.take 6 str | 246 | enumMonth str = BS.unwords $ filter (BS.isPrefixOf m) [ toDayStr d | d <- enumDiff (DayRange firstday 31) ]
where firstday = (BS.unpack m) ++ "01"
m = BS.take 6 str | 202 | false | true | 0 | 12 | 73 | 100 | 49 | 51 | null | null |
jonathan-laurent/copilot-kind | src/Copilot/Kind/Kind2/PrettyPrint.hs | bsd-3-clause | ppTerm :: Term -> SSExpr
ppTerm (ValueLitteral c) = atom c | 59 | ppTerm :: Term -> SSExpr
ppTerm (ValueLitteral c) = atom c | 59 | ppTerm (ValueLitteral c) = atom c | 34 | false | true | 0 | 7 | 11 | 27 | 13 | 14 | null | null |
oldmanmike/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gtResult OrdLE = false_Expr | 32 | gtResult OrdLE = false_Expr | 32 | gtResult OrdLE = false_Expr | 32 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
ekohl/ganeti | htools/Ganeti/HTools/Types.hs | gpl-2.0 | apolToString AllocLastResort = C.allocPolicyLastResort | 55 | apolToString AllocLastResort = C.allocPolicyLastResort | 55 | apolToString AllocLastResort = C.allocPolicyLastResort | 55 | false | false | 1 | 6 | 4 | 15 | 5 | 10 | null | null |
klarh/haste-webgl | src/Haste/Graphics/WebGL.hs | mit | drawArrays::Context->DrawMode->Int->Int->IO ()
drawArrays = ffi "(function(ctx, mode, first, count) {ctx.drawArrays(mode, first, count);})" | 139 | drawArrays::Context->DrawMode->Int->Int->IO ()
drawArrays = ffi "(function(ctx, mode, first, count) {ctx.drawArrays(mode, first, count);})" | 139 | drawArrays = ffi "(function(ctx, mode, first, count) {ctx.drawArrays(mode, first, count);})" | 92 | false | true | 0 | 10 | 11 | 35 | 17 | 18 | null | null |
brendanhay/gogol | gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs | mpl-2.0 | -- | The maximum number of kilos any one piece of baggage may weigh.
fbaKilosPerPiece :: Lens' FreeBaggageAllowance (Maybe Int32)
fbaKilosPerPiece
= lens _fbaKilosPerPiece
(\ s a -> s{_fbaKilosPerPiece = a})
. mapping _Coerce | 239 | fbaKilosPerPiece :: Lens' FreeBaggageAllowance (Maybe Int32)
fbaKilosPerPiece
= lens _fbaKilosPerPiece
(\ s a -> s{_fbaKilosPerPiece = a})
. mapping _Coerce | 170 | fbaKilosPerPiece
= lens _fbaKilosPerPiece
(\ s a -> s{_fbaKilosPerPiece = a})
. mapping _Coerce | 109 | true | true | 0 | 10 | 47 | 55 | 28 | 27 | null | null |
tobytripp/SpiraJira | src/Web/SpiraJira/Issue.hs | lgpl-3.0 | empty_author = Author "" "" "" | 30 | empty_author = Author "" "" "" | 30 | empty_author = Author "" "" "" | 30 | false | false | 1 | 5 | 5 | 16 | 6 | 10 | null | null |
Gabriel439/Haskell-Break-Library | src/Control/Break.hs | bsd-3-clause | {-| `break` from a `loop`
The argument you supply to `break` is the return value of the `loop`
-}
break :: Monad m => r -> Break r m a
break r = Break (throwE r) | 166 | break :: Monad m => r -> Break r m a
break r = Break (throwE r) | 63 | break r = Break (throwE r) | 26 | true | true | 0 | 7 | 40 | 42 | 20 | 22 | null | null |
juodaspaulius/clafer | src/Language/Clafer/Intermediate/TypeSystem.hs | mit | getIfThenElseType _ TReal TReal = return $ Just TReal | 84 | getIfThenElseType _ TReal TReal = return $ Just TReal | 84 | getIfThenElseType _ TReal TReal = return $ Just TReal | 84 | false | false | 1 | 6 | 39 | 19 | 8 | 11 | null | null |
bqv/mako | Irc.hs | mpl-2.0 | monthAgo :: Free IrcF Int
monthAgo = time >>= return . (\x -> x - (86400*30)) . round | 85 | monthAgo :: Free IrcF Int
monthAgo = time >>= return . (\x -> x - (86400*30)) . round | 85 | monthAgo = time >>= return . (\x -> x - (86400*30)) . round | 59 | false | true | 0 | 11 | 17 | 47 | 25 | 22 | null | null |
hsyl20/ViperVM | scripts/Unums.hs | bsd-3-clause | nr2' :: U U2
nr2' = unumEncode (Proxy :: Proxy U2) (Proxy :: Proxy (Rcp (Neg (I 2)))) OpenInterval | 98 | nr2' :: U U2
nr2' = unumEncode (Proxy :: Proxy U2) (Proxy :: Proxy (Rcp (Neg (I 2)))) OpenInterval | 98 | nr2' = unumEncode (Proxy :: Proxy U2) (Proxy :: Proxy (Rcp (Neg (I 2)))) OpenInterval | 85 | false | true | 0 | 13 | 18 | 63 | 30 | 33 | null | null |
erlandsona/cal_haskell | src/Year.hs | mit | yearPadding, yearNewLine :: [String] -> String
yearPadding = intercalate " " | 77 | yearPadding, yearNewLine :: [String] -> String
yearPadding = intercalate " " | 77 | yearPadding = intercalate " " | 30 | false | true | 2 | 7 | 11 | 34 | 14 | 20 | null | null |
innovimax/bond | compiler/Bond/Template/TypeMapping.hs | mit | cppType BT_UInt8 = pure "uint8_t" | 33 | cppType BT_UInt8 = pure "uint8_t" | 33 | cppType BT_UInt8 = pure "uint8_t" | 33 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/Syntax/Datum.hs | bsd-3-clause | pPair
:: Pattern vars1 a
-> Pattern vars2 b
-> Pattern (vars1 ++ vars2) (HPair a b)
pPair x y =
case eqAppendIdentity (varsOfPattern y) of
Refl -> PDatum tdPair . PInl $ PKonst x `PEt` PKonst y `PEt` PDone | 225 | pPair
:: Pattern vars1 a
-> Pattern vars2 b
-> Pattern (vars1 ++ vars2) (HPair a b)
pPair x y =
case eqAppendIdentity (varsOfPattern y) of
Refl -> PDatum tdPair . PInl $ PKonst x `PEt` PKonst y `PEt` PDone | 225 | pPair x y =
case eqAppendIdentity (varsOfPattern y) of
Refl -> PDatum tdPair . PInl $ PKonst x `PEt` PKonst y `PEt` PDone | 129 | false | true | 0 | 12 | 59 | 107 | 51 | 56 | null | null |
jstolarek/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprInstr (FADD sz reg1 reg2 reg3) = pprBinaryF (sLit "fadd") sz reg1 reg2 reg3 | 78 | pprInstr (FADD sz reg1 reg2 reg3) = pprBinaryF (sLit "fadd") sz reg1 reg2 reg3 | 78 | pprInstr (FADD sz reg1 reg2 reg3) = pprBinaryF (sLit "fadd") sz reg1 reg2 reg3 | 78 | false | false | 0 | 7 | 13 | 39 | 18 | 21 | null | null |
dalaing/sdl2 | src/SDL/Exception.hs | bsd-3-clause | throwIfNeg :: (MonadIO m, Num a, Ord a) => Text -> Text -> m a -> m a
throwIfNeg = throwIf (< 0) | 96 | throwIfNeg :: (MonadIO m, Num a, Ord a) => Text -> Text -> m a -> m a
throwIfNeg = throwIf (< 0) | 96 | throwIfNeg = throwIf (< 0) | 26 | false | true | 0 | 9 | 22 | 57 | 29 | 28 | null | null |
peti/funcmp | FMP/Types.hs | gpl-3.0 | maximum' :: [Numeric] -> Numeric
maximum' [a] = a | 88 | maximum' :: [Numeric] -> Numeric
maximum' [a] = a | 88 | maximum' [a] = a | 34 | false | true | 0 | 6 | 47 | 25 | 13 | 12 | null | null |
nomeata/ghc | compiler/cmm/CmmMachOp.hs | bsd-3-clause | -- is it?
-- -----------------------------------------------------------------------------
-- machOpArgReps
-- | This function is used for debugging only: we can check whether an
-- application of a MachOp is "type-correct" by checking that the MachReps of
-- its arguments are the same as the MachOp expects. This i... | 2,285 | machOpArgReps :: MachOp -> [Width]
machOpArgReps op =
case op of
MO_Add r -> [r,r]
MO_Sub r -> [r,r]
MO_Eq r -> [r,r]
MO_Ne r -> [r,r]
MO_Mul r -> [r,r]
MO_S_MulMayOflo r -> [r,r]
MO_S_Quot r -> [r,r]
MO_S_Rem r ... | 1,930 | machOpArgReps op =
case op of
MO_Add r -> [r,r]
MO_Sub r -> [r,r]
MO_Eq r -> [r,r]
MO_Ne r -> [r,r]
MO_Mul r -> [r,r]
MO_S_MulMayOflo r -> [r,r]
MO_S_Quot r -> [r,r]
MO_S_Rem r -> [r,r]
MO_S_Neg r ... | 1,895 | true | true | 44 | 6 | 845 | 628 | 360 | 268 | null | null |
codemac/yi-editor | src/Yi/Eval.hs | gpl-2.0 | jumpToErrorE :: YiM ()
jumpToErrorE = do
(f,l,c) <- withBuffer parseErrorMessageB
jumpToE f l c | 99 | jumpToErrorE :: YiM ()
jumpToErrorE = do
(f,l,c) <- withBuffer parseErrorMessageB
jumpToE f l c | 99 | jumpToErrorE = do
(f,l,c) <- withBuffer parseErrorMessageB
jumpToE f l c | 76 | false | true | 0 | 8 | 18 | 45 | 22 | 23 | null | null |
nushio3/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | -- TODO: emit Hole Constraints for wildcards
tcRhs (TcPatBind infos pat' grhss pat_ty)
= -- When we are doing pattern bindings we *don't* bring any scoped
-- type variables into scope unlike function bindings
-- Wny not? They are not completely rigid.
-- That's why we have the special case for a single F... | 918 | tcRhs (TcPatBind infos pat' grhss pat_ty)
= -- When we are doing pattern bindings we *don't* bring any scoped
-- type variables into scope unlike function bindings
-- Wny not? They are not completely rigid.
-- That's why we have the special case for a single FunBind in tcMonoBinds
tcExtendIdBinderSta... | 873 | tcRhs (TcPatBind infos pat' grhss pat_ty)
= -- When we are doing pattern bindings we *don't* bring any scoped
-- type variables into scope unlike function bindings
-- Wny not? They are not completely rigid.
-- That's why we have the special case for a single FunBind in tcMonoBinds
tcExtendIdBinderSta... | 873 | true | false | 0 | 13 | 317 | 176 | 96 | 80 | null | null |
mrb/tee-io | test/Handler/HomeSpec.hs | mit | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
elieux/ghc | compiler/types/Type.hs | bsd-3-clause | typeSize (FunTy t1 t2) = typeSize t1 + typeSize t2 | 52 | typeSize (FunTy t1 t2) = typeSize t1 + typeSize t2 | 52 | typeSize (FunTy t1 t2) = typeSize t1 + typeSize t2 | 52 | false | false | 0 | 7 | 11 | 27 | 12 | 15 | null | null |
brendanhay/gogol | gogol-cloudsearch/gen/Network/Google/Resource/CloudSearch/Settings/UpdateCustomer.hs | mpl-2.0 | -- | Multipart request metadata.
sucPayload :: Lens' SettingsUpdateCustomer CustomerSettings
sucPayload
= lens _sucPayload (\ s a -> s{_sucPayload = a}) | 154 | sucPayload :: Lens' SettingsUpdateCustomer CustomerSettings
sucPayload
= lens _sucPayload (\ s a -> s{_sucPayload = a}) | 121 | sucPayload
= lens _sucPayload (\ s a -> s{_sucPayload = a}) | 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
scsibug/hS3 | Tests.hs | bsd-3-clause | nameNotValidTC :: String -> String -> Test
nameNotValidTC msg name = TestCase (assertBool msg (not (isBucketNameValid name))) | 125 | nameNotValidTC :: String -> String -> Test
nameNotValidTC msg name = TestCase (assertBool msg (not (isBucketNameValid name))) | 125 | nameNotValidTC msg name = TestCase (assertBool msg (not (isBucketNameValid name))) | 82 | false | true | 0 | 11 | 16 | 47 | 23 | 24 | null | null |
rueshyna/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'RefreshSheetsChartRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rscrObjectId'
refreshSheetsChartRequest
:: RefreshSheetsChartRequest
refreshSheetsChartRequest =
RefreshSheetsChartRequest'
... | 353 | refreshSheetsChartRequest
:: RefreshSheetsChartRequest
refreshSheetsChartRequest =
RefreshSheetsChartRequest'
{ _rscrObjectId = Nothing
} | 153 | refreshSheetsChartRequest =
RefreshSheetsChartRequest'
{ _rscrObjectId = Nothing
} | 94 | true | true | 0 | 6 | 60 | 24 | 16 | 8 | null | null |
gspindles/rftg-cards | src/Game/RftG/Cards/Base.hs | mit | secludedWorld :: Card
secludedWorld = Card
(World $ Production NoveltyGoods)
"SECLUDED WORLD"
(Cost 1)
(VP 1)
Nothing
[]
[Consume, Produce] | 153 | secludedWorld :: Card
secludedWorld = Card
(World $ Production NoveltyGoods)
"SECLUDED WORLD"
(Cost 1)
(VP 1)
Nothing
[]
[Consume, Produce] | 153 | secludedWorld = Card
(World $ Production NoveltyGoods)
"SECLUDED WORLD"
(Cost 1)
(VP 1)
Nothing
[]
[Consume, Produce] | 131 | false | true | 0 | 7 | 33 | 62 | 29 | 33 | null | null |
cnc-patch/disass | src/Language/Assembly/X86/Print.hs | bsd-3-clause | enlarge s i = s ++ take (i - length s) (repeat ' ') | 51 | enlarge s i = s ++ take (i - length s) (repeat ' ') | 51 | enlarge s i = s ++ take (i - length s) (repeat ' ') | 51 | false | false | 0 | 9 | 13 | 36 | 17 | 19 | null | null |
acowley/ghc | compiler/prelude/THNames.hs | bsd-3-clause | starKIdKey = mkPreludeMiscIdUnique 414 | 45 | starKIdKey = mkPreludeMiscIdUnique 414 | 45 | starKIdKey = mkPreludeMiscIdUnique 414 | 45 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
kim/amazonka | amazonka-cloudformation/gen/Network/AWS/CloudFormation/CreateStack.hs | mpl-2.0 | -- | A list of capabilities that you must specify before AWS CloudFormation can
-- create or update certain stacks. Some stack templates might include resources
-- that can affect permissions in your AWS account. For those stacks, you must
-- explicitly acknowledge their capabilities by specifying this parameter.
--
--... | 1,723 | csCapabilities :: Lens' CreateStack [Capability]
csCapabilities = lens _csCapabilities (\s a -> s { _csCapabilities = a }) . _List | 130 | csCapabilities = lens _csCapabilities (\s a -> s { _csCapabilities = a }) . _List | 81 | true | true | 0 | 10 | 140 | 56 | 35 | 21 | null | null |
peti/postmaster | src/Main.hs | agpl-3.0 | main :: IO ()
main =
withSocketsDo $
withSyslog "postmaster" [] Mail $ do
cfg <- execParser cli >>= makeConfiguration
runReaderT (runPostmaster (postmaster cfg)) (logToHandle stderr) | 200 | main :: IO ()
main =
withSocketsDo $
withSyslog "postmaster" [] Mail $ do
cfg <- execParser cli >>= makeConfiguration
runReaderT (runPostmaster (postmaster cfg)) (logToHandle stderr) | 200 | main =
withSocketsDo $
withSyslog "postmaster" [] Mail $ do
cfg <- execParser cli >>= makeConfiguration
runReaderT (runPostmaster (postmaster cfg)) (logToHandle stderr) | 186 | false | true | 0 | 12 | 43 | 73 | 34 | 39 | null | null |
ibabushkin/hapstone | test/Internal/CapstoneSpec.hs | bsd-3-clause | peekDetailSpec :: Spec
peekDetailSpec = describe "peekDetail" $ do
it "returns results when a pointer is given" pending | 123 | peekDetailSpec :: Spec
peekDetailSpec = describe "peekDetail" $ do
it "returns results when a pointer is given" pending | 123 | peekDetailSpec = describe "peekDetail" $ do
it "returns results when a pointer is given" pending | 100 | false | true | 0 | 8 | 21 | 26 | 12 | 14 | null | null |
bergmark/hlint | src/HSE/Util.hs | bsd-3-clause | fromTyParen :: Type s -> Type s
fromTyParen (TyParen _ x) = fromTyParen x | 73 | fromTyParen :: Type s -> Type s
fromTyParen (TyParen _ x) = fromTyParen x | 73 | fromTyParen (TyParen _ x) = fromTyParen x | 41 | false | true | 0 | 7 | 13 | 35 | 16 | 19 | null | null |
snoyberg/convertible | testsrc/TestInfrastructure.hs | lgpl-2.1 | qverbose :: QC.Testable a => String -> a -> HU.Test
qverbose = qc2huVerbose 250 | 79 | qverbose :: QC.Testable a => String -> a -> HU.Test
qverbose = qc2huVerbose 250 | 79 | qverbose = qc2huVerbose 250 | 27 | false | true | 0 | 10 | 13 | 40 | 17 | 23 | null | null |
thielema/wxhaskell | wxdirect/src/ParseC.hs | lgpl-2.1 | pdecl :: Parser (Maybe Decl)
pdecl
= do whiteSpace
x <- (do f <- pfundecl; return (Just f)) <|> return Nothing
eof
return x | 146 | pdecl :: Parser (Maybe Decl)
pdecl
= do whiteSpace
x <- (do f <- pfundecl; return (Just f)) <|> return Nothing
eof
return x | 146 | pdecl
= do whiteSpace
x <- (do f <- pfundecl; return (Just f)) <|> return Nothing
eof
return x | 117 | false | true | 1 | 15 | 46 | 73 | 31 | 42 | null | null |
projectorhq/haskell-liquid | src/Text/Liquid/Renderer.hs | bsd-3-clause | -- | Eval truth
evalTruthiness
:: Value
-> Expr
-> Rendering Bool
evalTruthiness j (Truthy (Variable i)) =
case extractValue j i of
(AccSuccess v) -> maybe (pure True) pure (v ^? _Bool)
failure -> second (const False) failure | 268 | evalTruthiness
:: Value
-> Expr
-> Rendering Bool
evalTruthiness j (Truthy (Variable i)) =
case extractValue j i of
(AccSuccess v) -> maybe (pure True) pure (v ^? _Bool)
failure -> second (const False) failure | 252 | evalTruthiness j (Truthy (Variable i)) =
case extractValue j i of
(AccSuccess v) -> maybe (pure True) pure (v ^? _Bool)
failure -> second (const False) failure | 196 | true | true | 0 | 12 | 81 | 102 | 49 | 53 | null | null |
beni55/pandoc | src/pandoc.hs | gpl-2.0 | lhsExtension _ = False | 22 | lhsExtension _ = False | 22 | lhsExtension _ = False | 22 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
HMPerson1/soi | src/Language/Soi/Internal/Codegen.hs | gpl-3.0 | currentBlockName :: Codegen Name
currentBlockName = use (currentBlock . blockName) | 82 | currentBlockName :: Codegen Name
currentBlockName = use (currentBlock . blockName) | 82 | currentBlockName = use (currentBlock . blockName) | 49 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
cybernomad/cis194 | hw1.hs | mit | {- Exercise 2 -}
doubleEveryOther :: [Integer] -> [Integer]
doubleEveryOther x = reverse $ doubleFlipped (reverse x) False | 122 | doubleEveryOther :: [Integer] -> [Integer]
doubleEveryOther x = reverse $ doubleFlipped (reverse x) False | 105 | doubleEveryOther x = reverse $ doubleFlipped (reverse x) False | 62 | true | true | 0 | 8 | 17 | 40 | 21 | 19 | null | null |
nightscape/platform | shared/src/Unison/Builtin.hs | mit | compareKeys _ _ = error "not a key" | 35 | compareKeys _ _ = error "not a key" | 35 | compareKeys _ _ = error "not a key" | 35 | false | false | 0 | 5 | 7 | 14 | 6 | 8 | null | null |
mettekou/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprImm (HIGHERA i)
= sdocWithPlatform $ \platform ->
if platformOS platform == OSDarwin
then panic "PPC.pprImm: highera not implemented on Darwin"
else pprImm i <> text "@highera" | 193 | pprImm (HIGHERA i)
= sdocWithPlatform $ \platform ->
if platformOS platform == OSDarwin
then panic "PPC.pprImm: highera not implemented on Darwin"
else pprImm i <> text "@highera" | 193 | pprImm (HIGHERA i)
= sdocWithPlatform $ \platform ->
if platformOS platform == OSDarwin
then panic "PPC.pprImm: highera not implemented on Darwin"
else pprImm i <> text "@highera" | 193 | false | false | 0 | 9 | 40 | 53 | 25 | 28 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/IO/Handle/Types.hs | bsd-3-clause | isReadableHandleType ReadWriteHandle = True | 46 | isReadableHandleType ReadWriteHandle = True | 46 | isReadableHandleType ReadWriteHandle = True | 46 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
IvanSindija/Project-Shell-Hash | Parsing/HashParser.hs | gpl-3.0 | stringLiteral :: Parser Expr
stringLiteral = do
token $ char '"'
ret <- Str <$> litString
token $ char '"'
return ret | 125 | stringLiteral :: Parser Expr
stringLiteral = do
token $ char '"'
ret <- Str <$> litString
token $ char '"'
return ret | 125 | stringLiteral = do
token $ char '"'
ret <- Str <$> litString
token $ char '"'
return ret | 96 | false | true | 1 | 9 | 29 | 55 | 22 | 33 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/BackendBuckets/Patch.hs | mpl-2.0 | -- | Name of the BackendBucket resource to patch.
bbpBackendBucket :: Lens' BackendBucketsPatch Text
bbpBackendBucket
= lens _bbpBackendBucket
(\ s a -> s{_bbpBackendBucket = a}) | 186 | bbpBackendBucket :: Lens' BackendBucketsPatch Text
bbpBackendBucket
= lens _bbpBackendBucket
(\ s a -> s{_bbpBackendBucket = a}) | 136 | bbpBackendBucket
= lens _bbpBackendBucket
(\ s a -> s{_bbpBackendBucket = a}) | 85 | true | true | 1 | 9 | 32 | 46 | 22 | 24 | null | null |
csabahruska/gpipe-quake3 | Render.hs | bsd-3-clause | renderQuake :: V3 Float -> BSPLevel -> T.Trie CommonAttrs -> T.Trie (Juicy.Image PixelRGBA8) -> IO ()
renderQuake startPos bsp@BSPLevel{..} shaderInfo imageInfo =
runContextT (GLFW.defaultHandleConfig { GLFW.configEventPolicy = Nothing }) $ do
win <- newWindow (WindowFormatColorDepth RGBA32F Depth32) (GLFW.defaul... | 4,020 | renderQuake :: V3 Float -> BSPLevel -> T.Trie CommonAttrs -> T.Trie (Juicy.Image PixelRGBA8) -> IO ()
renderQuake startPos bsp@BSPLevel{..} shaderInfo imageInfo =
runContextT (GLFW.defaultHandleConfig { GLFW.configEventPolicy = Nothing }) $ do
win <- newWindow (WindowFormatColorDepth RGBA32F Depth32) (GLFW.defaul... | 4,020 | renderQuake startPos bsp@BSPLevel{..} shaderInfo imageInfo =
runContextT (GLFW.defaultHandleConfig { GLFW.configEventPolicy = Nothing }) $ do
win <- newWindow (WindowFormatColorDepth RGBA32F Depth32) (GLFW.defaultWindowConfig "Q3 Viewer")
-- pre tesselate patches and append to static draw verices and indices... | 3,918 | false | true | 0 | 24 | 1,002 | 1,373 | 679 | 694 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLANGUAGE_PORTUGUESE_BRAZILIAN :: Int
wxLANGUAGE_PORTUGUESE_BRAZILIAN = 151 | 76 | wxLANGUAGE_PORTUGUESE_BRAZILIAN :: Int
wxLANGUAGE_PORTUGUESE_BRAZILIAN = 151 | 76 | wxLANGUAGE_PORTUGUESE_BRAZILIAN = 151 | 37 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
leshchevds/ganeti | src/Ganeti/Query/Node.hs | bsd-2-clause | collectLiveData True cfg fields nodes = do
let hvs = [getDefaultHypervisorSpec cfg |
queryDomainRequired hypervisorFields fields]
good_nodes = nodesWithValidConfig cfg nodes
storage_units = if queryDomainRequired storageFields fields
then getStorageUnitsOfNodes cfg goo... | 605 | collectLiveData True cfg fields nodes = do
let hvs = [getDefaultHypervisorSpec cfg |
queryDomainRequired hypervisorFields fields]
good_nodes = nodesWithValidConfig cfg nodes
storage_units = if queryDomainRequired storageFields fields
then getStorageUnitsOfNodes cfg goo... | 605 | collectLiveData True cfg fields nodes = do
let hvs = [getDefaultHypervisorSpec cfg |
queryDomainRequired hypervisorFields fields]
good_nodes = nodesWithValidConfig cfg nodes
storage_units = if queryDomainRequired storageFields fields
then getStorageUnitsOfNodes cfg goo... | 605 | false | false | 0 | 17 | 165 | 146 | 71 | 75 | null | null |
TimRichter/Idris-dev | src/Idris/CaseSplit.hs | bsd-3-clause | replaceVar :: Context -> Name -> PTerm -> PTerm -> PTerm
replaceVar ctxt n t (PApp fc f pats) = PApp fc f (map substArg pats)
where subst :: PTerm -> PTerm
subst orig@(PPatvar _ v) | v == n = t
| otherwise = Placeholder
subst orig@(PRef _ _ v) | v == n = t
... | 652 | replaceVar :: Context -> Name -> PTerm -> PTerm -> PTerm
replaceVar ctxt n t (PApp fc f pats) = PApp fc f (map substArg pats)
where subst :: PTerm -> PTerm
subst orig@(PPatvar _ v) | v == n = t
| otherwise = Placeholder
subst orig@(PRef _ _ v) | v == n = t
... | 652 | replaceVar ctxt n t (PApp fc f pats) = PApp fc f (map substArg pats)
where subst :: PTerm -> PTerm
subst orig@(PPatvar _ v) | v == n = t
| otherwise = Placeholder
subst orig@(PRef _ _ v) | v == n = t
| isDConName v ctxt = orig
su... | 595 | false | true | 8 | 12 | 250 | 306 | 139 | 167 | null | null |
rickerbh/AoC | AoC2016/src/AoC201606.hs | mit | -- Part 1
executePart1 :: String -> String
executePart1 input =
case parsedInput input of
Prelude.Left msg -> show msg
Prelude.Right words -> show $ map fst $ map head $ map generateFrequencies $ transpose words | 222 | executePart1 :: String -> String
executePart1 input =
case parsedInput input of
Prelude.Left msg -> show msg
Prelude.Right words -> show $ map fst $ map head $ map generateFrequencies $ transpose words | 211 | executePart1 input =
case parsedInput input of
Prelude.Left msg -> show msg
Prelude.Right words -> show $ map fst $ map head $ map generateFrequencies $ transpose words | 178 | true | true | 6 | 7 | 46 | 57 | 29 | 28 | null | null |
brendanhay/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/List.hs | mpl-2.0 | -- | nextPageToken value returned from a previous list call, indicating that
-- the subsequent page of results should be returned. The list request must
-- be otherwise identical to the one that resulted in this token.
calaPageToken :: Lens' CoursesAliasesList (Maybe Text)
calaPageToken
= lens _calaPageToken
(\... | 350 | calaPageToken :: Lens' CoursesAliasesList (Maybe Text)
calaPageToken
= lens _calaPageToken
(\ s a -> s{_calaPageToken = a}) | 131 | calaPageToken
= lens _calaPageToken
(\ s a -> s{_calaPageToken = a}) | 76 | true | true | 0 | 9 | 61 | 48 | 27 | 21 | null | null |
sgf-dma/show-words | src/ShowWords/Text.hs | bsd-3-clause | reorderLines gen (x : xs) = do
Config {confLineOrder = lineOrder} <- ask
if lineOrder == "shuffle"
then return (x : shuffleList gen xs)
else return (x : xs) | 178 | reorderLines gen (x : xs) = do
Config {confLineOrder = lineOrder} <- ask
if lineOrder == "shuffle"
then return (x : shuffleList gen xs)
else return (x : xs) | 178 | reorderLines gen (x : xs) = do
Config {confLineOrder = lineOrder} <- ask
if lineOrder == "shuffle"
then return (x : shuffleList gen xs)
else return (x : xs) | 178 | false | false | 0 | 11 | 50 | 74 | 37 | 37 | null | null |
merc1031/haskell-sonos-http-api | src/Sonos/Lib.hs | bsd-3-clause | ungroupRoom :: State
-> CliArguments
-> ZonePlayer
-> IO ()
ungroupRoom state args room = do
let addr = let l = zpLocation room
in urlFmt (lUrl l) (lPort l)
let avMessage = becomeCoordinatorOfStandaloneGroup
avSoapAction addr avMessage
return () | 312 | ungroupRoom :: State
-> CliArguments
-> ZonePlayer
-> IO ()
ungroupRoom state args room = do
let addr = let l = zpLocation room
in urlFmt (lUrl l) (lPort l)
let avMessage = becomeCoordinatorOfStandaloneGroup
avSoapAction addr avMessage
return () | 312 | ungroupRoom state args room = do
let addr = let l = zpLocation room
in urlFmt (lUrl l) (lPort l)
let avMessage = becomeCoordinatorOfStandaloneGroup
avSoapAction addr avMessage
return () | 216 | false | true | 0 | 15 | 105 | 105 | 46 | 59 | null | null |
ulricha/algebra-sql | src/Database/Algebra/Table/Construct.hs | bsd-3-clause | -- | Select rows where the column `SelAttr' contains True.
selectM :: Expr -> Build TableAlgebra AlgNode -> Build TableAlgebra AlgNode
selectM sel = bind1 (select sel) | 167 | selectM :: Expr -> Build TableAlgebra AlgNode -> Build TableAlgebra AlgNode
selectM sel = bind1 (select sel) | 108 | selectM sel = bind1 (select sel) | 32 | true | true | 0 | 7 | 26 | 42 | 20 | 22 | null | null |
timjb/diagrams-rubiks-cube | src/Diagrams/RubiksCube/Model.hs | mit | sideCorners :: Traversal' (Side a) a
sideCorners f (Side tl tc tr ml mc mr bl bc br) =
(\tl' tr' bl' br' -> Side tl' tc tr' ml mc mr bl' bc br')
<$> f tl <*> f tr <*> f bl <*> f br | 184 | sideCorners :: Traversal' (Side a) a
sideCorners f (Side tl tc tr ml mc mr bl bc br) =
(\tl' tr' bl' br' -> Side tl' tc tr' ml mc mr bl' bc br')
<$> f tl <*> f tr <*> f bl <*> f br | 184 | sideCorners f (Side tl tc tr ml mc mr bl bc br) =
(\tl' tr' bl' br' -> Side tl' tc tr' ml mc mr bl' bc br')
<$> f tl <*> f tr <*> f bl <*> f br | 147 | false | true | 2 | 8 | 49 | 111 | 53 | 58 | null | null |
fmthoma/ghc | compiler/types/TypeRep.hs | bsd-3-clause | tidyFreeTyVars :: TidyEnv -> TyVarSet -> TidyEnv
-- ^ Add the free 'TyVar's to the env in tidy form,
-- so that we can tidy the type they are free in
tidyFreeTyVars (full_occ_env, var_env) tyvars
= fst (tidyOpenTyVars (full_occ_env, var_env) (varSetElems tyvars)) | 265 | tidyFreeTyVars :: TidyEnv -> TyVarSet -> TidyEnv
tidyFreeTyVars (full_occ_env, var_env) tyvars
= fst (tidyOpenTyVars (full_occ_env, var_env) (varSetElems tyvars)) | 164 | tidyFreeTyVars (full_occ_env, var_env) tyvars
= fst (tidyOpenTyVars (full_occ_env, var_env) (varSetElems tyvars)) | 115 | true | true | 0 | 9 | 43 | 55 | 30 | 25 | null | null |
RoboNickBot/nlp-tools | src/Analyze.hs | bsd-2-clause | main = opts >>= (\os -> if opPr os
then fromFS (opDir os)
else fromDB os) | 127 | main = opts >>= (\os -> if opPr os
then fromFS (opDir os)
else fromDB os) | 127 | main = opts >>= (\os -> if opPr os
then fromFS (opDir os)
else fromDB os) | 127 | false | false | 0 | 11 | 69 | 41 | 21 | 20 | null | null |
machine-intelligence/Botworld | Botworld/Display.hs | bsd-3-clause | itemDetail (ProcessorPart p) = ["[#]", show $ speed p] | 54 | itemDetail (ProcessorPart p) = ["[#]", show $ speed p] | 54 | itemDetail (ProcessorPart p) = ["[#]", show $ speed p] | 54 | false | false | 0 | 7 | 8 | 28 | 14 | 14 | null | null |
snoyberg/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | ofBlockMap :: BlockId -> BlockEnv CmmBlock -> CmmGraph
ofBlockMap entry bodyMap = CmmGraph {g_entry=entry, g_graph=GMany NothingO bodyMap NothingO} | 147 | ofBlockMap :: BlockId -> BlockEnv CmmBlock -> CmmGraph
ofBlockMap entry bodyMap = CmmGraph {g_entry=entry, g_graph=GMany NothingO bodyMap NothingO} | 147 | ofBlockMap entry bodyMap = CmmGraph {g_entry=entry, g_graph=GMany NothingO bodyMap NothingO} | 92 | false | true | 0 | 7 | 17 | 48 | 25 | 23 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | -- Flags to indicate which attributes are being applied
-- enum wxTextAttrFlags
wxTEXT_ATTR_TEXT_COLOUR :: Int
wxTEXT_ATTR_TEXT_COLOUR = 0x00000001 | 165 | wxTEXT_ATTR_TEXT_COLOUR :: Int
wxTEXT_ATTR_TEXT_COLOUR = 0x00000001 | 85 | wxTEXT_ATTR_TEXT_COLOUR = 0x00000001 | 45 | true | true | 0 | 4 | 35 | 13 | 8 | 5 | null | null |
rCEx/feldspar-lang-small | tests/Feldspar/Range/Test.hs | bsd-3-clause | prop_rangeLessEq t r1 r2 =
not (isEmpty r1) && not (isEmpty r2) ==>
forAll (fromRange r1) $ \x ->
forAll (fromRange r2) $ \y ->
rangeLessEq r1 r2 ==> x <= y
where _ = r1 `rangeTy` t
--------------------------------------------------------------------------------
-- ** Propagation
-------------------... | 381 | prop_rangeLessEq t r1 r2 =
not (isEmpty r1) && not (isEmpty r2) ==>
forAll (fromRange r1) $ \x ->
forAll (fromRange r2) $ \y ->
rangeLessEq r1 r2 ==> x <= y
where _ = r1 `rangeTy` t
--------------------------------------------------------------------------------
-- ** Propagation
-------------------... | 381 | prop_rangeLessEq t r1 r2 =
not (isEmpty r1) && not (isEmpty r2) ==>
forAll (fromRange r1) $ \x ->
forAll (fromRange r2) $ \y ->
rangeLessEq r1 r2 ==> x <= y
where _ = r1 `rangeTy` t
--------------------------------------------------------------------------------
-- ** Propagation
-------------------... | 381 | false | false | 0 | 11 | 62 | 105 | 53 | 52 | null | null |
hoffmeyer/timeregger | src/Controllers/Controller.hs | bsd-3-clause | getDate :: Entity User -> ActionM ()
getDate _ = do
dateId <- param "dateId"
maybeDate <- liftIO $ readDate dateId
case maybeDate of
Just date -> json date
Nothing -> raise $ LT.pack "Date not found" | 215 | getDate :: Entity User -> ActionM ()
getDate _ = do
dateId <- param "dateId"
maybeDate <- liftIO $ readDate dateId
case maybeDate of
Just date -> json date
Nothing -> raise $ LT.pack "Date not found" | 215 | getDate _ = do
dateId <- param "dateId"
maybeDate <- liftIO $ readDate dateId
case maybeDate of
Just date -> json date
Nothing -> raise $ LT.pack "Date not found" | 178 | false | true | 0 | 12 | 52 | 84 | 37 | 47 | null | null |
SeanRBurton/spaceprobe | Control/SpaceProbe/Internal/Probe.hs | bsd-3-clause | extractElem (x:xs) = (x, xs) : map (\(y, ys) -> (y, x:ys)) (extractElem xs) | 75 | extractElem (x:xs) = (x, xs) : map (\(y, ys) -> (y, x:ys)) (extractElem xs) | 75 | extractElem (x:xs) = (x, xs) : map (\(y, ys) -> (y, x:ys)) (extractElem xs) | 75 | false | false | 0 | 10 | 13 | 61 | 34 | 27 | null | null |
kapilash/ccs2cs | src/Main.hs | apache-2.0 | asPreProcArgs (CPPArgs strs) f = if os == "mingw32" then "/E" : (strs ++ [f])
else "-E" : (strs ++ [f]) | 137 | asPreProcArgs (CPPArgs strs) f = if os == "mingw32" then "/E" : (strs ++ [f])
else "-E" : (strs ++ [f]) | 137 | asPreProcArgs (CPPArgs strs) f = if os == "mingw32" then "/E" : (strs ++ [f])
else "-E" : (strs ++ [f]) | 137 | false | false | 0 | 9 | 54 | 57 | 31 | 26 | null | null |
minib00m/jpp | src/Parser.hs | mit | exprTerms :: Parser Expr
exprTerms =
parens expression
<|> try literal
<|> try array
<|> try functionCall
<|> try arrayCall
<|> try variable
<|> lambda | 169 | exprTerms :: Parser Expr
exprTerms =
parens expression
<|> try literal
<|> try array
<|> try functionCall
<|> try arrayCall
<|> try variable
<|> lambda | 169 | exprTerms =
parens expression
<|> try literal
<|> try array
<|> try functionCall
<|> try arrayCall
<|> try variable
<|> lambda | 144 | false | true | 18 | 5 | 42 | 75 | 37 | 38 | null | null |
nishiuramakoto/logiku | app/Authentication.hs | gpl-3.0 | cacheSession :: MonadHandler m => Text -> m (Maybe Text) -> m (Maybe Text)
cacheSession key m = do
mval <- lookupSession key
case mval of
Just val -> return $ Just val
Nothing -> do mval' <- m
case mval' of
Just val' -> do setSession key val'
... | 400 | cacheSession :: MonadHandler m => Text -> m (Maybe Text) -> m (Maybe Text)
cacheSession key m = do
mval <- lookupSession key
case mval of
Just val -> return $ Just val
Nothing -> do mval' <- m
case mval' of
Just val' -> do setSession key val'
... | 400 | cacheSession key m = do
mval <- lookupSession key
case mval of
Just val -> return $ Just val
Nothing -> do mval' <- m
case mval' of
Just val' -> do setSession key val'
return $ Just val'
Nothing -> return No... | 325 | false | true | 0 | 20 | 169 | 144 | 62 | 82 | null | null |
abhin4v/hask-irc | hask-irc-handlers/Network/IRC/Handlers/Tell.hs | apache-2.0 | saveTell :: AcidState Tells -> Tell -> IO ()
saveTell acid = update acid . SaveTellQ | 84 | saveTell :: AcidState Tells -> Tell -> IO ()
saveTell acid = update acid . SaveTellQ | 84 | saveTell acid = update acid . SaveTellQ | 39 | false | true | 0 | 8 | 15 | 37 | 17 | 20 | null | null |
phadej/stack | src/Stack/Constants.hs | bsd-3-clause | -- | The filename used for dirtiness check of config.
configCacheFile :: (MonadThrow m, MonadReader env m, HasPlatform env,HasEnvConfig env)
=> Path Abs Dir -- ^ Package directory.
-> m (Path Abs File)
configCacheFile dir =
liftM
(</> $(mkRelFile "stack-config-cache"))
... | 347 | configCacheFile :: (MonadThrow m, MonadReader env m, HasPlatform env,HasEnvConfig env)
=> Path Abs Dir -- ^ Package directory.
-> m (Path Abs File)
configCacheFile dir =
liftM
(</> $(mkRelFile "stack-config-cache"))
(distDirFromDir dir) | 293 | configCacheFile dir =
liftM
(</> $(mkRelFile "stack-config-cache"))
(distDirFromDir dir) | 108 | true | true | 0 | 10 | 98 | 93 | 45 | 48 | null | null |
phadej/stack | src/main/Main.hs | bsd-3-clause | main :: IO ()
main = do
-- Line buffer the output by default, particularly for non-terminal runs.
-- See https://github.com/commercialhaskell/stack/pull/360
hSetBuffering stdout LineBuffering
hSetBuffering stdin LineBuffering
hSetBuffering stderr LineBuffering
hSetTranslit stdout
hSetTranslit stderr
ar... | 1,727 | main :: IO ()
main = do
-- Line buffer the output by default, particularly for non-terminal runs.
-- See https://github.com/commercialhaskell/stack/pull/360
hSetBuffering stdout LineBuffering
hSetBuffering stdin LineBuffering
hSetBuffering stderr LineBuffering
hSetTranslit stdout
hSetTranslit stderr
ar... | 1,727 | main = do
-- Line buffer the output by default, particularly for non-terminal runs.
-- See https://github.com/commercialhaskell/stack/pull/360
hSetBuffering stdout LineBuffering
hSetBuffering stdin LineBuffering
hSetBuffering stderr LineBuffering
hSetTranslit stdout
hSetTranslit stderr
args <- getArgs
... | 1,713 | false | true | 0 | 20 | 492 | 366 | 165 | 201 | null | null |
fmapfmapfmap/amazonka | amazonka-rds/gen/Network/AWS/RDS/DescribeOptionGroupOptions.hs | mpl-2.0 | -- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by 'MaxRecords'.
dogoMarker :: Lens' DescribeOptionGroupOptions (Maybe Text)
dogoMarker = lens _dogoMarker (\ s a -> s{_dogoMarker = a}) | 320 | dogoMarker :: Lens' DescribeOptionGroupOptions (Maybe Text)
dogoMarker = lens _dogoMarker (\ s a -> s{_dogoMarker = a}) | 119 | dogoMarker = lens _dogoMarker (\ s a -> s{_dogoMarker = a}) | 59 | true | true | 1 | 9 | 49 | 54 | 27 | 27 | null | null |
input-output-hk/rscoin-haskell | src/RSCoin/Explorer/Channel.hs | gpl-3.0 | writeChannel
:: MonadIO m
=> Channel -> ChannelItem -> m ()
writeChannel (Channel ch) = liftIO . writeChan ch | 117 | writeChannel
:: MonadIO m
=> Channel -> ChannelItem -> m ()
writeChannel (Channel ch) = liftIO . writeChan ch | 117 | writeChannel (Channel ch) = liftIO . writeChan ch | 49 | false | true | 0 | 11 | 26 | 51 | 23 | 28 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Common/Actor.hs | bsd-3-clause | bspeed :: Actor -> [ItemFull] -> Speed
bspeed b activeItems =
case btrajectory b of
Nothing -> toSpeed $ max 1 -- avoid infinite wait
$ sumSlotNoFilter IK.EqpSlotAddSpeed activeItems
Just (_, speed) -> speed
-- | Whether an actor is braced for combat this clip. | 288 | bspeed :: Actor -> [ItemFull] -> Speed
bspeed b activeItems =
case btrajectory b of
Nothing -> toSpeed $ max 1 -- avoid infinite wait
$ sumSlotNoFilter IK.EqpSlotAddSpeed activeItems
Just (_, speed) -> speed
-- | Whether an actor is braced for combat this clip. | 288 | bspeed b activeItems =
case btrajectory b of
Nothing -> toSpeed $ max 1 -- avoid infinite wait
$ sumSlotNoFilter IK.EqpSlotAddSpeed activeItems
Just (_, speed) -> speed
-- | Whether an actor is braced for combat this clip. | 249 | false | true | 0 | 10 | 71 | 75 | 38 | 37 | null | null |
blanu/arbre | Arbre/Native.hs | gpl-2.0 | integerError :: [Expression] -> Expression
integerError params = Error $ "Type error, not integer literals" ++ (show params) | 124 | integerError :: [Expression] -> Expression
integerError params = Error $ "Type error, not integer literals" ++ (show params) | 124 | integerError params = Error $ "Type error, not integer literals" ++ (show params) | 81 | false | true | 0 | 7 | 17 | 35 | 18 | 17 | null | null |
snowleopard/hadrian | src/UserSettings.hs | mit | -- See doc/user-settings.md for instructions.
-- Please update doc/user-settings.md when committing changes to this file.
-- | User-defined build flavours. See 'userFlavour' as an example.
userFlavours :: [Flavour]
userFlavours = [userFlavour] | 244 | userFlavours :: [Flavour]
userFlavours = [userFlavour] | 54 | userFlavours = [userFlavour] | 28 | true | true | 0 | 5 | 31 | 20 | 13 | 7 | null | null |
bredelings/BAli-Phy | haskell/SModel.hs | gpl-2.0 | stateLetters (MixtureModels _ (m:ms)) = stateLetters m | 54 | stateLetters (MixtureModels _ (m:ms)) = stateLetters m | 54 | stateLetters (MixtureModels _ (m:ms)) = stateLetters m | 54 | false | false | 0 | 8 | 6 | 28 | 13 | 15 | null | null |
haskell-tinc/hpack | src/Hpack/Render.hs | mit | renderSection :: (a -> [Element]) -> [Element] -> [Element] -> Section a -> [Element]
renderSection renderSectionData extraFieldsStart extraFieldsEnd Section{..} = addVerbatim sectionVerbatim $
extraFieldsStart
++ renderSectionData sectionData ++ [
renderDirectories "hs-source-dirs" sectionSourceDirs
, ren... | 1,601 | renderSection :: (a -> [Element]) -> [Element] -> [Element] -> Section a -> [Element]
renderSection renderSectionData extraFieldsStart extraFieldsEnd Section{..} = addVerbatim sectionVerbatim $
extraFieldsStart
++ renderSectionData sectionData ++ [
renderDirectories "hs-source-dirs" sectionSourceDirs
, ren... | 1,601 | renderSection renderSectionData extraFieldsStart extraFieldsEnd Section{..} = addVerbatim sectionVerbatim $
extraFieldsStart
++ renderSectionData sectionData ++ [
renderDirectories "hs-source-dirs" sectionSourceDirs
, renderDefaultExtensions sectionDefaultExtensions
, renderOtherExtensions sectionOtherEx... | 1,515 | false | true | 12 | 9 | 189 | 330 | 161 | 169 | null | null |
DigitalBrains1/clash-lt24 | Toolbox/Serial.hs | bsd-2-clause | input' s@(mode, wait, run, shift, sample) (cTick, dIn)
= (s', ((frameErr, dOut), dValid))
where
s'@(mode', wait', run', shift', sample') = input'' s cTick dIn
frameErr = vhead shift' == L
dOut = fromBV $ vtail shift' :: Unsigned 8
dValid = run && (not run') | 297 | input' s@(mode, wait, run, shift, sample) (cTick, dIn)
= (s', ((frameErr, dOut), dValid))
where
s'@(mode', wait', run', shift', sample') = input'' s cTick dIn
frameErr = vhead shift' == L
dOut = fromBV $ vtail shift' :: Unsigned 8
dValid = run && (not run') | 297 | input' s@(mode, wait, run, shift, sample) (cTick, dIn)
= (s', ((frameErr, dOut), dValid))
where
s'@(mode', wait', run', shift', sample') = input'' s cTick dIn
frameErr = vhead shift' == L
dOut = fromBV $ vtail shift' :: Unsigned 8
dValid = run && (not run') | 297 | false | false | 1 | 8 | 84 | 139 | 75 | 64 | null | null |
andygill/rubik-solver | src/Rubik/D2.hs | bsd-3-clause | turnD2 (Axis Y dir) = Axis X dir | 32 | turnD2 (Axis Y dir) = Axis X dir | 32 | turnD2 (Axis Y dir) = Axis X dir | 32 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
treeowl/hstats | src/Math/Statistics.hs | bsd-3-clause | covMatrix :: (Floating a) => [[a]] -> [[a]]
covMatrix xs = split' (length xs) cs
where
cs = [ covar a b | a <- xs, b <- xs]
split' n = unfoldr (\y -> if null y then Nothing else Just $ splitAt n y)
-- |Pearson's product-moment correlation coefficient | 268 | covMatrix :: (Floating a) => [[a]] -> [[a]]
covMatrix xs = split' (length xs) cs
where
cs = [ covar a b | a <- xs, b <- xs]
split' n = unfoldr (\y -> if null y then Nothing else Just $ splitAt n y)
-- |Pearson's product-moment correlation coefficient | 268 | covMatrix xs = split' (length xs) cs
where
cs = [ covar a b | a <- xs, b <- xs]
split' n = unfoldr (\y -> if null y then Nothing else Just $ splitAt n y)
-- |Pearson's product-moment correlation coefficient | 224 | false | true | 1 | 10 | 68 | 122 | 64 | 58 | null | null |
bennofs/cabal2nix | src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs | bsd-3-clause | libNixName "ImageMagick" = return "imagemagick" | 70 | libNixName "ImageMagick" = return "imagemagick" | 70 | libNixName "ImageMagick" = return "imagemagick" | 70 | false | false | 0 | 5 | 27 | 13 | 5 | 8 | null | null |
rrnewton/stack | src/Stack/Types/Config.hs | bsd-3-clause | pvpBoundsText PvpBoundsBoth = "both" | 36 | pvpBoundsText PvpBoundsBoth = "both" | 36 | pvpBoundsText PvpBoundsBoth = "both" | 36 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
23Skidoo/aeson | tests/DataFamilies/Encoders.hs | bsd-3-clause | thApproxToEncodingDefault :: Approx String -> Encoding
thApproxToEncodingDefault = $(mkToEncoding defaultOptions 'Approx) | 121 | thApproxToEncodingDefault :: Approx String -> Encoding
thApproxToEncodingDefault = $(mkToEncoding defaultOptions 'Approx) | 121 | thApproxToEncodingDefault = $(mkToEncoding defaultOptions 'Approx) | 66 | false | true | 0 | 7 | 10 | 28 | 14 | 14 | null | null |
balachia/CriticMarkup.hs | CriticMarkup.hs | mit | -- | keep or drop results of the parser
-- n.b. have to make sure to run the parser even when dropping its results
keepFilter :: Keep -> Parsec String () String -> Parsec String () String
keepFilter Keep x = x | 209 | keepFilter :: Keep -> Parsec String () String -> Parsec String () String
keepFilter Keep x = x | 94 | keepFilter Keep x = x | 21 | true | true | 0 | 9 | 41 | 49 | 23 | 26 | null | null |
sdiehl/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | prodTyConKey = mkPreludeTyConUnique 142 | 40 | prodTyConKey = mkPreludeTyConUnique 142 | 40 | prodTyConKey = mkPreludeTyConUnique 142 | 40 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
jml/difftodo | tests/Todo.hs | apache-2.0 | tests :: TestTree
tests =
testGroup "Fixme.Todo"
[ testCase "No todos" $ do
let comment = newComment (Just "somefile") 1 "# wolverhampton"
let expected = []
expected @=? getTodos comment
, testCase "One todo" $ do
let comment = newComment (Just "somefile") 1 "# TODO: wolverhampton"
l... | 423 | tests :: TestTree
tests =
testGroup "Fixme.Todo"
[ testCase "No todos" $ do
let comment = newComment (Just "somefile") 1 "# wolverhampton"
let expected = []
expected @=? getTodos comment
, testCase "One todo" $ do
let comment = newComment (Just "somefile") 1 "# TODO: wolverhampton"
l... | 423 | tests =
testGroup "Fixme.Todo"
[ testCase "No todos" $ do
let comment = newComment (Just "somefile") 1 "# wolverhampton"
let expected = []
expected @=? getTodos comment
, testCase "One todo" $ do
let comment = newComment (Just "somefile") 1 "# TODO: wolverhampton"
let expected = [ to... | 405 | false | true | 0 | 14 | 112 | 137 | 63 | 74 | null | null |
goldfirere/units | units-defs/Data/Units/SI/Prefixes.hs | bsd-3-clause | peta :: unit -> Peta :@ unit
peta = (Peta :@) | 45 | peta :: unit -> Peta :@ unit
peta = (Peta :@) | 45 | peta = (Peta :@) | 16 | false | true | 0 | 6 | 10 | 23 | 13 | 10 | null | null |
massysett/penny | penny/lib/Penny/Copper/Copperize.hs | bsd-3-clause | cPrice
:: PriceParts a
-> Maybe (Price Char ())
cPrice (PriceParts _ zt from to dec) = fmap f (cZonedTime zt)
where
f dtz = Price cAtSign cWhite'Star dtz cWhite'Plus
(cCommodity from) cWhite'Plus jan cNewline
jan = Janus'CyExch $ CyExch (cCommodity to) cWhite'Star
(cExch dec)
-- Labels | 313 | cPrice
:: PriceParts a
-> Maybe (Price Char ())
cPrice (PriceParts _ zt from to dec) = fmap f (cZonedTime zt)
where
f dtz = Price cAtSign cWhite'Star dtz cWhite'Plus
(cCommodity from) cWhite'Plus jan cNewline
jan = Janus'CyExch $ CyExch (cCommodity to) cWhite'Star
(cExch dec)
-- Labels | 313 | cPrice (PriceParts _ zt from to dec) = fmap f (cZonedTime zt)
where
f dtz = Price cAtSign cWhite'Star dtz cWhite'Plus
(cCommodity from) cWhite'Plus jan cNewline
jan = Janus'CyExch $ CyExch (cCommodity to) cWhite'Star
(cExch dec)
-- Labels | 261 | false | true | 1 | 10 | 73 | 126 | 60 | 66 | null | null |
owickstrom/websub | src/Network/HTTP/WebSub/Subscriber.hs | mpl-2.0 | newSubscriptions :: URI -> c -> IO (Subscriptions c)
newSubscriptions baseUri client =
Subscriptions baseUri client <$> newMVar HM.empty <*> newMVar HM.empty | 159 | newSubscriptions :: URI -> c -> IO (Subscriptions c)
newSubscriptions baseUri client =
Subscriptions baseUri client <$> newMVar HM.empty <*> newMVar HM.empty | 159 | newSubscriptions baseUri client =
Subscriptions baseUri client <$> newMVar HM.empty <*> newMVar HM.empty | 106 | false | true | 0 | 9 | 23 | 56 | 26 | 30 | null | null |
headprogrammingczar/cabal | Cabal/Distribution/Simple/BuildTarget.hs | bsd-3-clause | nubMatchErrors (InexactMatch d xs) = InexactMatch d xs | 56 | nubMatchErrors (InexactMatch d xs) = InexactMatch d xs | 56 | nubMatchErrors (InexactMatch d xs) = InexactMatch d xs | 56 | false | false | 0 | 6 | 9 | 23 | 10 | 13 | null | null |
spechub/Hets | TopHybrid/Utilities.hs | gpl-2.0 | -- | The generic error message
gErr :: String
gErr = "Unspecific error found" | 77 | gErr :: String
gErr = "Unspecific error found" | 46 | gErr = "Unspecific error found" | 31 | true | true | 0 | 6 | 13 | 19 | 8 | 11 | null | null |
ghc-android/ghc | testsuite/tests/numeric/should_run/arith014.hs | bsd-3-clause | minInt2 = fromIntegral (minBound + 1 :: Int) * 2 :: Integer | 59 | minInt2 = fromIntegral (minBound + 1 :: Int) * 2 :: Integer | 59 | minInt2 = fromIntegral (minBound + 1 :: Int) * 2 :: Integer | 59 | false | false | 0 | 8 | 11 | 26 | 14 | 12 | null | null |
zachsully/hakaru | haskell/Tests/Parser.hs | bsd-3-clause | ret1 :: Text
ret1 = "return return 3" | 38 | ret1 :: Text
ret1 = "return return 3" | 38 | ret1 = "return return 3" | 25 | false | true | 0 | 4 | 8 | 11 | 6 | 5 | null | null |
gibiansky/nvim-hs | library/Neovim/API/Parser.hs | apache-2.0 | extractFunction :: Object -> Either String NeovimFunction
extractFunction funDefMap = NeovimFunction
<$> (oLookup (ObjectBinary "name") funDefMap >>= oToString)
<*> (oLookup (ObjectBinary "parameters") funDefMap
>>= oArr >>= toParameterlist)
<*> (oLookupDefault (ObjectBool False) (ObjectBinary "... | 525 | extractFunction :: Object -> Either String NeovimFunction
extractFunction funDefMap = NeovimFunction
<$> (oLookup (ObjectBinary "name") funDefMap >>= oToString)
<*> (oLookup (ObjectBinary "parameters") funDefMap
>>= oArr >>= toParameterlist)
<*> (oLookupDefault (ObjectBool False) (ObjectBinary "... | 525 | extractFunction funDefMap = NeovimFunction
<$> (oLookup (ObjectBinary "name") funDefMap >>= oToString)
<*> (oLookup (ObjectBinary "parameters") funDefMap
>>= oArr >>= toParameterlist)
<*> (oLookupDefault (ObjectBool False) (ObjectBinary "can_fail") funDefMap
>>= oToBool)
<*> (oLo... | 467 | false | true | 14 | 11 | 107 | 163 | 82 | 81 | null | null |
comatose/hecs | src/HECS/Internal.hs | bsd-3-clause | -- ^ build the original file from, at least, k partital files
recover :: Int -- ^ k
-> Int -- ^ n
-> [Fd] -- ^ partial files
-> Fd -- ^ file to be recovered
-> IO ()
recover k n src trg = do
md <- mapM readMetadata src -- also, shifting offset as a side-effect
guard $ ... | 879 | recover :: Int -- ^ k
-> Int -- ^ n
-> [Fd] -- ^ partial files
-> Fd -- ^ file to be recovered
-> IO ()
recover k n src trg = do
md <- mapM readMetadata src -- also, shifting offset as a side-effect
guard $ and $ zipWith ((==) `on` fst) md (tail md)
let len = fst $ h... | 817 | recover k n src trg = do
md <- mapM readMetadata src -- also, shifting offset as a side-effect
guard $ and $ zipWith ((==) `on` fst) md (tail md)
let len = fst $ head md
is <- S.makeInputStream . fmap (decode md) . forM src $ (`fdReadBS_` defaultChunkSize)
os <- S.makeOutputStream $ void . maybe (return 0)... | 669 | true | true | 0 | 13 | 275 | 320 | 161 | 159 | null | null |
harendra-kumar/asyncly | src/Streamly/Internal/Benchmark/Prelude.hs | bsd-3-clause | foldrTMap n = composeN n $ Internal.foldrT (\x xs -> x + 1 `S.cons` xs) S.nil | 82 | foldrTMap n = composeN n $ Internal.foldrT (\x xs -> x + 1 `S.cons` xs) S.nil | 82 | foldrTMap n = composeN n $ Internal.foldrT (\x xs -> x + 1 `S.cons` xs) S.nil | 82 | false | false | 3 | 9 | 20 | 51 | 24 | 27 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.