Changes between Version 1 and Version 2 of Commentary/PrimOps


Ignore:
Timestamp:
Sep 10, 2006 10:55:10 AM (8 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/PrimOps

    v1 v2  
    11[ Up: [wiki:Commentary] ] 
    22 
    3 = Primitive Operations (PrimOps) = 
     3= Primitive Operations (!PrimOps) = 
    44 
    5 A PrimOp is a function that cannot be implemented in Haskell, and are provided natively by GHC.  For example, adding two {{{Int#}}} values is provided as the PrimOp {{{+#}}}, and allocating a new mutable array is the PrimOp {{{newArray#}}}. 
     5A !PrimOp is a function that cannot be implemented in Haskell, and are provided natively by GHC.  For example, adding two {{{Int#}}} values is provided as the !PrimOp {{{+#}}}, and allocating a new mutable array is the !PrimOp {{{newArray#}}}. 
    66 
    77PrimOps are made available to Haskell code through the virtual module {{{GHC.Prim}}}.  This module has no implementation, and its interface never resides on disk: if {{{GHC.Prim}}} is imported, we use a built-in {{{ModIface}}} value - see {{{ghcPrimIface}}} in [[GhcFile(compiler/iface/LoadIface.lhs)]]. 
    88 
    9 == Implementation of PrimOps: MachOps == 
     9== Implementation of !PrimOps: !MachOps == 
    1010 
    1111== The primops.txt.pp file == 
    1212 
    13 == Adding a new PrimOp == 
     13== Adding a new !PrimOp ==