[Haskell-cafe] FGL problem: cannot acces data constructor NodeMap
immanuel.normann at googlemail.com
Sat Jul 24 08:20:47 EDT 2010
I have a problem with the data constructor NodeMap
of the graph library fgl-220.127.116.11 (also fgl-18.104.22.168):
I cannot access the data constructor NodeMap, as the ghci session shows:
Prelude> :m Data.Graph.Inductive.NodeMap
Prelude Data.Graph.Inductive.NodeMap> :t NodeMap
<interactive>:1:0: Not in scope: data constructor `NodeMap'
However, when I load the source directly it works:
Prelude> :l Data/Graph/Inductive/NodeMap.hs
[1 of 3] Compiling Data.Graph.Inductive.Graph (
Data/Graph/Inductive/Graph.hs, interpreted )
[2 of 3] Compiling Data.Graph.Inductive.Internal.FiniteMap (
Data/Graph/Inductive/Internal/FiniteMap.hs, interpreted )
[3 of 3] Compiling Data.Graph.Inductive.NodeMap (
Data/Graph/Inductive/NodeMap.hs, interpreted )
Ok, modules loaded: Data.Graph.Inductive.Internal.FiniteMap,
*Data.Graph.Inductive.NodeMap> :t NodeMap
NodeMap :: (Ord a) => FiniteMap a Node -> Int -> NodeMap a
Why is that so?
Afterall, my purpose is to get access to the map in a NodeMap and finally to
apply lookup to it. But I don't know how to access the map from a NodeMap
(the map selector isn't accessible either).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe