[Haskell-cafe] Not in scope
Jochem Berndsen
jochem at functor.nl
Sat Apr 25 16:34:07 EDT 2009
siso dagbovie wrote:
> Hi,
>
> I've defined the datatype:
>
> data Graph a b = Empty | Context a b :& Graph a b
>
> and the function
>
> isEmpty :: Graph a b -> Bool
> isEmpty Empty = True
> isEmpty _ = False
>
> and when I do a test run with the graph,
> ( [ ],2,'c',[("down",3)]) :& Empty
>
> Haskell is bringing the message " Not in scope: data constructor `:&' "
> Why is that so?
This works for me. Are the definitions in the same file? Otherwise, you
will need to import your definition.
All the best,
--
Jochem Berndsen | jochem at functor.nl
GPG: 0xE6FABFAB
More information about the Haskell-Cafe
mailing list