Nice! How is that done?
/ EmilDen 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 -> ...