Generalize MAC to MACT to use any underlying monad

#1 Open
Repository
fredefox
Branch
monad-trans
Repository
russo
Branch
master

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

git checkout master
git remote add fredefox/mac-lib https://bitbucket.org/fredefox/mac-lib.git
git fetch fredefox/mac-lib
git merge --no-ff -m 'Merged in fredefox/mac-lib/monad-trans (pull request #1)' remotes/fredefox/mac-lib/monad-trans
Author
  1. fredefox
Reviewers
Description

This makes MACT a monad transformer. It's very similar to the identity monad transformer. It's actually exactly the same, except that MACT has the phantom type l.

In keeping with the spirit of the style in mtl I have put the underlying monad as the second-to-last type parameter of MACT. Also in keeping with the style of mtl I have made MAC l a a type-synonym for

MAC l Identity a

So not with IO as the underlying monad. I believe this is the only sensible choice, but I'm willing to let myself be convinced to the contrary.

Comments (1)

  1. fredefox author

    I'd just like to add that I haven't modified the examples to work with the new layout.

    I didn't catch this because they were not mentioned in the .cabal-file.