Commit a4b8a28
committed
WIP: Add
As `GShow` is isomorphic to this constraint, it's nice to add this super
class. This reminds people that if they implement `GShow` they should
also implement `forall a. Show (t a)`, as its both incredibly easy to do
so and never (in practice) an additional dependency.
Unforunately, this change doesn't yet type-check because the instances
in base for `Sum` and `Product` are overly consersative: they assume
there is a field with a type related to the GADT index. That should be
fixed, and this PR can be pointed to as an example of why the problem
isn't just theoretical.forall a. Show (t a) superclass to GShow
1 parent 6784109 commit a4b8a28
1 file changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
| 59 | + | |
52 | 60 | | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| |||
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
73 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
74 | 88 | | |
75 | 89 | | |
76 | 90 | | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
80 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
81 | 100 | | |
82 | 101 | | |
83 | 102 | | |
| |||
0 commit comments