@@ -20,6 +20,7 @@ module Development.IDE.State.Rules(
2020 getDefinition,
2121 getDependencies,
2222 getDalfDependencies,
23+ getParsedModule,
2324 fileFromParsedModule
2425 ) where
2526
@@ -120,6 +121,10 @@ getDefinition :: NormalizedFilePath -> Position -> Action (Maybe Location)
120121getDefinition file pos = do
121122 fmap (either (const Nothing) id) . runExceptT $ getDefinitionForFile file pos
122123
124+-- | Parse the contents of a daml file.
125+getParsedModule :: NormalizedFilePath -> Action (Maybe ParsedModule)
126+getParsedModule file =
127+ eitherToMaybe <$> (runExceptT $ useE GetParsedModule file)
123128
124129------------------------------------------------------------
125130-- Internal Actions