当我尝试定义一个新类型时,我在ghci中收到错误:
Prelude> data Point = Pt Int Int <interactive>:1:0: parse error on input `data' Prelude> let data Point = Pt Int Int <interactive>:1:4: parse error on input `data'
我究竟做错了什么?
haskell ghci
ghci ×1
haskell ×1