Commit f6d61129 authored by's avatar
Browse files

Add notes about unsafeCoerce

parent 7929e422
......@@ -6072,7 +6072,7 @@ shortcoming is something that could be fixed, with some kind of pragma.)
<sect2> <title>The <literal>inline</literal> function </title>
<sect2> <title>The <literal>lazy</literal> function </title>
The <literal>lazy</literal> function restrains strictness analysis a little:
......@@ -6097,6 +6097,21 @@ look strict in <literal>y</literal> which would defeat the whole
purpose of <literal>par</literal>.
<sect2> <title>The <literal>unsafeCoerce#</literal> function </title>
The function <literal>unsafeCoerce#</literal> allows you to side-step the
typechecker entirely. It has type
unsafeCoerce# :: a -> b
That is, it allows you to coerce any type into any other type. If you use this
function, you had better get it right, otherwise segmentation faults await.
It is generally used when you want to write a program that you know is
well-typed, but where Haskell's type system is not expressive enough to prove
that it is well typed.
Supports Markdown
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