
#13735: RankNTypes don't work with PatternSynonyms -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: invalid | Keywords: | PatternSynonyms 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 dfeuer): Replying to [comment:12 Iceland_jack]:
`f (B endo) = A (appEndo endo)` works while this doesn't
{{{#!hs f :: B -> A f (B (appEndo -> f)) = A f }}}
That's not surprising. We don't have impredicative types, so `appEndo x` always produces a monomorphic result. You have to unpack the `Endo` under the `A` constructor. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13735#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler