
#8841: PatternSynonyms error gives wrong source locations -------------------------+------------------------------------------------- Reporter: | Owner: Iceland_jack | Status: new Type: bug | Milestone: 7.8.1 Priority: low | Version: 7.8.1-rc2 Component: | Operating System: Linux Compiler | Type of failure: Incorrect warning at Keywords: | compile-time PatternSynonyms | Test Case: Architecture: x86 | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- Using an example from the [http://www.haskell.org/ghc/docs/7.8.1-rc1/html/users_guide/syntax- extns.html GHC user's guide] but omitting the argument to `Maybe` {{{ {-# LANGUAGE PatternSynonyms #-} data Type = App String [Type] pattern Maybe = App "Maybe" [t] }}} gives the following error without the correct source locations {{{ ghci> :load /tmp/failure.hs [1 of 1] Compiling Main ( /tmp/failure.hs, interpreted ) /tmp/failure.hs:1:1: Right-hand side of bidirectional pattern synonym cannot be used as an expression App "Maybe" [t] Failed, modules loaded: none. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8841 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler