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

[ bsd3, language, library ] [ Propose Tags ]

Please see the README on GitHub at https://github.com/isovector/do-notation#readme


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.1.0.1, 0.1.0.2
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), indexed [details]
License BSD-3-Clause
Copyright 2018 Sandy Maguire
Author Sandy Maguire
Maintainer sandy@sandymaguire.me
Category Language
Home page https://github.com/isovector/do-notation#readme
Bug tracker https://github.com/isovector/do-notation/issues
Source repo head: git clone https://github.com/isovector/do-notation
Uploaded by isovector at Sun Sep 9 17:54:23 UTC 2018
Distributions NixOS:0.1.0.2, Stackage:0.1.0.2
Downloads 757 total (46 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2018-09-09 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for do-notation-0.1.0.2

[back to package description]

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.