From a9c4c5471bffe6b729e9e6860f32bdc5f62b1ec7 Mon Sep 17 00:00:00 2001 From: Lee Pike Date: Wed, 21 Dec 2011 21:07:38 -0800 Subject: [PATCH] Changed syntax. --- src/Copilot/Core/Expr.hs | 2 +- src/Copilot/Core/Interpret/Eval.hs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Copilot/Core/Expr.hs b/src/Copilot/Core/Expr.hs index 8c24cb2..87382c1 100644 --- a/src/Copilot/Core/Expr.hs +++ b/src/Copilot/Core/Expr.hs @@ -98,6 +98,6 @@ data Expr a where -------------------------------------------------------------------------------- -- | A untyped expression (no phantom type). -data UExpr = forall a . UExpr +data UExpr = forall a. UExpr { uExprType :: Type a , uExprExpr :: Expr a } diff --git a/src/Copilot/Core/Interpret/Eval.hs b/src/Copilot/Core/Interpret/Eval.hs index eb7d46d..34d8313 100644 --- a/src/Copilot/Core/Interpret/Eval.hs +++ b/src/Copilot/Core/Interpret/Eval.hs @@ -46,6 +46,8 @@ instance Show InterpException where badUsage $ "you need to supply a list of values for interpreting external element " ++ name --------------------------------------- + + -- Should be caught by Analyze.hs in copilot-language. show (BadType name) = badUsage $ "you probably gave the wrong type for external element " ++ name ++ ". Recheck your types and re-evaluate"