1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 17:05:33 +03:00

🔥 modifyExports.

This commit is contained in:
Rob Rix 2018-05-30 14:21:13 -04:00
parent 3ae5cc171a
commit eff98cfb03

View File

@ -12,10 +12,6 @@ import Data.Abstract.Name
getExports :: Member (State (Exports address)) effects => Evaluator address value effects (Exports address)
getExports = get
-- | Update the global export state.
modifyExports :: Member (State (Exports address)) effects => (Exports address -> Exports address) -> Evaluator address value effects ()
modifyExports = modify'
-- | Add an export to the global export state.
addExport :: Member (State (Exports address)) effects => Name -> Name -> Maybe address -> Evaluator address value effects ()
addExport name alias = modifyExports . insert name alias
addExport name alias = modify' . insert name alias