[GHC] #12535: Bad error message when unidirectional pattern synonym used in bidirectional pattern synonym

#12535: Bad error message when unidirectional pattern synonym used in bidirectional pattern synonym -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 (Type checker) | 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: -------------------------------------+------------------------------------- If I write: {{{ {-# LANGUAGE PatternSynonyms #-} module I where pattern P2 x y <- (x, y) pattern P1 x y = P2 x y }}} I get the error: {{{ ezyang@sabre:~$ ghc-8.0 -c I.hs I.hs:5:18: error: • non-bidirectional pattern synonym ‘P2’ used in an expression • In the expression: P2 x y In an equation for ‘$bP1’: $bP1 x y = P2 x y }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12535 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC