@@ -20,6 +20,7 @@ module Development.IDE.State.Rules(
20 getDefinition,
20 getDefinition,
21 getDependencies,
21 getDependencies,
22 getDalfDependencies,
22 getDalfDependencies,
23 fileFromParsedModule
24 fileFromParsedModule
@@ -120,6 +121,10 @@ getDefinition :: NormalizedFilePath -> Position -> Action (Maybe Location)
120getDefinition file pos = do
121getDefinition file pos = do
121 fmap (either (const Nothing) id) . runExceptT $ getDefinitionForFile file pos
122 fmap (either (const Nothing) id) . runExceptT $ getDefinitionForFile file pos
124+-- | Parse the contents of a daml file.
125+getParsedModule :: NormalizedFilePath -> Action (Maybe ParsedModule)
126+getParsedModule file =
127+ eitherToMaybe <$> (runExceptT $ useE GetParsedModule file)
124------------------------------------------------------------
129------------------------------------------------------------
125-- Internal Actions
130-- Internal Actions