BSD-2-Clause-Patent licensed by Torsten Schmits
Maintained by [email protected]
This version can be pinned in stack with:incipit-core-0.5.1.0@sha256:48dbdf92dc9b0185b420e364a93ab33d139d59a3cafd673762aba9bdaf19a645,3341

Module documentation for 0.5.1.0

About

This library provides a Prelude for Polysemy libraries, building upon incipit-base and exporting most of Polysemy’s core modules. For a more comprehensive variant that includes some basic libraries, consider incipit.

Usage

Using a custom Prelude requires the use of Cabal mixins to hide the module from base and replace it with IncipitCore:

For hpack:

dependencies:
  - name: base
    version: '>= 4 && < 5'
    mixin:
      - hiding (Prelude)
  - name: incipit-core
    version: '>= 0.3'
    mixin:
      - (IncipitCore as Prelude)
      - hiding (IncipitCore)

For cabal:

build-depends:
    base >=4 && <5, incipit-core >= 0.3
mixins:
    base hiding (Prelude), incipit-core (IncipitCore as Prelude), incipit-core hiding (IncipitCore)

incipit-core used to export Prelude, but stack can’t deal with that.

Custom Prelude

In order to extend incipit-core with a local Prelude, the module IncipitCore has to be reexported:

dependencies:
  - name: base
    version: '>= 4 && < 5'
    mixin:
      - hiding (Prelude)
  - incipit-core >= 0.3
module Prelude (
  module Prelude,
  module IncipitCore,
) where

import IncipitCore

projectName :: Text
projectName =
  "spaceship"

Changes

Unreleased

0.4.1.0

  • Reexport Polysemy.Scoped

0.3.0.0

  • Remove module exports for Prelude to avoid a Stack bug.
  • Rename Incipit modules to IncipitBase and IncipitCore.
  • Add more try* combinators and use consistent naming.

0.2.0.0

  • Add unitT, returning () in a Tactical environment
  • Hide Polysemy’s effect GADT constructors