1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Derive hella instances for Env.

This commit is contained in:
Rob Rix 2017-09-09 19:03:15 +01:00
parent 7374994127
commit a80ee2cdb4

View File

@ -29,7 +29,7 @@ newtype MetaVar = MetaVar { unMetaVar :: String }
deriving (Eq, Ord, Show)
newtype Env a = Env { unEnv :: [(MetaVar, a)] }
deriving (Eq, Monoid, Ord, Show)
deriving (Eq, Foldable, Functor, Monoid, Ord, Show, Traversable)
envExtend :: MetaVar -> a -> Env a -> Env a
envExtend var val (Env m) = Env ((var, val) : m)