mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
🔥 the functional dependency on AbstractValue.
This commit is contained in:
parent
c427be3670
commit
022e0779f7
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE FunctionalDependencies, GADTs, KindSignatures, Rank2Types #-}
|
||||
{-# LANGUAGE GADTs, KindSignatures, Rank2Types #-}
|
||||
module Control.Abstract.Value
|
||||
( AbstractValue(..)
|
||||
, AbstractHole(..)
|
||||
@ -40,7 +40,7 @@ class AbstractHole value where
|
||||
-- | A 'Monad' abstracting the evaluation of (and under) binding constructs (functions, methods, etc).
|
||||
--
|
||||
-- This allows us to abstract the choice of whether to evaluate under binders for different value types.
|
||||
class Show value => AbstractValue location term value (effects :: [* -> *]) | effects value -> location where
|
||||
class Show value => AbstractValue location term value (effects :: [* -> *]) where
|
||||
-- | Construct an abstract unit value.
|
||||
-- TODO: This might be the same as the empty tuple for some value types
|
||||
unit :: Evaluator location term value effects value
|
||||
|
@ -42,7 +42,7 @@ evaluatingWithHoles
|
||||
. resumingValueError
|
||||
. resumingEvalError
|
||||
. resumingResolutionError
|
||||
. resumingAddressError @(Value Precise)
|
||||
. resumingAddressError @(Value Precise) @Precise
|
||||
|
||||
-- The order is significant here: caching has to run before typeChecking, or else we’ll nondeterministically produce TypeErrors as part of the result set. While this is probably actually correct, it will require us to have an Ord instance for TypeError, which we don’t have yet.
|
||||
checking
|
||||
|
Loading…
Reference in New Issue
Block a user