#736: Allowing any newtype of the IO monad to be used in FFI and extra optional
entry point
----------------------------------------------+-----------------------------
Reporter: [EMAIL PROTECTED] | Owner: simonpj
Type: feature request | Status: new
Priority: high | Milestone: 6.8
Component: Compiler | Version: 6.4.1
Severity: normal | Resolution:
Keywords: FFI foreign monad entry point | Difficulty: Unknown
Os: Multiple | Testcase: ffi-deriv1
Architecture: Multiple |
----------------------------------------------+-----------------------------
Changes (by simonmar):
* priority: normal => high
* owner: => simonpj
Comment:
On further inspection, ffi-deriv is failing because this case in
`TyCon.lhs` doesn't match:
{{{
coreExpandTyCon_maybe (AlgTyCon {algTcRec = NonRecursive, -- Not
recursive
algTcRhs = NewTyCon { nt_etad_rhs = etad_rhs, nt_co = Nothing }})
tys
= case etad_rhs of -- Don't do this in the pattern match, lest we
accidentally
-- match the etad_rhs of a *recursive* newtype
(tvs,rhs) -> expand tvs rhs tys
}}}
for the newtype in question, the `nt_co` field is not `Nothing`. I have
no clue where to go from here: clearly the `Nothing` is there for a good
reason, because removing it causes a core lint failure later.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/736>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs