
#8061: Support for Complex Double in Foreign Function Interface ------------------------------------+------------------------------------- Reporter: dsamperi | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Currently the FFI only permits BASIC return types like Double, Int, Bool, etc., but NOT Complex Double (only slightly non-basic!). This makes it impossible to import a Fortran function (not subroutine) that returns a complex value. Adding support for Complex Double would make it easier to interface to external libs like BLAS and LAPACK; without this support wrapper C libs must be used, and these are not standardized (the Haskell package hs-linear-algebra currently has some problems related to this). Thus adding Foreign support for Complex Double (not just through Ptr) would open up access to a large collection of external Fortran libs for the Haskell community. Currently I get the message "Unacceptable return type in FFI" when I try to return IO (ComplexType). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8061 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler