brendanhay / amazonka

A comprehensive Amazon Web Services SDK for Haskell.
https://amazonka.brendanhay.nz
Other
605 stars 226 forks source link

Strange behavior in Haddocks for amazonka #970

Closed chreekat closed 10 months ago

chreekat commented 10 months ago

Take for example https://hackage.haskell.org/package/amazonka-s3-2.0/docs/Amazonka-S3.html#v:newPutObject

image

Where is all the $sel stuff coming from?

Why are the comments for the first two arguments erroneous?

I suppose this could be a Haddock bug, but I thought I'd raise it here first.

endgame commented 10 months ago

I think this is haddock, not us. Here is the corresponding source:

-- |
-- Create a value of 'PutObject' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'acl', 'putObject_acl' - The canned ACL to apply to the object. For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL Canned ACL>.
-- ...
newPutObject ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  -- | 'body'
  Data.RequestBody ->
  PutObject

Haddock is doing something funky when linkifying field selectors, I think.

chreekat commented 10 months ago

Yeah, I agree. HLS said they run into the same thing.