curry-base-0.4.2: Functions for manipulating Curry programs

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

Curry.Syntax

Description

 

Synopsis

Documentation

data Token Source #

Data type for curry lexer tokens

Constructors

Token Category Attributes 

Instances

unlit :: FilePath -> String -> CYM String Source #

Unliterate a LiterateCurry file, identity on normal Curry file.

unlitLexSource :: FilePath -> String -> CYM [(Span, Token)] Source #

Unliterate and return the result of a lexical analysis of the source program src. The result is a list of tuples consisting of a Span and a Token.

unlitParseHeader :: FilePath -> String -> CYM Module Source #

Unliterate and parse a Curry Module header

unlitParseModule :: FilePath -> String -> CYM Module Source #

Unliterate and parse a Curry Module

lexSource :: FilePath -> String -> CYM [(Span, Token)] Source #

Return the result of a lexical analysis of the source program src. The result is a list of tuples consisting of a Span and a Token.

parseHeader :: FilePath -> String -> CYM Module Source #

Parse a Curry Module header

parseGoal :: String -> CYM Goal Source #

Parse a Goal, i.e. an expression with (optional) local declarations

ppModule :: Module -> Doc Source #

Pretty print a module

ppInterface :: Interface -> Doc Source #

Pretty print an interface

ppIDecl :: IDecl -> Doc Source #

Pretty print an interface declaration

showModule :: Module -> String Source #

Show a Curry module like by an devired Show instance