import GolangLean.AST import GolangLean.Env import GolangLean.Error namespace GolangLean /-! # Evaluator — operational big-step interpreter over the AST. Mirror of octive-lean's `Eval`. Monad stack `ExceptT GoError (StateT Env IO)`, chosen for the same reason: state survives non-local control flow (defer, panic, goroutine spawn) carried as exceptions. -/ abbrev EvalM := ExceptT GoError (StateT Env IO) partial def evalExpr (_e : Expr) : EvalM Value := throw (.notImpl "Eval.evalExpr") partial def evalStmt (_s : Stmt) : EvalM Unit := throw (.notImpl "Eval.evalStmt") def runFile (path : String) : IO UInt32 := do IO.eprintln s!"golang-lean: would execute {path} (interpreter not yet implemented)" return 1 end GolangLean