@@ -1,14 +1,14 @@
11module Auto where
22
3− data Auto s i o = Auto { state :: s, step :: s -> i -> o }
3+ data Auto s i o = MkAuto { state :: s, step :: s -> i -> o }
44
55 type SomeAuto i o = forall r. (forall s. Auto s i o -> r) -> r
66
77 exists :: forall s i o. s -> (s -> i -> o) -> SomeAuto i o
8− exists = \state step f -> f (Auto { state: state, step: step })
8+ exists = \state step f -> f (MkAuto { state: state, step: step })
99
1010 run :: forall i o. SomeAuto i o -> i -> o
11− run = \s i -> s (\a -> case a of Auto a -> a.step a.state i)
11+ run = \s i -> s (\a -> case a of MkAuto a -> a.step a.state i)
1212
1313module Main where
1414