#5529: Newtypes with hidden constructors cannot be passed as FFI arguments -----------------------------------+---------------------------------------- Reporter: mikhail.vorozhtsov | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.3 Keywords: | Testcase: Blockedby: | Difficulty: Os: Unknown/Multiple | Blocking: Architecture: Unknown/Multiple | Failure: None/Unknown -----------------------------------+----------------------------------------
Comment(by simonmar): Mikhail: this is not about whether GHC itself needs to know the representation internally, indeed typically GHC ''does'' have the full representation available even if the constructor is exported abstractly (at least when -O is on). The question here is whether GHC should require that the constructor is exported non-abstractly in order to be used in an FFI declaration. So I think point (2) above is not the issue. I think your point (1) is saying that even if we know that `CTime == Int64`, what the programmer actually needs to know is that `CTime == time_t`, correct? FYI, here's the previous discussion from the `haskell-prime` list: [http://www.haskell.org/pipermail/haskell-prime/2009-February/002726.html] it addresses most of the points we've covered here. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5529#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs