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
$ dune build
File "test.ml", line 2, characters 13-26:
2 | let zz = p [ a [ txt "a" ] ]
^^^^^^^^^^^^^
Error: This expression has type
([> ([> Html_types.txt ] as 'b) Html_types.a ] as 'a) elt
but an expression was expected of type
([< Html_types.p_content_fun ] as 'c) elt
Type 'a = [> `A of 'b ] is not compatible with type
'c =
[< `A of Html_types.phrasing_without_interactive
| `Abbr
| `Audio of Html_types.phrasing_without_media
| `Audio_interactive of Html_types.phrasing_without_media
| `B
| `Bdo
| `Br
| `Button
| `Canvas of Html_types.phrasing
| `Cite
| `Code
| `Command
| `Datalist
| `Del of Html_types.phrasing
| `Dfn
| `Em
| `Embed
| `I
| `Iframe
| `Img
| `Img_interactive
| `Input
| `Ins of Html_types.phrasing
| `Kbd
| `Keygen
| `Label
| `Map of Html_types.phrasing
| `Mark
| `Meter
| `Noscript of Html_types.phrasing_without_noscript
| `Object of Html_types.phrasing
| `Object_interactive of Html_types.phrasing
| `Output
| `PCDATA
| `Progress
| `Q
| `Ruby
| `Samp
| `Script
| `Select
| `Small
| `Span
| `Strong
| `Sub
| `Sup
| `Svg
| `Template
| `Textarea
| `Time
| `U
| `Var
| `Video of Html_types.phrasing_without_media
| `Video_interactive of Html_types.phrasing_without_media
| `Wbr ]
Type 'b = [> `PCDATA ] is not compatible with type
Html_types.phrasing_without_interactive
Types for tag `A are incompatible
I believe the reason is that tyxml.functor is not in scope during build, so some types become abstract (I am still confused why the build proceeds instead of failing), and then it leads to such an error.
Solution: explicitly add tyxml.functor to libraries stanza in my project
I believe this can be fixed on tyxml side by using (re_export tyxml.functor) (but requires upgrade to dune 2)
The text was updated successfully, but these errors were encountered:
ygrek
changed the title
dune implicit_transitive_deps false lead to confusing errors
dune implicit_transitive_deps false leads to confusing errors
Jul 28, 2020
What does this re_export command do exactly, in term of compilation object ?
I agree that the error is extremely weird, but your analysis sound plausible. At typechecking time, modules that are known to exist but have no definition become abstract, hence the lack of immediate failure.
test.ml:
dune-project:
dune:
This fails to build with hair-raising error :
I believe the reason is that tyxml.functor is not in scope during build, so some types become abstract (I am still confused why the build proceeds instead of failing), and then it leads to such an error.
Solution: explicitly add tyxml.functor to libraries stanza in my project
I believe this can be fixed on tyxml side by using
(re_export tyxml.functor)
(but requires upgrade to dune 2)The text was updated successfully, but these errors were encountered: