Paste: discriminated unions
Author: | inforichland |
Mode: | haskell |
Date: | Mon, 3 Aug 2009 05:46:11 |
Plain Text |
data Objects = Whiskeybottle | Bucket | Chain | Frog | Wizard | Well
deriving (Eq, Show, Read)
data Direction = West | East | Upstairs | Downstairs
deriving (Eq, Show, Read)
data Room = Garden | Attic | LivingRoom | Inventory
deriving (Eq, Show, Read)
data Path = Path {
dir :: Direction,
entryway :: String,
to :: Room
} deriving (Eq, Show)
data Location = Location {
name :: Room,
desc :: String,
paths :: [Path],
objects :: [Objects]
} deriving (Eq)
New Annotation