I'm getting a missing case definition when I'm calling this
check c (n:nx) state (l:ls,r:rs)
=true,if((isprefix state c)&(r=n))
=false, otherwise
I've checked this and it works on its own no matter what I send it.
This is where I'm calling it from (warning: it's a bit badly written for now):
readword input state tape
=output tape, if (((haltcheck sWord sNum state tape)=true)&(isprefix " halt" rline))
=doinst rline state tape , if ((check sWord sNum state tape)=true)
=readword tail state tape, otherwise
where
theline = dropwhile notit input
start = dropwhile isspace theline
sWord = takewhile letter start
ends = dropwhile notspace start
distart = dropwhile isspace ends
sNum = takewhile notspace distart
tail = dropwhile notspace distart
rline = takewhile notit tail