Module HTML.Parser

This module contains a very simple parser for HTML documents.

Author: Michael Hanus

Version: October 2022

Summary of exported operations:

readHtmlFile :: HTML a => String -> IO [a]  Deterministic 
Reads a file with HTML text and returns the corresponding HTML expressions.
parseHtmlString :: HTML a => String -> [a]  Deterministic 
Transforms an HTML string into a list of BaseHTML expressions.

Exported operations:

readHtmlFile :: HTML a => String -> IO [a]  Deterministic 

Reads a file with HTML text and returns the corresponding HTML expressions.

Example call:
(readHtmlFile file)
Parameters:
  • file : the name of a file containing HTML text
Returns:
a list of HTML expressions (if the file contains exactly one HTML document, this list should contain exactly one element)

parseHtmlString :: HTML a => String -> [a]  Deterministic 

Transforms an HTML string into a list of BaseHTML expressions. If the HTML string is a well structured document, the list of HTML expressions should contain exactly one element.