binaryTree :: (Ord a, Enum a, Num a, Show a) => a -> Graph.LabeledGraph
binaryTree n = Graph.graphFromEdgeList
    (map (\(a,b) -> (show a, show b))
         (concat [map (\x -> (v, x)) (neighbors v) | v <- [1..n]]))
  where
    neighbors v
        | (2*v) > n = []
        | (2*v + 1) > n = [2*v]
        | otherwise = [2*v, (2*v) + 1]
binaryTree :: (Ord a, Enum a, Num a, Show a) => a -> Graph.LabeledGraph
binaryTree n = Graph.graphFromEdgeList
    (map (\(a,b) -> (show a, show b))
         (concat [map (\x -> (v, x)) (neighbors v) | v <- [1..n]]))
  where
    neighbors v
        | (2*v) > n = []
        | (2*v + 1) > n = [2*v]
        | otherwise = [2*v, (2*v) + 1]
binaryTree n = Graph.graphFromEdgeList
    (map (\(a,b) -> (show a, show b))
         (concat [map (\x -> (v, x)) (neighbors v) | v <- [1..n]]))
  where
    neighbors v
        | (2*v) > n = []
        | (2*v + 1) > n = [2*v]
        | otherwise = [2*v, (2*v) + 1]