[GHC] #14131: Difference between newtype and newtype instance
GHC
ghc-devs at haskell.org
Thu Aug 17 22:10:56 UTC 2017
#14131: Difference between newtype and newtype instance
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
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 RyanGlScott):
Note that this error does not occur if the kind variables are bound in an
earlier type pattern. That is, this equivalent instance typechecks:
{{{#!hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
data family Nat :: k -> k -> *
newtype instance Nat (f :: k -> *) :: (k -> *) -> * where
Nat :: (forall xx. f xx -> g xx) -> Nat f g
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14131#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list