Skip to content

Instantly share code, notes, and snippets.

View nicolashahn's full-sized avatar

Nicolas Hahn nicolashahn

View GitHub Profile
@nicolashahn
nicolashahn / cmps112asg5
Created May 6, 2015 22:19
cmps112 asg5
For this assignment, you will create an interpreter for a minimal imperative WHILE language in Haskell.
First, copy the following definitions into a new file called hw5.hs.
-- Necessary imports
import Control.Applicative ((<$>),liftA,liftA2)
import Data.Map
import Text.Parsec
import Text.Parsec.Expr
import Text.Parsec.Language (emptyDef)
-- main.hs
import Data.Monoid ((<>))
import Graphics.Gloss
import Graphics.Gloss.Interface.IO.Game
import Math.Geometry.Grid
import Math.Geometry.Grid.Square
import Data.List
import System.Random
import System.Random.Shuffle