{-# LANGUAGE PatternSynonyms #-} module ShouldCompile where pattern Single{x} = [x] pattern Double{y, z} = (y, z) pattern More{x} <- (x, _) where More x = (x, Nothing) selector :: Int selector = x [5] update :: [String] update = ["String"]{x = "updated"}