haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 241 forks source link

Include expandable source codes directly to the function documentation #1049

Open chshersh opened 5 years ago

chshersh commented 5 years ago

As Haskell is a declarative language, it's often very helpful to just look at the source code of a function to figure out its behavior. I think it would be really nice to include source code of functions under expandable section like in the screenshots below.

Screenshot from 2019-04-01 18-04-47 Screenshot from 2019-04-01 18-05-01

I'm aware that you can view source code under # Source. But I think that having expandable section might me more convenient. We can take some expiration from Ruby RDock:

harpocrates commented 5 years ago

Related https://github.com/haskell/haddock/issues/351.