Closed mcbahson closed 4 years ago
I added {-# LANGUAGE QuasiQuotes #-}
to the top of the file and received a new error:
Main.hs:57:39: error:
• Result expression is missing a typecast
• In the quasi-quotation:
[TH.singletonStatement|
select $1 :: int8 + $2 :: int8
|]
|
57 | sumStatement = [TH.singletonStatement|
|
You're right! It was a broken example from the beginning! We need to explicitly provide the type for each returned expression:
[TH.singletonStatement| select ($1 :: int8 + $2 :: int8) :: int8 |]
Fixed the examples
I copied the example from the hasql readme and attempted to build, but I received the following:
I'm new to Hasql, so my apologies for not seeing anything obviously wrong.