freer-simple/changelog.md
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

1.5 KiB

Change Log

All notable changes to this project will be documented in this file.

Unreleased

  • Fix Could not deduce: effs ~ (r : rs) that may occur when using a Member contraint (a regression introduced in 0.2.4.0)

0.2.4.1 (November 25, 2016)

  • Restore GHC (7.8, 7.10) compatibility

0.2.4.0 (November 25, 2016)

  • Internal reorg
    • In particular, hide implementation details in Union.Internal
    • Rewrite interpreters in terms of extract instead of decomp
  • Add runNat convenience function

0.2.3.0 (June 25, 2016)

  • Add GHC 8 support

0.2.2.2 (Sep. 14, 2015)

  • Use local data Nat for Data.Open.Union
    • Using GHC.TypeLits lead to overlapping instances

0.2.2.1 (Sep. 14, 2015)

  • Document ALL THE THINGS

0.2.2.0 (Sep. 13, 2015)

  • Add bench suite

0.2.1.0 (Sep. 13, 2015)

  • Add test suite

0.2.0.2 (Sep. 12, 2015)

  • Clean up language extensions per file
  • Add Teletype DSL to the README

0.2.0.1 (Sep. 12, 2015)

  • Add Teletype DSL example
  • Expose send in public interface

0.2.0.0 (Sep. 12, 2015)

  • Implement NonDetEff
  • Separate Cut/Coroutine out from Internals
    • Partial implementation: won't compile yet
  • Extract remaining examples from Internal comments

0.1.1.0 (Sep. 12, 2015)

  • Warnings clean up
  • Examples separated from primary implementation
  • Initial project documentation added

0.1.0.0 (Sep. 12, 2015)

  • Initial release