#1831: reify never provides the declaration of variables
------------------------+---------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: Template Haskell
Version: 6.8.1 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
------------------------+---------------------------------------------------
The information returned by reify when provided a variable Name is
{{{
VarI Name Type (Maybe Dec) Fixity
}}}
The Dec part, due to be nested in Maybe, is clearly optional. In fact,
according to Language.Haskell.TH.Syntax:
{{{
-- Nothing for lambda-bound variables, and
-- for anything else TH can't figure out
-- E.g. [| let x = 1 in $(do { d <- reify 'x; .. }) |]
}}}
However, the typechecker (TcSplice module) always returns Nothing. So it's
simply not implemented.
I suggest either implementing the feature or removing the Dec part of
VarI. Either way, the type should be consistent with the features offered
in TH.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1831>
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