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:a6c3f73a9451980337751a12a6b27ef8b480fd87aed4cef449432704b124bf17,3488

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