'mod'Haskell上的语法错误

les*_*how 4 haskell template-haskell

我正在关注一个haskell教程:http://www.seas.upenn.edu/~cis194/lectures/01-intro.html

我正在测试ghci中的函数,我得到了这个部分:

hailstone :: Integer -> Integer
hailstone n
  | n `mod` 2 == 0 = n `div` 2
  | otherwise      = 3*n + 1
Run Code Online (Sandbox Code Playgroud)

我在.hs文件中有这个功能,我在同一个目录中启动ghci并执行:l hailstone.hs

输出是

Syntax error on 'mod'
    Perhaps you intended to use TemplateHaskell
    In the Template Haskell quotation 'mod'
Failed, modules loaded: none.
Run Code Online (Sandbox Code Playgroud)

做了一些谷歌搜索,试图加载这个'templatehaskell',最后得到一组不同的错误(http://brandon.si/code/working-with-template-haskell-in-ghci/)

les*_*how 7

正如user2407038在评论中正确建议的那样,问题是我使用了撇号(')而不是反引号(`),反引号与我本应该使用的单引号不同.