curry-base-1.0.0: Functions for manipulating Curry programs

Copyright(c) 2009 Holger Siegel
2011 - 2013 Björn Peemöller
2016 Finn Teegen
2016 Jan Tikovsky
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
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

unlitParsePragmas :: FilePath -> String -> CYM (Module ()) Source #

Unliterate and parse only pragmas of a Curry Module

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

parsePragmas :: FilePath -> String -> CYM (Module ()) Source #

Parse only pragmas of a Curry Module

parseModule :: FilePath -> String -> CYM (Module ()) Source #

Parse a Curry Module

parseGoal :: String -> CYM (Goal ()) Source #

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

ppModule :: Module a -> Doc Source #

Pretty print a module

ppInterface :: Interface -> Doc Source #

Pretty print an interface

ppIDecl :: IDecl -> Doc Source #

Pretty print an interface declaration

showModule :: Show a => Module a -> String Source #

Show a Curry module like by an devired Show instance