我的Haskell代码有问题

Nic*_*las 0 haskell functional-programming ghci

我正在尝试使用ghci 7.8.3在Haskell中编写一些代码.当我输入这段代码时,[x*2 ¦ x <- [1..10]]它会给我一个错误,说它不明白是什么<-.我究竟做错了什么?

Sib*_*ibi 5

那是因为它应该是这样的:

[x*2 | x <- [1..10]] -- notice | instead of ¦
Run Code Online (Sandbox Code Playgroud)

ghci中的示例演示:

?> [x*2 ¦ x <- [1..10]]
<interactive>:2:10: parse error on input `<-'
?> [x*2 | x <- [1..10]]
[2,4,6,8,10,12,14,16,18,20]
Run Code Online (Sandbox Code Playgroud)