Skip to content

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
Edited by pjljvdlaar
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information