curry-frontend-1.0.4: Compile the functional logic language Curry to several intermediate formats

Copyright(c) 2014 - 2016 Björn Peemöller
2016 Jan Tikovsky
2016 - 2017 Finn Teegen
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
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
Show Code Source # 
Instance details

Defined in Html.SyntaxColoring

Methods

showsPrec :: Int -> Code -> ShowS #

show :: Code -> String #

showList :: [Code] -> ShowS #

data TypeUsage Source #

Instances
Show TypeUsage Source # 
Instance details

Defined in Html.SyntaxColoring

data IdentUsage Source #

Constructors

IdDeclare 
IdRefer 
IdUnknown 
Instances
Show IdentUsage Source # 
Instance details

Defined in Html.SyntaxColoring