mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Ingest exports/imports/declarations.
This commit is contained in:
parent
2ac3f65b15
commit
af0ebfa696
@ -28,8 +28,12 @@ parseModuleFile file = do
|
||||
return $ parseModule contents
|
||||
|
||||
moduleToTerm :: HsModule -> Term a Info
|
||||
moduleToTerm (HsModule loc name exports imports declarations) = info :< Indexed [] where
|
||||
moduleToTerm (HsModule loc name exports imports declarations) = info :< Indexed terms where
|
||||
info = Info Range { start = 0, end = 0 } Data.Set.empty
|
||||
exportTerms = exportSpecToTerm <$> maybe [] id exports
|
||||
importTerms = importDeclarationToTerm <$> imports
|
||||
declarationTerms = declarationToTerm <$> declarations
|
||||
terms = exportTerms ++ importTerms ++ declarationTerms
|
||||
|
||||
exportSpecToTerm :: HsExportSpec -> Term a Info
|
||||
exportSpecToTerm spec = _
|
||||
|
Loading…
Reference in New Issue
Block a user