
1 Sep
2020
1 Sep
'20
1:39 p.m.
Nice! How is that done? / Emil Den 2020-09-01 kl. 13:50, skrev Trevor McDonell:
Embedded pattern matching
This release also introduces support for /embedded pattern matching/ via the new |match| operator, which allows us to reuse Haskell's case syntax in embedded code:
intersect :: Exp Ray -> Exp Object -> Exp Bool intersect ray= match\case Sphere_ c r-> ... Triangle_ a b c-> ...