diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2013-09-13 18:40:36 +0200 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2013-09-13 21:58:26 +0200 |
commit | 17a868afa169c52d8525a95cbed87b2fc12044c6 (patch) | |
tree | a04530408077a286a80ca8d34c5d6dc0c98eddc6 /compiler/prelude/PrelInfo.lhs | |
parent | 638da2fecaaaf743c4da7f8e2522f4afc0d8400c (diff) | |
download | haskell-coercible.tar.gz |
Introduce coerce :: Coercible a b -> a -> bcoercible
This is the result of the design at
http://ghc.haskell.org/trac/ghc/wiki/NewtypeWrappers
The goal is to be able to convert between, say [First Int] and [Last
Int] with zero run-time overhead. To that end, we introduce a special
two parameter type class Coercible whose instances are created
automatically and on-the fly. This relies on and exploits the recent
addition of roles to core.
Diffstat (limited to 'compiler/prelude/PrelInfo.lhs')
-rw-r--r-- | compiler/prelude/PrelInfo.lhs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/prelude/PrelInfo.lhs b/compiler/prelude/PrelInfo.lhs index 4a39977797..0ef5b32eb3 100644 --- a/compiler/prelude/PrelInfo.lhs +++ b/compiler/prelude/PrelInfo.lhs @@ -130,7 +130,7 @@ ghcPrimExports = map (Avail . idName) ghcPrimIds ++ map (Avail . idName . primOpId) allThePrimOps ++ [ AvailTC n [n] - | tc <- funTyCon : primTyCons, let n = tyConName tc ] + | tc <- funTyCon : coercibleTyCon : primTyCons, let n = tyConName tc ] \end{code} |