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

[ bsd3, language, library ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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 2018-09-09T17:54:23Z
Distributions LTSHaskell:0.1.0.2, NixOS:0.1.0.2, Stackage:0.1.0.2
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2066 total (18 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-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.