[Haskell-cafe] Template Haskell question
宮里洸司
viercc at gmail.com
Tue Apr 27 16:00:39 UTC 2021
I have tried too, and can provide a few points to raise. See the following gist:
https://gist.github.com/viercc/9d22ea0c740183ba0e4b5b00d654dcd3
* This happens with "normal" non-interactive compilation by GHC
* Confirmed with both GHC 8.10.4 and GHC 9.0.1
* This happens with duplicate definitions in let
let {x = 1; $([p| x |] :: PatQ) = 2 } in x
* There's another inconsistent behavior with pattern splices
nested inside another quote
\x $([p| x |] :: PatQ) -> x -- compiles to \_ x -> x
[| \x $([p| x |] :: PatQ) -> x |] -- compiles to [| \x x1 -> x |]
--
/* Koji Miyazato <viercc at gmail.com> */
More information about the Haskell-Cafe
mailing list