Added the Time type, and the GetTime process to the AST, and added showOccam/showRain lines for the Time type

This commit is contained in:
Neil Brown 2007-09-19 10:20:40 +00:00
parent 629137443f
commit c6217865b9
2 changed files with 4 additions and 0 deletions

View File

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

View File

@ -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 = "<invalid Rain type: " ++ show x ++ ">"
instance ShowOccam A.DyadicOp where