#4188: Template Haskell support for reifying non-vanilla data constructors
---------------------------------+------------------------------------------
Reporter: illissius | Owner: illissius
Type: feature request | Status: new
Priority: normal | Component: Template Haskell
Version: | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Apart from not supporting GADT syntax, Template Haskell also doesn't
currently have support for reifying non-vanilla data constructors given
with the normal syntax, even though the API is fully capable of
representing all of its features.
In the case where I try to reify a data declaration of the form,
{{{
data AnyShow = forall a. Show a => AnyShow a
}}}
(using !ExistentialQuantification)
I get the error: Can't reify a GADT data constructor: `!AnyShow',
Even though it can easily be represented:
{{{
DataD [] AnyShow [] [ForallC [PlainTV a] [ClassP Show [VarT a]] (NormalC
AnyShow [(NotStrict,VarT a)])] []
}}}
I propose to add support for reifying non-vanilla data constructors given
with the normal syntax.
(Of note is that everything that can be done using GADT syntax can also be
done with the normal syntax, using !ExistentialQuantification and equality
constraints from !TypeFamilies.)
Patch shortly.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4188>
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