[GHC] #10797: Kind-level functional dependencies are not resolved properly
GHC
ghc-devs at haskell.org
Wed Aug 26 19:57:31 UTC 2015
#10797: Kind-level functional dependencies are not resolved properly
-------------------------------------+-------------------------------------
Reporter: danilo2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by danilo2):
And one more additional fact. We can implement what I want creating some
boilerplate. I'm sure there should be way to avoid it (without using
TemplateHaskell):
{{{
class BaseType a b | a -> b where
baseType :: a -> b
instance {-# OVERLAPPABLE #-} out ~ (Proxy a) => BaseType (Proxy a) out
instance {-# OVERLAPPABLE #-} out ~ (Proxy a) => BaseType (Proxy (a t1))
out
instance {-# OVERLAPPABLE #-} out ~ (Proxy a) => BaseType (Proxy (a t1
t2)) out
instance {-# OVERLAPPABLE #-} out ~ (Proxy a) => BaseType (Proxy (a t1 t2
t3)) out
instance {-# OVERLAPPABLE #-} out ~ (Proxy a) => BaseType (Proxy (a t1 t2
t3 t4)) out
instance {-# OVERLAPPABLE #-} out ~ (Proxy a) => BaseType (Proxy (a t1 t2
t3 t4 t5)) out
...
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10797#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list