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

[ bsd3, language, library ] [ Propose Tags ]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,
Change log
Dependencies base (>=4.7 && <5), indexed [details]
License BSD-3-Clause
Copyright 2018 Sandy Maguire
Author Sandy Maguire
Category Language
Home page
Bug tracker
Source repo head: git clone
Uploaded by isovector at 2018-09-09T17:54:23Z
Distributions LTSHaskell:, NixOS:, Stackage:
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1996 total (17 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-09-09 [all 1 reports]

Readme for do-notation-

[back to package description]


Build Status | Hackage


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

Manny Calavera, Grim Fandango


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.


{-# LANGUAGE RebindableSyntax #-}

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


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


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