[GHC] #7021: Tuple (and other exotic predicates) not yet handled in Template Haskell
GHC
ghc-devs at haskell.org
Wed Jan 8 21:46:24 UTC 2014
#7021: Tuple (and other exotic predicates) not yet handled in Template Haskell
-------------------------+-------------------------------------------------
Reporter: | Owner:
goldfire | Status: new
Type: | Milestone: 7.8.1
feature request | Version: 7.5
Priority: | Keywords: ConstraintKinds
normal | TemplateHaskell
Component: | Architecture: Unknown/Multiple
Template Haskell | Difficulty: Unknown
Resolution: | Blocked By:
Operating System: | Related Tickets:
Unknown/Multiple |
Type of failure: |
None/Unknown |
Test Case: |
Blocking: |
-------------------------+-------------------------------------------------
Comment (by yoeight):
Here's an implementation by introducing a new TH.Pred data constructor
(let's say TypeT) as suggested by Richard
[http://www.haskell.org/pipermail/ghc-devs/2014-January/003629.html here]:
So, this is what I have in mind
{{{#!haskell
TypeT Type
}}}
By using the description's snippet, I got:
{{{
VarI Tuple.foo (ForallT [PlainTV a_1627398569] [TypeP (AppT (AppT (TupleT
2) (AppT (ConT GHC.Show.Show) (VarT a_1627398569))) (AppT (ConT
GHC.Read.Read) (VarT a_1627398569)))] (VarT a_1627398569)) Nothing (Fixity
9 InfixL)
}}}
What do you think ?
Richard also suggested that we could make Pred a type synonym of TH.Type.
Unfortunately, I have no idea how to express equality constraint only by
using TH.Type
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7021#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list