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?