Copyright | (c) Julian Ospald 2020 |
---|---|
License | LGPL-3.0 |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
GHCup.Prelude
Description
GHCup specific prelude. Lots of Excepts functionality.
Synopsis
- catchWarn :: forall (es :: [Type]) (m :: Type -> Type) env. (Pretty (V es), HFErrorProject (V es), MonadReader env m, HasLog env, MonadIO m, Monad m) => Excepts es m () -> Excepts ('[] :: [Type]) m ()
- runBothE' :: forall (e :: [Type]) (m :: Type -> Type) a b. (Monad m, Show (V e), Pretty (V e), HFErrorProject (V e), PopVariant InstallSetError e, LiftVariant' e (InstallSetError ': e), e :<< (InstallSetError ': e)) => Excepts e m a -> Excepts e m b -> Excepts (InstallSetError ': e) m ()
- addToPath :: [FilePath] -> Bool -> IO [(String, String)]
- addToPath' :: [(String, String)] -> [FilePath] -> Bool -> [(String, String)]
- module GHCup.Prelude.Internal
- isWindows :: Bool
- enableAnsiSupport :: IO (Either String Bool)
- isNotWindows :: Bool
Documentation
catchWarn :: forall (es :: [Type]) (m :: Type -> Type) env. (Pretty (V es), HFErrorProject (V es), MonadReader env m, HasLog env, MonadIO m, Monad m) => Excepts es m () -> Excepts ('[] :: [Type]) m () Source #
runBothE' :: forall (e :: [Type]) (m :: Type -> Type) a b. (Monad m, Show (V e), Pretty (V e), HFErrorProject (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 #
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 #