
#12548: Exported pattern synonyms does not mark top-level bindings in RHS as used -------------------------------------+------------------------------------- Reporter: pkmx | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: Incorrect Unknown/Multiple | warning at compile-time Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# LANGUAGE PatternSynonyms #-} module Foo (pattern P) where x :: Int x = 0 pattern P :: Int pattern P <- _ where P = x }}} gives: {{{ Foo.hs:6:1: warning: [-Wunused-top-binds] Defined but not used: ‘x’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12548 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler