git.iko.soy/rowtype-yoga/purescript-backend-optimizer
on main help sign in
18 lines 548 B history raw
1module Snapshot.CaseNamed where
3import Prelude
5test1 :: Int -> String
6test1 = case _ of
7 one@one'@one''@1 -> show one <> show one' <> show one''
8 two@2 -> show two
9 any0@any1@any -> "any: " <> show any0 <> show any1 <> show any
11data Product3 = Product3 Int Int Int
13test2 :: Product3 -> String
14test2 = case _ of
15 Product3 c@1 a b -> show a <> show b <> show c
16 Product3 a c@1 b -> show a <> show b <> show c
17 Product3 a b c@1 -> show a <> show b <> show c
18 Product3 a@x b@y c@z -> show a <> show x <> show b <> show y <> show c <> show z