Copyright | (c) 2009 Holger Siegel 2011 - 2013 Björn Peemöller 2016 Finn Teegen 2016 Jan Tikovsky |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- module Curry.Syntax.Type
- module Curry.Syntax.Utils
- data Token = Token Category Attributes
- data Category
- = CharTok
- | IntTok
- | FloatTok
- | StringTok
- | Id
- | QId
- | Sym
- | QSym
- | LeftParen
- | RightParen
- | Semicolon
- | LeftBrace
- | RightBrace
- | LeftBracket
- | RightBracket
- | Comma
- | Underscore
- | Backquote
- | VSemicolon
- | VRightBrace
- | KW_case
- | KW_class
- | KW_data
- | KW_default
- | KW_deriving
- | KW_do
- | KW_else
- | KW_external
- | KW_fcase
- | KW_free
- | KW_if
- | KW_import
- | KW_in
- | KW_infix
- | KW_infixl
- | KW_infixr
- | KW_instance
- | KW_let
- | KW_module
- | KW_newtype
- | KW_of
- | KW_then
- | KW_type
- | KW_where
- | At
- | Colon
- | DotDot
- | DoubleColon
- | Equals
- | Backslash
- | Bar
- | LeftArrow
- | RightArrow
- | Tilde
- | DoubleArrow
- | Id_as
- | Id_ccall
- | Id_forall
- | Id_hiding
- | Id_interface
- | Id_primitive
- | Id_qualified
- | SymDot
- | SymMinus
- | SymStar
- | PragmaLanguage
- | PragmaOptions
- | PragmaHiding
- | PragmaMethod
- | PragmaModule
- | PragmaEnd
- | LineComment
- | NestedComment
- | EOF
- data Attributes
- = NoAttributes
- | CharAttributes { }
- | IntAttributes { }
- | FloatAttributes { }
- | StringAttributes { }
- | IdentAttributes { }
- | OptionsAttributes { }
- unlit :: FilePath -> String -> CYM String
- unlitLexSource :: FilePath -> String -> CYM [(Span, Token)]
- unlitParseHeader :: FilePath -> String -> CYM (Module ())
- unlitParsePragmas :: FilePath -> String -> CYM (Module ())
- unlitParseModule :: FilePath -> String -> CYM (Module ())
- lexSource :: FilePath -> String -> CYM [(Span, Token)]
- parseInterface :: FilePath -> String -> CYM Interface
- parseHeader :: FilePath -> String -> CYM (Module ())
- parsePragmas :: FilePath -> String -> CYM (Module ())
- parseModule :: FilePath -> String -> CYM (Module ())
- parseGoal :: String -> CYM (Goal ())
- ppModule :: Module a -> Doc
- ppInterface :: Interface -> Doc
- ppIDecl :: IDecl -> Doc
- showModule :: Show a => Module a -> String
Documentation
module Curry.Syntax.Type
module Curry.Syntax.Utils
Data type for curry lexer tokens
Category of curry tokens
data Attributes Source #
Attributes associated to a token
NoAttributes | |
CharAttributes | |
IntAttributes | |
FloatAttributes | |
StringAttributes | |
IdentAttributes | |
OptionsAttributes | |
Instances
Show Attributes Source # | |
Defined in Curry.Syntax.Lexer showsPrec :: Int -> Attributes -> ShowS # show :: Attributes -> String # showList :: [Attributes] -> ShowS # |
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
.
parseGoal :: String -> CYM (Goal ()) Source #
Parse a Goal
, i.e. an expression with (optional) local declarations
ppInterface :: Interface -> Doc Source #
Pretty print an interface