parseRuleFile :: String -> Either Error [LineRule]
parseRuleFile x = do
  ls <- lexFile x
  let numbered = zip [1..] ls
  let nonEmptyLines = filter (not . null . snd) . map (second removeComments) $ numbered
  return $ map (uncurry parseLine) nonEmptyLines
parseRuleFile :: String -> Either Error [LineRule]
parseRuleFile x = do
  ls <- lexFile x
  let numbered = zip [1..] ls
  let nonEmptyLines = filter (not . null . snd) . map (second removeComments) $ numbered
  return $ map (uncurry parseLine) nonEmptyLines
parseRuleFile x = do
  ls <- lexFile x
  let numbered = zip [1..] ls
  let nonEmptyLines = filter (not . null . snd) . map (second removeComments) $ numbered
  return $ map (uncurry parseLine) nonEmptyLines