curry-frontend-0.4.2: Lexer, parser, type checker, etc. for the Curry language

Copyright(c) 2014 - 2016, Björn Peemöller 2016 , Jan Tikovsky
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Html.SyntaxColoring

Description

This module arranges the tokens of the module into different code categories for HTML presentation. The parsed and qualified module is used to establish links between used identifiers and their definitions.

The fully qualified module is traversed to generate a list of code elements. Code elements representing identifiers are distinguished by their kind (type constructor, data constructor, function, (type) variable). They include information about their usage (i.e., declaration, call etc.) and whether the identifier occurs fully qualified in the source code or not. Initially, all identifier codes are fully qualified.

In a next step, the token stream of the given program and the code list are traversed sequentially (see encodeToks). The information in the token stream is used to:

  • add code elements for newlines, spaces and pragmas
  • update the qualification information of identifiers in the code list.

Synopsis

Documentation

data Code Source #

Type of codes which are distinguished for HTML output the boolean flags indicate whether the corresponding identifier occurs qualified in the source module

Instances