@hackage incipit-core0.7.0.2
A Prelude for Polysemy
Installation
Dependencies (3)
- base >=4.17.2.1 && <4.23
- incipit-base >=0.4.0.0 && <0.8
- polysemy >=1.6.0.0 && <1.10 Show all…
Dependents (10)
@hackage/polysemy-log, @hackage/polysemy-time, @hackage/polysemy-process, @hackage/polysemy-resume, @hackage/polysemy-conc, @hackage/polysemy-log-di, Show all…
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"