[GHC] #9352: Allow `State# s` argument/result types in `ccall` FFI imports

GHC ghc-devs at haskell.org
Wed Jul 23 19:07:37 UTC 2014


#9352: Allow `State# s` argument/result types in `ccall` FFI imports
-------------------------------------+-------------------------------------
       Reporter:  hvr                |                   Owner:
           Type:  feature request    |                  Status:  new
       Priority:  normal             |               Milestone:  7.10.1
      Component:  Compiler (Type     |                 Version:  7.8.2
  checker)                           |        Operating System:
       Keywords:                     |  Unknown/Multiple
   Architecture:  Unknown/Multiple   |         Type of failure:
     Difficulty:  Unknown            |  None/Unknown
     Blocked By:                     |               Test Case:
Related Tickets:  #9218              |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 This ticket is to allowing code like

 {{{#!hs
 {-# LANGUAGE UnliftedFFITypes #-}
 {-# LANGUAGE MagicHash #-}

 module M where

 import GHC.Exts

 foreign import ccall unsafe "foo" c_foo :: Int# -> State# s -> State# s

 foreign import ccall unsafe "bar" c_foo :: Int# -> State# s -> (# State#
 s, Int# #)
 }}}

 See also discussion in #9218

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9352>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list