snoyberg / monad-logger

A class of monads which can log messages
MIT License
37 stars 22 forks source link

Document Loc #26

Closed MaxGabriel closed 4 years ago

MaxGabriel commented 4 years ago

This PR is primarily inspired by https://github.com/yesodweb/persistent/pull/1076. Persistent was importing Loc directly from template-haskell and unnecessarily depending on that package, causing issues for users.

This PR documents what I think is the intended usage, importing Loc from monad-logger instead. Additionally, I think the documentation around Loc is good for even regular users, since it explains it's a re-export from template-haskell.

I wasn't able to add documentation directly to Loc with the standard -- |, I'm guessing because Loc is a re-export. So I added the documentation directly above the export of Loc.

MaxGabriel commented 4 years ago

Thanks for the quick merge, always really nice contributing to your packages :)