| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Dojang.App
Description
The application monad for Dojang.
Synopsis
- data (MonadFileSystem i, MonadError IOError i, MonadIO i) => App (i :: Type -> Type) v
- data AppEnv = AppEnv {}
- data Loc
- data LogLevel
- type LogSource = Text
- data LogStr
- currentEnvironment' :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i Environment
- doesManifestExist :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i Bool
- ensureContext :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i (Context (App i))
- ensureRepository :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i Repository
- loadManifest :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i (Either Error (Maybe Manifest))
- loadRepository :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i (Either Error (Maybe Repository))
- lookupEnv' :: (MonadFileSystem i, MonadIO i) => EnvironmentVariable -> i (Maybe OsString)
- runAppWithLogging :: (MonadFileSystem i, MonadIO i) => AppEnv -> App i a -> (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) -> i a
- runAppWithStderrLogging :: (MonadFileSystem i, MonadIO i) => AppEnv -> App i a -> i a
- runAppWithoutLogging :: (MonadFileSystem i, MonadIO i) => AppEnv -> App i a -> i a
- saveManifest :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => Manifest -> App i OsPath
Documentation
data (MonadFileSystem i, MonadError IOError i, MonadIO i) => App (i :: Type -> Type) v Source #
The application monad for Dojang.
Instances
The environment for the application monad.
Constructors
| AppEnv | |
Fields
| |
Instances
| Data Loc | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Loc -> c Loc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Loc # dataTypeOf :: Loc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Loc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Loc) # gmapT :: (forall b. Data b => b -> b) -> Loc -> Loc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r # gmapQ :: (forall d. Data d => d -> u) -> Loc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Loc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Loc -> m Loc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc # | |||||
| Generic Loc | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
| |||||
| Show Loc | |||||
| Eq Loc | |||||
| Ord Loc | |||||
| type Rep Loc | |||||
Defined in Language.Haskell.TH.Syntax type Rep Loc = D1 ('MetaData "Loc" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "Loc" 'PrefixI 'True) ((S1 ('MetaSel ('Just "loc_filename") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "loc_package") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "loc_module") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "loc_start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CharPos) :*: S1 ('MetaSel ('Just "loc_end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CharPos))))) | |||||
Log message builder. Use (<>) to append two LogStr in O(1).
currentEnvironment' :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i Environment Source #
doesManifestExist :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i Bool Source #
ensureContext :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i (Context (App i)) Source #
ensureRepository :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i Repository Source #
loadManifest :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i (Either Error (Maybe Manifest)) Source #
loadRepository :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => App i (Either Error (Maybe Repository)) Source #
lookupEnv' :: (MonadFileSystem i, MonadIO i) => EnvironmentVariable -> i (Maybe OsString) Source #
runAppWithLogging :: (MonadFileSystem i, MonadIO i) => AppEnv -> App i a -> (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) -> i a Source #
Run the application monad with logging handled by the given function.
runAppWithStderrLogging :: (MonadFileSystem i, MonadIO i) => AppEnv -> App i a -> i a Source #
Run the application monad with logging to stderr.
runAppWithoutLogging :: (MonadFileSystem i, MonadIO i) => AppEnv -> App i a -> i a Source #
saveManifest :: forall (i :: Type -> Type). (MonadFileSystem i, MonadIO i) => Manifest -> App i OsPath Source #