1

How do I write a = inside a QuasiQuote expression?

[uri|https://graph.facebook.com/me?fields=id,name,email|]

Currently I get

example/Facebook/test.hs:56:83: error:
    parse error on input ‘=’
    Perhaps you need a 'let' in a 'do' block?
    e.g. 'let x = 5' instead of 'x = 5'
Reactormonk
  • 21,472
  • 14
  • 74
  • 123

1 Answers1

3

You need to enable the correct language extension for QuasiQuotes to work. In source code:

{-# LANGUAGE QuasiQuotes #-}

In GHCI:

:set -XQuasiQuotes 
jkeuhlen
  • 4,401
  • 23
  • 36