Compare commits

...

2 Commits

2 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ program =
]
while :: Expr -> Prog -> Stmt
while cond body = Loop $ If cond [] [ Break ] : body
while cond body = Loop [ If cond body [ Break ] ]
sumFromTo :: Int -> Int -> Prog
sumFromTo f t =

View File

@ -1,3 +1,5 @@
{-# LANGUAGE GADTs #-}
module HW4Part2 where
{-
- int ::= (any integer)
-
@ -18,7 +20,6 @@
- prog ::= \epsilon | stmt; prog
-}
{-# LANGUAGE GADTs #-}
import Control.Monad.Except
import Control.Monad.State
import Data.Bool