I am attempting to pass back a Node type from this function, but I get the error that empty is out of scope:
import Data.Set (Set)
import qualified Data.Set as Set
data Node = Vertex String (Set Node)
deriving Show
toNode :: String -> Node
toNode x = Vertex x empty
What am I doing wrong?
import qualified Data.Set as Setmeans that when you want to use something fromData.Set, you have to qualify it withSet.. So to useemptywriteSet.empty.