Skip to content

Infix pattern synonyms fail to parse (regression)

{-# LANGUAGE PatternSynonyms #-}
pattern head `Cons` tail = head : tail

In v7.10 I get:

[1 of 1] Compiling Main             ( pat.hs, interpreted )

pat.hs:2:14: parse error on input ?`?

In v7.8 I get:

[1 of 1] Compiling Main             ( ph.hs, interpreted )
Ok, modules loaded: Main.
*Main> :set -XPatternSynonyms
*Main> let h `Cons` t = "ht"
*Main> h
'h'
*Main> t
"t"
Edited by rwbarton
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information