buildTableForFile :: String -> IO SymbolTable
buildTableForFile fname = do
  assemblerFile <- B.readFile fname
  let assemblerFileLines = filter (not . B.null) $ B.lines assemblerFile
  let numberOfSymbols = head assemblerFileLines
  let headerLines = filter isHeaderLine (tail assemblerFileLines)
  let symbols = map parseSymbol headerLines
  let internalVariableSymbols = filter isInternalVariable symbols
  let addresses = [3..((length internalVariableSymbols)+3)]
  let addressedSymbols = zip (reverse internalVariableSymbols) addresses
  let otherSymbols = (symbols L.\\ internalVariableSymbols)
  let dummySymbols = zip otherSymbols (replicate (length otherSymbols) (-1))
  let totalSymbols = addressedSymbols ++ dummySymbols
  let names = map (getName . fst) totalSymbols
  return $ M.fromList $ zip names totalSymbols
buildTableForFile :: String -> IO SymbolTable
buildTableForFile fname = do
  assemblerFile <- B.readFile fname
  let assemblerFileLines = filter (not . B.null) $ B.lines assemblerFile
  let numberOfSymbols = head assemblerFileLines
  let headerLines = filter isHeaderLine (tail assemblerFileLines)
  let symbols = map parseSymbol headerLines
  let internalVariableSymbols = filter isInternalVariable symbols
  let addresses = [3..((length internalVariableSymbols)+3)]
  let addressedSymbols = zip (reverse internalVariableSymbols) addresses
  let otherSymbols = (symbols L.\\ internalVariableSymbols)
  let dummySymbols = zip otherSymbols (replicate (length otherSymbols) (-1))
  let totalSymbols = addressedSymbols ++ dummySymbols
  let names = map (getName . fst) totalSymbols
  return $ M.fromList $ zip names totalSymbols
buildTableForFile fname = do
  assemblerFile <- B.readFile fname
  let assemblerFileLines = filter (not . B.null) $ B.lines assemblerFile
  let numberOfSymbols = head assemblerFileLines
  let headerLines = filter isHeaderLine (tail assemblerFileLines)
  let symbols = map parseSymbol headerLines
  let internalVariableSymbols = filter isInternalVariable symbols
  let addresses = [3..((length internalVariableSymbols)+3)]
  let addressedSymbols = zip (reverse internalVariableSymbols) addresses
  let otherSymbols = (symbols L.\\ internalVariableSymbols)
  let dummySymbols = zip otherSymbols (replicate (length otherSymbols) (-1))
  let totalSymbols = addressedSymbols ++ dummySymbols
  let names = map (getName . fst) totalSymbols
  return $ M.fromList $ zip names totalSymbols