Comments (1)
To answer my own issue, the problem seem to be with the dflags
that are set in initDynFlagsPure
(perhaps when some language extensions are set in the cabal file, supplemented by language extensions in the source file). If I use the ModSummary
dflags
but also set Opt_KeepRawTokenStream
with parseModuleFromStringInternal
it all works OK.
I suspect that the fix to https://gitlab.haskell.org/ghc/ghc/issues/10942 is what is causing the comments to disappear without setting Opt_KeepRawTokenStream
.
I have not tried the other adjustments that initDynFlagsPure
makes, such as -hide-all-packages
, without apparent ill effect.
So there does seem to be an underlying bug here, but it's not clear to me what the fix is.
from ghc-exactprint.
Related Issues (20)
- 1.3.0 is not buildable with ghc <9.2 HOT 1
- Hackage revisions with upper bounds on ghc package HOT 1
- Build failure with GHC 9.4.1 HOT 7
- For exactprint 1.5.0 / ghc-9.2.5, `makeDeltaAst'` seems to just break things
- balanceCommentsList makes a mess of relative positions
- Missing match for HsType: HsDocTy HOT 1
- Missing match for IE HOT 1
- ghc-9.8.1 build failure HOT 4
- No instance for ‘MonadTrans TransformT’ HOT 3
- Usage examples? HOT 14
- ParseResult is a different type after 8.10 HOT 1
- exactPrinted comments seem to gain additional carriage returns on Windows
- addAnnotationsForPretty breaks layout HOT 5
- Parse/Print roundtrip loses shebang unless file path is in the form of "dir/file.hs"
- Migrate to ghc-lib HOT 2
- Release 0.6.3.3 HOT 3
- Using `ghc-paths` makes downstream executables non portable HOT 4
- Can DeltaPos of the first pattern not depend on the position of "case"? HOT 2
- Support GHC 9.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghc-exactprint.