mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Reorder the type applications
This commit is contained in:
parent
24006eecaf
commit
b03c2b8581
@ -64,7 +64,7 @@ type Env' v = Environment (LocationFor v) v
|
||||
|
||||
-- Step :: (forall term. (Recursive term) => term) -> EvalEnv v
|
||||
|
||||
step :: forall term es v. (Evaluatable es term v (Base term), Eval (Base term) term :< es, Recursive term) => term -> Eff es v
|
||||
step :: forall v term es. (Evaluatable es term v (Base term), Eval (Base term) term :< es, Recursive term) => term -> Eff es v
|
||||
step = eval . project
|
||||
|
||||
data Eval constr term v where
|
||||
@ -102,9 +102,9 @@ instance (Recursive t
|
||||
)
|
||||
=> Evaluatable es t v [] where
|
||||
eval [] = pure unit -- Return unit value if this is an empty list of terms
|
||||
eval [x] = step @t x -- Return the value for the last term
|
||||
eval [x] = step x -- Return the value for the last term
|
||||
eval (x:xs) = do
|
||||
_ <- step @t @es @v x -- Evaluate the head term
|
||||
_ <- step @v x -- Evaluate the head term
|
||||
env <- get @(Environment (LocationFor v) v) -- Get the global environment after evaluation since
|
||||
-- it might have been modified by the 'step'
|
||||
-- evaluation above ^.
|
||||
|
Loading…
Reference in New Issue
Block a user