-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecursive.hs
1441 lines (1288 loc) · 55.7 KB
/
Recursive.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Avoid lambda" #-}
{-# HLINT ignore "Use const" #-}
{-# HLINT ignore "Use if" #-}
module MtgPure.Model.Recursive (
Ability (..),
ActivatedAbility (..),
AnyCard (..),
AnyToken (..),
BattleType (..),
Card (..),
CardCharacteristic (..),
CardSpec (..),
Case (..),
Condition (..),
Cost (..),
Effect (..),
Elect (..),
ElectOT (..),
ElectTargetedEffect,
Else (..),
Enchant (..),
EnchantmentType (..),
EntersStatic (..),
Event,
EventListener,
EventListener' (..),
FinPayment,
IsSpecificCard (..),
IsUser (..),
List (..),
Requirement (..),
SetCard (..),
SetToken (..),
SomeOT (..),
SomeCard (..),
SomeCardOrToken,
SomeTerm (..),
SomeToken,
SpecificCard (..),
StaticAbility (..),
Token (..),
TriggeredAbility (..),
WithLinkedObject (..),
WithList (..),
WithMaskedObject (..),
WithMaskedObjects (..),
WithThis (..),
WithThisAbility (..),
WithThisActivated,
WithThisOneShot,
WithThisStatic,
WithThisTriggered,
WithThisZ (..),
SomeZone (..),
pattern CFalse,
pattern CTrue,
fromSomeOT,
mapSomeOT,
) where
import safe Data.ConsIndex (ConsIndex (..))
import safe Data.Inst (Inst1, Inst2, Inst3, Inst4, Inst5, Inst6, Inst7)
import safe Data.Kind (Type)
import safe Data.Nat (Fin (..), IsNat, NatList (..), ToNat)
import safe Data.Proxy (Proxy (..))
import safe Data.Typeable (Typeable, typeRep)
import safe MtgPure.Model.ArtifactType (ArtifactType)
import safe MtgPure.Model.CardName (CardName, HasCardName (..))
import safe MtgPure.Model.CardSet (CardSet)
import safe MtgPure.Model.Color (Color)
import safe MtgPure.Model.Colors (Colors)
import safe MtgPure.Model.CreatureType (CreatureType)
import safe MtgPure.Model.Damage (Damage)
import safe MtgPure.Model.Defense (Defense)
import safe MtgPure.Model.EffectType (EffectType (..))
import safe MtgPure.Model.ElectStage (CoNonIntrinsicStage, ElectStage (..))
import safe MtgPure.Model.LandType (LandType)
import safe MtgPure.Model.Loyalty (Loyalty)
import safe MtgPure.Model.Mana.ManaCost (ManaCost)
import safe MtgPure.Model.Mana.ManaPool (ManaPool)
import safe MtgPure.Model.Mana.Snow (Snow (..))
import safe MtgPure.Model.Object.IsObjectType (IsObjectType)
import safe MtgPure.Model.Object.OTN (OT1, OT2, OT3, OT4, OT5, OT6, OT7, OTN)
import safe MtgPure.Model.Object.OTNAliases (
OTNActivatedOrTriggeredAbility,
OTNAny,
OTNArtifact,
OTNArtifactCreature,
OTNArtifactLand,
OTNBattle,
OTNCreature,
OTNDamageSource,
OTNEnchantment,
OTNEnchantmentCreature,
OTNInstant,
OTNLand,
OTNPlaneswalker,
OTNPlayer,
OTNSorcery,
OTNSpell,
)
import safe MtgPure.Model.Object.Singleton.Any (CoAny)
import safe MtgPure.Model.Object.Singleton.Card (CoCard)
import safe MtgPure.Model.Object.Singleton.Permanent (CoPermanent)
import safe MtgPure.Model.Object.Singleton.Spell (CoSpell)
import safe MtgPure.Model.Power (Power)
import safe MtgPure.Model.Rarity (Rarity)
import safe MtgPure.Model.Supertype (Supertype)
import safe MtgPure.Model.TimePoint (TimePoint)
import safe MtgPure.Model.Toughness (Toughness)
import safe MtgPure.Model.Variable (Var (Var), Variable)
import safe MtgPure.Model.Zone (IsZone, Zone (..))
import safe MtgPure.Model.ZoneObject.ZoneObject (
IsOTN,
IsZO,
ZO,
ZOCreature,
ZOCreaturePlayerPlaneswalker,
ZOPermanent,
ZOPlayer,
)
--------------------------------------------------------------------------------
-- Semantics legend:
--
-- "ot is exactly (a,b,c,...)"
-- Ability ot (experimenting with engine not having this "exact" notion)
-- Card ot
-- EnchantmentType ot
-- WithThis liftOT zone ot
--
-- "ot is (at least) one of (a,b,c,...)"
-- Enchant zone ot
-- Requirement zone ot
-- SomeOT liftOT ot
-- ZO zone ot
--------------------------------------------------------------------------------
data Ability (zone :: Zone) (ot :: Type) :: Type where
Activated :: (IsZO zone ot) => Elect 'IntrinsicStage (ActivatedAbility zone ot) ot -> Ability zone ot
Static :: StaticAbility zone ot -> Ability zone ot
Triggered :: (IsZO zone ot) => TriggeredAbility zone ot -> Ability zone ot
deriving (Typeable)
instance ConsIndex (Ability zone ot) where
consIndex :: Ability zone ot -> Int
consIndex = \case
Activated{} -> 1
Static{} -> 2
Triggered{} -> 3
--------------------------------------------------------------------------------
data ActivatedAbility (zone :: Zone) (ot :: Type) :: Type where
Ability ::
(IsZO zone ot) =>
{ activated_cost :: Cost
, activated_effect :: Elect 'ResolveStage (Effect 'OneShot) ot
} ->
ActivatedAbility zone ot
Cycling :: (ot ~ OTN x, IsOTN ot) => Cost -> ActivatedAbility 'ZHand ot
deriving (Typeable)
instance ConsIndex (ActivatedAbility zone ot) where
consIndex :: ActivatedAbility zone ot -> Int
consIndex = \case
Ability{} -> 1
Cycling{} -> 2
--------------------------------------------------------------------------------
-- data ArtifactType (ot :: Type) :: Type where
-- Vehicle :: ArtifactType ot -- TODO: Stuff crew mechanic into here
-- deriving (Bounded, Enum, Eq, Ord, Show)
--------------------------------------------------------------------------------
-- TODO: Move out of Recursive.hs
class (Show u, Typeable u) => IsUser (u :: Type) where
showUserType :: String
showUserType = show (typeRep (Proxy @u))
instance IsUser () where
showUserType :: String
showUserType = "()"
instance IsUser Color
instance IsUser String
-- TODO: Move out of Recursive.hs
-- TODO: EnchantmentLand [Urza's Saga]
-- TODO: EnchantmentArtifactCreature [Hammer of Purphoros]
-- TODO: LandCreature [Dryad Arbor]
data SpecificCard (ot :: Type) :: Type where
ArtifactCard :: (OTNArtifact ~ ot) => SpecificCard ot
ArtifactCreatureCard :: (OTNArtifactCreature ~ ot) => SpecificCard ot
ArtifactLandCard :: (OTNArtifactLand ~ ot) => SpecificCard ot
BattleCard :: (OTNBattle ~ ot) => SpecificCard ot
CreatureCard :: (OTNCreature ~ ot) => SpecificCard ot
EnchantmentCard :: (OTNEnchantment ~ ot) => SpecificCard ot
EnchantmentCreatureCard :: (OTNEnchantmentCreature ~ ot) => SpecificCard ot
InstantCard :: (OTNInstant ~ ot) => SpecificCard ot
LandCard :: (OTNLand ~ ot) => SpecificCard ot
PlaneswalkerCard :: (OTNPlaneswalker ~ ot) => SpecificCard ot
SorceryCard :: (OTNSorcery ~ ot) => SpecificCard ot
deriving (Typeable)
instance ConsIndex (SpecificCard ot) where
consIndex :: SpecificCard ot -> Int
consIndex = \case
ArtifactCard{} -> 1
ArtifactCreatureCard{} -> 2
ArtifactLandCard{} -> 3
BattleCard{} -> 4
CreatureCard{} -> 5
EnchantmentCard{} -> 6
EnchantmentCreatureCard{} -> 7
InstantCard{} -> 8
LandCard{} -> 9
PlaneswalkerCard{} -> 10
SorceryCard{} -> 11
class (IsOTN ot) => IsSpecificCard (ot :: Type) where
singSpecificCard :: SpecificCard ot
instance IsSpecificCard OTNArtifact where
singSpecificCard :: SpecificCard OTNArtifact
singSpecificCard = ArtifactCard
instance IsSpecificCard OTNArtifactCreature where
singSpecificCard :: SpecificCard OTNArtifactCreature
singSpecificCard = ArtifactCreatureCard
instance IsSpecificCard OTNArtifactLand where
singSpecificCard :: SpecificCard OTNArtifactLand
singSpecificCard = ArtifactLandCard
instance IsSpecificCard OTNBattle where
singSpecificCard :: SpecificCard OTNBattle
singSpecificCard = BattleCard
instance IsSpecificCard OTNCreature where
singSpecificCard :: SpecificCard OTNCreature
singSpecificCard = CreatureCard
instance IsSpecificCard OTNEnchantment where
singSpecificCard :: SpecificCard OTNEnchantment
singSpecificCard = EnchantmentCard
instance IsSpecificCard OTNEnchantmentCreature where
singSpecificCard :: SpecificCard OTNEnchantmentCreature
singSpecificCard = EnchantmentCreatureCard
instance IsSpecificCard OTNInstant where
singSpecificCard :: SpecificCard OTNInstant
singSpecificCard = InstantCard
instance IsSpecificCard OTNLand where
singSpecificCard :: SpecificCard OTNLand
singSpecificCard = LandCard
instance IsSpecificCard OTNPlaneswalker where
singSpecificCard :: SpecificCard OTNPlaneswalker
singSpecificCard = PlaneswalkerCard
instance IsSpecificCard OTNSorcery where
singSpecificCard :: SpecificCard OTNSorcery
singSpecificCard = SorceryCard
--------------------------------------------------------------------------------
data AnyCard :: Type where
AnyCard1 :: (ot ~ OTN x, IsSpecificCard ot) => Card ot -> AnyCard
AnyCard2 :: (IsSpecificCard ot1, IsSpecificCard ot2) => Card (ot1, ot2) -> AnyCard
deriving (Typeable)
instance ConsIndex AnyCard where
consIndex :: AnyCard -> Int
consIndex = \case
AnyCard1{} -> 1
AnyCard2{} -> 2
instance HasCardName AnyCard where
getCardName :: AnyCard -> CardName
getCardName = \case
AnyCard1 card -> getCardName card
AnyCard2 card -> getCardName card
--------------------------------------------------------------------------------
data AnyToken :: Type where
AnyToken :: (IsSpecificCard ot) => Token ot -> AnyToken
deriving (Typeable)
instance ConsIndex AnyToken where
consIndex :: AnyToken -> Int
consIndex = \case
AnyToken{} -> 1
instance HasCardName AnyToken where
getCardName :: AnyToken -> CardName
getCardName = \case
AnyToken token -> getCardName token
--------------------------------------------------------------------------------
data BattleType :: Type where
-- TODO: flip side
Seige :: BattleType
deriving (Typeable)
instance ConsIndex BattleType where
consIndex :: BattleType -> Int
consIndex = \case
Seige{} -> 1
--------------------------------------------------------------------------------
data Card (ot :: Type) :: Type where
Card :: (ot ~ OTN x, IsSpecificCard ot) => CardName -> Elect 'IntrinsicStage (CardCharacteristic ot) ot -> Card ot
DoubleSidedCard :: (ot1 ~ OTN x, ot2 ~ OTN y, Inst2 IsSpecificCard ot1 ot2) => Card ot1 -> Card ot2 -> Card (ot1, ot2)
SplitCard ::
(ot1 ~ OTN x, ot2 ~ OTN y, Inst2 IsSpecificCard ot1 ot2) =>
{ splitCard_card1 :: Card ot1
, splitCard_card2 :: Card ot2
, splitCard_abilities :: [SomeZone Ability (ot1, ot2)]
} ->
Card (ot1, ot2)
deriving (Typeable)
instance ConsIndex (Card ot) where
consIndex :: Card ot -> Int
consIndex = \case
Card{} -> 1
DoubleSidedCard{} -> 2
SplitCard{} -> 3
instance HasCardName (Card ot) where
getCardName :: Card ot -> CardName
getCardName = \case
Card name _ -> name
DoubleSidedCard card1 card2 -> getCardName card1 <> " // " <> getCardName card2
SplitCard card1 card2 _ -> getCardName card1 <> " // " <> getCardName card2
--------------------------------------------------------------------------------
data CardCharacteristic (ot :: Type) :: Type where
ArtifactCharacteristic ::
{ artifact_colors :: Colors
, artifact_supertypes :: [Supertype OTNArtifact]
, artifact_artifactTypes :: [ArtifactType]
, artifact_spec :: CardSpec OTNArtifact
} ->
CardCharacteristic OTNArtifact
ArtifactCreatureCharacteristic ::
{ artifactCreature_colors :: Colors
, artifactCreature_supertypes :: [Supertype OTNArtifactCreature]
, artifactCreature_artifactTypes :: [ArtifactType]
, artifactCreature_creatureTypes :: [CreatureType] -- no creature types is legal [Nameless Race]
, artifactCreature_power :: Power
, artifactCreature_toughness :: Toughness
, artifactCreature_spec :: CardSpec OTNArtifactCreature
} ->
CardCharacteristic OTNArtifactCreature
ArtifactLandCharacteristic ::
{ artifactLand_supertypes :: [Supertype OTNArtifactLand]
, artifactLand_artifactTypes :: [ArtifactType]
, artifactLand_landTypes :: [LandType]
, artifactLand_spec :: CardSpec OTNArtifactLand
} ->
CardCharacteristic OTNArtifactLand
BattleCharacteristic ::
{ battle_colors :: Colors
, battle_supertypes :: [Supertype OTNBattle]
, battle_battleTypes :: [BattleType]
, battle_defense :: Defense
, battle_spec :: CardSpec OTNBattle
} ->
CardCharacteristic OTNBattle
CreatureCharacteristic ::
{ creature_colors :: Colors
, creature_supertypes :: [Supertype OTNCreature]
, creature_creatureTypes :: [CreatureType] -- no creature types is legal [Nameless Race]
, creature_power :: Power
, creature_toughness :: Toughness
, creature_spec :: CardSpec OTNCreature
} ->
CardCharacteristic OTNCreature
EnchantmentCharacteristic ::
{ enchantment_colors :: Colors
, enchantment_supertypes :: [Supertype OTNEnchantment]
, enchantment_enchantmentTypes :: [EnchantmentType OTNEnchantment]
, enchantment_spec :: CardSpec OTNEnchantment
} ->
CardCharacteristic OTNEnchantment
EnchantmentCreatureCharacteristic ::
{ enchantmentCreature_colors :: Colors
, enchantmentCreature_supertypes :: [Supertype OTNEnchantmentCreature]
, enchantmentCreature_creatureTypes :: [CreatureType] -- no creature types is legal [Nameless Race]
, enchantmentCreature_enchantmentTypes :: [EnchantmentType OTNEnchantmentCreature]
, enchantmentCreature_power :: Power
, enchantmentCreature_toughness :: Toughness
, enchantmentCreature_spec :: CardSpec OTNEnchantmentCreature
} ->
CardCharacteristic OTNEnchantmentCreature
InstantCharacteristic ::
{ instant_colors :: Colors
, instant_supertypes :: [Supertype OTNInstant]
, instant_spec :: Elect 'TargetStage (CardSpec OTNInstant) OTNInstant
} ->
CardCharacteristic OTNInstant
LandCharacteristic ::
{ land_supertypes :: [Supertype OTNLand]
, land_landTypes :: [LandType]
, land_spec :: CardSpec OTNLand
} ->
CardCharacteristic OTNLand
PlaneswalkerCharacteristic ::
{ planeswalker_colors :: Colors
, planeswalker_supertypes :: [Supertype OTNPlaneswalker]
, planeswalker_spec :: CardSpec OTNPlaneswalker
} ->
CardCharacteristic OTNPlaneswalker
SorceryCharacteristic ::
{ sorcery_colors :: Colors
, sorcery_supertypes :: [Supertype OTNSorcery]
, sorcery_spec :: Elect 'TargetStage (CardSpec OTNSorcery) OTNSorcery
} ->
CardCharacteristic OTNSorcery
deriving (Typeable)
instance ConsIndex (CardCharacteristic ot) where
consIndex :: CardCharacteristic ot -> Int
consIndex = \case
ArtifactCharacteristic{} -> 1
ArtifactCreatureCharacteristic{} -> 2
ArtifactLandCharacteristic{} -> 3
BattleCharacteristic{} -> 4
CreatureCharacteristic{} -> 5
EnchantmentCreatureCharacteristic{} -> 6
EnchantmentCharacteristic{} -> 7
InstantCharacteristic{} -> 8
LandCharacteristic{} -> 9
PlaneswalkerCharacteristic{} -> 10
SorceryCharacteristic{} -> 11
--------------------------------------------------------------------------------
data CardSpec (ot :: Type) :: Type where
ArtifactSpec ::
{ artifact_cost :: Cost
, artifact_abilities :: [SomeZone WithThisAbility OTNArtifact]
} ->
CardSpec OTNArtifact
ArtifactCreatureSpec ::
{ artifactCreature_cost :: Cost
, -- TODO: artifactCreature_abilities :: [SomeOT (SomeZone WithThisAbility) OTNArtifactCreature]
artifactCreature_artifactAbilities :: [SomeZone WithThisAbility OTNArtifact]
, artifactCreature_creatureAbilities :: [SomeZone WithThisAbility OTNCreature]
, artifactCreature_artifactCreatureAbilities :: [SomeZone WithThisAbility OTNArtifactCreature]
} ->
CardSpec OTNArtifactCreature
ArtifactLandSpec ::
{ artifactLand_artifactAbilities :: [SomeZone WithThisAbility OTNArtifact]
, artifactLand_landAbilities :: [SomeZone WithThisAbility OTNLand]
, artifactLand_artifactLandAbilities :: [SomeZone WithThisAbility OTNArtifactLand]
} ->
CardSpec OTNArtifactLand
BattleSpec ::
{ battle_cost :: Cost
, battle_abilities :: [SomeZone WithThisAbility OTNBattle]
} ->
CardSpec OTNBattle
CreatureSpec ::
{ creature_cost :: Cost
, creature_abilities :: [SomeZone WithThisAbility OTNCreature]
} ->
CardSpec OTNCreature
EnchantmentSpec ::
{ enchantment_cost :: Cost
, enchantment_abilities :: [SomeZone WithThisAbility OTNEnchantment]
} ->
CardSpec OTNEnchantment
EnchantmentCreatureSpec ::
{ enchantmentCreature_cost :: Cost
, enchantmentCreature_creatureAbilities :: [SomeZone WithThisAbility OTNCreature]
, enchantmentCreature_enchantmentAbilities :: [SomeZone WithThisAbility OTNEnchantment]
, enchantmentCreature_enchantmentCreatureAbilities :: [SomeZone WithThisAbility OTNEnchantmentCreature]
} ->
CardSpec OTNEnchantmentCreature
InstantSpec ::
{ instant_cost :: Cost
, instant_abilities :: [SomeZone WithThisAbility OTNInstant]
, instant_effect :: WithThisOneShot OTNInstant
} ->
CardSpec OTNInstant
LandSpec ::
{ land_abilities :: [SomeZone WithThisAbility OTNLand]
} ->
CardSpec OTNLand
PlaneswalkerSpec ::
{ planeswalker_cost :: Cost
, planeswalker_loyalty :: Loyalty
, planeswalker_abilities :: [SomeZone WithThisAbility OTNPlaneswalker]
} ->
CardSpec OTNPlaneswalker
SorcerySpec ::
{ sorcery_cost :: Cost
, sorcery_abilities :: [SomeZone WithThisAbility OTNSorcery]
, sorcery_effect :: WithThisOneShot OTNSorcery
} ->
CardSpec OTNSorcery
deriving (Typeable)
instance ConsIndex (CardSpec ot) where
consIndex :: CardSpec ot -> Int
consIndex = \case
ArtifactSpec{} -> 1
ArtifactCreatureSpec{} -> 2
ArtifactLandSpec{} -> 3
BattleSpec{} -> 4
CreatureSpec{} -> 5
EnchantmentCreatureSpec{} -> 6
EnchantmentSpec{} -> 7
InstantSpec{} -> 8
LandSpec{} -> 9
PlaneswalkerSpec{} -> 10
SorcerySpec{} -> 11
--------------------------------------------------------------------------------
data Case (x :: Type) where
CaseFin ::
(IsUser u, IsNat n) =>
{ caseFin :: Variable (Fin u n)
, ofFin :: NatList () n x
} ->
Case x
deriving (Typeable)
instance ConsIndex (Case x) where
consIndex :: Case x -> Int
consIndex = \case
CaseFin{} -> 1
--------------------------------------------------------------------------------
data Condition :: Type where
CAnd :: [Condition] -> Condition
CNot :: Condition -> Condition
COr :: [Condition] -> Condition
Satisfies :: (CoAny ot, IsZO zone ot) => ZO zone ot -> [Requirement zone ot] -> Condition
deriving (Typeable)
instance ConsIndex Condition where
consIndex :: Condition -> Int
consIndex = \case
CAnd{} -> 1
CNot{} -> 2
COr{} -> 3
Satisfies{} -> 4
pattern CFalse :: Condition
pattern CFalse = COr []
pattern CTrue :: Condition
pattern CTrue = CAnd []
--------------------------------------------------------------------------------
-- XXX: Uggh... need to add another type index for what to do after since some effects and abilities need to
-- know which costs were paid. (e.g. "If black mana was spend to pay this card's cost then ..."). Then a
-- continuation constructor needs to be provided. Then constructors of other types that use costs and something
-- else need to be updated accordingly. Ponder a less intrusive and less annoying solution... Perhaps Effect
-- (or whatever types) gets a constructor that can obtain an abstract runtime Cost which can be queried by
-- the API. This would likely require the model to encode more contingencies to handle dynamic issues, but this
-- is likely overwhelmingly worth it to avoid the continuation approach.
data Cost :: Type where
AndCosts :: [Cost] -> Cost
CostCase :: Case Cost -> Cost
DiscardRandomCost :: Int -> Cost -- TODO: PositiveInt
ExileCost :: (IsZO zone ot') => [Requirement zone ot'] -> Cost -- TODO: prohibit (zone == 'ZExile)
LoyaltyCost :: ZO 'ZBattlefield OTNPlaneswalker -> Loyalty -> Cost
ManaCost :: ManaCost 'Var -> Cost
OrCosts :: [Cost] -> Cost
PayLife :: Int -> Cost -- TODO: PositiveInt
SacrificeCost :: (CoPermanent ot', IsZO 'ZBattlefield ot') => [Requirement 'ZBattlefield ot'] -> Cost
TapCost :: (CoPermanent ot', IsZO 'ZBattlefield ot') => [Requirement 'ZBattlefield ot'] -> Cost
deriving (Typeable)
instance ConsIndex Cost where
consIndex :: Cost -> Int
consIndex = \case
AndCosts{} -> 1
CostCase{} -> 2
DiscardRandomCost{} -> 3
ExileCost{} -> 4
LoyaltyCost{} -> 5
ManaCost{} -> 6
OrCosts{} -> 7
PayLife{} -> 8
SacrificeCost{} -> 9
TapCost{} -> 10
--------------------------------------------------------------------------------
data Effect (ef :: EffectType) :: Type where
-- TODO: Need 'Var version of ManaPool for add X mana effects.
AddMana :: ZOPlayer -> ManaPool 'NonSnow -> Effect 'OneShot -- NOTE: Engine will reinterpret as Snow when source is Snow.
AddToBattlefield :: (CoPermanent ot, IsOTN ot) => ZOPlayer -> Token ot -> Effect 'OneShot
CantBeRegenerated :: ZOCreature -> Effect 'Continuous
ChangeTo :: (CoPermanent ot, IsOTN ot) => ZOPermanent -> Card ot -> Effect 'Continuous
CounterAbility :: ZO 'ZStack OTNActivatedOrTriggeredAbility -> Effect 'OneShot
CounterSpell :: ZO 'ZStack OTNSpell -> Effect 'OneShot
DealDamage :: (IsZO zone OTNDamageSource) => ZO zone OTNDamageSource -> ZOCreaturePlayerPlaneswalker -> Damage 'Var -> Effect 'OneShot
Destroy :: ZOPermanent -> Effect 'OneShot
DrawCards :: ZOPlayer -> Int -> Effect 'OneShot
EffectCase :: Case (Effect ef) -> Effect ef
EffectContinuous :: Effect 'Continuous -> Effect 'OneShot -- 611.2
EndTheTurn :: Effect 'OneShot
Exile :: (IsZO zone ot, CoCard ot) => ZO zone ot -> Effect 'OneShot -- TODO: prohibit (zone == 'ZExile)
GainAbility :: (CoAny ot, IsOTN ot) => ZO 'ZBattlefield ot -> WithThisAbility 'ZBattlefield ot -> Effect 'Continuous
-- XXX: This is Continuous to support things like "gain control until end of turn"
GainControl :: (CoAny ot, IsOTN ot) => ZOPlayer -> ZO 'ZBattlefield ot -> Effect 'Continuous -- TODO: restrict zone to 'ZBattlefield and 'ZStack
GainLife :: ZOPlayer -> Int -> Effect 'OneShot -- TODO: PositiveInt
LoseAbility :: (CoAny ot, IsOTN ot) => ZO 'ZBattlefield ot -> WithThisAbility 'ZBattlefield ot -> Effect 'Continuous
LoseLife :: ZOPlayer -> Int -> Effect 'OneShot -- TODO: PositiveInt
PutOntoBattlefield :: (CoPermanent ot, IsZO zone ot) => ZOPlayer -> ZO zone ot -> Effect 'OneShot -- TODO: zone /= 'ZBattlefield
Sacrifice :: (CoPermanent ot, IsOTN ot) => ZOPlayer -> [Requirement 'ZBattlefield ot] -> Effect 'OneShot
SearchLibrary :: (CoCard ot, IsOTN ot) => ZOPlayer {-searcher-} -> ZOPlayer {-searchee-} -> WithLinkedObject (Elect 'ResolveStage (Effect 'OneShot)) 'ZLibrary ot -> Effect 'OneShot
Sequence :: [Effect ef] -> Effect ef
ShuffleLibrary :: ZOPlayer -> Effect 'OneShot
StatDelta :: ZOCreature -> Power -> Toughness -> Effect 'Continuous
Tap :: (CoPermanent ot) => ZO 'ZBattlefield ot -> Effect 'OneShot
Untap :: (CoPermanent ot) => ZO 'ZBattlefield ot -> Effect 'OneShot
Until :: Elect 'ResolveStage Event OTNPlayer -> Effect 'Continuous -> Effect 'Continuous
WithList :: (IsZO zone ot) => WithList (Effect ef) zone ot -> Effect ef
deriving (Typeable)
instance ConsIndex (Effect ef) where
consIndex :: Effect ef -> Int
consIndex = \case
AddMana{} -> 1
AddToBattlefield{} -> 2
CantBeRegenerated{} -> 3
ChangeTo{} -> 4
CounterAbility{} -> 5
CounterSpell{} -> 6
DealDamage{} -> 7
Destroy{} -> 8
DrawCards{} -> 9
EffectCase{} -> 10
EffectContinuous{} -> 11
EndTheTurn{} -> 12
Exile{} -> 13
GainAbility{} -> 14
GainControl{} -> 15
GainLife{} -> 16
LoseAbility{} -> 17
LoseLife{} -> 18
PutOntoBattlefield{} -> 19
Sacrifice{} -> 20
SearchLibrary{} -> 21
Sequence{} -> 22
ShuffleLibrary{} -> 23
StatDelta{} -> 24
Tap{} -> 25
Untap{} -> 26
Until{} -> 27
WithList{} -> 28
--------------------------------------------------------------------------------
data Elect (s :: ElectStage) (el :: Type) (ot :: Type) :: Type where
ActivePlayer :: (ZOPlayer -> Elect s el ot) -> Elect s el ot
-- TODO: Add `IsZO zone ot` witness and change `'ZBattlefield` to `zone`.
All :: (IsOTN ot) => WithMaskedObjects (Elect s el) 'ZBattlefield ot -> Elect s el ot
Choose ::
(CoNonIntrinsicStage s, Typeable el, IsZO zone ot) =>
ZOPlayer ->
WithMaskedObject (Elect s el) zone ot ->
Elect s el ot
ChooseOption ::
(IsUser u, IsNat n, CoNonIntrinsicStage s) =>
ZOPlayer ->
NatList u n Condition ->
(Variable (Fin u n) -> Elect s el ot) ->
Elect s el ot
Condition :: Condition -> Elect s Condition ot
ControllerOf :: (IsZO zone OTNAny) => ZO zone OTNAny -> (ZOPlayer -> Elect s el ot) -> Elect s el ot
Cost :: Cost -> Elect 'IntrinsicStage Cost ot
Effect :: (Typeable ef) => [Effect ef] -> Elect 'ResolveStage (Effect ef) ot
ElectActivated :: (IsZO zone ot) => ActivatedAbility zone ot -> Elect 'TargetStage (ActivatedAbility zone ot) ot
ElectCardFacet :: CardCharacteristic ot -> Elect 'IntrinsicStage (CardCharacteristic ot) ot
ElectCardSpec :: CardSpec ot -> Elect 'TargetStage (CardSpec ot) ot
ElectCase :: Case (Elect s el ot) -> Elect s el ot
EndTargets :: (Typeable el) => Elect 'ResolveStage el ot -> Elect 'TargetStage (Elect 'ResolveStage el ot) ot
Event :: Event -> Elect 'ResolveStage Event ot
If :: Condition -> Elect s el ot -> Else s el ot -> Elect s el ot
Listen :: EventListener -> Elect 'IntrinsicStage EventListener ot
OwnerOf :: (IsZO zone OTNAny) => ZO zone OTNAny -> (ZOPlayer -> Elect s el ot) -> Elect s el ot
-- XXX: This could be generalized to `NatList user n Cost -> (Variable (FinPayment user n) -> Elect 'ResolveStage el ot)`
PlayerPays :: ZOPlayer -> Cost -> (Variable FinPayment -> Elect 'ResolveStage el ot) -> Elect 'ResolveStage el ot
-- TODO: Add `IsZO zone ot` witness and change `'ZBattlefield` to `zone`.
-- TODO: Prolly allow both 'Pre and 'Post
-- XXX: `Random` is potentially problematic when done within an aggregate Elect such as `All`...
-- Solutions:
-- (1) Use 'Pre instead of 'Post, but I think 'Post effects will need this
-- (2) Introduce 'Mid for between 'Pre and 'Post to enforce it happens before aggregates
-- (3) Say that this is OK and say that Random must come before All if want it unified. Seems good actually...
Random ::
(IsOTN ot) =>
WithMaskedObject (Elect 'ResolveStage el) 'ZBattlefield ot ->
Elect 'ResolveStage el ot -- Interpreted as "Arbitrary" in some contexts, such as Event and EventListener
-- TODO: Disallow `Target` for some types of `el` using a witness arg, in particular Event and EventListener
Target ::
(Typeable el, IsZO zone ot) =>
ZOPlayer ->
WithMaskedObject (Elect 'TargetStage el) zone ot ->
Elect 'TargetStage el ot
VariableFromPower :: ZOCreature -> (Variable Int -> Elect 'ResolveStage el ot) -> Elect 'ResolveStage el ot
-- TODO: It is actually possible to allow this to be IntrinsicStage by defaulting X to 0... but then `performElections`
-- for IntrinsicStage would need to somehow be RO and RW (RO for defaulted X and RW for player choice for X). Probably
-- possible by augmenting ElectStageRW with another type parameter. Worth it or necessary?
VariableInt :: (Variable Int -> Elect 'TargetStage el ot) -> Elect 'TargetStage el ot
-- TODO: Prolly can be any electStage instead of just IntrinsicStage.
Your :: (ZOPlayer -> Elect 'IntrinsicStage el ot) -> Elect 'IntrinsicStage el ot
deriving (Typeable)
instance ConsIndex (Elect s el ot) where
consIndex :: Elect s el ot -> Int
consIndex = \case
ActivePlayer{} -> 1
All{} -> 2
Choose{} -> 3
ChooseOption{} -> 4
Condition{} -> 5
ControllerOf{} -> 6
Cost{} -> 7
Effect{} -> 8
ElectActivated{} -> 9
ElectCardFacet{} -> 10
ElectCardSpec{} -> 11
ElectCase{} -> 12
EndTargets{} -> 13
Event{} -> 14
If{} -> 15
Listen{} -> 16
OwnerOf{} -> 17
PlayerPays{} -> 18
Random{} -> 19
Target{} -> 20
VariableFromPower{} -> 21
VariableInt{} -> 22
Your{} -> 23
type ElectTargetedEffect ef ot = Elect 'TargetStage (Elect 'ResolveStage ef ot) ot
-- | Used to make some higher-kinded `ot` stuff work.
data ElectOT (s :: ElectStage) (liftOT :: Type -> Type) (ot :: Type) where
ElectOT :: {unElectOT :: Elect s (liftOT ot) ot} -> ElectOT s liftOT ot
deriving (Typeable)
--------------------------------------------------------------------------------
data Else (s :: ElectStage) (el :: Type) (ot :: Type) :: Type where
ElseCost :: (el ~ Cost) => Elect s el ot -> Else s el ot
ElseEffect :: (el ~ Effect 'OneShot) => Elect s el ot -> Else s el ot
-- NOTE: Events need linear history to make sense of election costs tied to it, hence this hole.
-- Imagine otherwise this were not the case. Then different parts of the branch could listen to different
-- event types (without injecting yet another index/witness to prevent it). This is is dumb on its own
-- and gets worse when the conditional has costs involved. You'd have to solve for the future to know what
-- costs are paid in order to know which event to trigger! Impossible!
ElseEvent :: (el ~ EventListener' liftOT) => Else s el ot
deriving (Typeable)
instance ConsIndex (Else s el ot) where
consIndex :: Else s el ot -> Int
consIndex = \case
ElseCost{} -> 1
ElseEffect{} -> 2
ElseEvent{} -> 3
--------------------------------------------------------------------------------
data Enchant (zone :: Zone) (ot :: Type) :: Type where
Enchant :: (IsZO zone ot) => WithLinkedObject (Elect 'ResolveStage (Effect 'Continuous)) zone ot -> Enchant zone ot
deriving (Typeable)
instance ConsIndex (Enchant zone ot) where
consIndex :: Enchant zone ot -> Int
consIndex = \case
Enchant{} -> 1
--------------------------------------------------------------------------------
data EnchantmentType (ot :: Type) :: Type where
Aura :: (ot ~ OTNEnchantment, IsZO zone ot') => Enchant zone ot' -> EnchantmentType ot
deriving (Typeable)
instance ConsIndex (EnchantmentType ot) where
consIndex :: EnchantmentType ot -> Int
consIndex = \case
Aura{} -> 1
--------------------------------------------------------------------------------
-- This is distinct from triggered ETB effects.
data EntersStatic (zone :: Zone) (ot :: Type) :: Type where
EntersTapped :: (CoPermanent ot, IsOTN ot) => EntersStatic 'ZBattlefield ot
-- EntersWithCounters :: (CoPermanent ot, IsOTN ot) => CounterType ot -> Int -> EntersStatic 'ZBattlefield ot
deriving (Typeable)
instance ConsIndex (EntersStatic zone ot) where
consIndex :: EntersStatic zone ot -> Int
consIndex = \case
EntersTapped{} -> 1
--------------------------------------------------------------------------------
-- TODO: move out of this module
class (IsZone zone) => CoNonBattlefield (zone :: Zone)
-- See `Until` constructor for a place where this is used. e.g. [Pradesh Gypsies]
type Event = EventListener' Proxy
-- XXX: This should use 'Pre/PrePost instead of 'Post? e.g. [Flametongue Kavu]
type EventListener = EventListener' (Elect 'ResolveStage (Effect 'OneShot))
data EventListener' (liftOT :: Type -> Type) :: Type where
BecomesTapped :: (CoPermanent ot, IsOTN ot, Typeable liftOT) => WithLinkedObject liftOT 'ZBattlefield ot -> EventListener' liftOT
EntersBattlefield :: (CoPermanent ot, IsOTN ot, Typeable liftOT) => WithLinkedObject liftOT 'ZBattlefield ot -> EventListener' liftOT
EntersNonBattlefield :: (CoNonBattlefield zone, CoCard ot, Typeable liftOT) => WithLinkedObject liftOT zone ot -> EventListener' liftOT
Events :: [EventListener' liftOT] -> EventListener' liftOT
SpellIsCast :: (CoSpell ot, IsOTN ot) => WithLinkedObject liftOT 'ZBattlefield ot -> EventListener' liftOT
TimePoint :: (Typeable p) => TimePoint p -> liftOT OTNPlayer -> EventListener' liftOT
deriving (Typeable)
instance ConsIndex (EventListener' liftOT) where
consIndex :: EventListener' liftOT -> Int
consIndex = \case
BecomesTapped{} -> 1
EntersBattlefield{} -> 2
EntersNonBattlefield{} -> 3
Events{} -> 4
SpellIsCast{} -> 5
TimePoint{} -> 6
--------------------------------------------------------------------------------
data Payment = DidNotPay | Paid
deriving (Eq, Ord, Show, Typeable)
instance IsUser Payment
type FinPayment = Fin Payment (ToNat 1)
--------------------------------------------------------------------------------
newtype List a = List [a]
deriving (Functor, Typeable)
instance Applicative List where
pure :: a -> List a
pure = List . pure
(<*>) :: List (a -> b) -> List a -> List b
List f <*> List x = List $ f <*> x
--------------------------------------------------------------------------------
data Requirement (zone :: Zone) (ot :: Type) :: Type where
ControlledBy :: (IsOTN ot) => ZOPlayer -> Requirement 'ZBattlefield ot
ControlsA :: (IsOTN ot) => Requirement 'ZBattlefield ot -> Requirement zone OTNPlayer
HasAbility :: (IsZO zone ot) => SomeZone WithThisAbility ot -> Requirement zone ot -- Non-unique differing representations will not be considered the same
HasLandType :: (IsZO zone OTNLand) => LandType -> Requirement zone OTNLand
Is :: (CoAny ot, IsZO zone ot) => ZO zone ot -> Requirement zone ot
IsOpponentOf :: ZOPlayer -> Requirement zone OTNPlayer
IsTapped :: (CoPermanent ot, IsOTN ot) => Requirement 'ZBattlefield ot
Not :: (IsZO zone ot) => Requirement zone ot -> Requirement zone ot
OfColors :: (IsZO zone ot) => Colors -> Requirement zone ot -- needs `WCard ot` witness
OwnedBy :: (IsZO zone ot) => ZOPlayer -> Requirement zone ot
RAnd :: (IsZO zone ot) => [Requirement zone ot] -> Requirement zone ot
ROr :: (IsZO zone ot) => [Requirement zone ot] -> Requirement zone ot
-- TODO: Try to add some combinators that go from: forall a b. [forall liftOT. Requirement x] -> Requirement (ON2 a, b)
Req2 ::
( IsZO zone (OT2 a b)
, Inst2 IsObjectType a b
) =>
[Requirement zone (OT1 a)] ->
[Requirement zone (OT1 b)] ->
Requirement zone (OT2 a b)
Req3 ::
( IsZO zone (OT3 a b c)
, Inst3 IsObjectType a b c
) =>
[Requirement zone (OT1 a)] ->
[Requirement zone (OT1 b)] ->
[Requirement zone (OT1 c)] ->
Requirement zone (OT3 a b c)
Req4 ::
( IsZO zone (OT4 a b c d)
, Inst4 IsObjectType a b c d
) =>
[Requirement zone (OT1 a)] ->
[Requirement zone (OT1 b)] ->
[Requirement zone (OT1 c)] ->
[Requirement zone (OT1 d)] ->
Requirement zone (OT4 a b c d)
Req5 ::
( IsZO zone (OT5 a b c d e)
, Inst5 IsObjectType a b c d e
) =>
[Requirement zone (OT1 a)] ->
[Requirement zone (OT1 b)] ->
[Requirement zone (OT1 c)] ->
[Requirement zone (OT1 d)] ->
[Requirement zone (OT1 e)] ->
Requirement zone (OT5 a b c d e)
deriving (Typeable)
instance ConsIndex (Requirement zone ot) where
consIndex :: Requirement zone ot -> Int
consIndex = \case
ControlledBy{} -> 1
ControlsA{} -> 2
HasAbility{} -> 3
HasLandType{} -> 4
Is{} -> 5
IsOpponentOf{} -> 6
IsTapped{} -> 7
Not{} -> 8
OfColors{} -> 9
OwnedBy{} -> 10
RAnd{} -> 11
ROr{} -> 12
Req2{} -> 13
Req3{} -> 14
Req4{} -> 15
Req5{} -> 16
--------------------------------------------------------------------------------
-- XXX: Better to just make this take a user type `a` which can encode CardSet and Rarirty amongst other things.
data SetCard (ot :: Type) :: Type where
SetCard :: CardSet -> Rarity -> Card ot -> SetCard ot
deriving (Typeable)
instance ConsIndex (SetCard ot) where
consIndex :: SetCard ot -> Int
consIndex = \case
SetCard{} -> 1
--------------------------------------------------------------------------------
-- XXX: Better to just make this take a user type `a` which can encode CardSet and Rarirty amongst other things.
data SetToken (ot :: Type) :: Type where
SetToken :: CardSet -> Rarity -> Token ot -> SetToken ot
deriving (Typeable)
instance ConsIndex (SetToken ot) where
consIndex :: SetToken ot -> Int
consIndex = \case
SetToken{} -> 1
--------------------------------------------------------------------------------
-- TODO: Move all these Some* stuff to another file
data SomeOT (liftOT :: Type -> Type) (ot :: Type) :: Type where
Some2a :: (Inst2 IsObjectType a b) => SomeTerm liftOT (OT1 a) -> SomeOT liftOT (OT2 a b)
Some2b :: (Inst2 IsObjectType a b) => SomeTerm liftOT (OT1 b) -> SomeOT liftOT (OT2 a b)
--
Some5a :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT1 a) -> SomeOT liftOT (OT5 a b c d e)
Some5b :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT1 b) -> SomeOT liftOT (OT5 a b c d e)
Some5c :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT1 c) -> SomeOT liftOT (OT5 a b c d e)
Some5d :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT1 d) -> SomeOT liftOT (OT5 a b c d e)
Some5e :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT1 e) -> SomeOT liftOT (OT5 a b c d e)
Some5ab :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT2 a b) -> SomeOT liftOT (OT5 a b c d e)
Some5ad :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT2 a d) -> SomeOT liftOT (OT5 a b c d e)
Some5bc :: (Inst5 IsObjectType a b c d e) => SomeTerm liftOT (OT2 b c) -> SomeOT liftOT (OT5 a b c d e)
--
Some6a :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT1 a) -> SomeOT liftOT (OT6 a b c d e f)
Some6b :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT1 b) -> SomeOT liftOT (OT6 a b c d e f)
Some6c :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT1 c) -> SomeOT liftOT (OT6 a b c d e f)
Some6d :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT1 d) -> SomeOT liftOT (OT6 a b c d e f)
Some6e :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT1 e) -> SomeOT liftOT (OT6 a b c d e f)
Some6f :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT1 f) -> SomeOT liftOT (OT6 a b c d e f)
Some6ab :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT2 a b) -> SomeOT liftOT (OT6 a b c d e f)
Some6ac :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT2 a c) -> SomeOT liftOT (OT6 a b c d e f)
Some6ae :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT2 a e) -> SomeOT liftOT (OT6 a b c d e f)
Some6bc :: (Inst6 IsObjectType a b c d e f) => SomeTerm liftOT (OT2 b c) -> SomeOT liftOT (OT6 a b c d e f)