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