Compare commits
No commits in common. "035ee14144634ca99a8cbe63fef00f00446688a8" and "b2e7ccfeda86f8500705d35264458a95665df069" have entirely different histories.
035ee14144
...
b2e7ccfeda
@ -32,7 +32,7 @@ program =
|
|||||||
]
|
]
|
||||||
|
|
||||||
while :: Expr -> Prog -> Stmt
|
while :: Expr -> Prog -> Stmt
|
||||||
while cond body = Loop [ If cond body [ Break ] ]
|
while cond body = Loop $ If cond [] [ Break ] : body
|
||||||
|
|
||||||
sumFromTo :: Int -> Int -> Prog
|
sumFromTo :: Int -> Int -> Prog
|
||||||
sumFromTo f t =
|
sumFromTo f t =
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
{-# LANGUAGE GADTs #-}
|
|
||||||
module HW4Part2 where
|
|
||||||
{-
|
{-
|
||||||
- int ::= (any integer)
|
- int ::= (any integer)
|
||||||
-
|
-
|
||||||
@ -20,6 +18,7 @@ module HW4Part2 where
|
|||||||
- prog ::= \epsilon | stmt; prog
|
- prog ::= \epsilon | stmt; prog
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
{-# LANGUAGE GADTs #-}
|
||||||
import Control.Monad.Except
|
import Control.Monad.Except
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import Data.Bool
|
import Data.Bool
|
||||||
|
Loading…
Reference in New Issue
Block a user