@hackage / atelier-prelude

Custom relude-based prelude with Effectful conventions

Latest0.1.0.0

About

Metadata

  • Last updated , by cgeorgii
  • License MIT
  • Categories Prelude
  • Maintained by: christian.georgii@tweag.io

  • Lottery factor: 1

Links

Installation

Readme

atelier-prelude

A custom prelude based on relude, adapted for Effectful conventions. Part of the atelier toolkit.

Usage

atelier-prelude exposes a module named Prelude. To make it the implicit prelude, hide base's Prelude with a mixin — GHC's automatic import Prelude then resolves to this one, with no NoImplicitPrelude and no per-module imports.

In package.yaml (hpack):

dependencies:
- name: base
  mixin:
  - hiding (Prelude)
- atelier-prelude

or in a .cabal file:

build-depends: base, atelier-prelude
mixins:        base hiding (Prelude)

Add -Wno-implicit-prelude to your ghc-options to silence the implicit-prelude warning.

What's different from relude

Lifted, IO-based operations from relude are intentionally not re-exported, so that effects are threaded explicitly through Effectful rather than performed in IO:

  • Relude.Lifted.* (system, environment, handle, terminal, file operations)
  • Relude.File
  • Relude.Print (console output)

Use the corresponding atelier-core effects instead — e.g. Atelier.Effects.Env, Atelier.Effects.File, Atelier.Effects.Console.

Part of atelier

License

MIT — see LICENSE.