1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 09:21:35 +03:00

Swap the type parameters.

This commit is contained in:
Rob Rix 2018-05-31 09:05:30 -04:00
parent 8b9f49b5ea
commit 252b904520

View File

@ -41,14 +41,14 @@ import Prologue
-- | The 'Evaluatable' class defines the necessary interface for a term to be evaluated. While a default definition of 'eval' is given, instances with computational content must implement 'eval' to perform their small-step operational semantics.
class Evaluatable constr where
eval :: ( EvaluatableConstraints address term value effects
eval :: ( EvaluatableConstraints term address value effects
, Member Fail effects
)
=> SubtermAlgebra constr term (Evaluator address value effects (ValueRef value))
default eval :: (Member (Resumable (Unspecialized value)) effects, Show1 constr) => SubtermAlgebra constr term (Evaluator address value effects (ValueRef value))
eval expr = throwResumable (Unspecialized ("Eval unspecialized for " ++ liftShowsPrec (const (const id)) (const id) 0 expr ""))
type EvaluatableConstraints address term value effects =
type EvaluatableConstraints term address value effects =
( AbstractValue address value effects
, Declarations term
, FreeVariables term
@ -73,7 +73,7 @@ evaluatePackageWith :: forall address term value inner inner' inner'' outer
-- FIXME: Itd be nice if we didnt have to mention 'Addressable' here at all, but 'Located' locations require knowledge of 'currentModule' to run. Can we fix that?
. ( Addressable address inner'
, Evaluatable (Base term)
, EvaluatableConstraints address term value inner
, EvaluatableConstraints term address value inner
, Member Fail outer
, Member Fresh outer
, Member (Resumable (AddressError address value)) outer