[GHC] #14587: Unidirectional pattern signatures do not need to be invariant w.r.t. higher-rank polymorphism

#14587: Unidirectional pattern signatures do not need to be invariant w.r.t. higher-rank polymorphism -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Best explained by example: {{{#!hs data T = MkT (forall a. a -> a) pattern PT :: (Int -> Int) -> T pattern PT x <- MkT x }}} This looks perfectly reasonable to me. And the hand-written matcher is also accepted. Note that a similar bidirectional pattern synonym should indeed be rejected. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14587 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14587: Unidirectional pattern signatures do not need to be invariant w.r.t. higher-rank polymorphism -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => duplicate Comment: This works fine in HEAD. It's a dup of #13752, which I fixed in May. I marked it as "merge" but I don't know if it actually got merged into 8.2. Perhpas not. Anyway I claim it's fine now. Re-open if you disagree. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14587#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC