Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
> data Seq a = Nil | Cons a (Seq (a,a)) <hint>:1:1: parse error on input `data'
所以这是一段haskell声明二叉树的嵌套数据类型,使用这个版本:
http://tryhaskell.org/#9
不幸的是,TryHaskell 可能存在一个小缺陷。这是(最近的)GHCi
Prelude> data Seq a = Nil | Cons a (Seq (a,a)) Prelude> :i Seq data Seq a = Nil | Cons a (Seq (a, a)) -- Defined at <interactive>:2:6