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

📝 Closure.

This commit is contained in:
Rob Rix 2017-12-21 09:40:38 -05:00
parent 6d89beccea
commit ea4e0dcc6c

View File

@ -29,6 +29,7 @@ type Value location = Union (ValueConstructors location)
-- TODO: Parameterize Value by the set of constructors s.t. each language can have a distinct value union. -- TODO: Parameterize Value by the set of constructors s.t. each language can have a distinct value union.
-- TODO: Wrap the Value union in a newtype to differentiate from (eventual) à la carte Types. -- TODO: Wrap the Value union in a newtype to differentiate from (eventual) à la carte Types.
-- | A function value consisting of a list of parameters, the body of the function, and an environment of bindings captured by the body.
data Closure location term = Closure [Name] term (Environment location (Value location term)) data Closure location term = Closure [Name] term (Environment location (Value location term))
deriving (Eq, Generic1, Ord, Show) deriving (Eq, Generic1, Ord, Show)