You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library and attempting to extract it to Haskell. In Haskell, there are default library and syntactical supports for monad, so it would be nice if the extracted code can use this facilities.
Currently, the resulting extracted code looks something like this:
dataMonadm=Build_Monad (()->Any->m) (()->()->m-> (Any->m) ->m)
ret:: (Monada1) ->a2->a1
ret monad x =case monad of {
Build_Monad ret0 _ -> unsafeCoerce ret0 __ x}
bind:: (Monada1) ->a1-> (a2->a1) ->a1
bind monad x x0 =case monad of {
Build_Monad _ bind0 -> unsafeCoerce bind0 __ __ x x0}
dataPMonadm=Build_PMonad (()->Any->Any->m) (()->()->Any->m-> (Any->m)
->m)
typeMonPmx=Anypbind:: (PMonada1) -> (MonPa1a3) ->a1-> (a2->a1) ->a1
pbind pMonad pu x x0 =case pMonad of {
Build_PMonad _ pbind0 -> unsafeCoerce pbind0 __ __ pu x x0}
pMonad_Monad:: (Monada1) ->PMonada1
pMonad_Monad m =Build_PMonad (\_ -> unsafeCoerce (\_ x -> ret m x)) (\_ _ ->
unsafeCoerce (\_ c f -> bind m c f))
I am wondering if some modules can be added as a default extraction configuration to collide monads on both sides?
The text was updated successfully, but these errors were encountered:
This would be very useful. A basic problem (but not one that is insurmountable) is that converting Coq classes into Haskell classes isn't really a local transformation because Coq classes are values while Haskell classes are not.
At the moment, I don't have the cycles to address this, but I'd welcome pull requests.
I am using this library and attempting to extract it to Haskell. In Haskell, there are default library and syntactical supports for monad, so it would be nice if the extracted code can use this facilities.
Currently, the resulting extracted code looks something like this:
I am wondering if some modules can be added as a default extraction configuration to collide monads on both sides?
The text was updated successfully, but these errors were encountered: