Compare commits
2 Commits
b2e7ccfeda
...
035ee14144
Author | SHA1 | Date | |
---|---|---|---|
035ee14144 | |||
e567872503 |
@ -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 =
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user