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

Move Label into Data.Abstract.FreeVariables.

This commit is contained in:
Rob Rix 2018-03-15 14:49:59 -04:00
parent 6fc1747652
commit 42ec0c8717
3 changed files with 7 additions and 6 deletions

View File

@ -112,10 +112,6 @@ modifyModuleTable f = do
putModuleTable $! f table
-- | The type of labels.
-- TODO: This should be rolled into 'Name' and tracked in the environment, both so that we can abstract over labels like any other location, and so that we can garbage collect unreachable labels.
type Label = Int
-- | A 'Monad' abstracting jumps in imperative control.
class Monad m => MonadControl term m where
-- | Allocate a 'Label' for the given @term@.

View File

@ -19,6 +19,11 @@ friendlyName :: Name -> ByteString
friendlyName xs = intercalate "." (NonEmpty.toList xs)
-- | The type of labels.
-- TODO: This should be rolled into 'Name' and tracked in the environment, both so that we can abstract over labels like any other location, and so that we can garbage collect unreachable labels.
type Label = Int
-- | Types which can contain unbound variables.
class FreeVariables term where
-- | The set of free variables in the given value.

View File

@ -1,9 +1,9 @@
{-# LANGUAGE DeriveAnyClass #-}
module Language.Go.Syntax where
import Prologue
import Data.Abstract.Evaluatable
import Data.Abstract.Evaluatable hiding (Label)
import Diffing.Algorithm
import Prologue
-- A composite literal in Go
data Composite a = Composite { compositeType :: !a, compositeElement :: !a }