Smarter HsType pretty-print for promoted datacons
[ghc.git] / testsuite / tests / parser / should_compile / DumpRenamedAst.stderr
1
2 ==================== Renamer ====================
3
4 (Just
5  ((,,,)
6   (HsGroup
7    (NoExt)
8    (XValBindsLR
9     (NValBinds
10      [((,)
11        (NonRecursive)
12        {Bag(Located (HsBind Name)):
13         [({ DumpRenamedAst.hs:20:1-23 }
14           (FunBind
15            {NameSet:
16             []}
17            ({ DumpRenamedAst.hs:20:1-4 }
18             {Name: DumpRenamedAst.main})
19            (MG
20             (NoExt)
21             ({ DumpRenamedAst.hs:20:1-23 }
22              [({ DumpRenamedAst.hs:20:1-23 }
23                (Match
24                 (NoExt)
25                 (FunRhs
26                  ({ DumpRenamedAst.hs:20:1-4 }
27                   {Name: DumpRenamedAst.main})
28                  (Prefix)
29                  (NoSrcStrict))
30                 []
31                 (GRHSs
32                  (NoExt)
33                  [({ DumpRenamedAst.hs:20:6-23 }
34                    (GRHS
35                     (NoExt)
36                     []
37                     ({ DumpRenamedAst.hs:20:8-23 }
38                      (HsApp
39                       (NoExt)
40                       ({ DumpRenamedAst.hs:20:8-15 }
41                        (HsVar
42                         (NoExt)
43                         ({ DumpRenamedAst.hs:20:8-15 }
44                          {Name: System.IO.putStrLn})))
45                       ({ DumpRenamedAst.hs:20:17-23 }
46                        (HsLit
47                         (NoExt)
48                         (HsString
49                          (SourceText
50                           "\"hello\"")
51                          {FastString: "hello"})))))))]
52                  ({ <no location info> }
53                   (EmptyLocalBinds
54                    (NoExt))))))])
55             (FromSource))
56            (WpHole)
57            []))]})]
58      []))
59    []
60    [(TyClGroup
61      (NoExt)
62      [({ DumpRenamedAst.hs:8:1-30 }
63        (DataDecl
64         (DataDeclRn
65          (True)
66          {NameSet:
67           [{Name: DumpRenamedAst.Peano}]})
68         ({ DumpRenamedAst.hs:8:6-10 }
69          {Name: DumpRenamedAst.Peano})
70         (HsQTvs
71          (HsQTvsRn
72           []
73           {NameSet:
74            []})
75          [])
76         (Prefix)
77         (HsDataDefn
78          (NoExt)
79          (DataType)
80          ({ <no location info> }
81           [])
82          (Nothing)
83          (Nothing)
84          [({ DumpRenamedAst.hs:8:14-17 }
85            (ConDeclH98
86             (NoExt)
87             ({ DumpRenamedAst.hs:8:14-17 }
88              {Name: DumpRenamedAst.Zero})
89             ({ <no location info> }
90              (False))
91             []
92             (Nothing)
93             (PrefixCon
94              [])
95             (Nothing)))
96          ,({ DumpRenamedAst.hs:8:21-30 }
97            (ConDeclH98
98             (NoExt)
99             ({ DumpRenamedAst.hs:8:21-24 }
100              {Name: DumpRenamedAst.Succ})
101             ({ <no location info> }
102              (False))
103             []
104             (Nothing)
105             (PrefixCon
106              [({ DumpRenamedAst.hs:8:26-30 }
107                (HsTyVar
108                 (NoExt)
109                 (NotPromoted)
110                 ({ DumpRenamedAst.hs:8:26-30 }
111                  {Name: DumpRenamedAst.Peano})))])
112             (Nothing)))]
113          ({ <no location info> }
114           []))))]
115      []
116      [])
117    ,(TyClGroup
118      (NoExt)
119      [({ DumpRenamedAst.hs:10:1-39 }
120        (FamDecl
121         (NoExt)
122         (FamilyDecl
123          (NoExt)
124          (ClosedTypeFamily
125           (Just
126            [({ DumpRenamedAst.hs:11:3-36 }
127              (HsIB
128               [{Name: a}
129               ,{Name: as}]
130               (FamEqn
131                (NoExt)
132                ({ DumpRenamedAst.hs:11:3-8 }
133                 {Name: DumpRenamedAst.Length})
134                (Nothing)
135                [({ DumpRenamedAst.hs:11:10-17 }
136                  (HsParTy
137                   (NoExt)
138                   ({ DumpRenamedAst.hs:11:11-16 }
139                    (HsOpTy
140                     (NoExt)
141                     ({ DumpRenamedAst.hs:11:11 }
142                      (HsTyVar
143                       (NoExt)
144                       (NotPromoted)
145                       ({ DumpRenamedAst.hs:11:11 }
146                        {Name: a})))
147                     ({ DumpRenamedAst.hs:11:13 }
148                      {Name: :})
149                     ({ DumpRenamedAst.hs:11:15-16 }
150                      (HsTyVar
151                       (NoExt)
152                       (NotPromoted)
153                       ({ DumpRenamedAst.hs:11:15-16 }
154                        {Name: as})))))))]
155                (Prefix)
156                ({ DumpRenamedAst.hs:11:21-36 }
157                 (HsAppTy
158                  (NoExt)
159                  ({ DumpRenamedAst.hs:11:21-24 }
160                   (HsTyVar
161                    (NoExt)
162                    (NotPromoted)
163                    ({ DumpRenamedAst.hs:11:21-24 }
164                     {Name: DumpRenamedAst.Succ})))
165                  ({ DumpRenamedAst.hs:11:26-36 }
166                   (HsParTy
167                    (NoExt)
168                    ({ DumpRenamedAst.hs:11:27-35 }
169                     (HsAppTy
170                      (NoExt)
171                      ({ DumpRenamedAst.hs:11:27-32 }
172                       (HsTyVar
173                        (NoExt)
174                        (NotPromoted)
175                        ({ DumpRenamedAst.hs:11:27-32 }
176                         {Name: DumpRenamedAst.Length})))
177                      ({ DumpRenamedAst.hs:11:34-35 }
178                       (HsTyVar
179                        (NoExt)
180                        (NotPromoted)
181                        ({ DumpRenamedAst.hs:11:34-35 }
182                         {Name: as}))))))))))))
183            ,({ DumpRenamedAst.hs:12:3-24 }
184              (HsIB
185               []
186               (FamEqn
187                (NoExt)
188                ({ DumpRenamedAst.hs:12:3-8 }
189                 {Name: DumpRenamedAst.Length})
190                (Nothing)
191                [({ DumpRenamedAst.hs:12:10-12 }
192                  (HsExplicitListTy
193                   (NoExt)
194                   (IsPromoted)
195                   []))]
196                (Prefix)
197                ({ DumpRenamedAst.hs:12:21-24 }
198                 (HsTyVar
199                  (NoExt)
200                  (NotPromoted)
201                  ({ DumpRenamedAst.hs:12:21-24 }
202                   {Name: DumpRenamedAst.Zero}))))))]))
203          ({ DumpRenamedAst.hs:10:13-18 }
204           {Name: DumpRenamedAst.Length})
205          (HsQTvs
206           (HsQTvsRn
207            [{Name: k}]
208            {NameSet:
209             []})
210           [({ DumpRenamedAst.hs:10:21-29 }
211             (KindedTyVar
212              (NoExt)
213              ({ DumpRenamedAst.hs:10:21-22 }
214               {Name: as})
215              ({ DumpRenamedAst.hs:10:27-29 }
216               (HsListTy
217                (NoExt)
218                ({ DumpRenamedAst.hs:10:28 }
219                 (HsTyVar
220                  (NoExt)
221                  (NotPromoted)
222                  ({ DumpRenamedAst.hs:10:28 }
223                   {Name: k})))))))])
224          (Prefix)
225          ({ DumpRenamedAst.hs:10:32-39 }
226           (KindSig
227            (NoExt)
228            ({ DumpRenamedAst.hs:10:35-39 }
229             (HsTyVar
230              (NoExt)
231              (NotPromoted)
232              ({ DumpRenamedAst.hs:10:35-39 }
233               {Name: DumpRenamedAst.Peano})))))
234          (Nothing))))]
235      []
236      [])
237    ,(TyClGroup
238      (NoExt)
239      [({ DumpRenamedAst.hs:14:1-33 }
240        (FamDecl
241         (NoExt)
242         (FamilyDecl
243          (NoExt)
244          (DataFamily)
245          ({ DumpRenamedAst.hs:14:13-15 }
246           {Name: DumpRenamedAst.Nat})
247          (HsQTvs
248           (HsQTvsRn
249            [{Name: k}]
250            {NameSet:
251             []})
252           [])
253          (Prefix)
254          ({ DumpRenamedAst.hs:14:17-33 }
255           (KindSig
256            (NoExt)
257            ({ DumpRenamedAst.hs:14:20-33 }
258             (HsFunTy
259              (NoExt)
260              ({ DumpRenamedAst.hs:14:20 }
261               (HsTyVar
262                (NoExt)
263                (NotPromoted)
264                ({ DumpRenamedAst.hs:14:20 }
265                 {Name: k})))
266              ({ DumpRenamedAst.hs:14:25-33 }
267               (HsFunTy
268                (NoExt)
269                ({ DumpRenamedAst.hs:14:25 }
270                 (HsTyVar
271                  (NoExt)
272                  (NotPromoted)
273                  ({ DumpRenamedAst.hs:14:25 }
274                   {Name: k})))
275                ({ DumpRenamedAst.hs:14:30-33 }
276                 (HsTyVar
277                  (NoExt)
278                  (NotPromoted)
279                  ({ DumpRenamedAst.hs:14:30-33 }
280                   {Name: GHC.Types.Type})))))))))
281          (Nothing))))]
282      []
283      [({ DumpRenamedAst.hs:(17,1)-(18,45) }
284        (DataFamInstD
285         (NoExt)
286         (DataFamInstDecl
287          (HsIB
288           [{Name: k}
289           ,{Name: a}]
290           (FamEqn
291            (NoExt)
292            ({ DumpRenamedAst.hs:17:18-20 }
293             {Name: DumpRenamedAst.Nat})
294            (Nothing)
295            [({ DumpRenamedAst.hs:17:22-37 }
296              (HsParTy
297               (NoExt)
298               ({ DumpRenamedAst.hs:17:23-36 }
299                (HsKindSig
300                 (NoExt)
301                 ({ DumpRenamedAst.hs:17:23 }
302                  (HsTyVar
303                   (NoExt)
304                   (NotPromoted)
305                   ({ DumpRenamedAst.hs:17:23 }
306                    {Name: a})))
307                 ({ DumpRenamedAst.hs:17:28-36 }
308                  (HsFunTy
309                   (NoExt)
310                   ({ DumpRenamedAst.hs:17:28 }
311                    (HsTyVar
312                     (NoExt)
313                     (NotPromoted)
314                     ({ DumpRenamedAst.hs:17:28 }
315                      {Name: k})))
316                   ({ DumpRenamedAst.hs:17:33-36 }
317                    (HsTyVar
318                     (NoExt)
319                     (NotPromoted)
320                     ({ DumpRenamedAst.hs:17:33-36 }
321                      {Name: GHC.Types.Type})))))))))]
322            (Prefix)
323            (HsDataDefn
324             (NoExt)
325             (NewType)
326             ({ <no location info> }
327              [])
328             (Nothing)
329             (Just
330              ({ DumpRenamedAst.hs:17:42-60 }
331               (HsFunTy
332                (NoExt)
333                ({ DumpRenamedAst.hs:17:42-52 }
334                 (HsParTy
335                  (NoExt)
336                  ({ DumpRenamedAst.hs:17:43-51 }
337                   (HsFunTy
338                    (NoExt)
339                    ({ DumpRenamedAst.hs:17:43 }
340                     (HsTyVar
341                      (NoExt)
342                      (NotPromoted)
343                      ({ DumpRenamedAst.hs:17:43 }
344                       {Name: k})))
345                    ({ DumpRenamedAst.hs:17:48-51 }
346                     (HsTyVar
347                      (NoExt)
348                      (NotPromoted)
349                      ({ DumpRenamedAst.hs:17:48-51 }
350                       {Name: GHC.Types.Type})))))))
351                ({ DumpRenamedAst.hs:17:57-60 }
352                 (HsTyVar
353                  (NoExt)
354                  (NotPromoted)
355                  ({ DumpRenamedAst.hs:17:57-60 }
356                   {Name: GHC.Types.Type}))))))
357             [({ DumpRenamedAst.hs:18:3-45 }
358               (ConDeclGADT
359                (NoExt)
360                [({ DumpRenamedAst.hs:18:3-5 }
361                  {Name: DumpRenamedAst.Nat})]
362                ({ DumpRenamedAst.hs:18:10-45 }
363                 (False))
364                (HsQTvs
365                 (HsQTvsRn
366                  [{Name: f}
367                  ,{Name: g}]
368                  {NameSet:
369                   []})
370                 [])
371                (Nothing)
372                (PrefixCon
373                 [({ DumpRenamedAst.hs:18:10-34 }
374                   (HsParTy
375                    (NoExt)
376                    ({ DumpRenamedAst.hs:18:11-33 }
377                     (HsForAllTy
378                      (NoExt)
379                      [({ DumpRenamedAst.hs:18:18-19 }
380                        (UserTyVar
381                         (NoExt)
382                         ({ DumpRenamedAst.hs:18:18-19 }
383                          {Name: xx})))]
384                      ({ DumpRenamedAst.hs:18:22-33 }
385                       (HsFunTy
386                        (NoExt)
387                        ({ DumpRenamedAst.hs:18:22-25 }
388                         (HsAppTy
389                          (NoExt)
390                          ({ DumpRenamedAst.hs:18:22 }
391                           (HsTyVar
392                            (NoExt)
393                            (NotPromoted)
394                            ({ DumpRenamedAst.hs:18:22 }
395                             {Name: f})))
396                          ({ DumpRenamedAst.hs:18:24-25 }
397                           (HsTyVar
398                            (NoExt)
399                            (NotPromoted)
400                            ({ DumpRenamedAst.hs:18:24-25 }
401                             {Name: xx})))))
402                        ({ DumpRenamedAst.hs:18:30-33 }
403                         (HsAppTy
404                          (NoExt)
405                          ({ DumpRenamedAst.hs:18:30 }
406                           (HsTyVar
407                            (NoExt)
408                            (NotPromoted)
409                            ({ DumpRenamedAst.hs:18:30 }
410                             {Name: g})))
411                          ({ DumpRenamedAst.hs:18:32-33 }
412                           (HsTyVar
413                            (NoExt)
414                            (NotPromoted)
415                            ({ DumpRenamedAst.hs:18:32-33 }
416                             {Name: xx})))))))))))])
417                ({ DumpRenamedAst.hs:18:39-45 }
418                 (HsAppTy
419                  (NoExt)
420                  ({ DumpRenamedAst.hs:18:39-43 }
421                   (HsAppTy
422                    (NoExt)
423                    ({ DumpRenamedAst.hs:18:39-41 }
424                     (HsTyVar
425                      (NoExt)
426                      (NotPromoted)
427                      ({ DumpRenamedAst.hs:18:39-41 }
428                       {Name: DumpRenamedAst.Nat})))
429                    ({ DumpRenamedAst.hs:18:43 }
430                     (HsTyVar
431                      (NoExt)
432                      (NotPromoted)
433                      ({ DumpRenamedAst.hs:18:43 }
434                       {Name: f})))))
435                  ({ DumpRenamedAst.hs:18:45 }
436                   (HsTyVar
437                    (NoExt)
438                    (NotPromoted)
439                    ({ DumpRenamedAst.hs:18:45 }
440                     {Name: g})))))
441                (Nothing)))]
442             ({ <no location info> }
443              [])))))))])]
444    []
445    []
446    []
447    []
448    []
449    []
450    []
451    [])
452   [({ DumpRenamedAst.hs:4:8-21 }
453     (ImportDecl
454      (NoExt)
455      (NoSourceText)
456      ({ DumpRenamedAst.hs:4:8-21 }
457       {ModuleName: Prelude})
458      (Nothing)
459      (False)
460      (False)
461      (False)
462      (True)
463      (Nothing)
464      (Nothing)))
465   ,({ DumpRenamedAst.hs:6:1-23 }
466     (ImportDecl
467      (NoExt)
468      (NoSourceText)
469      ({ DumpRenamedAst.hs:6:8-16 }
470       {ModuleName: Data.Kind})
471      (Nothing)
472      (False)
473      (False)
474      (False)
475      (False)
476      (Nothing)
477      (Just
478       ((,)
479        (False)
480        ({ DumpRenamedAst.hs:6:18-23 }
481         [({ DumpRenamedAst.hs:6:19-22 }
482           (IEThingAbs
483            (NoExt)
484            ({ DumpRenamedAst.hs:6:19-22 }
485             (IEName
486              ({ DumpRenamedAst.hs:6:19-22 }
487               {Name: GHC.Types.Type})))))])))))]
488   (Nothing)
489   (Nothing)))
490
491