ghcup-0.1.18.0: ghc toolchain installer
Copyright(c) Julian Ospald 2020
LicenseLGPL-3.0
Maintainerhasufell@hasufell.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

GHCup.Prelude

Description

GHCup specific prelude. Lots of Excepts functionality.

Synopsis

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

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