[Haskell-cafe] implementing recursive let

2009-11-24 Thread Ben Franksen
I am trying to write an interpreter for a very simple untyped functional language. I have a problem with mutually recursive let expressions, for which my interpreter loops :( This is a code snippet from the eval function: eval :: Expr - Eval Value eval (Let decls body) = mdo let

Re: [Haskell-cafe] implementing recursive let

2009-11-24 Thread Derek Elkins
The following code works fine for me, so it seems you are missing some details that may help. {-# LANGUAGE RecursiveDo, GeneralizedNewtypeDeriving, TypeSynonymInstances, MultiParamTypeClasses #-} import Control.Monad import Control.Monad.State import Control.Monad.Error import