hugs2yc-0.1.1: Hugs Front-end to Yhc Core.

Portabilityportable
Stabilityexperimental
Maintainergolubovsky@gmail.com

Yhc.Core.FrontEnd.Hugs

Description

Hugs Core to Yhc Core converter (via parsing).

Synopsis

Documentation

parseHugsCore :: FilePath -> IO (Either ParseError Core)Source

Toplevel parser: reads in a given single Hugs Core file, starts the module parser with empty state. The function returns either a parse error or an individual Yhc Core in memory. Due to the Hugs specifics, individual Yhc Core modules are not usable, so it is recommended to use the linkHugsCore function unless anything special is needed.

linkHugsCoreSource

Arguments

:: [FilePath]

directories where *.cor files reside

-> [CoreFuncName]

reachability roots

-> String

name of the new Core

-> IO Core 

Hugs Core Linker: reads in all *.cor files from the given directories and produces a linked .yca object ready to save in a file. Names of reachability roots are picked from the arguments, and they should be fully qualified names with semicolons separating module name from function name. If an empty list is provided, all "main" functions found in all modules will be used as roots. If none exists, error will be reported. Error will also be reported if parsing of any of the files, or final linking results in an error.

hugsPrimTable :: [(CoreFuncName, CoreFuncName)]Source

Table of Hugs primitives mapped to the Normal Set of primitives.