Created
February 19, 2015 21:50
-
-
Save joshcough/b6288738f1b3712d2294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
statements needs these new arguments | |
:: HashMap Text (Set Global) -> -- all imported term names | |
HashMap Text (Set Global) -> -- all imported type names | |
... | |
-- we can 'resolve/filter' an import clause with something like: | |
resolveTermImports :: Monad m => | |
Import Global -> -- the import, obvs | |
HashMap Text Global -> -- map of all the term globals in the module | |
HashMap Text Global -> -- appropriately filtered result | |
-- types are same as terms. | |
resolveTypeImports :: Monad m => | |
Import Global -> | |
HashMap Text Global -> | |
HashMap Text Global | |
we need to save those maps for all of the import clauses in a module | |
and then we can union together the term maps with something like: | |
(HM.unionWith HS.union . fmap HS.Singleton) termMap | |
we do the same thing for the type maps, and we have the right argments for statements |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment