summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShayan Najd <sh.najd@gmail.com>2017-08-14 10:49:34 +0000
committerShayan Najd <sh.najd@gmail.com>2017-08-14 10:49:34 +0000
commitd7e3b6162b506ef9348a4b0af6f8d55213a8d7ef (patch)
tree61fa99ee7ec391ff651826b99c69faae8e860ade
parent9ffe09200d1a32fcfb8ba22f64d1684ac416f989 (diff)
downloadhaskell-wip/GrowableAST.tar.gz
Growable AST:wip/GrowableAST
- fixed some testcases
-rw-r--r--testsuite/tests/ghc-api/annotations-literals/parsed.stdout4
-rw-r--r--testsuite/tests/parser/should_compile/DumpParsedAst.stderr334
-rw-r--r--testsuite/tests/parser/should_compile/DumpRenamedAst.stderr342
-rw-r--r--testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr475
4 files changed, 669 insertions, 486 deletions
diff --git a/testsuite/tests/ghc-api/annotations-literals/parsed.stdout b/testsuite/tests/ghc-api/annotations-literals/parsed.stdout
index 7984181504..c3e3de0ebf 100644
--- a/testsuite/tests/ghc-api/annotations-literals/parsed.stdout
+++ b/testsuite/tests/ghc-api/annotations-literals/parsed.stdout
@@ -1,12 +1,12 @@
+HsString [noExpr] "noExpr"
HsIntegral [0003] 3
HsString [noExpr] "noExpr"
HsIntegral [0x04] 4
-HsString [noExpr] "noExpr"
HsString ["\x20"] " "
HsChar ['\x20'] ' '
HsString [noExpr] "noExpr"
HsCharPrim ['\x41'] 'A'
HsIntPrim [0004#] 4
HsWordPrim [005##] 5
-HsIntegral [1] 1
HsString [noExpr] "noExpr"
+HsIntegral [1] 1 \ No newline at end of file
diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
index ad3680e578..7988f9ac17 100644
--- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
@@ -2,236 +2,292 @@
==================== Parser AST ====================
({ DumpParsedAst.hs:1:1 }
- (HsModule
- (Just
- ({ DumpParsedAst.hs:3:8-20 }{ModuleName: DumpParsedAst}))
- (Nothing)
- []
+ (Module
+ (())
+ (Just
+ ({ DumpParsedAst.hs:3:8-20 }{ModuleName: DumpParsedAst}))
+ (Nothing)
+ []
[
({ DumpParsedAst.hs:5:1-30 }
- (TyClD
- (DataDecl
+ (TyClD
+ (())
+ (DataDecl
+ ((,)
+ (PlaceHolder)
+ (PlaceHolder))
({ DumpParsedAst.hs:5:6-10 }
- (Unqual {OccName: Peano}))
- (HsQTvs
- (PlaceHolder)
- []
- (PlaceHolder))
- (Prefix)
- (HsDataDefn
- (DataType)
+ (Unqual {OccName: Peano}))
+ (QTvs
+ ((,)
+ (PlaceHolder)
+ (PlaceHolder))
+ [])
+ (Prefix)
+ (DataDefn
+ (())
+ (DataType)
({ <no location info> }
- [])
- (Nothing)
- (Nothing)
+ [])
+ (Nothing)
+ (Nothing)
[
({ DumpParsedAst.hs:5:14-17 }
- (ConDeclH98
+ (ConDeclH98
+ (())
({ DumpParsedAst.hs:5:14-17 }
- (Unqual {OccName: Zero}))
- (Nothing)
- (Just
+ (Unqual {OccName: Zero}))
+ (Nothing)
+ (Just
({ <no location info> }
- []))
- (PrefixCon
- [])
+ []))
+ (PrefixCon
+ [])
(Nothing))),
({ DumpParsedAst.hs:5:21-30 }
- (ConDeclH98
+ (ConDeclH98
+ (())
({ DumpParsedAst.hs:5:21-24 }
- (Unqual {OccName: Succ}))
- (Nothing)
- (Just
+ (Unqual {OccName: Succ}))
+ (Nothing)
+ (Just
({ <no location info> }
- []))
- (PrefixCon
+ []))
+ (PrefixCon
[
({ DumpParsedAst.hs:5:26-30 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:5:26-30 }
- (Unqual {OccName: Peano}))))])
- (Nothing)))]
+ (Unqual {OccName: Peano}))))])
+ (Nothing)))]
({ <no location info> }
- []))
- (PlaceHolder)
- (PlaceHolder)))),
+ []))))),
({ DumpParsedAst.hs:7:1-39 }
- (TyClD
- (FamDecl
- (FamilyDecl
- (ClosedTypeFamily
- (Just
+ (TyClD
+ (())
+ (FamDecl
+ (())
+ (FamilyDecl
+ (())
+ (ClosedTypeFamily
+ (())
+ (Just
[
({ DumpParsedAst.hs:8:3-36 }
- (TyFamEqn
+ (TyFamEqn
+ (())
({ DumpParsedAst.hs:8:3-8 }
- (Unqual {OccName: Length}))
- (HsIB
- (PlaceHolder)
+ (Unqual {OccName: Length}))
+ (IB
+ ((,)
+ (PlaceHolder)
+ (PlaceHolder))
[
({ DumpParsedAst.hs:8:10-17 }
- (HsParTy
+ (ParTy
+ (())
({ DumpParsedAst.hs:8:11-16 }
- (HsAppsTy
+ (AppsTy
+ (())
[
({ DumpParsedAst.hs:8:11 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:8:11 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:8:11 }
(Unqual {OccName: a})))))),
({ DumpParsedAst.hs:8:13 }
- (HsAppInfix
+ (AppInfix
+ (())
({ DumpParsedAst.hs:8:13 }
(Exact {Name: ghc-prim:GHC.Types.:{(w) d}})))),
({ DumpParsedAst.hs:8:15-16 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:8:15-16 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:8:15-16 }
- (Unqual {OccName: as}))))))]))))]
- (PlaceHolder))
- (Prefix)
+ (Unqual {OccName: as}))))))]))))])
+ (Prefix)
({ DumpParsedAst.hs:8:21-36 }
- (HsAppsTy
+ (AppsTy
+ (())
[
({ DumpParsedAst.hs:8:21-24 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:8:21-24 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:8:21-24 }
(Unqual {OccName: Succ})))))),
({ DumpParsedAst.hs:8:26-36 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:8:26-36 }
- (HsParTy
+ (ParTy
+ (())
({ DumpParsedAst.hs:8:27-35 }
- (HsAppsTy
+ (AppsTy
+ (())
[
({ DumpParsedAst.hs:8:27-32 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:8:27-32 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:8:27-32 }
(Unqual {OccName: Length})))))),
({ DumpParsedAst.hs:8:34-35 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:8:34-35 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:8:34-35 }
(Unqual {OccName: as}))))))]))))))])))),
({ DumpParsedAst.hs:9:3-24 }
- (TyFamEqn
+ (TyFamEqn
+ (())
({ DumpParsedAst.hs:9:3-8 }
- (Unqual {OccName: Length}))
- (HsIB
- (PlaceHolder)
+ (Unqual {OccName: Length}))
+ (IB
+ ((,)
+ (PlaceHolder)
+ (PlaceHolder))
[
({ DumpParsedAst.hs:9:10-12 }
- (HsExplicitListTy
- (Promoted)
- (PlaceHolder)
- []))]
- (PlaceHolder))
- (Prefix)
+ (ExplicitListTy
+ (PlaceHolder)
+ (Promoted)
+ []))])
+ (Prefix)
({ DumpParsedAst.hs:9:21-24 }
- (HsAppsTy
+ (AppsTy
+ (())
[
({ DumpParsedAst.hs:9:21-24 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:9:21-24 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:9:21-24 }
- (Unqual {OccName: Zero}))))))]))))]))
+ (Unqual {OccName: Zero}))))))]))))]))
({ DumpParsedAst.hs:7:13-18 }
- (Unqual {OccName: Length}))
- (HsQTvs
- (PlaceHolder)
+ (Unqual {OccName: Length}))
+ (QTvs
+ ((,)
+ (PlaceHolder)
+ (PlaceHolder))
[
({ DumpParsedAst.hs:7:20-30 }
- (KindedTyVar
+ (KindedTyVar'
+ (())
({ DumpParsedAst.hs:7:21-22 }
- (Unqual {OccName: as}))
+ (Unqual {OccName: as}))
({ DumpParsedAst.hs:7:27-29 }
- (HsAppsTy
+ (AppsTy
+ (())
[
({ DumpParsedAst.hs:7:27-29 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:7:27-29 }
- (HsListTy
+ (ListTy
+ (())
({ DumpParsedAst.hs:7:28 }
- (HsAppsTy
+ (AppsTy
+ (())
[
({ DumpParsedAst.hs:7:28 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:7:28 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:7:28 }
- (Unqual {OccName: k}))))))]))))))]))))]
- (PlaceHolder))
- (Prefix)
+ (Unqual {OccName: k}))))))]))))))]))))])
+ (Prefix)
({ DumpParsedAst.hs:7:32-39 }
- (KindSig
+ (KindSigR
+ (())
({ DumpParsedAst.hs:7:35-39 }
- (HsAppsTy
+ (AppsTy
+ (())
[
({ DumpParsedAst.hs:7:35-39 }
- (HsAppPrefix
+ (AppPrefix
+ (())
({ DumpParsedAst.hs:7:35-39 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpParsedAst.hs:7:35-39 }
- (Unqual {OccName: Peano}))))))]))))
+ (Unqual {OccName: Peano}))))))]))))
(Nothing))))),
({ DumpParsedAst.hs:11:1-23 }
- (ValD
- (FunBind
+ (ValD
+ (())
+ (FunBind
+ ((,,)
+ (WpHole)
+ (PlaceHolder)
+ [])
({ DumpParsedAst.hs:11:1-4 }
- (Unqual {OccName: main}))
- (MG
+ (Unqual {OccName: main}))
+ (MG
+ ((,)
+ []
+ (PlaceHolder))
({ DumpParsedAst.hs:11:1-23 }
[
({ DumpParsedAst.hs:11:1-23 }
- (Match
- (FunRhs
+ (Match
+ (())
+ (FunRhs
({ DumpParsedAst.hs:11:1-4 }
- (Unqual {OccName: main}))
- (Prefix)
- (NoSrcStrict))
- []
- (Nothing)
- (GRHSs
+ (Unqual {OccName: main}))
+ (Prefix)
+ (NoSrcStrict))
+ []
+ (Nothing)
+ (GRHSs
+ (())
[
({ DumpParsedAst.hs:11:6-23 }
- (GRHS
- []
+ (GRHS
+ (())
+ []
({ DumpParsedAst.hs:11:8-23 }
- (HsApp
+ (App
+ (())
({ DumpParsedAst.hs:11:8-15 }
- (HsVar
+ (Var
+ (())
({ DumpParsedAst.hs:11:8-15 }
- (Unqual {OccName: putStrLn}))))
+ (Unqual {OccName: putStrLn}))))
({ DumpParsedAst.hs:11:17-23 }
- (HsLit
- (HsString
- (SourceText "\"hello\"") {FastString: "hello"})))))))]
+ (Lit
+ (())
+ (String
+ (SourceText "/"hello/"") {FastString: "hello"})))))))]
({ <no location info> }
- (EmptyLocalBinds)))))])
- []
- (PlaceHolder)
- (FromSource))
- (WpHole)
- (PlaceHolder)
- [])))]
- (Nothing)
- (Nothing)))
-
-
+ (EmptyLocalBinds
+ (()))))))])
+ (FromSource)))))]
+ (Nothing)
+ (Nothing))) \ No newline at end of file
diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
index c873ee148b..16fb6d8c83 100644
--- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
@@ -1,193 +1,235 @@
==================== Renamer ====================
-(HsGroup
- (ValBindsOut
- [
- ((,)
- (NonRecursive) {Bag(Located (HsBind Name)):
- [
- ({ DumpRenamedAst.hs:11:1-23 }
- (FunBind
- ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v}})
- (MG
- ({ DumpRenamedAst.hs:11:1-23 }
- [
- ({ DumpRenamedAst.hs:11:1-23 }
- (Match
- (FunRhs
- ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v}})
- (Prefix)
- (NoSrcStrict))
- []
- (Nothing)
- (GRHSs
- [
- ({ DumpRenamedAst.hs:11:6-23 }
- (GRHS
- []
- ({ DumpRenamedAst.hs:11:8-23 }
- (HsApp
- ({ DumpRenamedAst.hs:11:8-15 }
- (HsVar
- ({ DumpRenamedAst.hs:11:8-15 }{Name: base:System.IO.putStrLn{v}})))
- ({ DumpRenamedAst.hs:11:17-23 }
- (HsLit
- (HsString
- (SourceText "\"hello\"") {FastString: "hello"})))))))]
- ({ <no location info> }
- (EmptyLocalBinds)))))])
- []
- (PlaceHolder)
- (FromSource))
- (WpHole) {NameSet:
- []}
- []))]})]
- [])
- []
+(Group
+ (())
+ (NewValBindsLR
+ (NValBindsOut
+ [
+ ((,)
+ (NonRecursive) {Bag(Located (HsBind Name)):
+ [
+ ({ DumpRenamedAst.hs:11:1-23 }
+ (FunBind
+ ((,,)
+ (WpHole) {NameSet:
+ []}
+ [])
+ ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v}})
+ (MG
+ ((,)
+ []
+ (PlaceHolder))
+ ({ DumpRenamedAst.hs:11:1-23 }
+ [
+ ({ DumpRenamedAst.hs:11:1-23 }
+ (Match
+ (())
+ (FunRhs
+ ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v}})
+ (Prefix)
+ (NoSrcStrict))
+ []
+ (Nothing)
+ (GRHSs
+ (())
+ [
+ ({ DumpRenamedAst.hs:11:6-23 }
+ (GRHS
+ (())
+ []
+ ({ DumpRenamedAst.hs:11:8-23 }
+ (App
+ (())
+ ({ DumpRenamedAst.hs:11:8-15 }
+ (Var
+ (())
+ ({ DumpRenamedAst.hs:11:8-15 }{Name: base:System.IO.putStrLn{v}})))
+ ({ DumpRenamedAst.hs:11:17-23 }
+ (Lit
+ (())
+ (String
+ (SourceText "/"hello/"") {FastString: "hello"})))))))]
+ ({ <no location info> }
+ (EmptyLocalBinds
+ (()))))))])
+ (FromSource))))]})]
+ []))
+ []
[
- (TyClGroup
+ (TyClGroup
+ (())
[
({ DumpRenamedAst.hs:5:1-30 }
- (DataDecl
- ({ DumpRenamedAst.hs:5:6-10 }{Name: main:DumpRenamedAst.Peano{tc}})
- (HsQTvs
- []
- [] {NameSet:
- []})
- (Prefix)
- (HsDataDefn
- (DataType)
+ (DataDecl
+ ((,)
+ (True) {NameSet:
+ [{Name: main:DumpRenamedAst.Peano{tc}}]})
+ ({ DumpRenamedAst.hs:5:6-10 }{Name: main:DumpRenamedAst.Peano{tc}})
+ (QTvs
+ ((,)
+ [] {NameSet:
+ []})
+ [])
+ (Prefix)
+ (DataDefn
+ (())
+ (DataType)
({ <no location info> }
- [])
- (Nothing)
- (Nothing)
+ [])
+ (Nothing)
+ (Nothing)
[
({ DumpRenamedAst.hs:5:14-17 }
- (ConDeclH98
- ({ DumpRenamedAst.hs:5:14-17 }{Name: main:DumpRenamedAst.Zero{d}})
- (Nothing)
- (Just
+ (ConDeclH98
+ (())
+ ({ DumpRenamedAst.hs:5:14-17 }{Name: main:DumpRenamedAst.Zero{d}})
+ (Nothing)
+ (Just
({ <no location info> }
- []))
- (PrefixCon
- [])
+ []))
+ (PrefixCon
+ [])
(Nothing))),
({ DumpRenamedAst.hs:5:21-30 }
- (ConDeclH98
- ({ DumpRenamedAst.hs:5:21-24 }{Name: main:DumpRenamedAst.Succ{d}})
- (Nothing)
- (Just
+ (ConDeclH98
+ (())
+ ({ DumpRenamedAst.hs:5:21-24 }{Name: main:DumpRenamedAst.Succ{d}})
+ (Nothing)
+ (Just
({ <no location info> }
- []))
- (PrefixCon
+ []))
+ (PrefixCon
[
({ DumpRenamedAst.hs:5:26-30 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:5:26-30 }{Name: main:DumpRenamedAst.Peano{tc}})))])
- (Nothing)))]
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:5:26-30 }{Name: main:DumpRenamedAst.Peano{tc}})))])
+ (Nothing)))]
({ <no location info> }
- []))
- (True) {NameSet:
- [{Name: main:DumpRenamedAst.Peano{tc}}]}))]
- []
+ []))))]
+ []
[]),
- (TyClGroup
+ (TyClGroup
+ (())
[
({ DumpRenamedAst.hs:7:1-39 }
- (FamDecl
- (FamilyDecl
- (ClosedTypeFamily
- (Just
+ (FamDecl
+ (())
+ (FamilyDecl
+ (())
+ (ClosedTypeFamily
+ (())
+ (Just
[
({ DumpRenamedAst.hs:8:3-36 }
- (TyFamEqn
- ({ DumpRenamedAst.hs:8:3-8 }{Name: main:DumpRenamedAst.Length{tc}})
- (HsIB
- [{Name: a{tv}},{Name: as{tv}}]
+ (TyFamEqn
+ (())
+ ({ DumpRenamedAst.hs:8:3-8 }{Name: main:DumpRenamedAst.Length{tc}})
+ (IB
+ ((,)
+ [{Name: a{tv}},{Name: as{tv}}]
+ (True))
[
({ DumpRenamedAst.hs:8:10-17 }
- (HsParTy
+ (ParTy
+ (())
({ DumpRenamedAst.hs:8:11-16 }
- (HsOpTy
+ (OpTy
+ (())
({ DumpRenamedAst.hs:8:11 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:8:11 }{Name: a{tv}})))
- ({ DumpRenamedAst.hs:8:13 }{Name: ghc-prim:GHC.Types.:{(w) d}})
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:8:11 }{Name: a{tv}})))
+ ({ DumpRenamedAst.hs:8:13 }{Name: ghc-prim:GHC.Types.:{(w) d}})
({ DumpRenamedAst.hs:8:15-16 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:8:15-16 }{Name: as{tv}})))))))]
- (True))
- (Prefix)
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:8:15-16 }{Name: as{tv}})))))))])
+ (Prefix)
({ DumpRenamedAst.hs:8:21-36 }
- (HsAppTy
+ (AppTy
+ (())
({ DumpRenamedAst.hs:8:21-24 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:8:21-24 }{Name: main:DumpRenamedAst.Succ{d}})))
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:8:21-24 }{Name: main:DumpRenamedAst.Succ{d}})))
({ DumpRenamedAst.hs:8:26-36 }
- (HsParTy
+ (ParTy
+ (())
({ DumpRenamedAst.hs:8:27-35 }
- (HsAppTy
+ (AppTy
+ (())
({ DumpRenamedAst.hs:8:27-32 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:8:27-32 }{Name: main:DumpRenamedAst.Length{tc}})))
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:8:27-32 }{Name: main:DumpRenamedAst.Length{tc}})))
({ DumpRenamedAst.hs:8:34-35 }
- (HsTyVar
- (NotPromoted)
+ (TyVar
+ (())
+ (NotPromoted)
({ DumpRenamedAst.hs:8:34-35 }{Name: as{tv}}))))))))))),
({ DumpRenamedAst.hs:9:3-24 }
- (TyFamEqn
- ({ DumpRenamedAst.hs:9:3-8 }{Name: main:DumpRenamedAst.Length{tc}})
- (HsIB
- []
+ (TyFamEqn
+ (())
+ ({ DumpRenamedAst.hs:9:3-8 }{Name: main:DumpRenamedAst.Length{tc}})
+ (IB
+ ((,)
+ []
+ (True))
[
({ DumpRenamedAst.hs:9:10-12 }
- (HsExplicitListTy
- (Promoted)
- (PlaceHolder)
- []))]
- (True))
- (Prefix)
+ (ExplicitListTy
+ (PlaceHolder)
+ (Promoted)
+ []))])
+ (Prefix)
({ DumpRenamedAst.hs:9:21-24 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:9:21-24 }{Name: main:DumpRenamedAst.Zero{d}})))))]))
- ({ DumpRenamedAst.hs:7:13-18 }{Name: main:DumpRenamedAst.Length{tc}})
- (HsQTvs
- [{Name: k{tv}}]
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:9:21-24 }{Name: main:DumpRenamedAst.Zero{d}})))))]))
+ ({ DumpRenamedAst.hs:7:13-18 }{Name: main:DumpRenamedAst.Length{tc}})
+ (QTvs
+ ((,)
+ [{Name: k{tv}}] {NameSet:
+ []})
[
({ DumpRenamedAst.hs:7:20-30 }
- (KindedTyVar
- ({ DumpRenamedAst.hs:7:21-22 }{Name: as{tv}})
+ (KindedTyVar'
+ (())
+ ({ DumpRenamedAst.hs:7:21-22 }{Name: as{tv}})
({ DumpRenamedAst.hs:7:27-29 }
- (HsListTy
+ (ListTy
+ (())
({ DumpRenamedAst.hs:7:28 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:7:28 }{Name: k{tv}})))))))] {NameSet:
- []})
- (Prefix)
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:7:28 }{Name: k{tv}})))))))])
+ (Prefix)
({ DumpRenamedAst.hs:7:32-39 }
- (KindSig
+ (KindSigR
+ (())
({ DumpRenamedAst.hs:7:35-39 }
- (HsTyVar
- (NotPromoted)
- ({ DumpRenamedAst.hs:7:35-39 }{Name: main:DumpRenamedAst.Peano{tc}})))))
- (Nothing))))]
- []
- [])]
- []
- []
- []
- []
- []
- []
- []
- []
- [])
-
+ (TyVar
+ (())
+ (NotPromoted)
+ ({ DumpRenamedAst.hs:7:35-39 }{Name: main:DumpRenamedAst.Peano{tc}})))))
+ (Nothing))))]
+ []
+ [])]
+ []
+ []
+ []
+ []
+ []
+ []
+ []
+ []
+ []) \ No newline at end of file
diff --git a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
index d96c448cf9..9769bb9007 100644
--- a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
@@ -1,280 +1,365 @@
==================== Typechecker ====================
-{Bag(Located (HsBind Var)):
+{Bag(Located (HsBind Var)):
[
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$tcPeano{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
+ (VarBind
+ (()) {Var: (main:DumpTypecheckedAst.$tcPeano{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- {HsWord{64}Prim
- (14073232900889011755)
- (NoSourceText)}))))
+ (Lit
+ (())
+ {HsWord{64}Prim
+ (14073232900889011755)
+ (NoSourceText)}))))
({ <no location info> }
- (HsLit
- {HsWord{64}Prim
- (2739668351064589274)
- (NoSourceText)}))))
+ (Lit
+ (())
+ {HsWord{64}Prim
+ (2739668351064589274)
+ (NoSourceText)}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
({ <no location info> }
- (HsPar
+ (Par
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- (HsStringPrim
- (NoSourceText) "Peano")))))))))
+ (Lit
+ (())
+ (StringPrim
+ (NoSourceText) "Peano")))))))))
({ <no location info> }
- (HsLit
- {HsInt{64}Prim
- (0)
- (SourceText "0")}))))
+ (Lit
+ (())
+ {HsInt{64}Prim
+ (0)
+ (SourceText "0")}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: (ghc-prim:GHC.Types.krep$*{v} [gid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: (ghc-prim:GHC.Types.krep$*{v} [gid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
(False))),
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$tc'Zero{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
+ (VarBind
+ (()) {Var: (main:DumpTypecheckedAst.$tc'Zero{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- {HsWord{64}Prim
- (13760111476013868540)
- (NoSourceText)}))))
+ (Lit
+ (())
+ {HsWord{64}Prim
+ (13760111476013868540)
+ (NoSourceText)}))))
({ <no location info> }
- (HsLit
- {HsWord{64}Prim
- (12314848029315386153)
- (NoSourceText)}))))
+ (Lit
+ (())
+ {HsWord{64}Prim
+ (12314848029315386153)
+ (NoSourceText)}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
({ <no location info> }
- (HsPar
+ (Par
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- (HsStringPrim
- (NoSourceText) "'Zero")))))))))
+ (Lit
+ (())
+ (StringPrim
+ (NoSourceText) "'Zero")))))))))
({ <no location info> }
- (HsLit
- {HsInt{64}Prim
- (0)
- (SourceText "0")}))))
+ (Lit
+ (())
+ {HsInt{64}Prim
+ (0)
+ (SourceText "0")}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
(False))),
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$tc'Succ{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
+ (VarBind
+ (()) {Var: (main:DumpTypecheckedAst.$tc'Succ{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- {HsWord{64}Prim
- (1143980031331647856)
- (NoSourceText)}))))
+ (Lit
+ (())
+ {HsWord{64}Prim
+ (1143980031331647856)
+ (NoSourceText)}))))
({ <no location info> }
- (HsLit
- {HsWord{64}Prim
- (14802086722010293686)
- (NoSourceText)}))))
+ (Lit
+ (())
+ {HsWord{64}Prim
+ (14802086722010293686)
+ (NoSourceText)}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
({ <no location info> }
- (HsPar
+ (Par
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- (HsStringPrim
- (NoSourceText) "'Succ")))))))))
+ (Lit
+ (())
+ (StringPrim
+ (NoSourceText) "'Succ")))))))))
({ <no location info> }
- (HsLit
- {HsInt{64}Prim
- (0)
- (SourceText "0")}))))
+ (Lit
+ (())
+ {HsInt{64}Prim
+ (0)
+ (SourceText "0")}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
(False))),
({ <no location info> }
- (VarBind {Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})}
+ (VarBind
+ (()) {Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})}
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})})))))
(False))),
({ <no location info> }
- (VarBind {Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})}
+ (VarBind
+ (()) {Var: ($krep{v} [lid] :: ghc-prim:GHC.Types.KindRep{tc})}
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsVar
- ({ <no location info> }{Var: (main:DumpTypecheckedAst.$tcPeano{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})})))))
+ (Var
+ (())
+ ({ <no location info> }{Var: (main:DumpTypecheckedAst.$tcPeano{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})})))))
({ <no location info> }
- (HsWrap
- (WpTyApp
- (TyConApp
- ({abstract:TyCon})
- []))
- (HsConLikeOut
- ({abstract:ConLike}))))))
+ (NewExpr
+ (NHsWrap
+ (WpTyApp
+ (TyConApp
+ ({abstract:TyCon})
+ []))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))))))
(False))),
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})}
+ (VarBind
+ (()) {Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})}
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsPar
+ (Par
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- (HsStringPrim
- (NoSourceText) "main")))))))))
+ (Lit
+ (())
+ (StringPrim
+ (NoSourceText) "main")))))))))
({ <no location info> }
- (HsPar
+ (Par
+ (())
({ <no location info> }
- (HsApp
+ (App
+ (())
({ <no location info> }
- (HsConLikeOut
- ({abstract:ConLike})))
+ (NewExpr
+ (NHsConLikeOut
+ ({abstract:ConLike}))))
({ <no location info> }
- (HsLit
- (HsStringPrim
- (NoSourceText) "DumpTypecheckedAst")))))))))
+ (Lit
+ (())
+ (StringPrim
+ (NoSourceText) "DumpTypecheckedAst")))))))))
(False))),
({ DumpTypecheckedAst.hs:11:1-23 }
- (AbsBinds
- []
- []
- [
- (ABE {Var: (main:DumpTypecheckedAst.main{v} [lid] :: ghc-prim:GHC.Types.IO{tc}
- ())} {Var: (main{v} [lid] :: ghc-prim:GHC.Types.IO{tc} ())}
- (WpHole)
- (SpecPrags
- []))]
- [
- ({abstract:TcEvBinds})] {Bag(Located (HsBind Var)):
- [
- ({ DumpTypecheckedAst.hs:11:1-23 }
- (FunBind
- ({ DumpTypecheckedAst.hs:11:1-4 }{Var: (main{v} [lid] :: ghc-prim:GHC.Types.IO{tc} ())})
- (MG
- ({ DumpTypecheckedAst.hs:11:1-23 }
- [
- ({ DumpTypecheckedAst.hs:11:1-23 }
- (Match
- (FunRhs
- ({ DumpTypecheckedAst.hs:11:1-4 }{Name: main:DumpTypecheckedAst.main{v}})
- (Prefix)
- (NoSrcStrict))
- []
- (Nothing)
- (GRHSs
- [
- ({ DumpTypecheckedAst.hs:11:6-23 }
- (GRHS
- []
- ({ DumpTypecheckedAst.hs:11:8-23 }
- (HsApp
- ({ DumpTypecheckedAst.hs:11:8-15 }
- (HsVar
- ({ <no location info> }{Var: (base:System.IO.putStrLn{v} [gid] :: base:GHC.Base.String{tc}
- -> ghc-prim:GHC.Types.IO{tc} ())})))
- ({ DumpTypecheckedAst.hs:11:17-23 }
- (HsLit
- (HsString
- (SourceText "\"hello\"") {FastString: "hello"})))))))]
- ({ <no location info> }
- (EmptyLocalBinds)))))])
- []
- (TyConApp
- ({abstract:TyCon})
- [
- (TyConApp
- ({abstract:TyCon})
- [])])
- (FromSource))
- (WpHole) {NameSet:
- []}
- []))]}
- (False)))]}
-
+ (NewBindLR
+ (NAbsBinds
+ []
+ []
+ [
+ (ABE {Var: (main:DumpTypecheckedAst.main{v} [lid] :: ghc-prim:GHC.Types.IO{tc}
+ ())} {Var: (main{v} [lid] :: ghc-prim:GHC.Types.IO{tc} ())}
+ (WpHole)
+ (SpecPrags
+ []))]
+ [
+ ({abstract:TcEvBinds})] {Bag(Located (HsBind Var)):
+ [
+ ({ DumpTypecheckedAst.hs:11:1-23 }
+ (FunBind
+ ((,,)
+ (WpHole) {NameSet:
+ []}
+ [])
+ ({ DumpTypecheckedAst.hs:11:1-4 }{Var: (main{v} [lid] :: ghc-prim:GHC.Types.IO{tc} ())})
+ (MG
+ ((,)
+ []
+ (TyConApp
+ ({abstract:TyCon})
+ [
+ (TyConApp
+ ({abstract:TyCon})
+ [])]))
+ ({ DumpTypecheckedAst.hs:11:1-23 }
+ [
+ ({ DumpTypecheckedAst.hs:11:1-23 }
+ (Match
+ (())
+ (FunRhs
+ ({ DumpTypecheckedAst.hs:11:1-4 }{Name: main:DumpTypecheckedAst.main{v}})
+ (Prefix)
+ (NoSrcStrict))
+ []
+ (Nothing)
+ (GRHSs
+ (())
+ [
+ ({ DumpTypecheckedAst.hs:11:6-23 }
+ (GRHS
+ (())
+ []
+ ({ DumpTypecheckedAst.hs:11:8-23 }
+ (App
+ (())
+ ({ DumpTypecheckedAst.hs:11:8-15 }
+ (Var
+ (())
+ ({ <no location info> }{Var: (base:System.IO.putStrLn{v} [gid] :: base:GHC.Base.String{tc}
+ -> ghc-prim:GHC.Types.IO{tc} ())})))
+ ({ DumpTypecheckedAst.hs:11:17-23 }
+ (Lit
+ (())
+ (String
+ (SourceText "/"hello/"") {FastString: "hello"})))))))]
+ ({ <no location info> }
+ (EmptyLocalBinds
+ (()))))))])
+ (FromSource))))]}
+ (False))))]} \ No newline at end of file