Your shift
function is declared to return a Subst
, but it really returns a list. You probably meant to wrap the Subst
constructor around the list.
Then your subst
function is declared to take a Subst
argument, but you're calling it with a list - same issue basically.
Also your vars
function probably contains a type error as well because, as I indicated in my answer to your previous question, you can't define a meaningful function of type a -> [String]
.