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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TWal/ENS_adac | src/Asm.hs | bsd-3-clause | r10 = R10 | 9 | r10 = R10 | 9 | r10 = R10 | 9 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
manpages/haskonf | test/Haskonf/HaskonfSpec.hs | bsd-2-clause | mainDo :: [String] -> IO ()
mainDo ("--rebuild":xs) = do
_ <- rebuild pname
-- -^- Bad: errors should be addressed in real applications
launch xs | 157 | mainDo :: [String] -> IO ()
mainDo ("--rebuild":xs) = do
_ <- rebuild pname
-- -^- Bad: errors should be addressed in real applications
launch xs | 157 | mainDo ("--rebuild":xs) = do
_ <- rebuild pname
-- -^- Bad: errors should be addressed in real applications
launch xs | 129 | false | true | 0 | 9 | 37 | 55 | 25 | 30 | null | null |
joelmccracken/git-stuff | src/Config.hs | bsd-3-clause | moreThanOneChar :: String -> Bool
moreThanOneChar str =
List.length str > 0 | 77 | moreThanOneChar :: String -> Bool
moreThanOneChar str =
List.length str > 0 | 77 | moreThanOneChar str =
List.length str > 0 | 43 | false | true | 0 | 7 | 13 | 27 | 13 | 14 | null | null |
jwiegley/github | src/GitHub/Endpoints/Repos/Webhooks.hs | bsd-3-clause | - | List hooks.
-- See <https://developer.github.com/v3/repos/hooks/#list-hooks>
webhooksForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector RepoWebhook)
webhooksForR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "hooks"] []
| 265 | webhooksForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector RepoWebhook)
webhooksForR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "hooks"] [] | 183 | webhooksForR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "hooks"] [] | 95 | true | true | 1 | 9 | 37 | 60 | 34 | 26 | null | null |
sumitsahrawat/IHaskell | main/Main.hs | mit | replyTo _ CommInfoRequest{} replyHeader state =
let comms = Map.mapKeys (UUID.uuidToString) (openComms state) in
return
(state, CommInfoReply
{ header = replyHeader
, commInfo = Map.map (\(Widget w) -> targetName w) comms
}) | 274 | replyTo _ CommInfoRequest{} replyHeader state =
let comms = Map.mapKeys (UUID.uuidToString) (openComms state) in
return
(state, CommInfoReply
{ header = replyHeader
, commInfo = Map.map (\(Widget w) -> targetName w) comms
}) | 274 | replyTo _ CommInfoRequest{} replyHeader state =
let comms = Map.mapKeys (UUID.uuidToString) (openComms state) in
return
(state, CommInfoReply
{ header = replyHeader
, commInfo = Map.map (\(Widget w) -> targetName w) comms
}) | 274 | false | false | 1 | 13 | 81 | 95 | 49 | 46 | null | null |
Xophmeister/tapestry | Encode.hs | mit | tr :: String -> String
tr = simpleTag "tr" | 42 | tr :: String -> String
tr = simpleTag "tr" | 42 | tr = simpleTag "tr" | 19 | false | true | 0 | 7 | 8 | 25 | 10 | 15 | null | null |
haasn/colour | Data/Colour/Names.hs | mit | mediumvioletred :: (Ord a, Floating a) => Colour a
mediumvioletred = sRGB24 199 21 133 | 86 | mediumvioletred :: (Ord a, Floating a) => Colour a
mediumvioletred = sRGB24 199 21 133 | 86 | mediumvioletred = sRGB24 199 21 133 | 35 | false | true | 0 | 7 | 14 | 43 | 19 | 24 | null | null |
randen/haddock | haddock-api/src/Haddock/Interface/Create.hs | bsd-2-clause | parseOption "not-home" = return (Just OptNotHome) | 56 | parseOption "not-home" = return (Just OptNotHome) | 56 | parseOption "not-home" = return (Just OptNotHome) | 56 | false | false | 0 | 7 | 12 | 18 | 8 | 10 | null | null |
wavewave/hoodle-core | src/Hoodle/Type/Canvas.hs | gpl-3.0 | -- |
defaultEraserWCS :: WidthColorStyle
defaultEraserWCS = WidthColorStyle predefined_eraser_medium ColorWhite | 112 | defaultEraserWCS :: WidthColorStyle
defaultEraserWCS = WidthColorStyle predefined_eraser_medium ColorWhite | 106 | defaultEraserWCS = WidthColorStyle predefined_eraser_medium ColorWhite | 70 | true | true | 0 | 6 | 10 | 23 | 10 | 13 | null | null |
sdiehl/ghc | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | bsd-3-clause | isStrict, notStrict, unpacked :: Quote m => m Strict
isStrict = bang noSourceUnpackedness sourceStrict | 102 | isStrict, notStrict, unpacked :: Quote m => m Strict
isStrict = bang noSourceUnpackedness sourceStrict | 102 | isStrict = bang noSourceUnpackedness sourceStrict | 49 | false | true | 0 | 6 | 13 | 30 | 16 | 14 | null | null |
expipiplus1/minizinc | src/Language/MiniZinc/Builder/Internal.hs | mit | conjoin :: Foldable f => f (Expression 'Bool) -> Expression 'Bool
conjoin xs | null xs = true
| otherwise = foldl1 (/\) xs | 133 | conjoin :: Foldable f => f (Expression 'Bool) -> Expression 'Bool
conjoin xs | null xs = true
| otherwise = foldl1 (/\) xs | 133 | conjoin xs | null xs = true
| otherwise = foldl1 (/\) xs | 67 | false | true | 0 | 10 | 34 | 69 | 31 | 38 | null | null |
mcschroeder/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | pprUserCon :: (OutputableBndr con, OutputableBndr id) => con -> HsConPatDetails id -> SDoc
pprUserCon c (InfixCon p1 p2) = ppr p1 <+> pprInfixOcc c <+> ppr p2 | 158 | pprUserCon :: (OutputableBndr con, OutputableBndr id) => con -> HsConPatDetails id -> SDoc
pprUserCon c (InfixCon p1 p2) = ppr p1 <+> pprInfixOcc c <+> ppr p2 | 158 | pprUserCon c (InfixCon p1 p2) = ppr p1 <+> pprInfixOcc c <+> ppr p2 | 67 | false | true | 0 | 8 | 26 | 67 | 32 | 35 | null | null |
brendanhay/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/Groups/List.hs | mpl-2.0 | -- | Required. The project
-- (https:\/\/cloud.google.com\/monitoring\/api\/v3#project_name) whose
-- groups are to be listed. The format is: projects\/[PROJECT_ID_OR_NUMBER]
pglName :: Lens' ProjectsGroupsList Text
pglName = lens _pglName (\ s a -> s{_pglName = a}) | 266 | pglName :: Lens' ProjectsGroupsList Text
pglName = lens _pglName (\ s a -> s{_pglName = a}) | 91 | pglName = lens _pglName (\ s a -> s{_pglName = a}) | 50 | true | true | 1 | 9 | 33 | 45 | 24 | 21 | null | null |
tibbe/event | src/System/Event/Control.hs | bsd-2-clause | setNonBlock :: CInt -> IO ()
setNonBlock fd =
#if __GLASGOW_HASKELL__ >= 611
setNonBlockingFD fd True | 103 | setNonBlock :: CInt -> IO ()
setNonBlock fd =
#if __GLASGOW_HASKELL__ >= 611
setNonBlockingFD fd True | 103 | setNonBlock fd =
#if __GLASGOW_HASKELL__ >= 611
setNonBlockingFD fd True | 74 | false | true | 0 | 8 | 17 | 35 | 15 | 20 | null | null |
smobs/elblog | server/app/Main.hs | bsd-3-clause | getGameHandler :: ReaderT ServerData Handler GameView
getGameHandler = do
ref <- ask
liftIO (atomically $ readTVar (gameViewRef ref)) | 138 | getGameHandler :: ReaderT ServerData Handler GameView
getGameHandler = do
ref <- ask
liftIO (atomically $ readTVar (gameViewRef ref)) | 138 | getGameHandler = do
ref <- ask
liftIO (atomically $ readTVar (gameViewRef ref)) | 84 | false | true | 0 | 12 | 22 | 47 | 22 | 25 | null | null |
tjakway/ghcjvm | compiler/prelude/PrelNames.hs | bsd-3-clause | selectorClassKey = mkPreludeClassUnique 41 | 45 | selectorClassKey = mkPreludeClassUnique 41 | 45 | selectorClassKey = mkPreludeClassUnique 41 | 45 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
AlexeyRaga/eta | compiler/ETA/DeSugar/DsForeign.hs | bsd-3-clause | genJavaFCall :: ForeignCall -> ExtendsInfo -> [Type] -> Either PrimRep (Maybe Type) -> Type -> ForeignCall
genJavaFCall (CCall (CCallSpec (StaticTarget label mPkgKey isFun) JavaCallConv safety))
extendsInfo argTypes eResType ioResType
= CCall (CCallSpec (StaticTarget (mkFastString label') mPkgKey isFun) ... | 959 | genJavaFCall :: ForeignCall -> ExtendsInfo -> [Type] -> Either PrimRep (Maybe Type) -> Type -> ForeignCall
genJavaFCall (CCall (CCallSpec (StaticTarget label mPkgKey isFun) JavaCallConv safety))
extendsInfo argTypes eResType ioResType
= CCall (CCallSpec (StaticTarget (mkFastString label') mPkgKey isFun) ... | 959 | genJavaFCall (CCall (CCallSpec (StaticTarget label mPkgKey isFun) JavaCallConv safety))
extendsInfo argTypes eResType ioResType
= CCall (CCallSpec (StaticTarget (mkFastString label') mPkgKey isFun) JavaCallConv safety)
where label' = serializeTarget hasObj hasSubclass (not (isJust mObj))
... | 852 | false | true | 3 | 13 | 246 | 321 | 159 | 162 | null | null |
ribag/ganeti-experiments | src/Ganeti/Locking/Locks.hs | gpl-2.0 | lockLevel :: GanetiLocks -> LockLevel
lockLevel BGL = LevelCluster | 66 | lockLevel :: GanetiLocks -> LockLevel
lockLevel BGL = LevelCluster | 66 | lockLevel BGL = LevelCluster | 28 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F08.hs | bsd-3-clause | ptr_glFragmentLightfvSGIX :: FunPtr (GLenum -> GLenum -> Ptr GLfloat -> IO ())
ptr_glFragmentLightfvSGIX = unsafePerformIO $ getCommand "glFragmentLightfvSGIX" | 159 | ptr_glFragmentLightfvSGIX :: FunPtr (GLenum -> GLenum -> Ptr GLfloat -> IO ())
ptr_glFragmentLightfvSGIX = unsafePerformIO $ getCommand "glFragmentLightfvSGIX" | 159 | ptr_glFragmentLightfvSGIX = unsafePerformIO $ getCommand "glFragmentLightfvSGIX" | 80 | false | true | 2 | 10 | 17 | 46 | 21 | 25 | null | null |
utsav2601/cmpe295A | tools/flounder/GHBackend.hs | mit | export_function :: String -> C.Unit
export_function n =
C.GVarDecl C.Extern C.NonConst
(C.Function C.NoScope (C.TypeName "errval_t") params) name Nothing
where
name = export_fn_name n
params = [ C.Param (C.Ptr $ C.TypeName "void") "st",
C.Param (C.Ptr $ C.TypeName "idc_e... | 566 | export_function :: String -> C.Unit
export_function n =
C.GVarDecl C.Extern C.NonConst
(C.Function C.NoScope (C.TypeName "errval_t") params) name Nothing
where
name = export_fn_name n
params = [ C.Param (C.Ptr $ C.TypeName "void") "st",
C.Param (C.Ptr $ C.TypeName "idc_e... | 566 | export_function n =
C.GVarDecl C.Extern C.NonConst
(C.Function C.NoScope (C.TypeName "errval_t") params) name Nothing
where
name = export_fn_name n
params = [ C.Param (C.Ptr $ C.TypeName "void") "st",
C.Param (C.Ptr $ C.TypeName "idc_export_callback_fn") "export_cb",
... | 530 | false | true | 1 | 11 | 155 | 194 | 96 | 98 | null | null |
bos/critbit | tests/Properties/Common.hs | bsd-2-clause | -- | Compares functions taking two scalars
(=??=) :: Eq' a b => (t -> s -> a) -> (t -> s -> b) -> k -> t -> s -> Property
f =??= g = const $ \t s -> f t s =^= g t s | 164 | (=??=) :: Eq' a b => (t -> s -> a) -> (t -> s -> b) -> k -> t -> s -> Property
f =??= g = const $ \t s -> f t s =^= g t s | 121 | f =??= g = const $ \t s -> f t s =^= g t s | 42 | true | true | 0 | 13 | 47 | 97 | 49 | 48 | null | null |
mrakgr/futhark | src/Futhark/Optimise/Simplifier/Engine.hs | bsd-3-clause | simplifyExtLambda :: MonadEngine m =>
ExtLambda (InnerLore m)
-> [SubExp]
-> [(LParam (Lore m), SE.ScalExp, SE.ScalExp)]
-> m (ExtLambda (Lore m))
simplifyExtLambda lam@(ExtLambda params body rettype) nes parbnds = do
params' <- mapM (simplify... | 1,310 | simplifyExtLambda :: MonadEngine m =>
ExtLambda (InnerLore m)
-> [SubExp]
-> [(LParam (Lore m), SE.ScalExp, SE.ScalExp)]
-> m (ExtLambda (Lore m))
simplifyExtLambda lam@(ExtLambda params body rettype) nes parbnds = do
params' <- mapM (simplify... | 1,310 | simplifyExtLambda lam@(ExtLambda params body rettype) nes parbnds = do
params' <- mapM (simplifyParam simplify) params
let paramnames = HS.fromList $ boundByExtLambda lam
rettype' <- mapM simplify rettype
par_blocker <- asksEngineEnv $ blockHoistPar . envHoistBlockers
body' <- enterLoop $
bindLPara... | 1,088 | false | true | 36 | 8 | 406 | 356 | 188 | 168 | null | null |
mettekou/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | isCompulsoryUnfolding :: Unfolding -> Bool
isCompulsoryUnfolding (CoreUnfolding { uf_src = InlineCompulsory }) = True | 117 | isCompulsoryUnfolding :: Unfolding -> Bool
isCompulsoryUnfolding (CoreUnfolding { uf_src = InlineCompulsory }) = True | 117 | isCompulsoryUnfolding (CoreUnfolding { uf_src = InlineCompulsory }) = True | 74 | false | true | 3 | 7 | 13 | 37 | 17 | 20 | null | null |
rad1al/hutton_exercises | notes_ch11.hs | gpl-2.0 | showPlayer X = [" ", " X ", " "] | 36 | showPlayer X = [" ", " X ", " "] | 36 | showPlayer X = [" ", " X ", " "] | 36 | false | false | 1 | 5 | 13 | 21 | 10 | 11 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 38709 = 5917 | 32 | getValueFromProduct 38709 = 5917 | 32 | getValueFromProduct 38709 = 5917 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/RTCPeerConnection.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/webkitRTCPeerConnection.signalingState Mozilla webkitRTCPeerConnection.signalingState documentation>
getSignalingState ::
(MonadDOM m) => RTCPeerConnection -> m RTCSignalingState
getSignalingState self
= liftDOM ((self ^. js "signalingState") >... | 342 | getSignalingState ::
(MonadDOM m) => RTCPeerConnection -> m RTCSignalingState
getSignalingState self
= liftDOM ((self ^. js "signalingState") >>= fromJSValUnchecked) | 185 | getSignalingState self
= liftDOM ((self ^. js "signalingState") >>= fromJSValUnchecked) | 89 | true | true | 0 | 10 | 45 | 51 | 26 | 25 | null | null |
ygale/yesod | yesod-test/Yesod/Test.hs | mit | bodyEquals :: String -> YesodExample site ()
bodyEquals text = withResponse $ \ res ->
liftIO $ HUnit.assertBool ("Expected body to equal " ++ text) $
(simpleBody res) == encodeUtf8 (TL.pack text) | 202 | bodyEquals :: String -> YesodExample site ()
bodyEquals text = withResponse $ \ res ->
liftIO $ HUnit.assertBool ("Expected body to equal " ++ text) $
(simpleBody res) == encodeUtf8 (TL.pack text) | 202 | bodyEquals text = withResponse $ \ res ->
liftIO $ HUnit.assertBool ("Expected body to equal " ++ text) $
(simpleBody res) == encodeUtf8 (TL.pack text) | 157 | false | true | 4 | 8 | 37 | 81 | 39 | 42 | null | null |
ocramz/petsc-hs | examples/Test2.hs | gpl-3.0 | -- PETSC_EXTERN PetscErrorCode VecGetArray(Vec,PetscScalar**);
vecGetArray'' v p = [C.exp|int{VecGetArray($(Vec v), $(PetscScalar** p))}|] | 139 | vecGetArray'' v p = [C.exp|int{VecGetArray($(Vec v), $(PetscScalar** p))}|] | 76 | vecGetArray'' v p = [C.exp|int{VecGetArray($(Vec v), $(PetscScalar** p))}|] | 76 | true | false | 0 | 5 | 12 | 18 | 11 | 7 | null | null |
leshchevds/ganeti | src/Ganeti/Hs2Py/OpDoc.hs | bsd-2-clause | opInstanceShutdown :: String
opInstanceShutdown =
"Shutdown an instance." | 75 | opInstanceShutdown :: String
opInstanceShutdown =
"Shutdown an instance." | 75 | opInstanceShutdown =
"Shutdown an instance." | 46 | false | true | 0 | 4 | 9 | 11 | 6 | 5 | null | null |
kawu/ltag | src/NLP/LTAG/Rule.hs | bsd-2-clause | keepRule :: Monad m => Rule n t i f a -> RM n t i f a m ()
-- keepRule = RWS.tell . (:[])
keepRule = P.yield | 108 | keepRule :: Monad m => Rule n t i f a -> RM n t i f a m ()
keepRule = P.yield | 77 | keepRule = P.yield | 18 | true | true | 0 | 9 | 28 | 59 | 27 | 32 | null | null |
5outh/wyas | Evaluator.hs | gpl-2.0 | strBoolBinop :: (String -> String -> Bool)
-> [LispVal]
-> Either LispError LispVal
strBoolBinop = boolBinop unpackStr | 144 | strBoolBinop :: (String -> String -> Bool)
-> [LispVal]
-> Either LispError LispVal
strBoolBinop = boolBinop unpackStr | 144 | strBoolBinop = boolBinop unpackStr | 34 | false | true | 0 | 8 | 42 | 41 | 21 | 20 | null | null |
mlite/hLLVM | src/Llvm/Pass/RewriteDef.hs | bsd-3-clause | rwConversion :: MaybeChange a -> MaybeChange (Conversion a)
rwConversion f (Conversion co tv1 t) = do { tv1' <- f tv1
; return $ Conversion co tv1' t
} | 235 | rwConversion :: MaybeChange a -> MaybeChange (Conversion a)
rwConversion f (Conversion co tv1 t) = do { tv1' <- f tv1
; return $ Conversion co tv1' t
} | 235 | rwConversion f (Conversion co tv1 t) = do { tv1' <- f tv1
; return $ Conversion co tv1' t
} | 175 | false | true | 0 | 8 | 112 | 74 | 34 | 40 | null | null |
green-haskell/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | undefinedName :: Name
undefinedName = mkWiredInIdName gHC_ERR (fsLit "undefined") undefinedKey uNDEFINED_ID | 107 | undefinedName :: Name
undefinedName = mkWiredInIdName gHC_ERR (fsLit "undefined") undefinedKey uNDEFINED_ID | 107 | undefinedName = mkWiredInIdName gHC_ERR (fsLit "undefined") undefinedKey uNDEFINED_ID | 85 | false | true | 0 | 7 | 10 | 26 | 13 | 13 | null | null |
Philonous/xml-picklers | src/Data/XML/Pickle.hs | bsd-3-clause | -- | 'xp2Tuple'.
(<#>) :: PU [a] b1 -> PU [a] b2 -> PU [a] (b1, b2)
(<#>) l r = "(<#>)" <??> xp2Tuple l r | 105 | (<#>) :: PU [a] b1 -> PU [a] b2 -> PU [a] (b1, b2)
(<#>) l r = "(<#>)" <??> xp2Tuple l r | 88 | (<#>) l r = "(<#>)" <??> xp2Tuple l r | 37 | true | true | 2 | 9 | 25 | 73 | 38 | 35 | null | null |
shlevy/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | isInfixFunBind :: HsBindLR id1 id2 -> Bool
isInfixFunBind (FunBind _ (MG matches _ _ _) _ _ _)
= any (isInfixMatch . unLoc) (unLoc matches) | 141 | isInfixFunBind :: HsBindLR id1 id2 -> Bool
isInfixFunBind (FunBind _ (MG matches _ _ _) _ _ _)
= any (isInfixMatch . unLoc) (unLoc matches) | 141 | isInfixFunBind (FunBind _ (MG matches _ _ _) _ _ _)
= any (isInfixMatch . unLoc) (unLoc matches) | 98 | false | true | 0 | 9 | 26 | 67 | 33 | 34 | null | null |
girving/duck | duck/ParseOps.hs | bsd-3-clause | prettyop f a = prettyap f a | 27 | prettyop f a = prettyap f a | 27 | prettyop f a = prettyap f a | 27 | false | false | 0 | 5 | 6 | 16 | 7 | 9 | null | null |
DavidAlphaFox/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | zapFragileIdInfo :: Id -> Id
zapFragileIdInfo = zapInfo zapFragileInfo | 70 | zapFragileIdInfo :: Id -> Id
zapFragileIdInfo = zapInfo zapFragileInfo | 70 | zapFragileIdInfo = zapInfo zapFragileInfo | 41 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
Proclivis/wxHaskell | samples/contrib/NotebookRight.hs | lgpl-2.1 | main :: IO ()
main
= start gui | 32 | main :: IO ()
main
= start gui | 32 | main
= start gui | 18 | false | true | 0 | 7 | 9 | 25 | 10 | 15 | null | null |
rfranek/duckling | Duckling/TimeGrain/IT/Rules.hs | bsd-3-clause | rules :: [Rule]
rules = map go grains
where
go (name, regexPattern, grain) = Rule
{ name = name
, pattern = [regex regexPattern]
, prod = \_ -> Just $ Token TimeGrain grain
} | 204 | rules :: [Rule]
rules = map go grains
where
go (name, regexPattern, grain) = Rule
{ name = name
, pattern = [regex regexPattern]
, prod = \_ -> Just $ Token TimeGrain grain
} | 204 | rules = map go grains
where
go (name, regexPattern, grain) = Rule
{ name = name
, pattern = [regex regexPattern]
, prod = \_ -> Just $ Token TimeGrain grain
} | 188 | false | true | 0 | 10 | 64 | 91 | 46 | 45 | null | null |
topliceanu/learn | haskell/countdown.hs | mit | -- sort the
isValid Sub x y = x > y | 35 | isValid Sub x y = x > y | 23 | isValid Sub x y = x > y | 23 | true | false | 3 | 5 | 10 | 25 | 9 | 16 | null | null |
lostbean/sledge | src/Texture/Bingham/Constant.hs | gpl-3.0 | -- | Numerical calculation of 4th partial derivative of the normalization constant.
computedFdz4 :: Double -> Double -> Double -> Double -> Double
computedFdz4 z1 z2 z3 z4 = (-1) * dC (U.fromList [0,0,0,1]) (U.fromList [-z1, -z2, -z3, -z4]) | 240 | computedFdz4 :: Double -> Double -> Double -> Double -> Double
computedFdz4 z1 z2 z3 z4 = (-1) * dC (U.fromList [0,0,0,1]) (U.fromList [-z1, -z2, -z3, -z4]) | 156 | computedFdz4 z1 z2 z3 z4 = (-1) * dC (U.fromList [0,0,0,1]) (U.fromList [-z1, -z2, -z3, -z4]) | 93 | true | true | 0 | 10 | 38 | 104 | 55 | 49 | null | null |
nevrenato/Hets_Fork | Interfaces/Command.hs | gpl-2.0 | mkSelectCmd :: SelectCmd -> Command
mkSelectCmd s = SelectCmd s "" | 66 | mkSelectCmd :: SelectCmd -> Command
mkSelectCmd s = SelectCmd s "" | 66 | mkSelectCmd s = SelectCmd s "" | 30 | false | true | 0 | 5 | 10 | 23 | 11 | 12 | null | null |
cocreature/leksah | src/IDE/SourceCandy.hs | gpl-2.0 | candyParser :: CharParser () CandyTableI
candyParser = do
whiteSpace
ls <- P.many oneCandyParser
eof
return ls | 128 | candyParser :: CharParser () CandyTableI
candyParser = do
whiteSpace
ls <- P.many oneCandyParser
eof
return ls | 128 | candyParser = do
whiteSpace
ls <- P.many oneCandyParser
eof
return ls | 87 | false | true | 0 | 9 | 33 | 42 | 18 | 24 | null | null |
remusao/Hodor | src/Language/Brainfuck/Internals/Optim/Cancel.hs | bsd-3-clause | combine :: (Int -> Instr) -> Int -> (Int -> Instr) -> Int -> Instr
combine f1 i1 f2 i2
| i1 == i2 = Nope
| i1 > i2 = f1 (i1 - i2)
| otherwise = f2 (i2 - i1) | 171 | combine :: (Int -> Instr) -> Int -> (Int -> Instr) -> Int -> Instr
combine f1 i1 f2 i2
| i1 == i2 = Nope
| i1 > i2 = f1 (i1 - i2)
| otherwise = f2 (i2 - i1) | 171 | combine f1 i1 f2 i2
| i1 == i2 = Nope
| i1 > i2 = f1 (i1 - i2)
| otherwise = f2 (i2 - i1) | 104 | false | true | 2 | 9 | 56 | 100 | 50 | 50 | null | null |
beni55/hscurses | UI/HSCurses/Logging.hs | lgpl-2.1 | formatTime :: IO String
formatTime =
do let fmt = "%Y-%m-%d %H:%M:%S"
clockT <- getClockTime
calTime <- toCalendarTime clockT
let maxSdecLen = 5
sdec' = show $ ctPicosec calTime
sdec = if length sdec' > maxSdecLen
then take maxSdecLen sdec'
... | 435 | formatTime :: IO String
formatTime =
do let fmt = "%Y-%m-%d %H:%M:%S"
clockT <- getClockTime
calTime <- toCalendarTime clockT
let maxSdecLen = 5
sdec' = show $ ctPicosec calTime
sdec = if length sdec' > maxSdecLen
then take maxSdecLen sdec'
... | 435 | formatTime =
do let fmt = "%Y-%m-%d %H:%M:%S"
clockT <- getClockTime
calTime <- toCalendarTime clockT
let maxSdecLen = 5
sdec' = show $ ctPicosec calTime
sdec = if length sdec' > maxSdecLen
then take maxSdecLen sdec'
else sdec'
... | 411 | false | true | 0 | 13 | 161 | 116 | 53 | 63 | null | null |
danse/haskellers | Foundation.hs | bsd-2-clause | fixBrowserId :: Creds App -> Handler ()
fixBrowserId creds
| credsPlugin creds == "browserid" = runDB $ do
liftIO $ putStrLn "here i am"
let email = credsIdent creds
x <- getBy $ UniqueIdent email
case x of
Just _ -> return ()
Nothing -> do
mu ... | 619 | fixBrowserId :: Creds App -> Handler ()
fixBrowserId creds
| credsPlugin creds == "browserid" = runDB $ do
liftIO $ putStrLn "here i am"
let email = credsIdent creds
x <- getBy $ UniqueIdent email
case x of
Just _ -> return ()
Nothing -> do
mu ... | 619 | fixBrowserId creds
| credsPlugin creds == "browserid" = runDB $ do
liftIO $ putStrLn "here i am"
let email = credsIdent creds
x <- getBy $ UniqueIdent email
case x of
Just _ -> return ()
Nothing -> do
mu <- selectList [UserEmail ==. Just email,... | 579 | false | true | 0 | 22 | 267 | 212 | 94 | 118 | null | null |
23Skidoo/snap-website | src/Main.hs | bsd-3-clause | main :: IO ()
main = serveSnaplet defaultConfig appInit | 55 | main :: IO ()
main = serveSnaplet defaultConfig appInit | 55 | main = serveSnaplet defaultConfig appInit | 41 | false | true | 0 | 6 | 8 | 21 | 10 | 11 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeTags.hs | mpl-2.0 | -- | The maximum number of results to return for the request in a single page. The
-- remaining results of the initial request can be seen by sending another
-- request with the returned 'NextToken' value. This value can be between 5 and
-- 1000; if 'MaxResults' is given a value larger than 1000, only 1000 results are
... | 447 | dtMaxResults :: Lens' DescribeTags (Maybe Int)
dtMaxResults = lens _dtMaxResults (\s a -> s { _dtMaxResults = a }) | 114 | dtMaxResults = lens _dtMaxResults (\s a -> s { _dtMaxResults = a }) | 67 | true | true | 0 | 9 | 79 | 50 | 29 | 21 | null | null |
bos/wreq | httpbin/HttpBin/Server.hs | bsd-3-clause | simpleAuth expect = do
req <- getRequest
case expect req of
Nothing -> modifyResponse $ setResponseCode 400
Just (expected, resp) ->
case getHeader "Authorization" (headers req) of
Nothing -> unauthorized
Just auth | auth == expected -> writeJSON $
... | 407 | simpleAuth expect = do
req <- getRequest
case expect req of
Nothing -> modifyResponse $ setResponseCode 400
Just (expected, resp) ->
case getHeader "Authorization" (headers req) of
Nothing -> unauthorized
Just auth | auth == expected -> writeJSON $
... | 407 | simpleAuth expect = do
req <- getRequest
case expect req of
Nothing -> modifyResponse $ setResponseCode 400
Just (expected, resp) ->
case getHeader "Authorization" (headers req) of
Nothing -> unauthorized
Just auth | auth == expected -> writeJSON $
... | 407 | false | false | 0 | 17 | 139 | 123 | 58 | 65 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_subshellAssignmentCheck6 = verifyTree subshellAssignmentCheck "( export lol=$(ls); ); echo $lol;" | 105 | prop_subshellAssignmentCheck6 = verifyTree subshellAssignmentCheck "( export lol=$(ls); ); echo $lol;" | 105 | prop_subshellAssignmentCheck6 = verifyTree subshellAssignmentCheck "( export lol=$(ls); ); echo $lol;" | 105 | false | false | 0 | 5 | 12 | 11 | 5 | 6 | null | null |
skogsbaer/HTF | Test/Framework/Preprocessor.hs | lgpl-2.1 | progName :: String
progName = "htfpp" | 37 | progName :: String
progName = "htfpp" | 37 | progName = "htfpp" | 18 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
urbanslug/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | deTagExpr (Coercion co) = Coercion co | 49 | deTagExpr (Coercion co) = Coercion co | 49 | deTagExpr (Coercion co) = Coercion co | 49 | false | false | 0 | 6 | 17 | 19 | 8 | 11 | null | null |
frantisekfarka/ghc-dsi | compiler/codeGen/StgCmmExtCode.hs | bsd-3-clause | emitAssign :: CmmReg -> CmmExpr -> CmmParse ()
emitAssign l r = code (F.emitAssign l r) | 88 | emitAssign :: CmmReg -> CmmExpr -> CmmParse ()
emitAssign l r = code (F.emitAssign l r) | 88 | emitAssign l r = code (F.emitAssign l r) | 40 | false | true | 0 | 9 | 16 | 47 | 21 | 26 | null | null |
kovach/web2 | src/REPL.hs | mit | freshActor :: SM Actor
freshActor = lift $ ActorObject <$> freshNode | 68 | freshActor :: SM Actor
freshActor = lift $ ActorObject <$> freshNode | 68 | freshActor = lift $ ActorObject <$> freshNode | 45 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
jeffwheeler/pointedlist | Data/List/PointedList.hs | bsd-3-clause | -- | Possibly delete the element at the focus, then move the element on the
-- right to the focus. If no element is on the right, focus on the element to
-- the left. If the deletion will cause the list to be empty, return
-- 'Nothing'.
deleteRight :: PointedList a -> Maybe (PointedList a)
deleteRight (PointedLis... | 344 | deleteRight :: PointedList a -> Maybe (PointedList a)
deleteRight (PointedList [] _ [] ) = Nothing | 101 | deleteRight (PointedList [] _ [] ) = Nothing | 47 | true | true | 0 | 8 | 72 | 52 | 26 | 26 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | voidPrimTyConKey = mkPreludeTyConUnique 57 | 65 | voidPrimTyConKey = mkPreludeTyConUnique 57 | 65 | voidPrimTyConKey = mkPreludeTyConUnique 57 | 65 | false | false | 0 | 5 | 26 | 9 | 4 | 5 | null | null |
aelve/Jane | Notes.hs | mit | newNote ::
(IO' m, DB' m) =>
[NID] → -- ^ Note's children.
Text → -- ^ Note's title.
m NID -- ^ Created note's 'NID'.
newNote s t = do
nid ← genNid
timeStamp ← liftIO' getZonedTime
let n = Note {
_nid = nid,
_subs = s,
_title ... | 532 | newNote ::
(IO' m, DB' m) =>
[NID] → -- ^ Note's children.
Text → -- ^ Note's title.
m NID
newNote s t = do
nid ← genNid
timeStamp ← liftIO' getZonedTime
let n = Note {
_nid = nid,
_subs = s,
_title = t,
_created = timeSt... | 492 | newNote s t = do
nid ← genNid
timeStamp ← liftIO' getZonedTime
let n = Note {
_nid = nid,
_subs = s,
_title = t,
_created = timeStamp,
_lastModified = timeStamp }
notes.at nid .= Just n
return nid
-- | Makes a note a child of another note... | 370 | true | true | 0 | 12 | 210 | 134 | 69 | 65 | null | null |
thalerjonathan/phd | thesis/code/concurrent/sugarscape/SugarScapeSTMTVar/src/Model.hs | gpl-3.0 | -- NOTE: this is specified in book page 33 where the initial endowments are set to 5-25
sugarEndowmentRangeStandard :: (Double, Double)
sugarEndowmentRangeStandard = (5.0, 25.0) | 177 | sugarEndowmentRangeStandard :: (Double, Double)
sugarEndowmentRangeStandard = (5.0, 25.0) | 89 | sugarEndowmentRangeStandard = (5.0, 25.0) | 41 | true | true | 0 | 7 | 24 | 31 | 16 | 15 | null | null |
SamirTalwar/advent-of-code | 2021/AOC_18_1.hs | mit | magnitude :: Number -> Int
magnitude (Value n) = n | 50 | magnitude :: Number -> Int
magnitude (Value n) = n | 50 | magnitude (Value n) = n | 23 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
input-output-hk/pos-haskell-prototype | wallet/test/unit/Test/Spec/Submission.hs | mit | specBody :: ProtocolMagic -> Spec
specBody pm = do
describe "Test wallet submission layer" $ do
it "supports addition of pending transactions" $
withMaxSuccess 5 $ forAll (genPurePair pm) $ \(unSTB -> (submission, toAdd)) ->
let currentSlot = submission ^. getCurrentSlot
... | 10,340 | specBody :: ProtocolMagic -> Spec
specBody pm = do
describe "Test wallet submission layer" $ do
it "supports addition of pending transactions" $
withMaxSuccess 5 $ forAll (genPurePair pm) $ \(unSTB -> (submission, toAdd)) ->
let currentSlot = submission ^. getCurrentSlot
... | 10,340 | specBody pm = do
describe "Test wallet submission layer" $ do
it "supports addition of pending transactions" $
withMaxSuccess 5 $ forAll (genPurePair pm) $ \(unSTB -> (submission, toAdd)) ->
let currentSlot = submission ^. getCurrentSlot
submission' = addPending' toA... | 10,306 | false | true | 0 | 40 | 3,930 | 2,400 | 1,242 | 1,158 | null | null |
ryantm/ghc | testsuite/tests/ffi/should_run/ffi009.hs | bsd-3-clause | manyArgsM12 :: FunTypeM12
manyArgsM12 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
((((((((((fromIntegral a1 * 31 + fromIntegral a2) * 31 +
fromIntegral a3) * 31 + fromIntegral a4) * 31 +
fromIntegral a5) * 31 + fromIntegral a6) * 31 +
fromIntegral a7) * 31 + fromIntegral ... | 448 | manyArgsM12 :: FunTypeM12
manyArgsM12 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
((((((((((fromIntegral a1 * 31 + fromIntegral a2) * 31 +
fromIntegral a3) * 31 + fromIntegral a4) * 31 +
fromIntegral a5) * 31 + fromIntegral a6) * 31 +
fromIntegral a7) * 31 + fromIntegral ... | 448 | manyArgsM12 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
((((((((((fromIntegral a1 * 31 + fromIntegral a2) * 31 +
fromIntegral a3) * 31 + fromIntegral a4) * 31 +
fromIntegral a5) * 31 + fromIntegral a6) * 31 +
fromIntegral a7) * 31 + fromIntegral a8) * 31 +
fr... | 422 | false | true | 4 | 35 | 163 | 203 | 93 | 110 | null | null |
vigoos/Farrago-OS | aura-master/aura-master/src/Aura/Flags.hs | gpl-2.0 | notSettingsFlag (TruncTail _) = False | 37 | notSettingsFlag (TruncTail _) = False | 37 | notSettingsFlag (TruncTail _) = False | 37 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
DATX02-17-26/DATX02-17-26 | libsrc/Norm/NormM.hs | gpl-2.0 | -- | 'withError': run a normalizer that can error.
-- If an error occurs, the starting term will be returned.
withError :: (HasError e m, Monad m') => NormArrT m a -> NormArrT m' a
withError = withErrorG id | 206 | withError :: (HasError e m, Monad m') => NormArrT m a -> NormArrT m' a
withError = withErrorG id | 96 | withError = withErrorG id | 25 | true | true | 0 | 8 | 38 | 53 | 25 | 28 | null | null |
ekmett/ghclive | prototypes/svgdemo/HintAjax.hs | bsd-3-clause | main :: IO()
main = scotty 3000 $ do
hint <- liftIO $ newHint
middleware logStdoutDev -- serves jquery.js and clock.js from static/
-- middleware $ staticPolicy (noDots >-> addBase "static") -- serves jquery.js and clock.js from static/ with scotty > 3
middleware $ staticRoot "static"
get "/"... | 799 | main :: IO()
main = scotty 3000 $ do
hint <- liftIO $ newHint
middleware logStdoutDev -- serves jquery.js and clock.js from static/
-- middleware $ staticPolicy (noDots >-> addBase "static") -- serves jquery.js and clock.js from static/ with scotty > 3
middleware $ staticRoot "static"
get "/"... | 799 | main = scotty 3000 $ do
hint <- liftIO $ newHint
middleware logStdoutDev -- serves jquery.js and clock.js from static/
-- middleware $ staticPolicy (noDots >-> addBase "static") -- serves jquery.js and clock.js from static/ with scotty > 3
middleware $ staticRoot "static"
get "/" $ file "hint... | 786 | false | true | 1 | 19 | 229 | 202 | 91 | 111 | null | null |
urv/fixhs | src/Data/FIX/Spec/FIX43.hs | lgpl-2.1 | tMDEntryID :: FIXTag
tMDEntryID = FIXTag
{ tName = "MDEntryID"
, tnum = 278
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 157 | tMDEntryID :: FIXTag
tMDEntryID = FIXTag
{ tName = "MDEntryID"
, tnum = 278
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 157 | tMDEntryID = FIXTag
{ tName = "MDEntryID"
, tnum = 278
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 136 | false | true | 0 | 8 | 37 | 45 | 26 | 19 | null | null |
elieux/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | -- | Desugar all other kind of bindings, Ids of strict binds are returned to
-- later be forced in the binding gorup body, see Note [Desugar Strict binds]
dsLHsBinds :: LHsBinds Id
-> DsM ([Id], [(Id,CoreExpr)])
dsLHsBinds binds = do { (force_vars, binds') <- ds_lhs_binds binds
; return... | 343 | dsLHsBinds :: LHsBinds Id
-> DsM ([Id], [(Id,CoreExpr)])
dsLHsBinds binds = do { (force_vars, binds') <- ds_lhs_binds binds
; return (force_vars, binds') } | 188 | dsLHsBinds binds = do { (force_vars, binds') <- ds_lhs_binds binds
; return (force_vars, binds') } | 120 | true | true | 0 | 10 | 84 | 80 | 43 | 37 | null | null |
ezyang/ghc | libraries/base/Data/Either.hs | bsd-3-clause | fromRight b _ = b | 25 | fromRight b _ = b | 25 | fromRight b _ = b | 25 | false | false | 0 | 5 | 12 | 11 | 5 | 6 | null | null |
TOSPIO/yi | src/library/Yi/Mode/Haskell.hs | gpl-2.0 | tokRegion :: Tok t -> Region
tokRegion t = mkRegion (tokBegin t) (tokEnd t) | 75 | tokRegion :: Tok t -> Region
tokRegion t = mkRegion (tokBegin t) (tokEnd t) | 75 | tokRegion t = mkRegion (tokBegin t) (tokEnd t) | 46 | false | true | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
bitemyapp/github | Github/Issues/Events.hs | bsd-3-clause | -- | Details on a specific event, by the event's ID.
--
-- > event "thoughtbot" "paperclip" 5335772
event :: String -> String -> Int -> IO (Either Error Event)
event user reqRepoName reqEventId =
githubGet ["repos", user, reqRepoName, "issues", "events", show reqEventId] | 273 | event :: String -> String -> Int -> IO (Either Error Event)
event user reqRepoName reqEventId =
githubGet ["repos", user, reqRepoName, "issues", "events", show reqEventId] | 173 | event user reqRepoName reqEventId =
githubGet ["repos", user, reqRepoName, "issues", "events", show reqEventId] | 113 | true | true | 0 | 10 | 44 | 72 | 38 | 34 | null | null |
kowey/GenI | geni-gui/src/NLP/GenI/GraphvizShow.hs | gpl-2.0 | gvDerivationLab :: T.Text -> TL.Text
gvDerivationLab xs = "Derivation" `TL.append` gvMunge xs | 93 | gvDerivationLab :: T.Text -> TL.Text
gvDerivationLab xs = "Derivation" `TL.append` gvMunge xs | 93 | gvDerivationLab xs = "Derivation" `TL.append` gvMunge xs | 56 | false | true | 0 | 6 | 11 | 33 | 17 | 16 | null | null |
Tosainu/pwn.hs | src/Pwn/Tubes/SSH.hs | mit | defaultSSHConfig :: SSHConfig
defaultSSHConfig = SSHConfig
{ port = 22
, password = ""
, keyFile = Nothing
} | 121 | defaultSSHConfig :: SSHConfig
defaultSSHConfig = SSHConfig
{ port = 22
, password = ""
, keyFile = Nothing
} | 121 | defaultSSHConfig = SSHConfig
{ port = 22
, password = ""
, keyFile = Nothing
} | 91 | false | true | 0 | 7 | 31 | 35 | 20 | 15 | null | null |
google/codeworld | codeworld-api/src/CodeWorld/Picture.hs | apache-2.0 | -- | Reflects a given point across a line through the origin at this
-- angle, in radians. For example, an angle of 0 reflects the point
-- vertically across the x axis, while an angle of @pi / 2@ reflects the
-- point horizontally across the y axis.
reflectedPoint :: Double -> Point -> Point
reflectedPoint th (x, y) ... | 563 | reflectedPoint :: Double -> Point -> Point
reflectedPoint th (x, y) = (x * cos a + y * sin a, x * sin a - y * cos a)
where
a = 2 * th
-- | Scales a given point by given x and y scaling factor. Scaling by a
-- negative factor also reflects across that axis.
--
-- >>> scaledPoint 2 3 (10, 10)
-- (20, 30) | 311 | reflectedPoint th (x, y) = (x * cos a + y * sin a, x * sin a - y * cos a)
where
a = 2 * th
-- | Scales a given point by given x and y scaling factor. Scaling by a
-- negative factor also reflects across that axis.
--
-- >>> scaledPoint 2 3 (10, 10)
-- (20, 30) | 268 | true | true | 0 | 9 | 128 | 93 | 51 | 42 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/Cello.hs | bsd-3-clause | note10 :: Note
note10 = Note
(Pitch 116.541 34 "a#2")
11
(Range
(NoteRange
(NoteRangeAmplitude 10022.52 86 9.0e-2)
(NoteRangeHarmonicFreq 1 116.54))
(NoteRange
(NoteRangeAmplitude 233.08 2 1692.0)
(NoteRangeHarmonicFreq 86 10022.52)))
[Harm... | 2,866 | note10 :: Note
note10 = Note
(Pitch 116.541 34 "a#2")
11
(Range
(NoteRange
(NoteRangeAmplitude 10022.52 86 9.0e-2)
(NoteRangeHarmonicFreq 1 116.54))
(NoteRange
(NoteRangeAmplitude 233.08 2 1692.0)
(NoteRangeHarmonicFreq 86 10022.52)))
[Harm... | 2,866 | note10 = Note
(Pitch 116.541 34 "a#2")
11
(Range
(NoteRange
(NoteRangeAmplitude 10022.52 86 9.0e-2)
(NoteRangeHarmonicFreq 1 116.54))
(NoteRange
(NoteRangeAmplitude 233.08 2 1692.0)
(NoteRangeHarmonicFreq 86 10022.52)))
[Harmonic 1 (-1.385)... | 2,851 | false | true | 0 | 10 | 791 | 1,174 | 605 | 569 | null | null |
vigoo/stack | src/Stack/Config/Docker.hs | bsd-3-clause | -- | Interprets DockerOptsMonoid options.
dockerOptsFromMonoid
:: MonadThrow m
=> Maybe Project -> Path Abs Dir -> DockerOptsMonoid -> m DockerOpts
dockerOptsFromMonoid mproject stackRoot DockerOptsMonoid{..} = do
let dockerEnable =
fromMaybe dockerMonoidDefaultEnable dockerMonoidEnable
... | 2,913 | dockerOptsFromMonoid
:: MonadThrow m
=> Maybe Project -> Path Abs Dir -> DockerOptsMonoid -> m DockerOpts
dockerOptsFromMonoid mproject stackRoot DockerOptsMonoid{..} = do
let dockerEnable =
fromMaybe dockerMonoidDefaultEnable dockerMonoidEnable
dockerImage =
let defaultTag =... | 2,871 | dockerOptsFromMonoid mproject stackRoot DockerOptsMonoid{..} = do
let dockerEnable =
fromMaybe dockerMonoidDefaultEnable dockerMonoidEnable
dockerImage =
let defaultTag =
case mproject of
Nothing -> ""
Just proj ->
... | 2,757 | true | true | 1 | 23 | 1,119 | 534 | 257 | 277 | null | null |
sinelaw/HOpenCV | src/AI/CV/OpenCV/ImgProc.hs | gpl-2.0 | fromCvtColorFlag Luv2LRGB = 81 | 34 | fromCvtColorFlag Luv2LRGB = 81 | 34 | fromCvtColorFlag Luv2LRGB = 81 | 34 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/ExtensionPredicates.hs | bsd-3-clause | -- | Is the <https://www.opengl.org/registry/specs/NV/mesh_shader.txt NV_mesh_shader> extension supported?
glGetNVMeshShader :: MonadIO m => m Bool
glGetNVMeshShader = getExtensions >>= (return . member "GL_NV_mesh_shader") | 223 | glGetNVMeshShader :: MonadIO m => m Bool
glGetNVMeshShader = getExtensions >>= (return . member "GL_NV_mesh_shader") | 116 | glGetNVMeshShader = getExtensions >>= (return . member "GL_NV_mesh_shader") | 75 | true | true | 0 | 8 | 22 | 36 | 18 | 18 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/TableDefinition.hs | mit | {- |
Returns the primary key for the table, as defined at construction via 'mkTableDefinition'.
-}
tablePrimaryKey :: TableDefinition (HasKey key) writeEntity readEntity -> PrimaryKey key
tablePrimaryKey def =
case _tablePrimaryKey def of
TableHasKey primaryKey -> primaryKey
{- |
Returns the marshaller for t... | 384 | tablePrimaryKey :: TableDefinition (HasKey key) writeEntity readEntity -> PrimaryKey key
tablePrimaryKey def =
case _tablePrimaryKey def of
TableHasKey primaryKey -> primaryKey
{- |
Returns the marshaller for the table, as defined at construction via 'mkTableDefinition'.
-} | 283 | tablePrimaryKey def =
case _tablePrimaryKey def of
TableHasKey primaryKey -> primaryKey
{- |
Returns the marshaller for the table, as defined at construction via 'mkTableDefinition'.
-} | 194 | true | true | 0 | 8 | 62 | 52 | 25 | 27 | null | null |
xicesky/sky-haskell-playground | src/Sky/Parsing/Invertible2.hs | bsd-3-clause | digit :: Syntax' Char Char
digit = Token id $ tokenSet "0123456789" | 67 | digit :: Syntax' Char Char
digit = Token id $ tokenSet "0123456789" | 67 | digit = Token id $ tokenSet "0123456789" | 40 | false | true | 0 | 6 | 11 | 26 | 12 | 14 | null | null |
jekor/templatepg | Database/TemplatePG/Types.hs | mit | -- text
-- as with ints, sacrificing precision/safety for floats
pgTypeFromOID 700 = PGReal | 92 | pgTypeFromOID 700 = PGReal | 27 | pgTypeFromOID 700 = PGReal | 27 | true | false | 0 | 5 | 14 | 11 | 6 | 5 | null | null |
mcschroeder/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickHsExpr (ExplicitPArr ty es) =
liftM2 ExplicitPArr
(return ty)
(mapM (addTickLHsExpr) es) | 135 | addTickHsExpr (ExplicitPArr ty es) =
liftM2 ExplicitPArr
(return ty)
(mapM (addTickLHsExpr) es) | 135 | addTickHsExpr (ExplicitPArr ty es) =
liftM2 ExplicitPArr
(return ty)
(mapM (addTickLHsExpr) es) | 135 | false | false | 0 | 7 | 51 | 44 | 20 | 24 | null | null |
scast/bigbrother | src/Table.hs | gpl-2.0 | typename (P.ReferenceTo x ) = typename x | 40 | typename (P.ReferenceTo x ) = typename x | 40 | typename (P.ReferenceTo x ) = typename x | 40 | false | false | 0 | 8 | 6 | 20 | 9 | 11 | null | null |
TomMD/cryptol | src/Cryptol/Transform/Specialize.hs | bsd-3-clause | specializeConst :: Expr -> M Expr
specializeConst e0 = do
let (e1, n) = destEProofApps e0
let (e2, ts) = destETApps e1
case e2 of
EVar qname ->
do cache <- getSpecCache
case Map.lookup qname cache of
Nothing -> return e0 -- Primitive/unspecializable variable; leave it alone
... | 1,154 | specializeConst :: Expr -> M Expr
specializeConst e0 = do
let (e1, n) = destEProofApps e0
let (e2, ts) = destETApps e1
case e2 of
EVar qname ->
do cache <- getSpecCache
case Map.lookup qname cache of
Nothing -> return e0 -- Primitive/unspecializable variable; leave it alone
... | 1,154 | specializeConst e0 = do
let (e1, n) = destEProofApps e0
let (e2, ts) = destETApps e1
case e2 of
EVar qname ->
do cache <- getSpecCache
case Map.lookup qname cache of
Nothing -> return e0 -- Primitive/unspecializable variable; leave it alone
Just (decl, tm) ->
... | 1,120 | false | true | 0 | 29 | 364 | 346 | 168 | 178 | null | null |
schell/odin | odin-engine/src/Control/Monad/Trans/NextT.hs | mit | -- | Runs both evented computations (left and then right) each frame and returns
-- the first computation that completes.
withEither :: MonadNext m => m a -> m b -> m (Either a b)
withEither ea eb = ((,) <$> runNext ea <*> runNext eb) >>= \case
( Left a, _) -> done $ Left a
( _, Left b) -> done $ Right ... | 486 | withEither :: MonadNext m => m a -> m b -> m (Either a b)
withEither ea eb = ((,) <$> runNext ea <*> runNext eb) >>= \case
( Left a, _) -> done $ Left a
( _, Left b) -> done $ Right b
(Right a, Right b) -> next $ withEither a b
-- | Runs all evented computations (left to right) on each frame and retu... | 364 | withEither ea eb = ((,) <$> runNext ea <*> runNext eb) >>= \case
( Left a, _) -> done $ Left a
( _, Left b) -> done $ Right b
(Right a, Right b) -> next $ withEither a b
-- | Runs all evented computations (left to right) on each frame and returns
-- the first computation that completes. | 306 | true | true | 0 | 11 | 114 | 154 | 75 | 79 | null | null |
Daniel-Diaz/FTPLine | Main.hs | bsd-3-clause | lastConn :: FTPLine ()
lastConn
= hand
(const $
withColor Red $ outputStrLn "Last connection doesn't exist.")
$
do appDir <- liftIO ftpLineDir
lc <- liftIO $ readFile $ appDir ++ "/LastConnection"
_ <- (liftIO $ readIO lc) >>= uncurry connect
outputStrLn "Last con... | 624 | lastConn :: FTPLine ()
lastConn
= hand
(const $
withColor Red $ outputStrLn "Last connection doesn't exist.")
$
do appDir <- liftIO ftpLineDir
lc <- liftIO $ readFile $ appDir ++ "/LastConnection"
_ <- (liftIO $ readIO lc) >>= uncurry connect
outputStrLn "Last con... | 624 | lastConn
= hand
(const $
withColor Red $ outputStrLn "Last connection doesn't exist.")
$
do appDir <- liftIO ftpLineDir
lc <- liftIO $ readFile $ appDir ++ "/LastConnection"
_ <- (liftIO $ readIO lc) >>= uncurry connect
outputStrLn "Last connection reestablished."... | 601 | false | true | 0 | 16 | 206 | 178 | 80 | 98 | null | null |
elginer/Delve | src/Symbol.hs | gpl-3.0 | -- render a path, OO-style
render_path :: [ Symbol ] -> Symbol
render_path path =
L.foldl B.append B.empty ( L.intersperse ( B.singleton '.' ) path ) | 153 | render_path :: [ Symbol ] -> Symbol
render_path path =
L.foldl B.append B.empty ( L.intersperse ( B.singleton '.' ) path ) | 126 | render_path path =
L.foldl B.append B.empty ( L.intersperse ( B.singleton '.' ) path ) | 90 | true | true | 0 | 10 | 29 | 53 | 27 | 26 | null | null |
kawamuray/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | cryptoTypeSsh :: String
cryptoTypeSsh = "ssh" | 45 | cryptoTypeSsh :: String
cryptoTypeSsh = "ssh" | 45 | cryptoTypeSsh = "ssh" | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
dikmax/haskell-blog | src/XmlHtmlWriter.hs | bsd-2-clause | writeRawInline (Strong inline) = do
inlines <- concatRawInlines inline
return ("<strong>" `T.append` inlines `T.append` "</strong>") | 136 | writeRawInline (Strong inline) = do
inlines <- concatRawInlines inline
return ("<strong>" `T.append` inlines `T.append` "</strong>") | 136 | writeRawInline (Strong inline) = do
inlines <- concatRawInlines inline
return ("<strong>" `T.append` inlines `T.append` "</strong>") | 136 | false | false | 0 | 10 | 18 | 50 | 25 | 25 | null | null |
pparkkin/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo ReadArrayArrayOp_MutableArrayArray = mkGenPrimOp (fsLit "readMutableArrayArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayArrayPrimTy deltaTy])) | 267 | primOpInfo ReadArrayArrayOp_MutableArrayArray = mkGenPrimOp (fsLit "readMutableArrayArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayArrayPrimTy deltaTy])) | 267 | primOpInfo ReadArrayArrayOp_MutableArrayArray = mkGenPrimOp (fsLit "readMutableArrayArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayArrayPrimTy deltaTy])) | 267 | false | false | 0 | 10 | 18 | 65 | 33 | 32 | null | null |
spacekitteh/smcghc | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | extendSExpr rep x = CmmMachOp (MO_SS_Conv rep W32) [x] | 54 | extendSExpr rep x = CmmMachOp (MO_SS_Conv rep W32) [x] | 54 | extendSExpr rep x = CmmMachOp (MO_SS_Conv rep W32) [x] | 54 | false | false | 1 | 7 | 8 | 31 | 13 | 18 | null | null |
jfischoff/modulespection | src/Language/Haskell/TH/Module/Magic.hs | bsd-3-clause | -- | Parse a file and collect all of the declarations names
parseFile :: GhcMonad m => DynFlags -> FilePath -> m [TH.Name]
parseFile dflags filePath = do
src <- liftIO $ readFile filePath
let (warns, L _ hsModule) =
either (error . errString) id
$ parser src dflags filePath
... | 446 | parseFile :: GhcMonad m => DynFlags -> FilePath -> m [TH.Name]
parseFile dflags filePath = do
src <- liftIO $ readFile filePath
let (warns, L _ hsModule) =
either (error . errString) id
$ parser src dflags filePath
names = mapMaybe getNameMaybe... | 386 | parseFile dflags filePath = do
src <- liftIO $ readFile filePath
let (warns, L _ hsModule) =
either (error . errString) id
$ parser src dflags filePath
names = mapMaybe getNameMaybe $ hsmodDecls hsModule
return $ map rdrNameToName na... | 323 | true | true | 0 | 13 | 148 | 125 | 59 | 66 | null | null |
spacekitteh/smcghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@
fFlags :: [FlagSpec GeneralFlag]
fFlags = [
( "error-spans", Opt_ErrorSpans, nop ),
( "print-explicit-foralls", Opt_PrintExplicitForalls, nop ),
( "print-explicit-kinds", Opt_PrintExplicitKinds, nop )... | 4,938 | fFlags :: [FlagSpec GeneralFlag]
fFlags = [
( "error-spans", Opt_ErrorSpans, nop ),
( "print-explicit-foralls", Opt_PrintExplicitForalls, nop ),
( "print-explicit-kinds", Opt_PrintExplicitKinds, nop ),
( "call-arity", Opt_CallArity, nop ),
( "st... | 4,867 | fFlags = [
( "error-spans", Opt_ErrorSpans, nop ),
( "print-explicit-foralls", Opt_PrintExplicitForalls, nop ),
( "print-explicit-kinds", Opt_PrintExplicitKinds, nop ),
( "call-arity", Opt_CallArity, nop ),
( "strictness", ... | 4,834 | true | true | 0 | 8 | 1,723 | 871 | 577 | 294 | null | null |
MaxGabriel/yesod | yesod-core/Yesod/Core/Handler.hs | mit | validCsrf (Just _token) Nothing = False | 43 | validCsrf (Just _token) Nothing = False | 43 | validCsrf (Just _token) Nothing = False | 43 | false | false | 0 | 7 | 9 | 17 | 8 | 9 | null | null |
RossMeikleham/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LSHL ITChar) [l, r] = doOp v (LSHL ITNative) [l, r] | 59 | doOp v (LSHL ITChar) [l, r] = doOp v (LSHL ITNative) [l, r] | 59 | doOp v (LSHL ITChar) [l, r] = doOp v (LSHL ITNative) [l, r] | 59 | false | false | 0 | 7 | 12 | 44 | 23 | 21 | null | null |
alicemaz/advent2016 | One.hs | bsd-3-clause | step S (x, y) m = (x, y - m) | 28 | step S (x, y) m = (x, y - m) | 28 | step S (x, y) m = (x, y - m) | 28 | false | false | 1 | 7 | 9 | 35 | 16 | 19 | null | null |
marcmo/hsDiagnosis | src/Diag/Config.hs | bsd-3-clause | defaultConfigFile :: IO String
defaultConfigFile = do home <- System.Directory.getUserDocumentsDirectory
return $ home ++ "/.hsDiagnosis/config.cfg" | 172 | defaultConfigFile :: IO String
defaultConfigFile = do home <- System.Directory.getUserDocumentsDirectory
return $ home ++ "/.hsDiagnosis/config.cfg" | 172 | defaultConfigFile = do home <- System.Directory.getUserDocumentsDirectory
return $ home ++ "/.hsDiagnosis/config.cfg" | 140 | false | true | 0 | 8 | 38 | 35 | 17 | 18 | null | null |
adamse/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | rdrDocToLaTeX :: Doc RdrName -> LaTeX
rdrDocToLaTeX doc = markup rdrLatexMarkup doc Plain | 89 | rdrDocToLaTeX :: Doc RdrName -> LaTeX
rdrDocToLaTeX doc = markup rdrLatexMarkup doc Plain | 89 | rdrDocToLaTeX doc = markup rdrLatexMarkup doc Plain | 51 | false | true | 0 | 7 | 12 | 33 | 14 | 19 | null | null |
danfran/feed | src/Text/RSS1/Export.hs | bsd-3-clause | xmlChannel :: Channel -> XML.Element
xmlChannel ch =
(qualNode (rss10NS,Nothing) "channel" $ map Elem $
([ xmlLeaf (rss10NS,Nothing) "title" (channelTitle ch)
, xmlLeaf (rss10NS,Nothing) "link" (channelLink ch)
, xmlLeaf (rss10NS,Nothing) "description" (channelDesc ch)
] ++
mb xmlText... | 921 | xmlChannel :: Channel -> XML.Element
xmlChannel ch =
(qualNode (rss10NS,Nothing) "channel" $ map Elem $
([ xmlLeaf (rss10NS,Nothing) "title" (channelTitle ch)
, xmlLeaf (rss10NS,Nothing) "link" (channelLink ch)
, xmlLeaf (rss10NS,Nothing) "description" (channelDesc ch)
] ++
mb xmlText... | 921 | xmlChannel ch =
(qualNode (rss10NS,Nothing) "channel" $ map Elem $
([ xmlLeaf (rss10NS,Nothing) "title" (channelTitle ch)
, xmlLeaf (rss10NS,Nothing) "link" (channelLink ch)
, xmlLeaf (rss10NS,Nothing) "description" (channelDesc ch)
] ++
mb xmlTextInputURI (channelTextInputURI ch) ++
... | 884 | false | true | 0 | 19 | 241 | 315 | 159 | 156 | null | null |
frasertweedale/freebsd-update-repair | src/Main.hs | mit | main :: IO ()
main = join $ execParser (info commands mempty) | 61 | main :: IO ()
main = join $ execParser (info commands mempty) | 61 | main = join $ execParser (info commands mempty) | 47 | false | true | 0 | 8 | 11 | 31 | 15 | 16 | null | null |
urbanslug/ghc | libraries/base/GHC/Conc/Sync.hs | bsd-3-clause | -- | A variant of 'throw' that can only be used within the 'STM' monad.
--
-- Throwing an exception in @STM@ aborts the transaction and propagates the
-- exception.
--
-- Although 'throwSTM' has a type that is an instance of the type of 'throw', the
-- two functions are subtly different:
--
-- > throw e `seq` x ===... | 867 | throwSTM :: Exception e => e -> STM a
throwSTM e = STM $ raiseIO# (toException e) | 81 | throwSTM e = STM $ raiseIO# (toException e) | 43 | true | true | 0 | 8 | 168 | 59 | 37 | 22 | null | null |
csierra/didactic-upgrade-monads | src/Upgrade/Util.hs | gpl-2.0 | runSqlite3 :: DBCmd () SqlValue -> IO ()
runSqlite3 upgrade =
bracket (connectSqlite3 "upgrade.db") close runUpgrade
where close c = commit c >> disconnect c
runUpgrade = runReaderT upgrade . sqlite3Context | 224 | runSqlite3 :: DBCmd () SqlValue -> IO ()
runSqlite3 upgrade =
bracket (connectSqlite3 "upgrade.db") close runUpgrade
where close c = commit c >> disconnect c
runUpgrade = runReaderT upgrade . sqlite3Context | 224 | runSqlite3 upgrade =
bracket (connectSqlite3 "upgrade.db") close runUpgrade
where close c = commit c >> disconnect c
runUpgrade = runReaderT upgrade . sqlite3Context | 183 | false | true | 3 | 8 | 48 | 85 | 36 | 49 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.