yesodweb / yesodweb.com-content

Content for the www.yesodweb.com site
http://www.yesodweb.com/
Other
67 stars 112 forks source link

Undocumented suggestion to use "ddump-splices" GHC option #217

Open wizzardx opened 6 years ago

wizzardx commented 6 years ago

Recommendations to start using the ddump-splices GHC option start showing up around here:

https://www.yesodweb.com/book/basics#basics_routing

But by this point, the learner only really knows how to run this command:

stack runghc helloworld.hs

A quick example of running GHC (via stack) with the "ddump-splices" against helloworld.hs would be great.

wizzardx commented 6 years ago

Similarly, there's a suggestion to (similar to the ddump-slices option) build Haddock documentation to understand the generated code better.

An example of that for helloworld.hs would be great, too.

psibi commented 6 years ago

This may help you regarding ddump-splices: https://stackoverflow.com/questions/47702242/passing-ddump-splices-to-stack-script-interpreter

benjamingoldstein commented 5 years ago

The answer to this related question I asked was helpful and relevant:

https://stackoverflow.com/questions/58343614/how-can-i-see-a-specific-files-generated-template-haskell-code-when-using-yesod