@@ -555,25 +555,67 @@ instance Unparse patternType => Unparse (Sentence patternType) where
555
555
unparse = unparseGeneric
556
556
unparse2 = unparse2Generic
557
557
558
+ instance Injection (Sentence patternType ) (SentenceAlias patternType ) where
559
+ inject = SentenceAliasSentence
560
+
561
+ retract (SentenceAliasSentence sentenceAlias) = Just sentenceAlias
562
+ retract _ = Nothing
563
+
564
+ instance Injection (Sentence patternType ) (SentenceSymbol patternType ) where
565
+ inject = SentenceSymbolSentence
566
+
567
+ retract (SentenceSymbolSentence sentenceSymbol) = Just sentenceSymbol
568
+ retract _ = Nothing
569
+
570
+ instance Injection (Sentence patternType ) (SentenceImport patternType ) where
571
+ inject = SentenceImportSentence
572
+
573
+ retract (SentenceImportSentence sentenceImport) = Just sentenceImport
574
+ retract _ = Nothing
575
+
576
+ instance Injection (Sentence patternType ) (SentenceAxiom patternType ) where
577
+ inject = SentenceAxiomSentence
578
+
579
+ retract (SentenceAxiomSentence sentenceAxiom) = Just sentenceAxiom
580
+ retract _ = Nothing
581
+
582
+ instance Injection (Sentence patternType ) (SentenceClaim patternType ) where
583
+ inject = SentenceClaimSentence
584
+
585
+ retract (SentenceClaimSentence sentenceClaim) = Just sentenceClaim
586
+ retract _ = Nothing
587
+
588
+ instance Injection (Sentence patternType ) (SentenceSort patternType ) where
589
+ inject = SentenceSortSentence
590
+
591
+ retract (SentenceSortSentence sentenceSort) = Just sentenceSort
592
+ retract _ = Nothing
593
+
594
+ instance Injection (Sentence patternType ) (SentenceHook patternType ) where
595
+ inject = SentenceHookSentence
596
+
597
+ retract (SentenceHookSentence sentenceHook) = Just sentenceHook
598
+ retract _ = Nothing
599
+
558
600
projectSentenceImport
559
601
:: Sentence ParsedPattern
560
602
-> Maybe (SentenceImport ParsedPattern )
561
- projectSentenceImport = projectTyped
603
+ projectSentenceImport = retract
562
604
563
605
projectSentenceSort
564
606
:: Sentence ParsedPattern
565
607
-> Maybe (SentenceSort ParsedPattern )
566
- projectSentenceSort = projectTyped
608
+ projectSentenceSort = retract
567
609
568
610
projectSentenceSymbol
569
611
:: Sentence ParsedPattern
570
612
-> Maybe (SentenceSymbol ParsedPattern )
571
- projectSentenceSymbol = projectTyped
613
+ projectSentenceSymbol = retract
572
614
573
615
projectSentenceHook
574
616
:: Sentence ParsedPattern
575
617
-> Maybe (SentenceHook ParsedPattern )
576
- projectSentenceHook = projectTyped
618
+ projectSentenceHook = retract
577
619
578
620
projectSentenceHookedSort
579
621
:: Sentence ParsedPattern
@@ -588,17 +630,17 @@ projectSentenceHookedSymbol = projectSentenceHook Monad.>=> projectTyped
588
630
projectSentenceAlias
589
631
:: Sentence ParsedPattern
590
632
-> Maybe (SentenceAlias ParsedPattern )
591
- projectSentenceAlias = projectTyped
633
+ projectSentenceAlias = retract
592
634
593
635
projectSentenceAxiom
594
636
:: Sentence ParsedPattern
595
637
-> Maybe (SentenceAxiom ParsedPattern )
596
- projectSentenceAxiom = projectTyped
638
+ projectSentenceAxiom = retract
597
639
598
640
projectSentenceClaim
599
641
:: Sentence ParsedPattern
600
642
-> Maybe (SentenceClaim ParsedPattern )
601
- projectSentenceClaim = projectTyped
643
+ projectSentenceClaim = retract
602
644
603
645
{- | The attributes associated with a sentence.
604
646
0 commit comments