| Copyright | (c) 1999 - 2004 Wolfgang Lux 2005 Martin Engelke 2011 - 2015 Björn Peemöller 2014 Jan Rasmus Tikovsky 2016 Finn Teegen |
|---|---|
| License | BSD-3-clause |
| Maintainer | bjp@informatik.uni-kiel.de |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Curry.Syntax.Type
Description
This module provides the necessary data structures to maintain the parsed representation of a Curry program.
Synopsis
- data Module a = Module SpanInfo [ModulePragma] ModuleIdent (Maybe ExportSpec) [ImportDecl] [Decl a]
- data ModulePragma
- = LanguagePragma SpanInfo [Extension]
- | OptionsPragma SpanInfo (Maybe Tool) String
- data Extension
- data KnownExtension
- data Tool
- = KICS2
- | PAKCS
- | CYMAKE
- | FRONTEND
- | UnknownTool String
- data ExportSpec = Exporting SpanInfo [Export]
- data Export
- data ImportDecl = ImportDecl SpanInfo ModuleIdent Qualified (Maybe ModuleIdent) (Maybe ImportSpec)
- data ImportSpec
- data Import
- type Qualified = Bool
- data Interface = Interface ModuleIdent [IImportDecl] [IDecl]
- data IImportDecl = IImportDecl Position ModuleIdent
- type Arity = Int
- data IDecl
- = IInfixDecl Position Infix Precedence QualIdent
- | HidingDataDecl Position QualIdent (Maybe KindExpr) [Ident]
- | IDataDecl Position QualIdent (Maybe KindExpr) [Ident] [ConstrDecl] [Ident]
- | INewtypeDecl Position QualIdent (Maybe KindExpr) [Ident] NewConstrDecl [Ident]
- | ITypeDecl Position QualIdent (Maybe KindExpr) [Ident] TypeExpr
- | IFunctionDecl Position QualIdent (Maybe Ident) Arity QualTypeExpr
- | HidingClassDecl Position Context QualIdent (Maybe KindExpr) Ident
- | IClassDecl Position Context QualIdent (Maybe KindExpr) Ident [IMethodDecl] [Ident]
- | IInstanceDecl Position Context QualIdent InstanceType [IMethodImpl] (Maybe ModuleIdent)
- data KindExpr
- data IMethodDecl = IMethodDecl Position Ident (Maybe Arity) QualTypeExpr
- type IMethodImpl = (Ident, Arity)
- data Decl a
- = InfixDecl SpanInfo Infix (Maybe Precedence) [Ident]
- | DataDecl SpanInfo Ident [Ident] [ConstrDecl] [QualIdent]
- | ExternalDataDecl SpanInfo Ident [Ident]
- | NewtypeDecl SpanInfo Ident [Ident] NewConstrDecl [QualIdent]
- | TypeDecl SpanInfo Ident [Ident] TypeExpr
- | TypeSig SpanInfo [Ident] QualTypeExpr
- | FunctionDecl SpanInfo a Ident [Equation a]
- | ExternalDecl SpanInfo [Var a]
- | PatternDecl SpanInfo (Pattern a) (Rhs a)
- | FreeDecl SpanInfo [Var a]
- | DefaultDecl SpanInfo [TypeExpr]
- | ClassDecl SpanInfo Context Ident Ident [Decl a]
- | InstanceDecl SpanInfo Context QualIdent InstanceType [Decl a]
- type Precedence = Integer
- data Infix
- data ConstrDecl
- data NewConstrDecl
- data FieldDecl = FieldDecl SpanInfo [Ident] TypeExpr
- data TypeExpr
- data QualTypeExpr = QualTypeExpr SpanInfo Context TypeExpr
- data Equation a = Equation SpanInfo (Lhs a) (Rhs a)
- data Lhs a
- data Rhs a
- = SimpleRhs SpanInfo (Expression a) [Decl a]
- | GuardedRhs SpanInfo [CondExpr a] [Decl a]
- data CondExpr a = CondExpr SpanInfo (Expression a) (Expression a)
- data Literal
- data Pattern a
- = LiteralPattern SpanInfo a Literal
- | NegativePattern SpanInfo a Literal
- | VariablePattern SpanInfo a Ident
- | ConstructorPattern SpanInfo a QualIdent [Pattern a]
- | InfixPattern SpanInfo a (Pattern a) QualIdent (Pattern a)
- | ParenPattern SpanInfo (Pattern a)
- | RecordPattern SpanInfo a QualIdent [Field (Pattern a)]
- | TuplePattern SpanInfo [Pattern a]
- | ListPattern SpanInfo a [Pattern a]
- | AsPattern SpanInfo Ident (Pattern a)
- | LazyPattern SpanInfo (Pattern a)
- | FunctionPattern SpanInfo a QualIdent [Pattern a]
- | InfixFuncPattern SpanInfo a (Pattern a) QualIdent (Pattern a)
- data Expression a
- = Literal SpanInfo a Literal
- | Variable SpanInfo a QualIdent
- | Constructor SpanInfo a QualIdent
- | Paren SpanInfo (Expression a)
- | Typed SpanInfo (Expression a) QualTypeExpr
- | Record SpanInfo a QualIdent [Field (Expression a)]
- | RecordUpdate SpanInfo (Expression a) [Field (Expression a)]
- | Tuple SpanInfo [Expression a]
- | List SpanInfo a [Expression a]
- | ListCompr SpanInfo (Expression a) [Statement a]
- | EnumFrom SpanInfo (Expression a)
- | EnumFromThen SpanInfo (Expression a) (Expression a)
- | EnumFromTo SpanInfo (Expression a) (Expression a)
- | EnumFromThenTo SpanInfo (Expression a) (Expression a) (Expression a)
- | UnaryMinus SpanInfo (Expression a)
- | Apply SpanInfo (Expression a) (Expression a)
- | InfixApply SpanInfo (Expression a) (InfixOp a) (Expression a)
- | LeftSection SpanInfo (Expression a) (InfixOp a)
- | RightSection SpanInfo (InfixOp a) (Expression a)
- | Lambda SpanInfo [Pattern a] (Expression a)
- | Let SpanInfo [Decl a] (Expression a)
- | Do SpanInfo [Statement a] (Expression a)
- | IfThenElse SpanInfo (Expression a) (Expression a) (Expression a)
- | Case SpanInfo CaseType (Expression a) [Alt a]
- data InfixOp a
- = InfixOp a QualIdent
- | InfixConstr a QualIdent
- data Statement a
- = StmtExpr SpanInfo (Expression a)
- | StmtDecl SpanInfo [Decl a]
- | StmtBind SpanInfo (Pattern a) (Expression a)
- data CaseType
- data Alt a = Alt SpanInfo (Pattern a) (Rhs a)
- data Field a = Field SpanInfo QualIdent a
- data Var a = Var a Ident
- type Context = [Constraint]
- data Constraint = Constraint SpanInfo QualIdent TypeExpr
- type InstanceType = TypeExpr
- data Goal a = Goal SpanInfo (Expression a) [Decl a]
Module header
Curry module
Constructors
| Module SpanInfo [ModulePragma] ModuleIdent (Maybe ExportSpec) [ImportDecl] [Decl a] |
Instances
| Functor Module Source # | |
| Eq a => Eq (Module a) Source # | |
| Read a => Read (Module a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Module a) Source # | |
| HasPosition (Module a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Module a) Source # | |
Defined in Curry.Syntax.Type | |
Module pragmas
data ModulePragma Source #
Module pragma
Constructors
| LanguagePragma SpanInfo [Extension] | language pragma |
| OptionsPragma SpanInfo (Maybe Tool) String | options pragma |
Instances
| Eq ModulePragma Source # | |
Defined in Curry.Syntax.Type | |
| Read ModulePragma Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS ModulePragma readList :: ReadS [ModulePragma] readPrec :: ReadPrec ModulePragma readListPrec :: ReadPrec [ModulePragma] | |
| Show ModulePragma Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> ModulePragma -> ShowS show :: ModulePragma -> String showList :: [ModulePragma] -> ShowS | |
| HasPosition ModulePragma Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: ModulePragma -> Position Source # setPosition :: Position -> ModulePragma -> ModulePragma Source # | |
| HasSpanInfo ModulePragma Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: ModulePragma -> SpanInfo Source # setSpanInfo :: SpanInfo -> ModulePragma -> ModulePragma Source # | |
Specified language extensions, either known or unknown.
Constructors
| KnownExtension Position KnownExtension | a known extension |
| UnknownExtension Position String | an unknown extension |
Instances
| Eq Extension Source # | |
| Read Extension Source # | |
Defined in Curry.Syntax.Extension | |
| Show Extension Source # | |
| HasPosition Extension Source # | |
Defined in Curry.Syntax.Extension | |
data KnownExtension Source #
Known language extensions of Curry.
Constructors
| AnonFreeVars | anonymous free variables |
| CPP | C preprocessor |
| FunctionalPatterns | functional patterns |
| NegativeLiterals | negative literals |
| NoImplicitPrelude | no implicit import of the prelude |
Instances
Different Curry tools which may accept compiler options.
Constructors
| KICS2 | |
| PAKCS | |
| CYMAKE | |
| FRONTEND | |
| UnknownTool String |
Export specification
data ExportSpec Source #
Export specification
Instances
| Eq ExportSpec Source # | |
Defined in Curry.Syntax.Type | |
| Read ExportSpec Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS ExportSpec readList :: ReadS [ExportSpec] readPrec :: ReadPrec ExportSpec readListPrec :: ReadPrec [ExportSpec] | |
| Show ExportSpec Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> ExportSpec -> ShowS show :: ExportSpec -> String showList :: [ExportSpec] -> ShowS | |
| HasPosition ExportSpec Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: ExportSpec -> Position Source # setPosition :: Position -> ExportSpec -> ExportSpec Source # | |
| HasSpanInfo ExportSpec Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: ExportSpec -> SpanInfo Source # setSpanInfo :: SpanInfo -> ExportSpec -> ExportSpec Source # updateEndPos :: ExportSpec -> ExportSpec Source # | |
Single exported entity
Constructors
| Export SpanInfo QualIdent | |
| ExportTypeWith SpanInfo QualIdent [Ident] | |
| ExportTypeAll SpanInfo QualIdent | |
| ExportModule SpanInfo ModuleIdent |
Instances
| Eq Export Source # | |
| Read Export Source # | |
Defined in Curry.Syntax.Type | |
| Show Export Source # | |
| HasPosition Export Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo Export Source # | |
Defined in Curry.Syntax.Type | |
Import declarations
data ImportDecl Source #
Import declaration
Constructors
| ImportDecl SpanInfo ModuleIdent Qualified (Maybe ModuleIdent) (Maybe ImportSpec) |
Instances
| Eq ImportDecl Source # | |
Defined in Curry.Syntax.Type | |
| Read ImportDecl Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS ImportDecl readList :: ReadS [ImportDecl] readPrec :: ReadPrec ImportDecl readListPrec :: ReadPrec [ImportDecl] | |
| Show ImportDecl Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> ImportDecl -> ShowS show :: ImportDecl -> String showList :: [ImportDecl] -> ShowS | |
| HasPosition ImportDecl Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: ImportDecl -> Position Source # setPosition :: Position -> ImportDecl -> ImportDecl Source # | |
| HasSpanInfo ImportDecl Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: ImportDecl -> SpanInfo Source # setSpanInfo :: SpanInfo -> ImportDecl -> ImportDecl Source # updateEndPos :: ImportDecl -> ImportDecl Source # | |
data ImportSpec Source #
Import specification
Instances
| Eq ImportSpec Source # | |
Defined in Curry.Syntax.Type | |
| Read ImportSpec Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS ImportSpec readList :: ReadS [ImportSpec] readPrec :: ReadPrec ImportSpec readListPrec :: ReadPrec [ImportSpec] | |
| Show ImportSpec Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> ImportSpec -> ShowS show :: ImportSpec -> String showList :: [ImportSpec] -> ShowS | |
| HasPosition ImportSpec Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: ImportSpec -> Position Source # setPosition :: Position -> ImportSpec -> ImportSpec Source # | |
| HasSpanInfo ImportSpec Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: ImportSpec -> SpanInfo Source # setSpanInfo :: SpanInfo -> ImportSpec -> ImportSpec Source # updateEndPos :: ImportSpec -> ImportSpec Source # | |
Single imported entity
Constructors
| Import SpanInfo Ident | |
| ImportTypeWith SpanInfo Ident [Ident] | |
| ImportTypeAll SpanInfo Ident |
Instances
| Eq Import Source # | |
| Read Import Source # | |
Defined in Curry.Syntax.Type | |
| Show Import Source # | |
| HasPosition Import Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo Import Source # | |
Defined in Curry.Syntax.Type | |
Interface
Module interface
Interface declarations are restricted to type declarations and signatures. Note that an interface function declaration additionaly contains the function arity (= number of parameters) in order to generate correct FlatCurry function applications.
Constructors
| Interface ModuleIdent [IImportDecl] [IDecl] |
data IImportDecl Source #
Interface import declaration
Constructors
| IImportDecl Position ModuleIdent |
Instances
| Eq IImportDecl Source # | |
Defined in Curry.Syntax.Type | |
| Read IImportDecl Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS IImportDecl readList :: ReadS [IImportDecl] readPrec :: ReadPrec IImportDecl readListPrec :: ReadPrec [IImportDecl] | |
| Show IImportDecl Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> IImportDecl -> ShowS show :: IImportDecl -> String showList :: [IImportDecl] -> ShowS | |
Interface declaration
Constructors
| IInfixDecl Position Infix Precedence QualIdent | |
| HidingDataDecl Position QualIdent (Maybe KindExpr) [Ident] | |
| IDataDecl Position QualIdent (Maybe KindExpr) [Ident] [ConstrDecl] [Ident] | |
| INewtypeDecl Position QualIdent (Maybe KindExpr) [Ident] NewConstrDecl [Ident] | |
| ITypeDecl Position QualIdent (Maybe KindExpr) [Ident] TypeExpr | |
| IFunctionDecl Position QualIdent (Maybe Ident) Arity QualTypeExpr | |
| HidingClassDecl Position Context QualIdent (Maybe KindExpr) Ident | |
| IClassDecl Position Context QualIdent (Maybe KindExpr) Ident [IMethodDecl] [Ident] | |
| IInstanceDecl Position Context QualIdent InstanceType [IMethodImpl] (Maybe ModuleIdent) |
Kind expressions
data IMethodDecl Source #
Class methods
Constructors
| IMethodDecl Position Ident (Maybe Arity) QualTypeExpr |
Instances
| Eq IMethodDecl Source # | |
Defined in Curry.Syntax.Type | |
| Read IMethodDecl Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS IMethodDecl readList :: ReadS [IMethodDecl] readPrec :: ReadPrec IMethodDecl readListPrec :: ReadPrec [IMethodDecl] | |
| Show IMethodDecl Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> IMethodDecl -> ShowS show :: IMethodDecl -> String showList :: [IMethodDecl] -> ShowS | |
type IMethodImpl = (Ident, Arity) Source #
Class method implementations
Declarations
Declaration in a module
Constructors
| InfixDecl SpanInfo Infix (Maybe Precedence) [Ident] | |
| DataDecl SpanInfo Ident [Ident] [ConstrDecl] [QualIdent] | |
| ExternalDataDecl SpanInfo Ident [Ident] | |
| NewtypeDecl SpanInfo Ident [Ident] NewConstrDecl [QualIdent] | |
| TypeDecl SpanInfo Ident [Ident] TypeExpr | |
| TypeSig SpanInfo [Ident] QualTypeExpr | |
| FunctionDecl SpanInfo a Ident [Equation a] | |
| ExternalDecl SpanInfo [Var a] | |
| PatternDecl SpanInfo (Pattern a) (Rhs a) | |
| FreeDecl SpanInfo [Var a] | |
| DefaultDecl SpanInfo [TypeExpr] | |
| ClassDecl SpanInfo Context Ident Ident [Decl a] | |
| InstanceDecl SpanInfo Context QualIdent InstanceType [Decl a] |
Instances
| Functor Decl Source # | |
| Eq a => Eq (Decl a) Source # | |
| Read a => Read (Decl a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Decl a) Source # | |
| HasPosition (Decl a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Decl a) Source # | |
Defined in Curry.Syntax.Type | |
type Precedence = Integer Source #
Operator precedence
Fixity of operators
data ConstrDecl Source #
Constructor declaration for algebraic data types
Constructors
| ConstrDecl SpanInfo Ident [TypeExpr] | |
| ConOpDecl SpanInfo TypeExpr Ident TypeExpr | |
| RecordDecl SpanInfo Ident [FieldDecl] |
Instances
| Eq ConstrDecl Source # | |
Defined in Curry.Syntax.Type | |
| Read ConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS ConstrDecl readList :: ReadS [ConstrDecl] readPrec :: ReadPrec ConstrDecl readListPrec :: ReadPrec [ConstrDecl] | |
| Show ConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> ConstrDecl -> ShowS show :: ConstrDecl -> String showList :: [ConstrDecl] -> ShowS | |
| HasPosition ConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: ConstrDecl -> Position Source # setPosition :: Position -> ConstrDecl -> ConstrDecl Source # | |
| HasSpanInfo ConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: ConstrDecl -> SpanInfo Source # setSpanInfo :: SpanInfo -> ConstrDecl -> ConstrDecl Source # updateEndPos :: ConstrDecl -> ConstrDecl Source # | |
data NewConstrDecl Source #
Constructor declaration for renaming types (newtypes)
Constructors
| NewConstrDecl SpanInfo Ident TypeExpr | |
| NewRecordDecl SpanInfo Ident (Ident, TypeExpr) |
Instances
| Eq NewConstrDecl Source # | |
Defined in Curry.Syntax.Type | |
| Read NewConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS NewConstrDecl readList :: ReadS [NewConstrDecl] readPrec :: ReadPrec NewConstrDecl readListPrec :: ReadPrec [NewConstrDecl] | |
| Show NewConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> NewConstrDecl -> ShowS show :: NewConstrDecl -> String showList :: [NewConstrDecl] -> ShowS | |
| HasPosition NewConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: NewConstrDecl -> Position Source # setPosition :: Position -> NewConstrDecl -> NewConstrDecl Source # | |
| HasSpanInfo NewConstrDecl Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: NewConstrDecl -> SpanInfo Source # setSpanInfo :: SpanInfo -> NewConstrDecl -> NewConstrDecl Source # | |
Declaration for labelled fields
Instances
| Eq FieldDecl Source # | |
| Read FieldDecl Source # | |
Defined in Curry.Syntax.Type | |
| Show FieldDecl Source # | |
| HasPosition FieldDecl Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo FieldDecl Source # | |
Defined in Curry.Syntax.Type | |
Type expressions
Constructors
Instances
| Eq TypeExpr Source # | |
| Read TypeExpr Source # | |
Defined in Curry.Syntax.Type | |
| Show TypeExpr Source # | |
| HasPosition TypeExpr Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo TypeExpr Source # | |
Defined in Curry.Syntax.Type | |
data QualTypeExpr Source #
Qualified type expressions
Constructors
| QualTypeExpr SpanInfo Context TypeExpr |
Instances
| Eq QualTypeExpr Source # | |
Defined in Curry.Syntax.Type | |
| Read QualTypeExpr Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS QualTypeExpr readList :: ReadS [QualTypeExpr] readPrec :: ReadPrec QualTypeExpr readListPrec :: ReadPrec [QualTypeExpr] | |
| Show QualTypeExpr Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> QualTypeExpr -> ShowS show :: QualTypeExpr -> String showList :: [QualTypeExpr] -> ShowS | |
| HasPosition QualTypeExpr Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: QualTypeExpr -> Position Source # setPosition :: Position -> QualTypeExpr -> QualTypeExpr Source # | |
| HasSpanInfo QualTypeExpr Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: QualTypeExpr -> SpanInfo Source # setSpanInfo :: SpanInfo -> QualTypeExpr -> QualTypeExpr Source # | |
Function defining equation
Instances
| Functor Equation Source # | |
| Eq a => Eq (Equation a) Source # | |
| Read a => Read (Equation a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Equation a) Source # | |
| HasPosition (Equation a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Equation a) Source # | |
Defined in Curry.Syntax.Type | |
Left-hand-side of an Equation (function identifier and patterns)
Constructors
| FunLhs SpanInfo Ident [Pattern a] | |
| OpLhs SpanInfo (Pattern a) Ident (Pattern a) | |
| ApLhs SpanInfo (Lhs a) [Pattern a] |
Instances
| Functor Lhs Source # | |
| Eq a => Eq (Lhs a) Source # | |
| Read a => Read (Lhs a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Lhs a) Source # | |
| HasPosition (Lhs a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Lhs a) Source # | |
Defined in Curry.Syntax.Type | |
Right-hand-side of an Equation
Constructors
| SimpleRhs SpanInfo (Expression a) [Decl a] | |
| GuardedRhs SpanInfo [CondExpr a] [Decl a] |
Instances
| Functor Rhs Source # | |
| Eq a => Eq (Rhs a) Source # | |
| Read a => Read (Rhs a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Rhs a) Source # | |
| HasPosition (Rhs a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Rhs a) Source # | |
Defined in Curry.Syntax.Type | |
Conditional expression (expression conditioned by a guard)
Constructors
| CondExpr SpanInfo (Expression a) (Expression a) |
Instances
| Functor CondExpr Source # | |
| Eq a => Eq (CondExpr a) Source # | |
| Read a => Read (CondExpr a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (CondExpr a) Source # | |
| HasPosition (CondExpr a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (CondExpr a) Source # | |
Defined in Curry.Syntax.Type | |
Literal
Constructor term (used for patterns)
Constructors
| LiteralPattern SpanInfo a Literal | |
| NegativePattern SpanInfo a Literal | |
| VariablePattern SpanInfo a Ident | |
| ConstructorPattern SpanInfo a QualIdent [Pattern a] | |
| InfixPattern SpanInfo a (Pattern a) QualIdent (Pattern a) | |
| ParenPattern SpanInfo (Pattern a) | |
| RecordPattern SpanInfo a QualIdent [Field (Pattern a)] | |
| TuplePattern SpanInfo [Pattern a] | |
| ListPattern SpanInfo a [Pattern a] | |
| AsPattern SpanInfo Ident (Pattern a) | |
| LazyPattern SpanInfo (Pattern a) | |
| FunctionPattern SpanInfo a QualIdent [Pattern a] | |
| InfixFuncPattern SpanInfo a (Pattern a) QualIdent (Pattern a) |
Instances
| Functor Pattern Source # | |
| Eq a => Eq (Pattern a) Source # | |
| Read a => Read (Pattern a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Pattern a) Source # | |
| HasPosition (Pattern a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Pattern a) Source # | |
Defined in Curry.Syntax.Type | |
data Expression a Source #
Expression
Constructors
Instances
| Functor Expression Source # | |
Defined in Curry.Syntax.Type | |
| Eq a => Eq (Expression a) Source # | |
Defined in Curry.Syntax.Type | |
| Read a => Read (Expression a) Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS (Expression a) readList :: ReadS [Expression a] readPrec :: ReadPrec (Expression a) readListPrec :: ReadPrec [Expression a] | |
| Show a => Show (Expression a) Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> Expression a -> ShowS show :: Expression a -> String showList :: [Expression a] -> ShowS | |
| HasPosition (Expression a) Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: Expression a -> Position Source # setPosition :: Position -> Expression a -> Expression a Source # | |
| HasSpanInfo (Expression a) Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: Expression a -> SpanInfo Source # setSpanInfo :: SpanInfo -> Expression a -> Expression a Source # updateEndPos :: Expression a -> Expression a Source # | |
Infix operation
Constructors
| InfixOp a QualIdent | |
| InfixConstr a QualIdent |
Statement (used for do-sequence and list comprehensions)
Constructors
| StmtExpr SpanInfo (Expression a) | |
| StmtDecl SpanInfo [Decl a] | |
| StmtBind SpanInfo (Pattern a) (Expression a) |
Instances
| Functor Statement Source # | |
| Eq a => Eq (Statement a) Source # | |
| Read a => Read (Statement a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Statement a) Source # | |
| HasPosition (Statement a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Statement a) Source # | |
Defined in Curry.Syntax.Type | |
Type of case expressions
Single case alternative
Instances
| Functor Alt Source # | |
| Eq a => Eq (Alt a) Source # | |
| Read a => Read (Alt a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Alt a) Source # | |
| HasPosition (Alt a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Alt a) Source # | |
Defined in Curry.Syntax.Type | |
Record field
Instances
| Functor Field Source # | |
| Eq a => Eq (Field a) Source # | |
| Read a => Read (Field a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Field a) Source # | |
| HasPosition (Field a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Field a) Source # | |
Defined in Curry.Syntax.Type | |
Annotated identifier
Type classes
type Context = [Constraint] Source #
data Constraint Source #
Constructors
| Constraint SpanInfo QualIdent TypeExpr |
Instances
| Eq Constraint Source # | |
Defined in Curry.Syntax.Type | |
| Read Constraint Source # | |
Defined in Curry.Syntax.Type Methods readsPrec :: Int -> ReadS Constraint readList :: ReadS [Constraint] readPrec :: ReadPrec Constraint readListPrec :: ReadPrec [Constraint] | |
| Show Constraint Source # | |
Defined in Curry.Syntax.Type Methods showsPrec :: Int -> Constraint -> ShowS show :: Constraint -> String showList :: [Constraint] -> ShowS | |
| HasPosition Constraint Source # | |
Defined in Curry.Syntax.Type Methods getPosition :: Constraint -> Position Source # setPosition :: Position -> Constraint -> Constraint Source # | |
| HasSpanInfo Constraint Source # | |
Defined in Curry.Syntax.Type Methods getSpanInfo :: Constraint -> SpanInfo Source # setSpanInfo :: SpanInfo -> Constraint -> Constraint Source # updateEndPos :: Constraint -> Constraint Source # | |
type InstanceType = TypeExpr Source #
Goals
Goal in REPL (expression to evaluate)
Constructors
| Goal SpanInfo (Expression a) [Decl a] |
Instances
| Functor Goal Source # | |
| Eq a => Eq (Goal a) Source # | |
| Read a => Read (Goal a) Source # | |
Defined in Curry.Syntax.Type | |
| Show a => Show (Goal a) Source # | |
| HasPosition (Goal a) Source # | |
Defined in Curry.Syntax.Type | |
| HasSpanInfo (Goal a) Source # | |
Defined in Curry.Syntax.Type | |