Commit 30d8349a authored by Simon Peyton Jones's avatar Simon Peyton Jones

Comments only

parent 45c319ff
......@@ -1300,7 +1300,6 @@ Also see
Note [magicDictId magic]
The identifier `magicDict` is just a place-holder, which is used to
implement a primitve that we cannot define in Haskell but we can write
in Core. It is declared with a place-holder type:
......@@ -1334,15 +1333,14 @@ Next, we add a built-in Prelude rule (see prelude/PrelRules.hs),
which will replace the RHS of this definition with the appropriate
definition in Core. The rewrite rule works as follows:
magicDict@t (wrap@a@b f) x y
magicDict @t (wrap @a @b f) x y
f (x `cast` co a) y
f (x `cast` co a) y
The `co` coercion is the newtype-coercion extracted from the type-class.
The type class is obtain by looking at the type of wrap.
@realWorld#@ used to be a magic literal, \tr{void#}. If things get
nasty as-is, change it back to a literal (@Literal@).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment