Outputable.cparen
[ghc-hetmet.git] / compiler / prelude / primops.txt.pp
index 6e0a13d..1d46095 100644 (file)
@@ -1473,7 +1473,7 @@ section "Concurrency primitives"
 ------------------------------------------------------------------------
 
 primtype State# s
 ------------------------------------------------------------------------
 
 primtype State# s
-       { {\tt State#} is the primitive, unlifted type of states.  It has
+       { {\tt State\#} is the primitive, unlifted type of states.  It has
        one type parameter, thus {\tt State\# RealWorld}, or {\tt State\# s},
        where s is a type variable. The only purpose of the type parameter
        is to keep different state threads separate.  It is represented by
        one type parameter, thus {\tt State\# RealWorld}, or {\tt State\# s},
        where s is a type variable. The only purpose of the type parameter
        is to keep different state threads separate.  It is represented by
@@ -1482,7 +1482,7 @@ primtype State# s
 primtype RealWorld
        { {\tt RealWorld} is deeply magical.  It is {\it primitive}, but it is not
        {\it unlifted} (hence {\tt ptrArg}).  We never manipulate values of type
 primtype RealWorld
        { {\tt RealWorld} is deeply magical.  It is {\it primitive}, but it is not
        {\it unlifted} (hence {\tt ptrArg}).  We never manipulate values of type
-       {\tt RealWorld}; it's only used in the type system, to parameterise {\tt State#}. }
+       {\tt RealWorld}; it's only used in the type system, to parameterise {\tt State\#}. }
 
 primtype ThreadId#
        {(In a non-concurrent implementation, this can be a singleton
 
 primtype ThreadId#
        {(In a non-concurrent implementation, this can be a singleton
@@ -1532,6 +1532,11 @@ primop  IsCurrentThreadBoundOp "isCurrentThreadBound#" GenPrimOp
    with
    out_of_line = True
 
    with
    out_of_line = True
 
+primop  NoDuplicateOp "noDuplicate#" GenPrimOp
+   State# RealWorld -> State# RealWorld
+   with
+   out_of_line = True
+
 ------------------------------------------------------------------------
 section "Weak pointers"
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
 section "Weak pointers"
 ------------------------------------------------------------------------
@@ -1733,13 +1738,8 @@ primop  NewBCOOp "newBCO#" GenPrimOp
    has_side_effects = True
    out_of_line      = True
 
    has_side_effects = True
    out_of_line      = True
 
-primop  InfoPtrOp "infoPtr#" GenPrimOp
-   a -> Addr#
-   with
-   out_of_line = True
-
-primop  ClosurePayloadOp "closurePayload#" GenPrimOp
-   a -> (# Array# b, ByteArr# #)
+primop  UnpackClosureOp "unpackClosure#" GenPrimOp
+   a -> (# Addr#, Array# b, ByteArr# #)
    with
    out_of_line = True
 
    with
    out_of_line = True
 
@@ -1756,11 +1756,11 @@ pseudoop   "seq"
 
 pseudoop   "inline"
    a -> a
 
 pseudoop   "inline"
    a -> a
-   { The call {\tt(inline f)} arranges that f is inlined, regardless of its size.
-       More precisely, the call {\tt(inline f)} rewrites to the right-hand side of
+   { The call {\tt (inline f)} arranges that f is inlined, regardless of its size.
+       More precisely, the call {\tt (inline f)} rewrites to the right-hand side of
        {\tt f}'s definition. This allows the programmer to control inlining from a
        particular call site rather than the definition site of the function (c.f.
        {\tt f}'s definition. This allows the programmer to control inlining from a
        particular call site rather than the definition site of the function (c.f.
-       {\ttINLINE} pragmas in User's Guide, Section 7.10.3, "INLINE and NOINLINE
+       {\tt INLINE} pragmas in User's Guide, Section 7.10.3, "INLINE and NOINLINE
        pragmas").
 
        This inlining occurs regardless of the argument to the call or the size of
        pragmas").
 
        This inlining occurs regardless of the argument to the call or the size of
@@ -1787,8 +1787,9 @@ pseudoop   "lazy"
        This behaviour is occasionally useful when controlling evaluation order.
        Notably, {\tt lazy} is used in the library definition of {\tt Control.Parallel.par}:
 
        This behaviour is occasionally useful when controlling evaluation order.
        Notably, {\tt lazy} is used in the library definition of {\tt Control.Parallel.par}:
 
-       >    par :: a -> b -> b
-       >    par x y = case (par# x) of { _ -> lazy y }
+       {\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}.
 
        If {\tt lazy} were not lazy, {\tt par} would look strict in {\tt y} which
        would defeat the whole purpose of {\tt par}.
@@ -1808,7 +1809,7 @@ primtype Any a
        It's also used to instantiate un-constrained type variables after type
        checking.  For example
 
        It's also used to instantiate un-constrained type variables after type
        checking.  For example
 
-       >       length Any []
+       {\tt length Any []}
 
        Annoyingly, we sometimes need {\tt Any}s of other kinds, such as {\tt (* -> *)} etc.
        This is a bit like tuples.   We define a couple of useful ones here,
 
        Annoyingly, we sometimes need {\tt Any}s of other kinds, such as {\tt (* -> *)} etc.
        This is a bit like tuples.   We define a couple of useful ones here,