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:
parent
629137443f
commit
c6217865b9
|
@ -126,6 +126,7 @@ data Type =
|
||||||
| Counted Type Type
|
| Counted Type Type
|
||||||
| Any
|
| Any
|
||||||
| Timer
|
| Timer
|
||||||
|
| Time
|
||||||
| Port Type
|
| Port Type
|
||||||
deriving (Show, Eq, Typeable, Data)
|
deriving (Show, Eq, Typeable, Data)
|
||||||
|
|
||||||
|
@ -465,6 +466,7 @@ data Process =
|
||||||
| Input Meta Variable InputMode
|
| Input Meta Variable InputMode
|
||||||
| Output Meta Variable [OutputItem]
|
| Output Meta Variable [OutputItem]
|
||||||
| OutputCase Meta Variable Name [OutputItem]
|
| OutputCase Meta Variable Name [OutputItem]
|
||||||
|
| GetTime Meta Variable
|
||||||
| Skip Meta
|
| Skip Meta
|
||||||
| Stop Meta
|
| Stop Meta
|
||||||
-- | The main process.
|
-- | The main process.
|
||||||
|
|
|
@ -97,6 +97,7 @@ instance ShowOccam A.Type where
|
||||||
showOccam (A.Counted ct et) = showOccam ct ++ "::" ++ showOccam et
|
showOccam (A.Counted ct et) = showOccam ct ++ "::" ++ showOccam et
|
||||||
showOccam A.Any = "ANY"
|
showOccam A.Any = "ANY"
|
||||||
showOccam A.Timer = "TIMER"
|
showOccam A.Timer = "TIMER"
|
||||||
|
showOccam A.Time = "TIME"
|
||||||
showOccam (A.Port t) = "PORT OF " ++ showOccam t
|
showOccam (A.Port t) = "PORT OF " ++ showOccam t
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,6 +120,7 @@ instance ShowRain A.Type where
|
||||||
where
|
where
|
||||||
ao :: Bool -> String
|
ao :: Bool -> String
|
||||||
ao b = if b then "any" else "one"
|
ao b = if b then "any" else "one"
|
||||||
|
showRain A.Time = "time"
|
||||||
showRain x = "<invalid Rain type: " ++ show x ++ ">"
|
showRain x = "<invalid Rain type: " ++ show x ++ ">"
|
||||||
|
|
||||||
instance ShowOccam A.DyadicOp where
|
instance ShowOccam A.DyadicOp where
|
||||||
|
|
Loading…
Reference in New Issue
Block a user