-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tyxml.Html module does not follow Html_sigs.T #315
Comments
Yes, this is intended, What are you actually trying to do ? |
I'm trying to build a module type in order to declare a functor I could use with both tyxml and js_of_ocaml_tyxml module Make (HTML : HTML) = struct
let repr = HTML.div []
end
module JS_Builder = Make (Js_of_ocaml_tyxml.Tyxml_js)
module Server_Builder = Make (Tyxml.Html) Using a signature such as
what is working for me is to rebuild the signature leaving the differents type abstract:
but I was surprised to see an error with a missing Svg module. |
Oh, I see, indeed, that is a good use case. What you should probably do is for |
Thanks for your answer ; it's good to hear that I'm not completly wrong ! Your answer is the solution of course, but I'm a bit hesitant to close the ticket : it took me time to figure exactly how to achieve what I wanted, and the ticket is a consequence of the questions I've had when trying to get a solution. Do you think you can update the documentation with a word about this usage ? |
To keep a track in the message, here is the functor signature: module Make
(SVG : Svg_sigs.T
with type 'a Xml.W.t = 'a
and type 'a Xml.W.tlist = 'a list
and type Xml.uri = string)
(HTML : Html_sigs.T with module Xml = SVG.Xml and module Svg := SVG)
= struct
end |
I agree, it would be a good idea to add that somewhere in the documentation. I'm note quite sure where. Note that you can use the |
Hello,
I’m not sure of this issue, but when working with the functorial interface I had some error with this code:
which give an error in the compilation:
Is this intended ? It seems to come from the signature in the functorial interface which use destructive substitution (but I’m not sure how to undestand it in the case of modules):
The text was updated successfully, but these errors were encountered: