The system-lifted package

[Tags:bsd3, library, program]

Lifted versions of functions provided in System.Directory, System.Environment and others. User can derive instances for EitherT, ErrorT, MaybeT, etc.

[Skip to Readme]


Dependencies base (>=4.6 && <5.0), directory (==1.2.*), either (>=4.1 && <4.4), haskell-src-meta (>= && <0.7), template-haskell (>=2.8 && <2.10), text (>=0.11.3 && <1.4), time (>=1.4.0 && <1.5), transformers (>=0.3 && <0.5), unix (>=2.6 && <2.8) [details]
License BSD3
Author João Cristóvão
Stability Unknown
Category System
Home page
Uploaded Fri May 30 14:58:55 UTC 2014 by jcristovao
Distributions NixOS:
Downloads 289 total (4 in the last 30 days)
0 []
Status Docs not available [build log]
Last success reported on 2015-05-21 [all 7 reports]


  • System
    • Directory
      • System.Directory.Lifted
    • Environment
      • System.Environment.Lifted
    • System.Lifted
    • Posix
      • User
        • System.Posix.User.Lifted


Maintainer's Corner

For package maintainers and hackage trustees

Readme for system-lifted

Readme for system-lifted-


Lifted versions of Haskell System functions.

While haskell promotes the use of Maybe and Either as smart ways of dealing with errors, I found that the support for their Monad Transformers counter-parts is less than stellar.

While some packages like Errors simplify this, they still add a lot of boilerplate to the code.

The goal of this project started out as a way to write cleaner directory related code in either one of the error related monad transformers, namely EitherT, ErrorT or MaybeT (non-determinism and ListT are not yet supported).

This is achieved through typeclasses, and thus, by simply declaring some simple template haskell at the start of a file:

type EitherIOText       = EitherT Text

deriveSystemLiftedErrors "DisallowIOE [HardwareFault]" ''EitherIOText
deriveSystemDirectory   ''EitherIOText

One could then write code like this:

getXdgConfigFolder :: EitherT IOException IO FilePath
getXdgConfigFolder = isRW =<< getEnv "XDG_CONFIG_HOME"

Currently the System.Directory and System.Environment are fully supported, and there is partial support for System.Unix.Users.

More examples and wider System. support is planned. Contribuitions are welcomed.