Skip to content

Bang patterns ignored in TH quotes

Example:

gen :: Q [Dec]
gen = [d|
  f g = let !x = g 3
            ~y = g 4
         in x + y
  |]

In the splice, the ~ is there, but the ! isn't. One must use bangP to get the !. Is this by design?

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