Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Documentation to default signatures #1519

Open
Lev135 opened this issue Aug 6, 2022 · 0 comments
Open

Documentation to default signatures #1519

Lev135 opened this issue Aug 6, 2022 · 0 comments

Comments

@Lev135
Copy link

Lev135 commented Aug 6, 2022

This code won't produce a haddock error. Nevertheless haddock comment to default bar will be lost.
I think comments to default realizations are very useful, but if it's too hard to fix maybe it is possible to produce an error. I was very surprised not finding my comments in result, while all had been processed fine.

-- | MyClass
class MyClass m where
  -- | foo signature with default realization
  foo :: Num a => m a
  foo = bar

  -- | bar signature
  bar :: Num a => m a

  -- | default bar realization with restricted signature
  default bar :: (a ~ Int) => m a
  bar = foo
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant