-- | Create a trivial DAG from a list of elements.
fromList :: [t] -> DAG t
fromList xs =
  [ Edge
    { from = i
    , to = i + 1
    , label = x }
  | (x, i) <- zip xs [0..] ]
fromList :: [t] -> DAG t
fromList xs =
  [ Edge
    { from = i
    , to = i + 1
    , label = x }
  | (x, i) <- zip xs [0..] ]
fromList xs =
  [ Edge
    { from = i
    , to = i + 1
    , label = x }
  | (x, i) <- zip xs [0..] ]