mirror of
https://github.com/github/semantic.git
synced 2024-12-11 08:45:48 +03:00
Rename fromList to fromModules.
This commit is contained in:
parent
fec4e09c25
commit
be84d9ff78
@ -178,7 +178,7 @@ withModules :: MonadEvaluatable location term value m
|
||||
=> [Module term]
|
||||
-> m a
|
||||
-> m a
|
||||
withModules = localModuleTable . const . ModuleTable.fromList
|
||||
withModules = localModuleTable . const . ModuleTable.fromModules
|
||||
|
||||
-- | Evaluate with a list of modules in scope, taking the head module as the entry point.
|
||||
evaluateModules :: MonadEvaluatable location term value m
|
||||
|
@ -4,7 +4,7 @@ module Data.Abstract.ModuleTable
|
||||
, ModuleTable (..)
|
||||
, lookup
|
||||
, insert
|
||||
, fromList
|
||||
, fromModules
|
||||
, toPairs
|
||||
) where
|
||||
|
||||
@ -25,8 +25,8 @@ insert k v ModuleTable{..} = ModuleTable (Map.insert k v unModuleTable)
|
||||
|
||||
|
||||
-- | Construct a 'ModuleTable' from a list of 'Module's.
|
||||
fromList :: [Module term] -> ModuleTable [Module term]
|
||||
fromList = ModuleTable . Map.fromListWith (<>) . map toEntry
|
||||
fromModules :: [Module term] -> ModuleTable [Module term]
|
||||
fromModules = ModuleTable . Map.fromListWith (<>) . map toEntry
|
||||
where toEntry m = (moduleName m, [m])
|
||||
|
||||
toPairs :: ModuleTable a -> [(ModuleName, a)]
|
||||
|
Loading…
Reference in New Issue
Block a user