Desugaring for "foreign import prim"
authorDuncan Coutts <duncan@well-typed.com>
Tue, 9 Jun 2009 10:59:45 +0000 (10:59 +0000)
committerDuncan Coutts <duncan@well-typed.com>
Tue, 9 Jun 2009 10:59:45 +0000 (10:59 +0000)
Unlike normal foreign imports which desugar into a separate worker and
wrapper, we use just a single wrapper decleration. The representation
in Core of the call is currently as a foreign call. This means the
args are all treated as fully strict. This is ok at the moment because
we restrict the types for foreign import prim to be of unboxed types,
however in future we may want to make prim imports be the normal cmm
calling convention for Haskell functions, in which case we would not
be able to assume all args are strict. At that point it may make more
sense to represent cmm/prim calls distinct from foreign calls, and
more like the we the existing PrimOp calls are handled.


No differences found