Fixed typeOfVariable to handle directed inferred variables

This commit is contained in:
Neil Brown 2009-02-10 22:20:02 +00:00
parent 6db9b221af
commit 4055746e19

View File

@ -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