fjvallarino / monomer

An easy to use, cross platform, GUI library for writing Haskell applications.
BSD 3-Clause "New" or "Revised" License
584 stars 42 forks source link

Problems in the doc (probably trivial) #139

Closed MuhammedZakir closed 2 years ago

MuhammedZakir commented 2 years ago
  1. From https://github.com/fjvallarino/monomer/issues/136#issuecomment-1120147291:

    Out of topic: in the Monomer lens utils, it would be nice if you could add a one-liner description to each function. For example, when I read Monomer.Graphics.Lens, I was confused when I saw the a function. I guessed it is to get the alpha value after looking at other functions in that module. The same happened when I read the doc for the widget-lens-util module. I could open a PR, but that will take a long time as I will need to familiarize with all these first.

  2. Not Found: https://hackage.haskell.org/package/monomer-1.4.0.0/docs/Accept.html

fjvallarino commented 2 years ago

Regarding item 1, I can't do anything at this point. The lenses are generated with TemplateHaskell by the lens library, and that extension has a limitation mentioned in this issue. Luckily, it seems it will be possible in the future when that GHC version becomes available in Hackage.

In general, I recommend checking the documentation of the target type you are interested in. Lenses names are derived from the names of the fields by stripping the prefix; you can get to the documentation based on that logic.

Item 2 is fixed in the updated docs.

MuhammedZakir commented 2 years ago
  1. Not found: https://hackage.haskell.org/package/monomer-1.4.0.0/docs/WidgetRequest.html.
fjvallarino commented 2 years ago

Fixed in this PR: https://github.com/fjvallarino/monomer/pull/145.

This will be available in Hackage when the next version is released (it will take a few weeks). I interleaved new features between the commits containing Haddock fixes, and pushing an update now would show things not available in 1.4.0.0.

fjvallarino commented 2 years ago

Since the fix is already in main, I'll close the issue.

Also, a new release has been pushed to Hackage, and the documentation should be ready at some point today (it takes a few hours)