Commit Graph

16 Commits

Author SHA1 Message Date
Tomas Janousek
52340b7e56 Update changelog 2017-01-29 11:20:16 +01:00
Tomas Janousek
958dbe0262 Expose data constructors of all included effects
I've seen people use unsafeCoerce to write their own interpreter for the
State effect. Ugh. :-)

d27099c8ee/src/Control/Monad/Freer/State/Extra.hs (L95)
2017-01-28 12:37:50 +01:00
Tomas Janousek
82734c04dd Add runNatS convenience function
`runNatS` is to `runNat` as `handleRelayS` is to `handleRelay`.
2017-01-28 12:14:50 +01:00
Tomas Janousek
8060429c52 Fix "Could not deduce: effs ~ (r : rs)" errors
Commit 4260466929 added the "r has at
least two elements" constraint to the `Member' t r ('S n)` instance but
`Member t effs` with a general (unknown) effs isn't enough to deduce
that effs is non-empty, so this doesn't typecheck:

    f :: Eff (IO ': effs) () -> Eff effs ()
    f = undefined

    g :: (Member Maybe effs) => Eff effs ()
    g = undefined

    h :: (Member Maybe effs) => Eff effs ()
    h = f g

GHC complains that it could not deduce: `effs ~ (r : rs)` arising from
the use of `g`. It can be worked around by using this instead:

    h :: (Member Maybe (e ': es)) => Eff (e ': es) ()
    h = f g

but I don't think this is a good user experience, and it's a regression
from 0.2.3.0 that would normally require a major version bump to 0.3 as
it breaks existing code. Therefore a fix should go in quickly and should
get into lts-7 asap.

This commit adds the "effs is non-empty" constraint to `Member t effs`
so the above typechecks again.
2017-01-28 12:12:24 +01:00
Tomas Janousek
674dd1b5ec README/changelog/cabal cleanup 2017-01-28 12:11:58 +01:00
Allele Dev
ce81c61670
fix: GHC 7.8 and 7.10 compatibility 2016-11-25 02:21:34 -07:00
Allele Dev
0f553b2b99
release: 0.2.4.0 2016-11-24 23:46:19 -07:00
Allele Dev
a2914d7eef
add: GHC 8 support 2016-06-25 15:08:34 -04:00
Alej Cabrera
d62a40947b release(0.2.2.2): fix Open.Union 2015-09-14 02:29:11 -05:00
Alej Cabrera
95bc74803b release(0.2.2.1): documentation 2015-09-14 02:08:03 -05:00
Alej Cabrera
826c39e17e add: bench support 2015-09-13 04:51:27 -05:00
Alej Cabrera
667aaef032 release(0.2.1.0): add test suite 2015-09-13 00:00:16 -05:00
Alej Cabrera
fd5d8d86c8 release(0.2.0.2): Teletype, cleanup 2015-09-12 14:14:47 -05:00
Alej Cabrera
1ee237a884 release(0.2.0.1): Teletype example 2015-09-12 14:04:59 -05:00
Alej Cabrera
fa212cb126 add(0.2.0): NonDetEff; more clean up
* Implement NonDetEff
* Separate Cut/Coroutine out from Internals
  * Partial implementation: won't compile yet
* Extract remaining examples from Internal comments
2015-09-12 03:01:16 -05:00
Alej Cabrera
6108d8ee42 docs: README, CoC, changelog 2015-09-12 01:41:06 -05:00