Haskell, error "Qualified name in binding position "
binding, haskell
Solution
You need a constructor name for the second part of your data. The following compiles:
data Heap a = EmptyHype
| Nonempty (Seq.Seq (Seq.Seq a)) Int
deriving (Show, Read, Eq)
You also needed to fully apply the (second) `Seq.Seq`, which is why I grouped the parens how I did.
Problem
``` import qualified Data.Sequence as Seq data Heap a = EmptyHype | Seq.Seq (Seq.Seq ) Int deriving (Show, Read, Eq) ``` I get the error `Qualified name in binding position: Seq.Seq` I read about this problem and as far as I undestood I can't use Seq.Seq but only Seq (Seq a) , but I need to qualify it as Seq because I wouldn't be able to use some functions. Of course I am probably wrong that's why I ask here.