@@ -65,32 +65,62 @@ class AbortBase g where
6565
6666-- TODO make these bidirectional
6767pattern BasicFW :: BasicBase g => BasicExprF x -> g x
68- pattern BasicFW x <- (extractB -> Just x)
69- pattern BasicEE :: (Base g ~ f , BasicBase f , Recursive g ) => BasicExprF g -> g
70- pattern BasicEE x <- (project -> BasicFW x)
68+ pattern BasicFW x <- (extractB -> Just x) where
69+ BasicFW x = embedB x
70+ pattern BasicEE :: (Base g ~ f , BasicBase f , Recursive g , Corecursive g ) => BasicExprF g -> g
71+ -- pattern BasicEE x <- (project -> BasicFW x) where
72+ pattern BasicEE x = GFix (BasicFW x)
7173pattern StuckFW :: (StuckBase g ) => StuckF x -> g x
72- pattern StuckFW x <- (extractS -> Just x)
73- pattern StuckEE :: (Base g ~ f , StuckBase f , Recursive g ) => StuckF g -> g
74- pattern StuckEE x <- (project -> StuckFW x)
74+ pattern StuckFW x <- (extractS -> Just x) where
75+ StuckFW x = embedS x
76+ pattern StuckEE :: (Base g ~ f , StuckBase f , Recursive g , Corecursive g ) => StuckF g -> g
77+ -- pattern StuckEE x <- (project -> StuckFW x)
78+ pattern StuckEE x = GFix (StuckFW x)
7579pattern AbortFW :: AbortBase g => AbortableF x -> g x
76- pattern AbortFW x <- (extractA -> Just x)
77- pattern AbortEE :: (Base g ~ f , AbortBase f , Recursive g ) => AbortableF g -> g
78- pattern AbortEE x <- (project -> (AbortFW x))
80+ pattern AbortFW x <- (extractA -> Just x) where
81+ AbortFW x = embedA x
82+ pattern AbortEE :: (Base g ~ f , AbortBase f , Recursive g , Corecursive g ) => AbortableF g -> g
83+ -- pattern AbortEE x <- (project -> (AbortFW x))
84+ pattern AbortEE x = GFix (AbortFW x)
7985
8086{-
8187pattern ZeroB :: (Base g ~ f, BasicBase f, Recursive g) => g
8288pattern ZeroB <- BasicEE ZeroSF
8389pattern PairB :: (Base g ~ f, BasicBase f, Recursive g) => g -> g -> g
8490pattern PairB a b <- BasicEE (PairSF a b)
8591-}
86- pattern FillFunction :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g ) => g -> g -> f g
87- pattern FillFunction c e <- StuckFW (SetEnvSF (BasicEE (PairSF c e)))
88- pattern GateSwitch :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g ) => g -> g -> g -> f g
89- pattern GateSwitch l r s <- FillFunction (StuckEE (GateSF l r)) s
90- pattern AppEE :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g ) => g -> g -> g
92+ pattern FillFunction :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g , Corecursive g ) => g -> g -> f g
93+ pattern FillFunction c e = StuckFW (SetEnvSF (BasicEE (PairSF c e)))
94+ pattern FillFunctionEE :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g , Corecursive g ) => g -> g -> g
95+ pattern FillFunctionEE c i = GFix (FillFunction c i)
96+ pattern GateSwitch :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g , Corecursive g ) => g -> g -> g -> f g
97+ pattern GateSwitch l r s = FillFunction (GateB l r) s
98+ pattern GateSwitchEE :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g , Corecursive g ) => g -> g -> g -> g
99+ pattern GateSwitchEE l r s = GFix (GateSwitch l r s)
100+ pattern AppEE :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g , Corecursive g ) => g -> g -> g
91101pattern AppEE c i <- StuckEE (SetEnvSF (StuckEE (SetEnvSF (BasicEE (PairSF (StuckEE (DeferSF _ (BasicEE (PairSF (StuckEE (LeftSF (StuckEE (RightSF (StuckEE EnvSF ))))) (BasicEE (PairSF (StuckEE (LeftSF (StuckEE EnvSF ))) (StuckEE (RightSF (StuckEE (RightSF (StuckEE EnvSF ))))))))))) (BasicEE (PairSF i c)))))))
92102
103+ pattern EnvB :: (Recursive g , Corecursive g , Base g ~ f , StuckBase f ) => g
104+ pattern EnvB = StuckEE EnvSF
105+ pattern SetEnvB :: (Recursive g , Corecursive g , Base g ~ f , StuckBase f ) => g -> g
106+ pattern SetEnvB x = StuckEE (SetEnvSF x)
107+ pattern GateB :: (Recursive g , Corecursive g , Base g ~ f , StuckBase f ) => g -> g -> g
108+ pattern GateB l r = StuckEE (GateSF l r)
109+ pattern LeftB :: (Recursive g , Corecursive g , Base g ~ f , StuckBase f ) => g -> g
110+ pattern LeftB x = StuckEE (LeftSF x)
111+ pattern RightB :: (Recursive g , Corecursive g , Base g ~ f , StuckBase f ) => g -> g
112+ pattern RightB x = StuckEE (RightSF x)
113+ pattern ZeroB :: (Recursive g , Corecursive g , Base g ~ f , BasicBase f ) => g
114+ pattern ZeroB = BasicEE ZeroSF
115+ pattern AbortB :: (Recursive g , Corecursive g , Base g ~ f , AbortBase f ) => g
116+ pattern AbortB = AbortEE AbortF
117+ -- note: only use this where annotations don't matter
118+ pattern PairB :: (Recursive g , Corecursive g , Base g ~ f , BasicBase f ) => g -> g -> g
119+ pattern PairB a b = BasicEE (PairSF a b)
120+
121+
93122-- TODO remove these in favor of patterns above
123+ {-
94124basicEE :: (Base g ~ f, BasicBase f, Corecursive g) => BasicExprF g -> g
95125basicEE = embed . embedB
96126stuckEE :: (Base g ~ f, StuckBase f, Corecursive g) => StuckF g -> g
@@ -120,8 +150,10 @@ gateSwitch l r = fillFunction (gateB l r)
120150
121151abortB :: (Base g ~ f, AbortBase f, Corecursive g) => g
122152abortB = abortEE AbortF
153+ -}
123154
124155-- TODO: remove in favor of varB
156+ {-
125157firstArgB :: (Base g ~ f, BasicBase f, StuckBase f, Corecursive g) => g
126158firstArgB = leftB envB
127159secondArgB :: (Base g ~ f, BasicBase f, StuckBase f, Corecursive g) => g
@@ -132,16 +164,17 @@ fourthArgB :: (Base g ~ f, BasicBase f, StuckBase f, Corecursive g) => g
132164fourthArgB = leftB . rightB . rightB $ rightB envB
133165fifthArgB :: (Base g ~ f, BasicBase f, StuckBase f, Corecursive g) => g
134166fifthArgB = leftB . rightB . rightB . rightB $ rightB envB
167+ -}
135168
136- varB :: (Base g ~ f , BasicBase f , StuckBase f , Corecursive g ) => Int -> g
169+ varB :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g , Corecursive g ) => Int -> g
137170varB n = if n < 0
138171 then error $ " varB invalid debruijin index " <> show n
139- else leftB (iterate rightB envB !! n)
172+ else LeftB (iterate RightB EnvB !! n)
140173
141- i2B :: (Base g ~ f , BasicBase f , Corecursive g ) => Int -> g
174+ i2B :: (Base g ~ f , BasicBase f , Recursive g , Corecursive g , CarryAnno g , CarryWrap g ~ w , BasicBase w ) => Int -> g
142175i2B = \ case
143- 0 -> zeroB
144- n -> pairB (i2B $ n - 1 ) zeroB
176+ 0 -> ZeroB
177+ n -> PairP (i2B $ n - 1 ) ZeroB
145178
146179b2i :: (Base g ~ f , BasicBase f , Recursive g ) => g -> Maybe Int
147180b2i = cata f where
@@ -154,15 +187,15 @@ b2s :: forall g f. (Base g ~ f, CarryWrap g ~ f, BasicBase f, Recursive g, Corec
154187b2s = fmap (fmap chr) . f where
155188 f = \ case
156189 PairP x xs -> (:) <$> b2i x <*> f xs
157- ZeroP -> pure []
190+ ZeroB -> pure []
158191 _ -> Nothing
159192
160- s2b :: forall g f . (Base g ~ f , BasicBase f , Corecursive g ) => String -> g
161- s2b = foldr (pairB . i2B . ord) zeroB
193+ s2b :: forall g f w . (Base g ~ f , BasicBase f , Recursive g , Corecursive g , CarryAnno g , CarryWrap g ~ w , BasicBase w ) => String -> g
194+ s2b = foldr (PairP . i2B . ord) ZeroB
162195
163196-- note that this doesn't incorporate laziness necessary for things like sizing recursion
164- iteB_ :: (Base g ~ f , BasicBase f , StuckBase f , Corecursive g ) => g -> g -> g -> g
165- iteB_ i t e = setEnvB $ pairB (gateB e t) i
197+ iteB_ :: (Base g ~ f , BasicBase f , StuckBase f , Recursive g , Corecursive g , CarryAnno g , CarryWrap g ~ w , BasicBase w ) => g -> g -> g -> g
198+ iteB_ i t e = SetEnvB $ PairP ( GateB e t) i
166199
167200data BasicExprF f
168201 = ZeroSF
@@ -797,11 +830,11 @@ type Term3Builder g = State (FunctionIndex, UnsizedRecursionToken) g
797830buildTerm :: (Corecursive g ) => Term3Builder g -> g
798831buildTerm = flip State. evalState (toEnum 0 , toEnum 0 )
799832
800- deferS :: (Base g ~ f , StuckBase f , Corecursive g ) => g -> Term3Builder g
833+ deferS :: (Base g ~ f , StuckBase f , Recursive g , Corecursive g ) => g -> Term3Builder g
801834deferS x = do
802835 fi <- State. gets fst
803836 State. modify (\ (_, urt) -> (succ fi, urt))
804- pure . stuckEE $ DeferSF fi x
837+ pure . StuckEE $ DeferSF fi x
805838
806839-- TODO: replace with PairP?
807840pairS :: (Base g ~ CofreeT. CofreeF f a , BasicBase f , Recursive g , Corecursive g , Monad m ) => m g -> m g -> m g
@@ -813,18 +846,19 @@ pairS a b = do
813846
814847clamS :: forall g f . (Base g ~ CofreeT. CofreeF f LocTag , StuckBase f , BasicBase f , Recursive g , Corecursive g )
815848 => Term3Builder g -> Term3Builder g
816- clamS x = pairS (x >>= deferS) $ pure zeroB
849+ clamS x = pairS (x >>= deferS) $ pure ZeroB
817850
818851lamS :: forall g f . (Base g ~ CofreeT. CofreeF f LocTag , StuckBase f , BasicBase f , Recursive g , Corecursive g )
819852 => Term3Builder g -> Term3Builder g
820- lamS x = pairS (x >>= deferS) $ pure envB
853+ lamS x = pairS (x >>= deferS) $ pure EnvB
821854
822- twiddleS :: forall g f . (Base g ~ CofreeT. CofreeF f LocTag , StuckBase f , BasicBase f , Corecursive g ) => Term3Builder g
823- twiddleS = deferS . pairB (leftB $ rightB envB) . pairB (leftB envB) $ rightB (rightB envB)
855+ twiddleS :: forall g f w . (Base g ~ CofreeT. CofreeF f LocTag , StuckBase f , BasicBase f , Recursive g , Corecursive g , CarryAnno g , CarryWrap g ~ w , BasicBase w )
856+ => Term3Builder g
857+ twiddleS = deferS . PairP (LeftB $ RightB EnvB ) . PairP (LeftB EnvB ) $ RightB (RightB EnvB )
824858
825- appS :: forall g f . (Base g ~ CofreeT. CofreeF f LocTag , StuckBase f , BasicBase f , Recursive g , Corecursive g )
859+ appS :: forall g f w . (Base g ~ CofreeT. CofreeF f LocTag , StuckBase f , BasicBase f , Recursive g , Corecursive g , CarryAnno g , CarryWrap g ~ w , BasicBase w )
826860 => Term3Builder g -> Term3Builder g -> Term3Builder g
827- appS c i = setEnvB . setEnvB <$> pairS twiddleS (pairS i c)
861+ appS c i = SetEnvB . SetEnvB <$> pairS twiddleS (pairS i c)
828862
829863-- inside three lambdas (\r f x -> ...)
830864-- r is the repeater function
@@ -833,50 +867,52 @@ appS c i = setEnvB . setEnvB <$> pairS twiddleS (pairS i c)
833867-- (f',env') is f (since f may contain a saved environment/closure env we want to use for each iteration)
834868repeatFunctionS :: LocTag -> Term3Builder Term3
835869repeatFunctionS l =
836- let applyF = setEnvB $ rightB envB
837- env' = rightB . rightB $ rightB envB
870+ let applyF = SetEnvB $ RightB EnvB
871+ env' = RightB . RightB $ RightB EnvB
838872 -- takes (rf, (f', (x, env'))), executes f' with (x, env') and creates a new frame
839- rf = deferS $ pairB (leftB envB )
840- (pairB (leftB envB )
841- (pairB (leftB (rightB envB ))
842- (pairB applyF env')))
843- r = leftB . leftB . rightB $ rightB envB
844- x = leftB envB
845- f' = leftB . leftB $ rightB envB
846- fenv = rightB . leftB $ rightB envB
873+ rf = deferS $ PairP ( LeftB EnvB )
874+ (PairP ( LeftB EnvB )
875+ (PairP ( LeftB ( RightB EnvB ))
876+ (PairP applyF env')))
877+ r = LeftB . LeftB . RightB $ RightB EnvB
878+ x = LeftB EnvB
879+ f' = LeftB . LeftB $ RightB EnvB
880+ fenv = RightB . LeftB $ RightB EnvB
847881 -- (r, (x, ((f', fenv), 0))) -> (rf, (rf, (f', (x, fenv))))
848- frameSetup = pairS rf (pairS rf (pure $ pairB f' (pairB x fenv)))
849- in clamS . lamS . lamS $ setEnvB <$> pairS (pure r) frameSetup
882+ frameSetup = pairS rf (pairS rf (pure $ PairP f' (PairP x fenv)))
883+ in clamS . lamS . lamS $ SetEnvB <$> pairS (pure r) frameSetup
850884
851885unsizedRepeater :: LocTag -> UnsizedRecursionToken -> Term3Builder Term3
852- unsizedRepeater l tok = clamS . pure . leftB . rightB . rightB . rightB . embed $ l CofreeT. :< Term3Unsized tok
886+ unsizedRepeater l tok = clamS . pure . LeftB . RightB . RightB . RightB . embed $ l CofreeT. :< Term3Unsized tok
853887
854888repeaterAndAbort :: LocTag -> UnsizedRecursionToken -> Term3Builder Term3
855889repeaterAndAbort l tok = pairS (unsizedRepeater l tok) abrt where
856890 -- args are (i, (b, ...)) since trb is on the stack
857- abrt = (>>= deferS) $ setEnvB . pairB (setEnvB $ pairB abortB abortToken) <$> appS (pure secondArgB) (pure firstArgB)
858- abortToken = pairB zeroB . i2B $ fromEnum tok
891+ -- abrt = (>>= deferS) $ SetEnvB . PairP (SetEnvB $ PairP AbortB abortToken) <$> appS (pure secondArgB) (pure firstArgB)
892+ abrt = (>>= deferS) $ SetEnvB . PairP (SetEnvB $ PairP AbortB abortToken) <$> appS (pure $ varB 1 ) (pure $ varB 0 )
893+ abortToken = PairP ZeroB . i2B $ fromEnum tok
859894
860895-- to construct a church numeral (\f x -> f ... (f x))
861896-- the core is nested setenvs around an env, where the number of setenvs is magnitude of church numeral
862897i2CB :: LocTag -> Int -> Term3Builder Term3
863- i2CB l n = appS (repeatFunctionS l) . clamS . pure . leftB . rightB . rightB . rightB $ iterate setEnvB envB !! n
898+ i2CB l n = appS (repeatFunctionS l) . clamS . pure . LeftB . RightB . RightB . RightB $ iterate SetEnvB EnvB !! n
864899
865900-- function is called with (r,a), where r is the repeating function, and a is the abort function
866901unsizedRecursionWrapper :: LocTag -> Term3Builder Term3 -> Term3Builder Term3 -> Term3Builder Term3 -> Term3Builder Term3
867902unsizedRecursionWrapper loc t r b =
868- let repeater = leftB $ leftB envB
869- abrt = pairB (rightB $ leftB envB) envB
903+ let repeater = LeftB $ LeftB EnvB
904+ abrt = PairP ( RightB $ LeftB EnvB ) EnvB
870905 -- drop first arg (repeater)
871906 nsLamS :: Term3Builder Term3 -> Term3Builder Term3
872- nsLamS x = pairS (x >>= deferS) (pure $ rightB envB )
907+ nsLamS x = pairS (x >>= deferS) (pure $ RightB EnvB )
873908 -- \t r b r' i -> if t i then r r' i else b i -- t r b are already on the stack when this is evaluated
874- rWrap = nsLamS . lamS $ iteB_ <$> appS (pure fifthArgB) (pure firstArgB)
875- <*> appS (appS (pure fourthArgB) (pure secondArgB)) (pure firstArgB)
876- <*> appS (pure thirdArgB) (pure firstArgB)
909+ -- rWrap = nsLamS . lamS $ iteB_ <$> appS (pure fifthArgB) (pure firstArgB)
910+ rWrap = nsLamS . lamS $ iteB_ <$> appS (pure $ varB 4 ) (pure $ varB 0 )
911+ <*> appS (appS (pure $ varB 3 ) (pure $ varB 1 )) (pure $ varB 0 )
912+ <*> appS (pure $ varB 2 ) (pure $ varB 0 )
877913 -- hack to make sure recursion test wrapper can be put in a definite place when sizing
878- tWrap = pairS ((>>= deferS) (appS (pure secondArgB ) (pure firstArgB ))) (pairS t $ pure zeroB )
879- trb = pairS b . pairS r . pairS tWrap $ pure zeroB
914+ tWrap = pairS ((>>= deferS) (appS (pure $ varB 1 ) (pure $ varB 0 ))) (pairS t $ pure ZeroB )
915+ trb = pairS b . pairS r . pairS tWrap $ pure ZeroB
880916 in pairS (appS (appS (appS (repeatFunctionS loc) (pure repeater)) rWrap) (pure abrt) >>= deferS) trb
881917
882918data DataType
@@ -946,17 +982,17 @@ tag :: Recursive a => anno -> a -> Cofree (Base a) anno
946982tag anno x = anno :< (tag anno <$> project x)
947983
948984
949- convertBasic :: (BasicBase g , BasicBase h , Base x ~ h , Corecursive x , Monad m ) => (g (m x ) -> m x ) -> g (m x ) -> m x
985+ convertBasic :: (BasicBase g , BasicBase h , Base x ~ h , Recursive x , Corecursive x , Monad m ) => (g (m x ) -> m x ) -> g (m x ) -> m x
950986convertBasic convertOther = \ case
951- BasicFW x -> basicEE <$> sequence x
987+ BasicFW x -> BasicEE <$> sequence x
952988 x -> convertOther x
953- convertStuck :: (StuckBase g , StuckBase h , Base x ~ h , Corecursive x , Monad m ) => (g (m x ) -> m x ) -> g (m x ) -> m x
989+ convertStuck :: (StuckBase g , StuckBase h , Base x ~ h , Recursive x , Corecursive x , Monad m ) => (g (m x ) -> m x ) -> g (m x ) -> m x
954990convertStuck convertOther = \ case
955- StuckFW x -> stuckEE <$> sequence x
991+ StuckFW x -> StuckEE <$> sequence x
956992 x -> convertOther x
957- convertAbort :: (AbortBase g , AbortBase h , Base x ~ h , Corecursive x , Monad m ) => (g (m x ) -> m x ) -> g (m x ) -> m x
993+ convertAbort :: (AbortBase g , AbortBase h , Base x ~ h , Recursive x , Corecursive x , Monad m ) => (g (m x ) -> m x ) -> g (m x ) -> m x
958994convertAbort convertOther = \ case
959- AbortFW x -> abortEE <$> sequence x
995+ AbortFW x -> AbortEE <$> sequence x
960996 x -> convertOther x
961997
962998instance TelomareLike Term3 where
@@ -986,14 +1022,19 @@ insertAndGetKey v = do
9861022 pure nextKey
9871023
9881024pattern AbortRecursion :: (Base g ~ f , CarryWrap g ~ f , BasicBase f , CarryAnno g , Recursive g , Corecursive g ) => g -> g
989- pattern AbortRecursion t <- PairP ZeroP t
1025+ -- pattern AbortRecursion t <- PairP ZeroB t
1026+ pattern AbortRecursion t = PairP ZeroB t
9901027pattern AbortUser :: (Base g ~ f , CarryWrap g ~ f , BasicBase f , CarryAnno g , Recursive g , Corecursive g ) => g -> g
991- pattern AbortUser m <- PairP (PairP ZeroP ZeroP ) m
1028+ -- pattern AbortUser m <- PairP (PairP ZeroB ZeroB) m
1029+ pattern AbortUser m = PairP (PairP ZeroB ZeroB ) m
9921030pattern AbortAny :: (Base g ~ f , CarryWrap g ~ f , BasicBase f , CarryAnno g , Recursive g , Corecursive g ) => g
993- pattern AbortAny <- PairP (PairP (PairP ZeroP ZeroP ) ZeroP ) ZeroP
1031+ -- pattern AbortAny <- PairP (PairP (PairP ZeroB ZeroB) ZeroB) ZeroB
1032+ pattern AbortAny = PairP (PairP (PairP ZeroB ZeroB ) ZeroB ) ZeroB
9941033pattern AbortUnsizeable :: (Base g ~ f , CarryWrap g ~ f , BasicBase f , CarryAnno g , Recursive g , Corecursive g ) => g -> g
995- pattern AbortUnsizeable t <- PairP (PairP (PairP (PairP ZeroP ZeroP ) ZeroP ) ZeroP ) t
1034+ -- pattern AbortUnsizeable t <- PairP (PairP (PairP (PairP ZeroB ZeroB) ZeroB) ZeroB) t
1035+ pattern AbortUnsizeable t = PairP (PairP (PairP (PairP ZeroB ZeroB ) ZeroB ) ZeroB ) t
9961036
1037+ {-
9971038abortRecursion :: (Base g ~ f, BasicBase f, Corecursive g) => g -> g
9981039abortRecursion = pairB zeroB
9991040abortUser :: (Base g ~ f, BasicBase f, Corecursive g) => g -> g
@@ -1002,6 +1043,7 @@ abortAny :: (Base g ~ f, BasicBase f, Corecursive g) => g
10021043abortAny = pairB (pairB (pairB zeroB zeroB) zeroB) zeroB
10031044abortUnsizeable :: (Base g ~ f, BasicBase f, Corecursive g) => g -> g
10041045abortUnsizeable = pairB (pairB (pairB (pairB zeroB zeroB) zeroB) zeroB)
1046+ -}
10051047
10061048convertAbortMessage :: (Base g ~ f , CarryWrap g ~ f , BasicBase f , Recursive g , Corecursive g , CarryAnno g , Show g ) => g -> String
10071049convertAbortMessage = \ case
@@ -1063,7 +1105,15 @@ instance CarryAnno (Cofree (ParserTermF (LamType l) v) LocTag) where
10631105 type CarryWrap (Cofree (ParserTermF (LamType l ) v ) LocTag ) = ParserTermF (LamType l ) v
10641106
10651107 getEmbed (a :< _) = (a :< )
1066- -- Term1 = Cofree (ParserTermF (LamType String) String) LocTag
1108+
1109+ instance CarryAnno Term3 where
1110+ type CarryWrap Term3 = Term3F
1111+
1112+ getEmbed (a :< _) = (a :< )
1113+ instance CarryAnno (Cofree CompiledExprF LocTag ) where
1114+ type CarryWrap (Cofree CompiledExprF LocTag ) = CompiledExprF
1115+
1116+ getEmbed (a :< _) = (a :< )
10671117
10681118pattern GFix :: (Recursive g , Corecursive g , Base g ~ f ) => f g -> g
10691119pattern GFix x <- (project -> x) where
@@ -1121,9 +1171,6 @@ pattern PairAFP a x y <- (a CofreeT.:< (extractB -> Just (PairSF x y))) where
11211171pattern PairP :: (Recursive g , CarryAnno g , Base g ~ f , CarryWrap g ~ w , BasicBase f , BasicBase w ) => g -> g -> g
11221172pattern PairP a b <- (project -> (extractB -> Just (PairSF a b))) where
11231173 PairP a b = getEmbed a (embedB (PairSF a b))
1124- pattern ZeroP :: (Recursive g , Corecursive g , Base g ~ f , BasicBase f ) => g
1125- pattern ZeroP <- (project -> (extractB -> Just ZeroSF )) where
1126- ZeroP = embed (embedB ZeroSF )
11271174
11281175
11291176{-
0 commit comments