eadSpec :: String -> String -> [Int]
readSpec spec input =
  case " \t\n" `intersect` input of
    "" ->
      case parse parseSpec spec input of
        Left err -> error $ show err
        Right val -> val
    _ -> error $ "whitespace not allowed in " ++ spec

readSpec :: String -> String -> [Int]
readSpec spec input =
  case " \t\n" `intersect` input of
    "" ->
      case parse parseSpec spec input of
        Left err -> error $ show err
        Right val -> val
    _ -> error $ "whitespace not allowed in " ++ spec
readSpec spec input =
  case " \t\n" `intersect` input of
    "" ->
      case parse parseSpec spec input of
        Left err -> error $ show err
        Right val -> val
    _ -> error $ "whitespace not allowed in " ++ spec