[Haskell-cafe] typed tagless-final interpretation examples broken with recent ghc
oleg at okmij.org
oleg at okmij.org
Sun Oct 12 13:39:04 UTC 2014
Mathijs Kwik wrote more than two months ago, on Aug 2 2014:
> I've been reading up on typed tagless-final interpretations [1] and the
> accompanying examples.
>
> It seems the stuff about CPS transformations does no longer compile,
> probably because of stricter typing rules. I tried both ghc 7.6 and ghc
> 7.8, which both give a different kind of error message.
GHC 7.6 has introduced the ambiguity check, which has been causing
quite a bit of pain. For an example, please see
http://ghc.haskell.org/trac/ghc/ticket/9587
The example in that ticket is a simplified version of the tagless
final CPS transformations.
>From experience, the best solution to that sort of problems is to
re-write the code. Often the result is simpler. This has been the case for
CPS transformations. The new version of the tagless-final CPS
transformations is notably shorter
http://okmij.org/ftp/tagless-final/course/CPS.hs
and it should work in any GHC with type families, including GHC 7.8.3.
More information about the Haskell-Cafe
mailing list