Skip to content

Pattern synonym does not work in top-level pattern bind

When I say

{-# LANGUAGE PatternSynonyms #-}
pattern Id x = x

Id x = True

I get

    Not in scope: data constructor ‘Id’

This happens with both 7.8.3 and HEAD.

Edited by Gergő Érdi
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information