Unbound module Html_sigs.T but Html_sigs is okay

Hi all,

I am trying to use an attribute (namely: the “download” attribute: http://ocsigen.org/tyxml/4.4.0/api/Html_sigs.T#VALa_download ) in the Ocsigen framework.

I have a weird behavior when opening modules: I can open Html_sigs but open Html_sigs.T throws a “Unbound module” error.

More specifically, if I try:

 a ~a:[Html_sigs.T.a_download ("img.png")] 
     ~service:imageservice
     [txt "Get image"] ()

I have the following error:

File "graffiti.eliom", line 111, characters 19-41:
111 |            ; a ~a:[Html_sigs.T.a_download ("img.png")] 
                         ^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound module Html_sigs.T

What am I missing?

The short answer is that Html_sigs.T is not a module but a module type, in other words a specification and not an implementation.

Ok thanks, understood for the “module type” thing. But how can I use this Html_sigs.T.a_download value?

You cannot, it is not a value. Like I said Html_sigs.T is a specification, it doesn’t have contents. The module that you want is probably Tyxml.Html which is a module that implements the specifcation T.

1 Like