
Can someone provide an example of how to use wrapFR/wrapBR? I know they are deprecated, but I would really like to see them in action if they are used anywhere at all ... Thanks so much! Justin

Hello Justin, If you grep Hoopl's source code for wrapFR and wrapBR, you can find uses of the methods. For example: thenFwdRw :: forall m n f. Monad m => FwdRewrite m n f -> FwdRewrite m n f -> FwdRewrite m n f -- @ end comb1.tex thenFwdRw rw3 rw3' = wrapFR2 thenrw rw3 rw3' where thenrw :: forall m1 e x t t1. Monad m1 => (t -> t1 -> m1 (Maybe (Graph n e x, FwdRewrite m n f))) -> (t -> t1 -> m1 (Maybe (Graph n e x, FwdRewrite m n f))) -> (t -> t1 -> m1 (Maybe (Graph n e x, FwdRewrite m n f))) thenrw rw rw' n f = rw n f >>= fwdRes where fwdRes Nothing = rw' n f fwdRes (Just gr) = return $ Just $ fadd_rw rw3' gr This usage of wrapFR2 doesn't take advantage of the extra polymorphism of wrapFR2, but it takes two forward rewrites and composes them into a single rewrite. Edward
participants (2)
-
Edward Z. Yang
-
Justin Bailey