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

GHCup.Prelude

Description

GHCup specific prelude. Lots of Excepts functionality.

Synopsis

Documentation

catchWarn :: forall es m env. (Pretty (V es), HFErrorProject (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), 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 #

addToPath Source #

Arguments

:: [FilePath] 
-> Bool

if False will prepend

-> IO [(String, String)] 

addToPath' Source #

Arguments

:: [(String, String)] 
-> [FilePath] 
-> Bool

if False will prepend

-> [(String, String)] 

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