1 module Symantic.Parser.Automaton.Instructions where
3 class Automatable repr where
4 ret :: repr inp '[x] n x a
5 push :: x -> repr inp (x ': xs) n r a -> repr inp xs n r a
6 pop :: repr inp xs n r a -> repr inp (x ': xs) n r a
8 data Automaton inp xs n x a where
9 Ret :: Automaton inp '[x] n x a
10 Push :: x -> Automaton inp (x ': xs) n r a -> Automaton inp xs n r a
11 Pop :: Automaton inp xs n r a -> Automaton inp (x ': xs) n r a