Commit 9d7182fb authored by's avatar
Browse files

Remove the nonexistent lazy primop, and follow move from GHC.Base to GHC.Magic

parent a9ec8ec0
......@@ -887,7 +887,7 @@ unsafeCoerceName = mkWiredInIdName gHC_PRIM (fsLit "unsafeCoerce#") unsafeCoerc
nullAddrName = mkWiredInIdName gHC_PRIM (fsLit "nullAddr#") nullAddrIdKey nullAddrId
seqName = mkWiredInIdName gHC_PRIM (fsLit "seq") seqIdKey seqId
realWorldName = mkWiredInIdName gHC_PRIM (fsLit "realWorld#") realWorldPrimIdKey realWorldPrimId
lazyIdName = mkWiredInIdName gHC_BASE (fsLit "lazy") lazyIdKey lazyId
lazyIdName = mkWiredInIdName gHC_MAGIC (fsLit "lazy") lazyIdKey lazyId
coercionTokenName = mkWiredInIdName gHC_PRIM (fsLit "coercionToken#") coercionTokenIdKey coercionTokenId
......@@ -2068,26 +2068,6 @@ pseudoop "seq"
{ Evaluates its first argument to head normal form, and then returns its second
argument as the result. }
pseudoop "lazy"
a -> a
{ The {\tt lazy} function restrains strictness analysis a little. The call
{\tt (lazy e)} means the same as {\tt e}, but {\tt lazy} has a magical
property so far as strictness analysis is concerned: it is lazy in its first
argument, even though its semantics is strict. After strictness analysis has
run, calls to {\tt lazy} are inlined to be the identity function.
This behaviour is occasionally useful when controlling evaluation order.
Notably, {\tt lazy} is used in the library definition of {\tt Control.Parallel.par}:
{\tt par :: a -> b -> b}
{\tt par x y = case (par\# x) of \_ -> lazy y}
If {\tt lazy} were not lazy, {\tt par} would look strict in {\tt y} which
would defeat the whole purpose of {\tt par}.
Like {\tt seq}, the argument of {\tt lazy} can have an unboxed type. }
primtype Any k
{ The type constructor {\tt Any} is type to which you can unsafely coerce any
lifted type, and back.
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