initial "foreign import prim" patches for review
Isaac Dupree
ml at isaac.cedarswampstudios.org
Wed Jun 10 10:14:36 EDT 2009
Simon Marlow wrote:
> foreign import prim "has_side_effects commutable foo#" :: ...
note, FFI spec defines lack-of-"safe/unsafe" to mean "safe" (and it's
*not* unsafe in the typical FFI ways, so I think that makes a bit more
sense to me than "unsafe")
If there are features like "can_fail" and "has_side_effects" whose
absence leads to an optimization, it makes me a little uncomfortable
(what if they're not specified when they should be? didn't we have a bug
like that for has_side_effects just recently, even with the primops all
specified in one well-commented file?) Also would it be better to call
it "ghcprim" rather than "prim" (then people will be more wary of all
these compiler-specific requirements), or does it not really matter?
-Isaac
More information about the Cvs-ghc
mailing list