
17 May
2011
17 May
'11
1:58 p.m.
On Mon, May 16, 2011 at 10:40:23PM +0200, Adrien Haxaire wrote:
Hello,
The only thing that I do not understand yet, is why I can't use the 'Node' data which I defined in another module. If the Node data declaration is in the file in which I read the JSON, it is ok. If I import the module in which I want to place it, ghc tells me that the data constructor 'Node' is not in scope.
in Input.hs: import Elements (Node)
This only imports the Node type and not its constructors. If you want to import its constructors as well you have to write import Elements (Node(..)) (just like in the export list of the Elements module). -Brent