File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -186,11 +186,14 @@ arityFormat = ("++"++) . prettyPrint
186
186
-- | Retrieve the name and a list of exported functions of a haskell module.
187
187
-- It should use 'parseFileContents' to take pragmas into account.
188
188
exportsGet :: String -> Either String (ModuleName , [Name ])
189
- exportsGet content = case parseFileContents content of
189
+ exportsGet content = case parseSrc of
190
190
ParseOk (Module _ name _ _ header _ decls)
191
191
-> Right . (,) name $ maybe (exportsFromDecls decls)
192
192
exportsFromHeader header
193
193
ParseFailed _ msg -> Left msg
194
+ where parseSrc = parseFileContentsWithMode
195
+ defaultParseMode {fixities = Nothing }
196
+ content
194
197
195
198
exportsFromDecls :: [Decl ] -> [Name ]
196
199
exportsFromDecls = mapMaybe declarationNames
You can’t perform that action at this time.
0 commit comments