
#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