mirror of
https://github.com/github/semantic.git
synced 2025-01-06 23:46:21 +03:00
Define a helper to construct a package from a list of modules.
This commit is contained in:
parent
be84d9ff78
commit
e1f9e34659
@ -2,7 +2,7 @@ module Data.Abstract.Package where
|
||||
|
||||
import Data.Abstract.FreeVariables
|
||||
import Data.Abstract.Module
|
||||
import Data.Abstract.ModuleTable
|
||||
import Data.Abstract.ModuleTable as ModuleTable
|
||||
|
||||
type PackageName = Name
|
||||
|
||||
@ -16,3 +16,7 @@ data Package term = Package
|
||||
|
||||
newtype Version = Version { versionString :: String }
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
|
||||
fromModules :: [Module term] -> Package term
|
||||
fromModules modules = Package Nothing Nothing (ModuleTable.fromModules modules) mempty
|
||||
|
Loading…
Reference in New Issue
Block a user