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
Fix GPR#1204 #1329
Fix GPR#1204 #1329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
As a side-note, with this patch the type definition type 'a t = [`A of 'a] as 'a;; gets printed by the top-level printer in a way that is not accepted by the type-checker: # type 'a t = [`A of 'a] as 'a;;
type 'a t = [ `A of 'a ] constraint 'a = 'a t
# type 'a t = [ `A of 'a ] constraint 'a = 'a t;;
Characters 0-45:
type 'a t = [ `A of 'a ] constraint 'a = 'a t;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: The type abbreviation t is cyclic However, this isn't a new bug from this code, as you could already get the same thing with a slightly different type in 4.04.1: # type 'a t = [ `A of 'a t ] as 'a;;
type 'a t = [ `A of 'a t ] constraint 'a = 'a t
# type 'a t = [ `A of 'a t ] constraint 'a = 'a t;;
Characters 0-47:
type 'a t = [ `A of 'a t ] constraint 'a = 'a t;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: The type abbreviation t is cyclic |
Indeed, the problem does not seem directly related to this fix. However, this fix may have some impact on tools using the internal type representation for printing, in particular if they do not call the proper functions from |
odoc carefully copies the behaviour of the functions in |
Attempted a slightly different approach, adding the row name in |
It's much less clear that this new version is correct. It looks like it will only add row names to types coming from other modules. I think it would be better to use the version you had before. |
359e55d
to
b47d056
Compare
Another way to fix #1204, by setting
row_name
inTypedecl
, as suggested by @lpw25.