From: Duncan Coutts Date: Tue, 9 Jun 2009 10:59:45 +0000 (+0000) Subject: Desugaring for "foreign import prim" X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5b7e2a875b089f31cd8dedb52d47ef9a93f276be;hp=5b7e2a875b089f31cd8dedb52d47ef9a93f276be Desugaring for "foreign import prim" 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. ---