module Symantic.Parser.Automaton.Instructions where class Automatable repr where ret :: repr inp '[x] n x a push :: x -> repr inp (x ': xs) n r a -> repr inp xs n r a pop :: repr inp xs n r a -> repr inp (x ': xs) n r a data Automaton inp xs n x a where Ret :: Automaton inp '[x] n x a Push :: x -> Automaton inp (x ': xs) n r a -> Automaton inp xs n r a Pop :: Automaton inp xs n r a -> Automaton inp (x ': xs) n r a