1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Define the Empty instance for EvaluatorState in terms of other Empty instances.

This commit is contained in:
Rob Rix 2018-04-25 18:12:57 -04:00
parent 1e5e766da9
commit eae31711c2

View File

@ -74,7 +74,7 @@ import qualified Data.IntMap as IntMap
import Data.Semigroup.Reducer
import Lens.Micro
import Prelude hiding (fail)
import Prologue
import Prologue hiding (empty)
-- | A 'Monad' providing the basic essentials for evaluation.
--
@ -112,7 +112,7 @@ instance (Ord location, Semigroup (Cell location value)) => Semigroup (Evaluator
EvaluatorState e1 h1 m1 l1 x1 j1 o1 <> EvaluatorState e2 h2 m2 l2 x2 j2 o2 = EvaluatorState (e1 <> e2) (h1 <> h2) (m1 <> m2) (l1 <> l2) (x1 <> x2) (j1 <> j2) (o1 <> o2)
instance (Ord location, Semigroup (Cell location value)) => Empty (EvaluatorState location term value) where
empty = EvaluatorState mempty mempty mempty mempty mempty mempty mempty
empty = EvaluatorState empty empty empty empty empty empty empty
-- Lenses