[GHC] #8177: Roles for type families
GHC
ghc-devs at haskell.org
Fri Apr 7 21:34:35 UTC 2017
#8177: Roles for type families
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone: ⊥
Component: Compiler | Version: 7.6.3
Resolution: | Keywords: TypeFamilies
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by glguy):
I'd like to share my usecase for wanting this feature
Given the following type:
{{{#!haskell
-- | Family of N-ary operator types.
type family Op n a b where
Op 'Z a b = b
Op ('S n) a b = a -> Op n a b
}}}
I'd love to be able to
{{{#!haskell
coerce :: Coercible a b => Op n a c -> Op n b c
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8177#comment:32>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list