
#14560: Typo in example on https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms -------------------------------------+------------------------------------- Reporter: pjljvdlaar | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.2.1 Resolution: | Keywords: type error Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by pjljvdlaar: Old description:
In section Associated pattern synonyms on https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms is written
class ListLike l where pattern Nil :: l a pattern Cons :: a -> l a -> a isNil :: l a -> Bool isNil Nil = True isNil (Cons _ _) = False
yet should Cons not have signature
pattern Cons :: a -> l a -> l a
append :: l a -> l a -> l a
New description: In section Associated pattern synonyms on https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms is written {{{ class ListLike l where pattern Nil :: l a pattern Cons :: a -> l a -> a isNil :: l a -> Bool isNil Nil = True isNil (Cons _ _) = False }}} yet should Cons not have signature {{{ pattern Cons :: a -> l a -> l a }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14560#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler