[Haskell-cafe] Pattern guards seen in the wild?

Ben Franksen ben.franksen at online.de
Mon Oct 4 20:16:59 UTC 2021

Am 01.10.21 um 09:04 schrieb Tom Smeding:
> 2. Actually a special case of (1.): this is particularly useful with
> GADTs and "discovered" type evidence, like in
> https://github.com/AccelerateHS/accelerate/blob/1ab75f1eb01a1b427563808057d46f29d99bb4dc/src/Data/Array/Accelerate/Prelude.hs#L1429
> .

Yes, exactly. It is not allowed to do that in let-bindings (including 
where-clauses), only in case matches, pattern guards, and monadic binds.

I would rather have questions that cannot be answered, than answers that
cannot be questioned.  -- Richard Feynman

More information about the Haskell-Cafe mailing list