I want to use haskell-src-exts to parse haskell source module. But it requires fixities of all the operators to be specified. So I need to have a list of all imported modules to extract fixities for all the operators in scope.
So, I need to parse module to get list of imported modules; and I need the list of imported modules to parse the module :(
The question: how to parse haskell source module without parsing it? Is there any other parser I can use? How hlint solves the issue?
haskell-src-exts
provides function to extract top level pragmas. I need something similar, but for imported modules.