|
#6066: Constraint Kinds don't work with Template Haskell
------------------------------+--------------------------------------------- Reporter: sseverance | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- If I have a record with a constraint kind that has multiple constraints such as: {{{ type MyConstraint a = (Show a, Eq a, Typeable a) data MyConstraint a => MyType a = MyType { someField :: a } }}} If I try to use template haskell on the type (in my case mkLabels from fclabels) you get the following error: Can't represent tuple predicates in Template Haskell: MyConstraint a Complete Repro Case: {{{ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DatatypeContexts #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE TemplateHaskell #-} import Data.Label import Data.Typeable type MyConstraint a = (Show a, Eq a, Typeable a) data MyConstraint a => MyType a = MyType { myField :: a } deriving (Show, Eq) mkLabels [''MyType] }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6066> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
#6066: Constraint Kinds don't work with Template Haskell
------------------------------+--------------------------------------------- Reporter: sseverance | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- Comment(by dreixel): Maybe this is also fixed with the patches for #5612? -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6066#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
In reply to this post by GHC
#6066: Constraint Kinds don't work with Template Haskell
---------------------------------+------------------------------------------ Reporter: sseverance | Owner: Type: bug | Status: closed Priority: normal | Component: Compiler Version: 7.4.1 | Resolution: duplicate Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Testcase: | Blockedby: Blocking: | Related: ---------------------------------+------------------------------------------ Changes (by sseverance): * status: new => closed * resolution: => duplicate Comment: It would appear so. I have marked as duplicate. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6066#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
| Powered by Nabble | Edit this page |
