[GHC] #7021: Tuple (and other exotic predicates) not yet handled in Template Haskell
GHC
ghc-devs at haskell.org
Fri Jan 24 01:27:23 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 goldfire):
Thanks for sharing your patch. Here are some further comments:
* The `EqualityT` constructor has type `Type -> Type -> Type`. Yet, this
would prevent encoding constructs like `[t| ((~) Int) |]`, which should be
valid. I recommend putting `EqualityT` in like `ArrowT` is now, as a
nullary (0-argument) constructor.
* The `foldM` and `go` algorithm (lines 65-67) you use seems like
`repTapps`. Or, am I missing something?
* In reifying an `IrredPred`, you use `splitAppTy`... but we're not sure
there that the type is an application. For example, it could be a nullary
type family, like this:
{{{
type family ALittleSilly :: Constraint
}}}
I believe this would be an `IrredPred`, if there are no instances for
the type family. (I haven't tested it.)
I will say that I appreciate your attention to detail to GHC's coding
style. I hope all these comments don't put you off -- we do really
appreciate your contribution!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7021#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list