mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Define unExports as a function rather than a selector.
This commit is contained in:
parent
17c6a5be85
commit
c4dc798ffd
@ -16,9 +16,12 @@ import qualified Data.Map as Map
|
||||
import Data.Semilattice.Lower
|
||||
|
||||
-- | A map of export names to an alias & address tuple.
|
||||
newtype Exports location value = Exports { unExports :: Map.Map Name (Name, Maybe (Address location value)) }
|
||||
newtype Exports location value = Exports (Map.Map Name (Name, Maybe (Address location value)))
|
||||
deriving (Eq, Lower, Monoid, Ord, Semigroup, Show)
|
||||
|
||||
unExports :: Exports location value -> Map.Map Name (Name, Maybe (Address location value))
|
||||
unExports (Exports exports) = exports
|
||||
|
||||
null :: Exports location value -> Bool
|
||||
null = Map.null . unExports
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user