From 4055746e19365cf0a03a1ef92df3748d52f9e945 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 10 Feb 2009 22:20:02 +0000 Subject: [PATCH] Fixed typeOfVariable to handle directed inferred variables --- common/Types.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/Types.hs b/common/Types.hs index d8bd1e9..a111c2c 100644 --- a/common/Types.hs +++ b/common/Types.hs @@ -217,7 +217,8 @@ typeOfVariable (A.DirectedVariable m dir v) if dir == dir' then return t else dieP m $ "Attempted to reverse direction of a channel-end" - _ -> dieP m $ "Direction specified on non-channel variable" + A.Infer -> return $ A.ChanEnd dir (A.ChanAttributes False False) A.Infer + _ -> diePC m $ formatCode "Direction specified on non-channel variable of type: %" t -- | Get the abbreviation mode of a variable. abbrevModeOfVariable :: (CSMR m, Die m) => A.Variable -> m A.AbbrevMode