do-notation

Generalize do-notation to work on monads and indexed monads simultaneously.

https://github.com/isovector/do-notation#readme

LTS Haskell 22.37:0.1.0.2
Stackage Nightly 2024-10-09:0.1.0.2
Latest on Hackage:0.1.0.2

See all snapshots do-notation appears in

BSD-3-Clause licensed by Sandy Maguire
Maintained by [email protected]
This version can be pinned in stack with:do-notation-0.1.0.2@sha256:04cd62b59fcb30bfc2fce72002cba54655c38348ef167a7c99f029225f85838f,1472

Module documentation for 0.1.0.2

Depends on 2 packages(full list with versions):

do-notation

Build Status | Hackage

Dedication

I’ve just locked an open door. Strange, yet symbolically compelling.

Manny Calavera, Grim Fandango

Overview

Have you ever wanted to manage siiiick invariants with indexed monads without giving up your regular monads in the process? do-notation lets you do this with a bunch of type jiggery-pokery behind the scenes.

It also provides the Ix m indexed monad which is a free construction over a regular monad m. Cool.

Usage

{-# LANGUAGE RebindableSyntax #-}

import Language.Haskell.DoNotation
import Prelude hiding (Monad (..), pure)

Limitations

The implementation doesn’t play very nicely with do-blocks bound via let.

Thanks

Huge shout-outs to Csongor Kiss for very patiently walking me through the incoherent instance machinery necessary to make this all work.

Changes

Changelog for do-notation

2018-09-09 – 0.1.0.2

Loosen constraint on PureSyntax down to Applicative.

2018-09-07 – 0.1.0.1

First release!

Unreleased changes