Skip to content
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

Adding documentation for generics #672

Merged
merged 6 commits into from
Feb 17, 2024
Merged

Conversation

krame505
Copy link
Contributor

This adds documentation for the generics feature of B-lang. I made an inital effort in doing this using BSV for consistency with the rest of the library reference guide, but gave up and decided to write this up using BH for now.

Also, make a small tweak to CShow to print out a filler string for higher-rank fields, rather than giving a somewhat cryptic error message about CShow' not having an instance for ConcPoly.

I am also wondering if we should remove the warning about generics being an unstable feature, at this point, as I don't really expect the interface to change going forward?

@krame505 krame505 marked this pull request as ready for review February 14, 2024 22:15
Copy link
Collaborator

@quark17 quark17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thank you! I have made some observations -- hopefully they're not too nitpicky.

Yes, I think we can remove the "experimental" warning. Do you want to include a commit to do that? Thank you!

doc/.gitignore Outdated Show resolved Hide resolved
doc/BH_ref_guide/BH_lang.tex Outdated Show resolved Hide resolved
doc/BH_ref_guide/BH_lang.tex Outdated Show resolved Hide resolved
{\alt} \term{�}
{\alt} \term{�}
{\alt} $\term{�}$
\term{�}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this something that maybe @mieszko should have a look at. I believe this is describing the characters that are allowed as "symbols" for creating operators, and that may have changed when he updated BSC to expect Unicode encoding for source files.

doc/BH_ref_guide/BH_lang.tex Show resolved Hide resolved
doc/libraries_ref_guide/LibDoc/Prelude.tex Outdated Show resolved Hide resolved
doc/libraries_ref_guide/LibDoc/Prelude.tex Outdated Show resolved Hide resolved
doc/libraries_ref_guide/LibDoc/Prelude.tex Show resolved Hide resolved
doc/libraries_ref_guide/LibDoc/Prelude.tex Outdated Show resolved Hide resolved
doc/libraries_ref_guide/libraries_ref_guide.tex Outdated Show resolved Hide resolved
@krame505
Copy link
Contributor Author

I think I addressed all the comments. Also removed the experimental warning.

@quark17
Copy link
Collaborator

quark17 commented Feb 16, 2024

Looking at the places \blue was used, I think it was intended to be defined as "Bluespec" and used in places where it was referring to the tools (or aspects common to the different frontends) and not referring specifically to BSV syntax. So I think the changes here that replace \blue with \BSVfull are mostly incorrect. I'm going to push a change to fix that.

I may also try to squash some of your commits together, to clean up the history. I would prefer not to merge this PR as one squashed commit, because some of the individual commits are useful, but I would prefer not to have little fixup commits at the end or change and then revert commits.

@quark17
Copy link
Collaborator

quark17 commented Feb 16, 2024

Ok, I've force-pushed new commits, that clean up the history and include a fix for the macros. If it looks good to you, I'll merge it. Thanks!

@krame505
Copy link
Contributor Author

Looks good!

@quark17
Copy link
Collaborator

quark17 commented Feb 17, 2024

The directive \hyperlink wasn't creating a hyperlink in the PDF for me, so I changed it to \href.

@quark17 quark17 merged commit 15463f5 into B-Lang-org:main Feb 17, 2024
42 of 43 checks passed
@krame505 krame505 deleted the generics-docs branch February 19, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants