From c6217865b95ddab0ac827d67dee26b1aa8fed89f Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 19 Sep 2007 10:20:40 +0000 Subject: [PATCH] Added the Time type, and the GetTime process to the AST, and added showOccam/showRain lines for the Time type --- common/AST.hs | 2 ++ common/ShowCode.hs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/common/AST.hs b/common/AST.hs index 80641c1..91e7ca7 100644 --- a/common/AST.hs +++ b/common/AST.hs @@ -126,6 +126,7 @@ data Type = | Counted Type Type | Any | Timer + | Time | Port Type deriving (Show, Eq, Typeable, Data) @@ -465,6 +466,7 @@ data Process = | Input Meta Variable InputMode | Output Meta Variable [OutputItem] | OutputCase Meta Variable Name [OutputItem] + | GetTime Meta Variable | Skip Meta | Stop Meta -- | The main process. diff --git a/common/ShowCode.hs b/common/ShowCode.hs index 38d2d9a..94463bd 100644 --- a/common/ShowCode.hs +++ b/common/ShowCode.hs @@ -97,6 +97,7 @@ instance ShowOccam A.Type where showOccam (A.Counted ct et) = showOccam ct ++ "::" ++ showOccam et showOccam A.Any = "ANY" showOccam A.Timer = "TIMER" + showOccam A.Time = "TIME" showOccam (A.Port t) = "PORT OF " ++ showOccam t @@ -119,6 +120,7 @@ instance ShowRain A.Type where where ao :: Bool -> String ao b = if b then "any" else "one" + showRain A.Time = "time" showRain x = "" instance ShowOccam A.DyadicOp where