A bidirectional text display method embodied in a functional programming
language which first assigns bidirectional attributes to a logical
character stream. Next, through explicit processing, level numbers are
assigned, honoring any directional overrides present in the logical
character stream. Subsequent weak and neutral type processing potentially
causes attribute types to change based upon surrounding attribute types.
Then, implicit processing assigns final level numbers to the stream which
control reordering. Finally, reordering processing produces a sequence of
characters in display order. By separating the facets of layout dealing
with reordering from those that are concerned with rendering, such as
line breaking, glyph selection, and shaping, the Haskell-based method is
more discernible and comprehendable, thereby allowing it to be more
useful as a model upon which others may base bidirectional
implementations.