Errata for Developing Web Apps with Haskell and Yesod
Submit your own errata for this product.
The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update
|ePub, Safari Books Online
Code sample for debug commands
The Yesod type class does not seem to expose the "shouldLog" method. The error received when running the code from the sample is:
‘shouldLog’ is not a (visible) method of class ‘Yesod’
The type class does expose shouldLogIO which has the same type signature except that it requires an IO Bool return type. The following change allows the code to run as expected.
data App = App
instance Yesod App where
shouldLogIO App src level = return True
Hope this helps some other newbs like myself.
Note from the Author or Editor:
The book was written against Yesod version 1.4. The removal of the `shouldLog` method occurred in 1.6, which was just released. Can you confirm which version of the yesod-core library you're using?
||Mar 01, 2018