
#9197: FFI types should be usable in foreign import decls without revealing representations -------------------------------------+------------------------------------ Reporter: duncan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (FFI) | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by duncan): I suspect it does have something to do with `CTYPE`. I looked at the code for that a bit. It's clear that it associates a string (representing a C type) with a Haskell type to use in FFI generated headers. I couldn't immediately tell if it also does anything for declaring it as one of the known FFI types, but I suspect not. It may well be quite reasonable to give the `CTYPE` pragma the extra duty of allowing looking through newtypes, rather than using a builtin list. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9197#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler