Added code for the Mobile types to the ShowCode module
This commit is contained in:
parent
441b700d8d
commit
86054ba754
|
@ -199,6 +199,7 @@ instance ShowOccam A.Type where
|
||||||
showOccamM A.Timer = return "TIMER"
|
showOccamM A.Timer = return "TIMER"
|
||||||
showOccamM A.Time = return "TIME"
|
showOccamM A.Time = return "TIME"
|
||||||
|
|
||||||
|
showOccamM (A.Mobile t) = return "MOBILE " +>> showOccamM t
|
||||||
showOccamM (A.Array ds t)
|
showOccamM (A.Array ds t)
|
||||||
= (return $ concat [case d of
|
= (return $ concat [case d of
|
||||||
A.Dimension n -> "[" ++ show n ++ "]"
|
A.Dimension n -> "[" ++ show n ++ "]"
|
||||||
|
@ -232,6 +233,8 @@ instance ShowRain A.Type 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 A.Time = "time"
|
||||||
|
-- Mobility is not explicit in Rain:
|
||||||
|
showRain (A.Mobile t) = showRain t
|
||||||
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