From 96984250b7f6342b5bc3f61eb58fd96c3536bf5f Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 26 Mar 2009 18:30:30 +0000 Subject: [PATCH] Added some missing cases to the ShowCode module --- common/ShowCode.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/ShowCode.hs b/common/ShowCode.hs index 275a3dd..ca8138f 100644 --- a/common/ShowCode.hs +++ b/common/ShowCode.hs @@ -386,6 +386,7 @@ instance ShowOccam A.LiteralRepr where showOccamM (A.HexLiteral _ s) = tell ["#", s] showOccamM (A.ByteLiteral _ s) = tell ["'", s, "'"] showOccamM (A.ArrayListLiteral _ elems) = tell ["["] >> showOccamM elems >> tell ["]"] + showOccamM (A.RecordLiteral _ es) = tell ["["] >> showOccamM es >> tell ["]"] --TODO record literals instance ShowRain A.LiteralRepr where @@ -550,6 +551,8 @@ instance ShowOccam A.Variant where instance ShowOccam A.Actual where showOccamM (A.ActualVariable v) = showOccamM v showOccamM (A.ActualExpression e) = showOccamM e + showOccamM (A.ActualChannelArray vs) = tell ["["] >> showOccamM vs >> tell ["]"] + showOccamM (A.ActualClaim v) = tell ["CLAIM "] >> showOccamM v instance ShowOccam A.OutputItem where showOccamM (A.OutExpression _ e) = showOccamM e @@ -609,7 +612,12 @@ showWithSemis ss = sequence_ $ intersperse (tell [" ; "]) $ map showOccamM ss instance ShowOccam A.ExpressionList where showOccamM (A.ExpressionList _ es) = showWithCommas es - --TODO functioncalllist + showOccamM (A.FunctionCallList _ n es) + = showOccamM n >> tell ["("] >> showOccamM es >> tell [")"] + showOccamM (A.IntrinsicFunctionCallList _ n es) + = tell [n, "("] >> showOccamM es >> tell [")"] + showOccamM (A.AllocChannelBundle _ n) + = tell ["MOBILE "] >> showOccamM n instance ShowRain A.ExpressionList where showRainM (A.ExpressionList _ [e]) = showRainM e