I have a simplified version of the standard interpreter monad transformer generated by FreeT:
FreeT
data InteractiveF p r a = Interact p (r -> a) type