@@ -32,7 +32,7 @@ import GHC.Generics
33 , Meta( MetaSel )
33 , Meta( MetaSel )
35−import GHC.TypeLits ( Symbol )
35+import GHC.TypeLits ( Symbol, KnownSymbol )
36import Prelude
36import Prelude
@@ -477,6 +477,7 @@ instance
477 , K1Table "Left" Aggregate (IsStructure structure1) structure1 a
477 , K1Table "Left" Aggregate (IsStructure structure1) structure1 a
478 , K1Table "Right" Aggregate (IsStructure structure2) structure2 b
478 , K1Table "Right" Aggregate (IsStructure structure2) structure2 b
479 , e ~ EitherTable a b
479 , e ~ EitherTable a b
480 ) => K1Table label Aggregate 'True (Shape2 'Either structure1 structure2) e
481 ) => K1Table label Aggregate 'True (Shape2 'Either structure1 structure2) e
482 fromK1Columns =
483 fromK1Columns =
@@ -499,6 +500,7 @@ instance
499 , K1Table "Left" Expr (IsStructure structure1) structure1 a
500 , K1Table "Left" Expr (IsStructure structure1) structure1 a
500 , K1Table "Right" Expr (IsStructure structure2) structure2 b
501 , K1Table "Right" Expr (IsStructure structure2) structure2 b
501 , e ~ EitherTable a b
502 , e ~ EitherTable a b
502 ) => K1Table label Expr 'True (Shape2 'Either structure1 structure2) e
504 ) => K1Table label Expr 'True (Shape2 'Either structure1 structure2) e
504 fromK1Columns =
506 fromK1Columns =
@@ -521,6 +523,7 @@ instance
521 , K1Table "Left" Insertion (IsStructure structure1) structure1 a
523 , K1Table "Left" Insertion (IsStructure structure1) structure1 a
522 , K1Table "Right" Insertion (IsStructure structure2) structure2 b
524 , K1Table "Right" Insertion (IsStructure structure2) structure2 b
523 , e ~ EitherTable a b
525 , e ~ EitherTable a b
524 ) => K1Table label Insertion 'True (Shape2 'Either structure1 structure2) e
527 ) => K1Table label Insertion 'True (Shape2 'Either structure1 structure2) e
526 fromK1Columns =
529 fromK1Columns =
@@ -543,6 +546,7 @@ instance
543 , K1Table "Left" Identity (IsStructure structure1) structure1 a
546 , K1Table "Left" Identity (IsStructure structure1) structure1 a
544 , K1Table "Right" Identity (IsStructure structure2) structure2 b
547 , K1Table "Right" Identity (IsStructure structure2) structure2 b
545 , e ~ Either a b
548 , e ~ Either a b
546 ) => K1Table label Identity 'True (Shape2 'Either structure1 structure2) e
550 ) => K1Table label Identity 'True (Shape2 'Either structure1 structure2) e
548 fromK1Columns
552 fromK1Columns
@@ -567,6 +571,7 @@ instance
567 , K1Table "Left" Name (IsStructure structure1) structure1 a
571 , K1Table "Left" Name (IsStructure structure1) structure1 a
568 , K1Table "Right" Name (IsStructure structure2) structure2 b
572 , K1Table "Right" Name (IsStructure structure2) structure2 b
569 , e ~ EitherTable a b
573 , e ~ EitherTable a b
570 ) => K1Table label Name 'True (Shape2 'Either structure1 structure2) e
575 ) => K1Table label Name 'True (Shape2 'Either structure1 structure2) e
572 fromK1Columns =
577 fromK1Columns =
@@ -587,6 +592,7 @@ instance
587 ( Table Aggregate a
592 ( Table Aggregate a
588 , K1Columns label structure ~ HLabel label (Columns a)
593 , K1Columns label structure ~ HLabel label (Columns a)
589 , as ~ ListTable a
594 , as ~ ListTable a
590 ) => K1Table label Aggregate 'True (Shape1 'List structure) as
596 ) => K1Table label Aggregate 'True (Shape1 'List structure) as
592 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
598 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -599,6 +605,7 @@ instance
599 ( Table Expr a
605 ( Table Expr a
600 , K1Columns label structure ~ HLabel label (Columns a)
606 , K1Columns label structure ~ HLabel label (Columns a)
601 , as ~ ListTable a
607 , as ~ ListTable a
602 ) => K1Table label Expr 'True (Shape1 'List structure) as
609 ) => K1Table label Expr 'True (Shape1 'List structure) as
604 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
611 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -611,6 +618,7 @@ instance
611 ( Table Insertion a
618 ( Table Insertion a
612 , K1Columns label structure ~ HLabel label (Columns a)
619 , K1Columns label structure ~ HLabel label (Columns a)
613 , as ~ ListTable a
620 , as ~ ListTable a
614 ) => K1Table label Insertion 'True (Shape1 'List structure) as
622 ) => K1Table label Insertion 'True (Shape1 'List structure) as
616 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
624 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -635,6 +643,7 @@ instance
635 ( Table Name a
643 ( Table Name a
636 , K1Columns label structure ~ HLabel label (Columns a)
644 , K1Columns label structure ~ HLabel label (Columns a)
637 , as ~ ListTable a
645 , as ~ ListTable a
638 ) => K1Table label Name 'True (Shape1 'List structure) as
647 ) => K1Table label Name 'True (Shape1 'List structure) as
640 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
649 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -647,6 +656,7 @@ instance
647 ( HTable (K1Columns "Just" structure)
656 ( HTable (K1Columns "Just" structure)
648 , K1Table "Just" Aggregate (IsStructure structure) structure a
657 , K1Table "Just" Aggregate (IsStructure structure) structure a
649 , ma ~ MaybeTable a
658 , ma ~ MaybeTable a
650 ) => K1Table label Aggregate 'True (Shape1 'Maybe structure) ma
660 ) => K1Table label Aggregate 'True (Shape1 'Maybe structure) ma
652 fromK1Columns =
662 fromK1Columns =
@@ -663,6 +673,7 @@ instance
663 ( HTable (K1Columns "Just" structure)
673 ( HTable (K1Columns "Just" structure)
664 , K1Table "Just" Expr (IsStructure structure) structure a
674 , K1Table "Just" Expr (IsStructure structure) structure a
665 , ma ~ MaybeTable a
675 , ma ~ MaybeTable a
666 ) => K1Table label Expr 'True (Shape1 'Maybe structure) ma
677 ) => K1Table label Expr 'True (Shape1 'Maybe structure) ma
668 fromK1Columns =
679 fromK1Columns =
@@ -679,6 +690,7 @@ instance
679 ( HTable (K1Columns "Just" structure)
690 ( HTable (K1Columns "Just" structure)
680 , K1Table "Just" Insertion (IsStructure structure) structure a
691 , K1Table "Just" Insertion (IsStructure structure) structure a
681 , ma ~ MaybeTable a
692 , ma ~ MaybeTable a
682 ) => K1Table label Insertion 'True (Shape1 'Maybe structure) ma
694 ) => K1Table label Insertion 'True (Shape1 'Maybe structure) ma
684 fromK1Columns =
696 fromK1Columns =
@@ -695,6 +707,7 @@ instance
695 ( HTable (K1Columns "Just" structure)
707 ( HTable (K1Columns "Just" structure)
696 , K1Table "Just" Identity (IsStructure structure) structure a
708 , K1Table "Just" Identity (IsStructure structure) structure a
697 , ma ~ Maybe a
709 , ma ~ Maybe a
698 ) => K1Table label Identity 'True (Shape1 'Maybe structure) ma
711 ) => K1Table label Identity 'True (Shape1 'Maybe structure) ma
700 fromK1Columns
713 fromK1Columns
@@ -713,6 +726,7 @@ instance
713 ( HTable (K1Columns "Just" structure)
726 ( HTable (K1Columns "Just" structure)
714 , K1Table "Just" Name (IsStructure structure) structure a
727 , K1Table "Just" Name (IsStructure structure) structure a
715 , ma ~ MaybeTable a
728 , ma ~ MaybeTable a
716 ) => K1Table label Name 'True (Shape1 'Maybe structure) ma
730 ) => K1Table label Name 'True (Shape1 'Maybe structure) ma
718 fromK1Columns =
732 fromK1Columns =
@@ -729,6 +743,7 @@ instance
729 ( Table Aggregate a
743 ( Table Aggregate a
730 , K1Columns label structure ~ HLabel label (Columns a)
744 , K1Columns label structure ~ HLabel label (Columns a)
731 , as ~ NonEmptyTable a
745 , as ~ NonEmptyTable a
732 ) => K1Table label Aggregate 'True (Shape1 'NonEmpty structure) as
747 ) => K1Table label Aggregate 'True (Shape1 'NonEmpty structure) as
734 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
749 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -741,6 +756,7 @@ instance
741 ( Table Expr a
756 ( Table Expr a
742 , K1Columns label structure ~ HLabel label (Columns a)
757 , K1Columns label structure ~ HLabel label (Columns a)
743 , as ~ NonEmptyTable a
758 , as ~ NonEmptyTable a
744 ) => K1Table label Expr 'True (Shape1 'NonEmpty structure) as
760 ) => K1Table label Expr 'True (Shape1 'NonEmpty structure) as
746 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
762 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -753,6 +769,7 @@ instance
753 ( Table Insertion a
769 ( Table Insertion a
754 , K1Columns label structure ~ HLabel label (Columns a)
770 , K1Columns label structure ~ HLabel label (Columns a)
755 , as ~ NonEmptyTable a
771 , as ~ NonEmptyTable a
756 ) => K1Table label Insertion 'True (Shape1 'NonEmpty structure) as
773 ) => K1Table label Insertion 'True (Shape1 'NonEmpty structure) as
758 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
775 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -777,6 +794,7 @@ instance
777 ( Table Name a
794 ( Table Name a
778 , K1Columns label structure ~ HLabel label (Columns a)
795 , K1Columns label structure ~ HLabel label (Columns a)
779 , as ~ NonEmptyTable a
796 , as ~ NonEmptyTable a
780 ) => K1Table label Name 'True (Shape1 'NonEmpty structure) as
798 ) => K1Table label Name 'True (Shape1 'NonEmpty structure) as
782 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
800 fromK1Columns = fromColumns . hrelabel (hunlabel hunlabeler)
@@ -791,6 +809,7 @@ instance
791 , K1Table "Here" Aggregate (IsStructure structure1) structure1 a
809 , K1Table "Here" Aggregate (IsStructure structure1) structure1 a
792 , K1Table "There" Aggregate (IsStructure structure2) structure2 b
810 , K1Table "There" Aggregate (IsStructure structure2) structure2 b
793 , e ~ TheseTable a b
811 , e ~ TheseTable a b
794 ) => K1Table label Aggregate 'True (Shape2 'These structure1 structure2) e
813 ) => K1Table label Aggregate 'True (Shape2 'These structure1 structure2) e
796 fromK1Columns =
815 fromK1Columns =
@@ -813,6 +832,7 @@ instance
813 , K1Table "Here" Expr (IsStructure structure1) structure1 a
832 , K1Table "Here" Expr (IsStructure structure1) structure1 a
814 , K1Table "There" Expr (IsStructure structure2) structure2 b
833 , K1Table "There" Expr (IsStructure structure2) structure2 b
815 , e ~ TheseTable a b
834 , e ~ TheseTable a b
816 ) => K1Table label Expr 'True (Shape2 'These structure1 structure2) e
836 ) => K1Table label Expr 'True (Shape2 'These structure1 structure2) e
818 fromK1Columns =
838 fromK1Columns =
@@ -835,6 +855,7 @@ instance
835 , K1Table "Here" Insertion (IsStructure structure1) structure1 a
855 , K1Table "Here" Insertion (IsStructure structure1) structure1 a
836 , K1Table "There" Insertion (IsStructure structure2) structure2 b
856 , K1Table "There" Insertion (IsStructure structure2) structure2 b
837 , e ~ TheseTable a b
857 , e ~ TheseTable a b
838 ) => K1Table label Insertion 'True (Shape2 'These structure1 structure2) e
859 ) => K1Table label Insertion 'True (Shape2 'These structure1 structure2) e
840 fromK1Columns =
861 fromK1Columns =
@@ -857,6 +878,7 @@ instance
857 , K1Table "Here" Identity (IsStructure structure1) structure1 a
878 , K1Table "Here" Identity (IsStructure structure1) structure1 a
858 , K1Table "There" Identity (IsStructure structure2) structure2 b
879 , K1Table "There" Identity (IsStructure structure2) structure2 b
859 , e ~ These a b
880 , e ~ These a b
860 ) => K1Table label Identity 'True (Shape2 'These structure1 structure2) e
882 ) => K1Table label Identity 'True (Shape2 'These structure1 structure2) e
862 fromK1Columns
884 fromK1Columns
@@ -881,6 +903,7 @@ instance
881 , K1Table "Here" Name (IsStructure structure1) structure1 a
903 , K1Table "Here" Name (IsStructure structure1) structure1 a
882 , K1Table "There" Name (IsStructure structure2) structure2 b
904 , K1Table "There" Name (IsStructure structure2) structure2 b
883 , e ~ TheseTable a b
905 , e ~ TheseTable a b
884 ) => K1Table label Name 'True (Shape2 'These structure1 structure2) e
907 ) => K1Table label Name 'True (Shape2 'These structure1 structure2) e
886 fromK1Columns =
909 fromK1Columns =
@@ -904,6 +927,7 @@ instance
904 , HTable (K1Columns "snd" structure2)
927 , HTable (K1Columns "snd" structure2)
905 , Labelable context
928 , Labelable context
906 , a ~ (a1, a2)
929 , a ~ (a1, a2)
907 ) => K1Table label context 'True (structure1, structure2) a
931 ) => K1Table label context 'True (structure1, structure2) a
909 fromK1Columns (hunlabel unlabeler -> (HPair a b)) =
933 fromK1Columns (hunlabel unlabeler -> (HPair a b)) =
@@ -927,6 +951,7 @@ instance
927 , HTable (K1Columns "trd" structure3)
951 , HTable (K1Columns "trd" structure3)
928 , Labelable context
952 , Labelable context
929 , a ~ (a1, a2, a3)
953 , a ~ (a1, a2, a3)
930 ) => K1Table label context 'True (structure1, structure2, structure3) a
955 ) => K1Table label context 'True (structure1, structure2, structure3) a
932 fromK1Columns (hunlabel unlabeler -> (HTrio a b c)) =
957 fromK1Columns (hunlabel unlabeler -> (HTrio a b c)) =
@@ -954,6 +979,7 @@ instance
954 , HTable (K1Columns "frt" structure4)
979 , HTable (K1Columns "frt" structure4)
955 , Labelable context
980 , Labelable context
956 , a ~ (a1, a2, a3, a4)
981 , a ~ (a1, a2, a3, a4)
957 ) => K1Table label context 'True (structure1, structure2, structure3, structure4) a
983 ) => K1Table label context 'True (structure1, structure2, structure3, structure4) a
959 fromK1Columns (hunlabel unlabeler -> (HQuartet a b c d)) =
985 fromK1Columns (hunlabel unlabeler -> (HQuartet a b c d)) =
@@ -985,6 +1011,7 @@ instance
985 , HTable (K1Columns "fft" structure5)
1011 , HTable (K1Columns "fft" structure5)
986 , Labelable context
1012 , Labelable context
987 , a ~ (a1, a2, a3, a4, a5)
1013 , a ~ (a1, a2, a3, a4, a5)
1014+ , KnownSymbol label
988 ) => K1Table label context 'True (structure1, structure2, structure3, structure4, structure5) a
1015 ) => K1Table label context 'True (structure1, structure2, structure3, structure4, structure5) a
990 fromK1Columns (hunlabel unlabeler -> (HQuintet a b c d e)) =
1017 fromK1Columns (hunlabel unlabeler -> (HQuintet a b c d e)) =
@@ -1011,6 +1038,7 @@ instance
1011 , Columns structure ~ Columns a
1038 , Columns structure ~ Columns a
1012 , Labelable context
1039 , Labelable context
1013 , Table context a
1040 , Table context a
1041+ , KnownSymbol label
1014 ) => K1Table label context 'False structure a
1042 ) => K1Table label context 'False structure a
1016 fromK1Columns = fromColumns . hunlabel unlabeler
1044 fromK1Columns = fromColumns . hunlabel unlabeler