Comments (1)
Thanks. Here is the dump for our reference.
({ test.hs:1:1 }
Just (Ann (DP (0,0)) [] [] [((AnnComment Comment {commentContents = "{-# LANGUAGE QuasiQuotes #-}", commentIdentifier = RealSrcSpan SrcSpanOneLine "test.hs" 1 1 29, commentOrigin = Nothing}),DP (0,0)),((G AnnModule),DP (1,0)),((G AnnVal),DP (0,1)),((G AnnWhere),DP (0,1)),((G AnnEofPos),DP (1,0))] Nothing Nothing)
(HsModule
(Just
({ test.hs:2:8-11 }
Nothing{ModuleName: Test}))
(Nothing)
[]
[
({ test.hs:(4,1)-(7,14) }
Just (Ann (DP (2,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:4:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: a}))
(False)
(MG
[
({ test.hs:(4,1)-(7,14) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1)),((G AnnWhere),DP (1,4))] Just [test.hs:(6,9)-(7,14)] Nothing)
(Match
(Just
((,)
({ test.hs:4:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: a}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(4,3)-(7,14) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:4:5-7 }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsVar
(Unqual {OccName: bar})))))]
(HsValBinds
(ValBindsIn {Bag(Located (HsBind RdrName)):
[
({ test.hs:(6,9)-(7,14) }
Just (Ann (DP (1,8)) [] [] [] Nothing Nothing)
(FunBind
({ test.hs:6:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)
(MG
[
({ test.hs:(6,9)-(7,14) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:6:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(6,13)-(7,14) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(6,15)-(7,14) }
Just (Ann (DP (0,1)) [] [] [] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(6,18)-(7,14) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))]}
[])))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))),
({ test.hs:(9,1)-(12,13) }
Just (Ann (DP (3,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:9:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: b}))
(False)
(MG
[
({ test.hs:(9,1)-(12,13) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1)),((G AnnWhere),DP (1,4))] Just [test.hs:(11,9)-(12,13)] Nothing)
(Match
(Just
((,)
({ test.hs:9:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: b}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(9,3)-(12,13) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:9:5-7 }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsVar
(Unqual {OccName: bar})))))]
(HsValBinds
(ValBindsIn {Bag(Located (HsBind RdrName)):
[
({ test.hs:(11,9)-(12,13) }
Just (Ann (DP (1,8)) [] [] [] Nothing Nothing)
(FunBind
({ test.hs:11:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)
(MG
[
({ test.hs:(11,9)-(12,13) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:11:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(11,13)-(12,13) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(11,15)-(12,13) }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(11,18)-(12,13) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))]}
[])))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))),
({ test.hs:(14,1)-(17,15) }
Just (Ann (DP (2,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:14:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: c}))
(False)
(MG
[
({ test.hs:(14,1)-(17,15) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1)),((G AnnWhere),DP (1,4))] Just [test.hs:(16,9)-(17,15)] Nothing)
(Match
(Just
((,)
({ test.hs:14:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: c}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(14,3)-(17,15) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:14:5-7 }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsVar
(Unqual {OccName: bar})))))]
(HsValBinds
(ValBindsIn {Bag(Located (HsBind RdrName)):
[
({ test.hs:(16,9)-(17,15) }
Just (Ann (DP (1,8)) [] [] [] Nothing Nothing)
(FunBind
({ test.hs:16:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)
(MG
[
({ test.hs:(16,9)-(17,15) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:16:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(16,13)-(17,15) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(16,15)-(17,15) }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(16,18)-(17,15) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))]}
[])))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))),
({ test.hs:(19,1)-(20,14) }
Just (Ann (DP (2,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:19:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: d}))
(False)
(MG
[
({ test.hs:(19,1)-(20,14) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:19:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: d}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(19,3)-(20,14) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(19,5)-(20,14) }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(19,8)-(20,14) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[])))]
(Nothing)
(Nothing)))
({ test.hs:1:1 }
Just (Ann (DP (0,0)) [] [] [((AnnComment Comment {commentContents = "{-# LANGUAGE QuasiQuotes #-}", commentIdentifier = RealSrcSpan SrcSpanOneLine "test.hs" 1 1 29, commentOrigin = Nothing}),DP (0,0)),((G AnnModule),DP (1,0)),((G AnnVal),DP (0,1)),((G AnnWhere),DP (0,1)),((G AnnEofPos),DP (1,0))] Nothing Nothing)
(HsModule
(Just
({ test.hs:2:8-11 }
Nothing{ModuleName: Test}))
(Nothing)
[]
[
({ test.hs:(4,1)-(7,14) }
Just (Ann (DP (2,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:4:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: a}))
(False)
(MG
[
({ test.hs:(4,1)-(7,14) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1)),((G AnnWhere),DP (1,4))] Just [test.hs:(6,9)-(7,14)] Nothing)
(Match
(Just
((,)
({ test.hs:4:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: a}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(4,3)-(7,14) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:4:5-7 }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsVar
(Unqual {OccName: bar})))))]
(HsValBinds
(ValBindsIn {Bag(Located (HsBind RdrName)):
[
({ test.hs:(6,9)-(7,14) }
Just (Ann (DP (1,8)) [] [] [] Nothing Nothing)
(FunBind
({ test.hs:6:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)
(MG
[
({ test.hs:(6,9)-(7,14) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:6:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(6,13)-(7,14) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(6,15)-(7,14) }
Just (Ann (DP (0,1)) [] [] [] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(6,18)-(7,14) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))]}
[])))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))),
({ test.hs:(9,1)-(12,13) }
Just (Ann (DP (3,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:9:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: b}))
(False)
(MG
[
({ test.hs:(9,1)-(12,13) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1)),((G AnnWhere),DP (1,4))] Just [test.hs:(11,9)-(12,13)] Nothing)
(Match
(Just
((,)
({ test.hs:9:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: b}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(9,3)-(12,13) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:9:5-7 }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsVar
(Unqual {OccName: bar})))))]
(HsValBinds
(ValBindsIn {Bag(Located (HsBind RdrName)):
[
({ test.hs:(11,9)-(12,13) }
Just (Ann (DP (1,8)) [] [] [] Nothing Nothing)
(FunBind
({ test.hs:11:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)
(MG
[
({ test.hs:(11,9)-(12,13) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:11:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(11,13)-(12,13) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(11,15)-(12,13) }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(11,18)-(12,13) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))]}
[])))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))),
({ test.hs:(14,1)-(17,15) }
Just (Ann (DP (2,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:14:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: c}))
(False)
(MG
[
({ test.hs:(14,1)-(17,15) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1)),((G AnnWhere),DP (1,4))] Just [test.hs:(16,9)-(17,15)] Nothing)
(Match
(Just
((,)
({ test.hs:14:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: c}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(14,3)-(17,15) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:14:5-7 }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsVar
(Unqual {OccName: bar})))))]
(HsValBinds
(ValBindsIn {Bag(Located (HsBind RdrName)):
[
({ test.hs:(16,9)-(17,15) }
Just (Ann (DP (1,8)) [] [] [] Nothing Nothing)
(FunBind
({ test.hs:16:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)
(MG
[
({ test.hs:(16,9)-(17,15) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:16:9-11 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: bar}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(16,13)-(17,15) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(16,15)-(17,15) }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(16,18)-(17,15) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))]}
[])))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[]))),
({ test.hs:(19,1)-(20,14) }
Just (Ann (DP (2,0)) [] [] [] Nothing Nothing)
(ValD
(FunBind
({ test.hs:19:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: d}))
(False)
(MG
[
({ test.hs:(19,1)-(20,14) }
Just (Ann (DP (0,0)) [] [] [((G AnnEqual),DP (0,1))] Nothing Nothing)
(Match
(Just
((,)
({ test.hs:19:1 }
Just (Ann (DP (0,0)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(Unqual {OccName: d}))
(False)))
[]
(Nothing)
(GRHSs
[
({ test.hs:(19,3)-(20,14) }
Just (Ann (DP (0,-1)) [] [] [] Nothing Nothing)
(GRHS
[]
({ test.hs:(19,5)-(20,14) }
Just (Ann (DP (0,1)) [] [] [((G AnnVal),DP (0,0))] Nothing Nothing)
(HsQuasiQuoteE
(HsQuasiQuote
(Unqual {OccName: q}) { test.hs:(19,8)-(20,14) } {FastString: "\n "})))))]
(EmptyLocalBinds))))]
[]
(PlaceHolder)
(FromSource))
(WpHole)
(PlaceHolder)
[])))]
(Nothing)
(Nothing)))
{-# LANGUAGE QuasiQuotes #-}
module Test where
a = bar
where
bar =
b = bar
where
bar = [q|
|]
c = bar
where
bar = [q|
|]
d = [q|
|]
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
- parseModuleFromString seems to use unhelpful dflags 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.