diff options
author | Camil Staps | 2018-01-07 11:51:01 +0100 |
---|---|---|
committer | Camil Staps | 2018-01-07 11:51:01 +0100 |
commit | 8ecc7a12c6d898199d86ef3bb1ef4bd1d325d32b (patch) | |
tree | 5a16bf2abcd28026815dfd0c0f5bc038094313db /assignment-13/uFPL.dcl | |
parent | Generate code from iTasks (diff) |
Finish generation of setup/loop/system functions; save files
Diffstat (limited to 'assignment-13/uFPL.dcl')
-rw-r--r-- | assignment-13/uFPL.dcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/assignment-13/uFPL.dcl b/assignment-13/uFPL.dcl index fee3c26..4d69076 100644 --- a/assignment-13/uFPL.dcl +++ b/assignment-13/uFPL.dcl @@ -39,6 +39,12 @@ instance allShares Trigger instance allShares Rule instance allShares NamedRule +class allTriggers t :: t -> [Trigger] +instance allTriggers [t] | allTriggers t +instance allTriggers Trigger +instance allTriggers Rule +instance allTriggers NamedRule + class Expr t | TC t where litExpr :: t -> CExpr instance Expr Int instance Expr Bool @@ -82,7 +88,7 @@ pressed :: (Expr Bool RO) -> Trigger | E.rwa rwb: SetCursor (Expr Int rwa, Expr Int rwb) | E.t rw: Print (Expr t rw) & Expr, toString t -:: NamedRule = E.r: (:=:) infixr 1 String r & gen r CBody & run, allShares, TC r +:: NamedRule = E.r: (:=:) infixr 1 String r & gen r CBody & run, allShares, allTriggers, TC r class gen f t :: f -> t |