Skip to content

Pattern synonyms and unboxed values

It's possible to declare a toplevel unboxed value with a pattern synonym, which causes a panic:

{-# LANGUAGE PatternSynonyms, MagicHash #-}
pattern P = 0#

(compare with error on x = 0#). pattern P <- 0# seems to work fine.

Edited by Krzysztof Gogolewski
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information