B-Lang-org / bsc

Bluespec Compiler (BSC)
Other
936 stars 143 forks source link

Adding documentation for generics #672

Closed krame505 closed 7 months ago

krame505 commented 7 months ago

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 commented 7 months ago

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

quark17 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

Looks good!

quark17 commented 7 months ago

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