curry-base-1.1.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
Eq Token Source # 
Instance details

Defined in Curry.Syntax.Lexer

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Ord Token Source # 
Instance details

Defined in Curry.Syntax.Lexer

Methods

compare :: Token -> Token -> Ordering #

(<) :: Token -> Token -> Bool #

(<=) :: Token -> Token -> Bool #

(>) :: Token -> Token -> Bool #

(>=) :: Token -> Token -> Bool #

max :: Token -> Token -> Token #

min :: Token -> Token -> Token #

Show Token Source # 
Instance details

Defined in Curry.Syntax.Lexer

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Symbol Token Source # 
Instance details

Defined in Curry.Syntax.Lexer

data Attributes Source #

Attributes associated to a token

Instances
Show Attributes Source # 
Instance details

Defined in Curry.Syntax.Lexer

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