Copyright | (c) Julian Ospald 2020 |
---|---|
License | LGPL-3.0 |
Maintainer | hasufell@hasufell.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
GHCup specific prelude. Lots of Excepts functionality.
Synopsis
- catchWarn :: forall es m env. (Pretty (V es), MonadReader env m, HasLog env, MonadIO m, Monad m) => Excepts es m () -> Excepts '[] m ()
- runBothE' :: forall e m a b. (Monad m, Show (V e), Pretty (V e), PopVariant InstallSetError e, LiftVariant' e (InstallSetError ': e), e :<< (InstallSetError ': e)) => Excepts e m a -> Excepts e m b -> Excepts (InstallSetError ': e) m ()
- throwSomeE :: forall es' es a m. (Monad m, LiftVariant es' es) => V es' -> Excepts es m a
- module GHCup.Prelude.Internal
- enableAnsiSupport :: IO (Either String Bool)
- isWindows :: Bool
- isNotWindows :: Bool
Documentation
catchWarn :: forall es m env. (Pretty (V es), MonadReader env m, HasLog env, MonadIO m, Monad m) => Excepts es m () -> Excepts '[] m () Source #
runBothE' :: forall e m a b. (Monad m, Show (V e), Pretty (V e), PopVariant InstallSetError e, LiftVariant' e (InstallSetError ': e), e :<< (InstallSetError ': e)) => Excepts e m a -> Excepts e m b -> Excepts (InstallSetError ': e) m () Source #
throwSomeE :: forall es' es a m. (Monad m, LiftVariant es' es) => V es' -> Excepts es m a Source #
Throw some exception
module GHCup.Prelude.Internal
enableAnsiSupport :: IO (Either String Bool) Source #
Enables ANSI support on windows, does nothing on unix.
Returns 'Left str' on errors and 'Right bool' on success, where
bool
markes whether ansi support was already enabled.
This function never crashes.
Rip-off of https://docs.rs/ansi_term/0.12.1/x86_64-pc-windows-msvc/src/ansi_term/windows.rs.html#10-61
isNotWindows :: Bool Source #