diff --git a/src/Data/Abstract/Environment.hs b/src/Data/Abstract/Environment.hs index b6d8bf6a4..e413ad821 100644 --- a/src/Data/Abstract/Environment.hs +++ b/src/Data/Abstract/Environment.hs @@ -88,7 +88,7 @@ mergeNewer (Environment a) (Environment b) = -- | Extract an association list of bindings from an 'Environment'. -- -- >>> pairs shadowed --- [(Name "foo",Address (Precise 1))] +-- [(Name {unName = "foo"},Address (Precise 1))] pairs :: Environment location value -> [(Name, Address location value)] pairs = map (second Address) . Map.toList . fold . unEnvironment diff --git a/src/Data/Abstract/FreeVariables.hs b/src/Data/Abstract/FreeVariables.hs index 2dcd58ebc..baa1851b6 100644 --- a/src/Data/Abstract/FreeVariables.hs +++ b/src/Data/Abstract/FreeVariables.hs @@ -8,15 +8,12 @@ import Data.Term import Prologue -- | The type of variable names. -newtype Name = Name ByteString +newtype Name = Name { unName :: ByteString } deriving (Eq, Ord, Show) name :: ByteString -> Name name = Name -unName :: Name -> ByteString -unName (Name bytes) = bytes - instance IsString Name where fromString = Name . BC.pack