pulsar/src/Aspect.hs

25 lines
578 B
Haskell

module Aspect where
import Text.ParserCombinators.Parsec
{-| Aspects represent the tasks that something is suitable for as well as its properties.
-- They are nominally formed of an Aspect type (which amounts to an Enum), as well an amount.
|--}
-- TODO: Figure out how to structure this... Type level counting????
data Aspect Type where
GenericAspect :: {
aspect :: AspectI,
amount :: Int
} -> Aspect a
parseAspect :: Parser AspectI
parseAspect = do
a <- many char
return $ case a of
"Flam" -> Flammable
"Cond" -> Conductive
"Cool" -> Cooling