@@ -32,7 +32,7 @@ import GHC.Generics
3232 , D, C, S
3333 , Meta( MetaSel )
3434 )
35−import GHC.TypeLits ( Symbol )
35+import GHC.TypeLits ( Symbol, KnownSymbol )
3636import Prelude
3737
3838-- rel8
@@ -477,6 +477,7 @@ instance
477477 , K1Table "Left" Aggregate (IsStructure structure1) structure1 a
478478 , K1Table "Right" Aggregate (IsStructure structure2) structure2 b
479479 , e ~ EitherTable a b
480+ , KnownSymbol label
480481 ) => K1Table label Aggregate 'True (Shape2 'Either structure1 structure2) e
481482 where
482483 fromK1Columns =
@@ -499,6 +500,7 @@ instance
499500 , K1Table "Left" Expr (IsStructure structure1) structure1 a
500501 , K1Table "Right" Expr (IsStructure structure2) structure2 b
501502 , e ~ EitherTable a b
503+ , KnownSymbol label
502504 ) => K1Table label Expr 'True (Shape2 'Either structure1 structure2) e
503505 where
504506 fromK1Columns =
@@ -521,6 +523,7 @@ instance
521523 , K1Table "Left" Insertion (IsStructure structure1) structure1 a
522524 , K1Table "Right" Insertion (IsStructure structure2) structure2 b
523525 , e ~ EitherTable a b
526+ , KnownSymbol label
524527 ) => K1Table label Insertion 'True (Shape2 'Either structure1 structure2) e
525528 where
526529 fromK1Columns =
@@ -543,6 +546,7 @@ instance
543546 , K1Table "Left" Identity (IsStructure structure1) structure1 a
544547 , K1Table "Right" Identity (IsStructure structure2) structure2 b
545548 , e ~ Either a b
549+ , KnownSymbol label
546550 ) => K1Table label Identity 'True (Shape2 'Either structure1 structure2) e
547551 where
548552 fromK1Columns
@@ -567,6 +571,7 @@ instance
567571 , K1Table "Left" Name (IsStructure structure1) structure1 a
568572 , K1Table "Right" Name (IsStructure structure2) structure2 b
569573 , e ~ EitherTable a b
574+ , KnownSymbol label
570575 ) => K1Table label Name 'True (Shape2 'Either structure1 structure2) e
571576 where
572577 fromK1Columns =
@@ -587,6 +592,7 @@ instance
587592 ( Table Aggregate a
588593 , K1Columns label structure ~ HLabel label (Columns a)
589594 , as ~ ListTable a
595+ , KnownSymbol label
590596 ) => K1Table label Aggregate 'True (Shape1 'List structure) as
591597 where
592598 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -599,6 +605,7 @@ instance
599605 ( Table Expr a
600606 , K1Columns label structure ~ HLabel label (Columns a)
601607 , as ~ ListTable a
608+ , KnownSymbol label
602609 ) => K1Table label Expr 'True (Shape1 'List structure) as
603610 where
604611 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -611,6 +618,7 @@ instance
611618 ( Table Insertion a
612619 , K1Columns label structure ~ HLabel label (Columns a)
613620 , as ~ ListTable a
621+ , KnownSymbol label
614622 ) => K1Table label Insertion 'True (Shape1 'List structure) as
615623 where
616624 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -635,6 +643,7 @@ instance
635643 ( Table Name a
636644 , K1Columns label structure ~ HLabel label (Columns a)
637645 , as ~ ListTable a
646+ , KnownSymbol label
638647 ) => K1Table label Name 'True (Shape1 'List structure) as
639648 where
640649 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -647,6 +656,7 @@ instance
647656 ( HTable (K1Columns "Just" structure)
648657 , K1Table "Just" Aggregate (IsStructure structure) structure a
649658 , ma ~ MaybeTable a
659+ , KnownSymbol label
650660 ) => K1Table label Aggregate 'True (Shape1 'Maybe structure) ma
651661 where
652662 fromK1Columns =
@@ -663,6 +673,7 @@ instance
663673 ( HTable (K1Columns "Just" structure)
664674 , K1Table "Just" Expr (IsStructure structure) structure a
665675 , ma ~ MaybeTable a
676+ , KnownSymbol label
666677 ) => K1Table label Expr 'True (Shape1 'Maybe structure) ma
667678 where
668679 fromK1Columns =
@@ -679,6 +690,7 @@ instance
679690 ( HTable (K1Columns "Just" structure)
680691 , K1Table "Just" Insertion (IsStructure structure) structure a
681692 , ma ~ MaybeTable a
693+ , KnownSymbol label
682694 ) => K1Table label Insertion 'True (Shape1 'Maybe structure) ma
683695 where
684696 fromK1Columns =
@@ -695,6 +707,7 @@ instance
695707 ( HTable (K1Columns "Just" structure)
696708 , K1Table "Just" Identity (IsStructure structure) structure a
697709 , ma ~ Maybe a
710+ , KnownSymbol label
698711 ) => K1Table label Identity 'True (Shape1 'Maybe structure) ma
699712 where
700713 fromK1Columns
@@ -713,6 +726,7 @@ instance
713726 ( HTable (K1Columns "Just" structure)
714727 , K1Table "Just" Name (IsStructure structure) structure a
715728 , ma ~ MaybeTable a
729+ , KnownSymbol label
716730 ) => K1Table label Name 'True (Shape1 'Maybe structure) ma
717731 where
718732 fromK1Columns =
@@ -729,6 +743,7 @@ instance
729743 ( Table Aggregate a
730744 , K1Columns label structure ~ HLabel label (Columns a)
731745 , as ~ NonEmptyTable a
746+ , KnownSymbol label
732747 ) => K1Table label Aggregate 'True (Shape1 'NonEmpty structure) as
733748 where
734749 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -741,6 +756,7 @@ instance
741756 ( Table Expr a
742757 , K1Columns label structure ~ HLabel label (Columns a)
743758 , as ~ NonEmptyTable a
759+ , KnownSymbol label
744760 ) => K1Table label Expr 'True (Shape1 'NonEmpty structure) as
745761 where
746762 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -753,6 +769,7 @@ instance
753769 ( Table Insertion a
754770 , K1Columns label structure ~ HLabel label (Columns a)
755771 , as ~ NonEmptyTable a
772+ , KnownSymbol label
756773 ) => K1Table label Insertion 'True (Shape1 'NonEmpty structure) as
757774 where
758775 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -777,6 +794,7 @@ instance
777794 ( Table Name a
778795 , K1Columns label structure ~ HLabel label (Columns a)
779796 , as ~ NonEmptyTable a
797+ , KnownSymbol label
780798 ) => K1Table label Name 'True (Shape1 'NonEmpty structure) as
781799 where
782800 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -791,6 +809,7 @@ instance
791809 , K1Table "Here" Aggregate (IsStructure structure1) structure1 a
792810 , K1Table "There" Aggregate (IsStructure structure2) structure2 b
793811 , e ~ TheseTable a b
812+ , KnownSymbol label
794813 ) => K1Table label Aggregate 'True (Shape2 'These structure1 structure2) e
795814 where
796815 fromK1Columns =
@@ -813,6 +832,7 @@ instance
813832 , K1Table "Here" Expr (IsStructure structure1) structure1 a
814833 , K1Table "There" Expr (IsStructure structure2) structure2 b
815834 , e ~ TheseTable a b
835+ , KnownSymbol label
816836 ) => K1Table label Expr 'True (Shape2 'These structure1 structure2) e
817837 where
818838 fromK1Columns =
@@ -835,6 +855,7 @@ instance
835855 , K1Table "Here" Insertion (IsStructure structure1) structure1 a
836856 , K1Table "There" Insertion (IsStructure structure2) structure2 b
837857 , e ~ TheseTable a b
858+ , KnownSymbol label
838859 ) => K1Table label Insertion 'True (Shape2 'These structure1 structure2) e
839860 where
840861 fromK1Columns =
@@ -857,6 +878,7 @@ instance
857878 , K1Table "Here" Identity (IsStructure structure1) structure1 a
858879 , K1Table "There" Identity (IsStructure structure2) structure2 b
859880 , e ~ These a b
881+ , KnownSymbol label
860882 ) => K1Table label Identity 'True (Shape2 'These structure1 structure2) e
861883 where
862884 fromK1Columns
@@ -881,6 +903,7 @@ instance
881903 , K1Table "Here" Name (IsStructure structure1) structure1 a
882904 , K1Table "There" Name (IsStructure structure2) structure2 b
883905 , e ~ TheseTable a b
906+ , KnownSymbol label
884907 ) => K1Table label Name 'True (Shape2 'These structure1 structure2) e
885908 where
886909 fromK1Columns =
@@ -904,6 +927,7 @@ instance
904927 , HTable (K1Columns "snd" structure2)
905928 , Labelable context
906929 , a ~ (a1, a2)
930+ , KnownSymbol label
907931 ) => K1Table label context 'True (structure1, structure2) a
908932 where
909933 fromK1Columns (hunlabel unlabeler -> (HPair a b)) =
@@ -927,6 +951,7 @@ instance
927951 , HTable (K1Columns "trd" structure3)
928952 , Labelable context
929953 , a ~ (a1, a2, a3)
954+ , KnownSymbol label
930955 ) => K1Table label context 'True (structure1, structure2, structure3) a
931956 where
932957 fromK1Columns (hunlabel unlabeler -> (HTrio a b c)) =
@@ -954,6 +979,7 @@ instance
954979 , HTable (K1Columns "frt" structure4)
955980 , Labelable context
956981 , a ~ (a1, a2, a3, a4)
982+ , KnownSymbol label
957983 ) => K1Table label context 'True (structure1, structure2, structure3, structure4) a
958984 where
959985 fromK1Columns (hunlabel unlabeler -> (HQuartet a b c d)) =
@@ -985,6 +1011,7 @@ instance
9851011 , HTable (K1Columns "fft" structure5)
9861012 , Labelable context
9871013 , a ~ (a1, a2, a3, a4, a5)
1014+ , KnownSymbol label
9881015 ) => K1Table label context 'True (structure1, structure2, structure3, structure4, structure5) a
9891016 where
9901017 fromK1Columns (hunlabel unlabeler -> (HQuintet a b c d e)) =
@@ -1011,6 +1038,7 @@ instance
10111038 , Columns structure ~ Columns a
10121039 , Labelable context
10131040 , Table context a
1041+ , KnownSymbol label
10141042 ) => K1Table label context 'False structure a
10151043 where
10161044 fromK1Columns = fromColumns . hunlabel unlabeler