curry-frontend-0.4.2: Lexer, parser, type checker, etc. for the Curry language

Copyright(c) Wolfgang Lux
2011 - 2015 Björn Peemöller
2015 Jan Tikovsky
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Base.Expr

Description

The compiler needs to compute the lists of free and bound variables for various different entities. We will devote three type classes to that purpose. The QualExpr class is expected to take into account that it is possible to use a qualified name to refer to a function defined in the current module and therefore M.x and x, where M is the current module name, should be considered the same name. However, note that this is correct only after renaming all local definitions as M.x always denotes an entity defined at the top-level.

Documentation

class Expr e where Source #

Minimal complete definition

fv

Methods

fv :: e -> [Ident] Source #

Free variables in an Expr

Instances

Expr TypeExpr Source # 

Methods

fv :: TypeExpr -> [Ident] Source #

Expr Alt Source # 

Methods

fv :: Alt -> [Ident] Source #

Expr Expression Source # 

Methods

fv :: Expression -> [Ident] Source #

Expr e => Expr [e] Source # 

Methods

fv :: [e] -> [Ident] Source #

class QualExpr e where Source #

Minimal complete definition

qfv

Methods

qfv :: ModuleIdent -> e -> [Ident] Source #

Free qualified variables in an Expr

class QuantExpr e where Source #

Minimal complete definition

bv

Methods

bv :: e -> [Ident] Source #

Bounded variables in an Expr

Instances

QuantExpr Decl Source # 

Methods

bv :: Decl -> [Ident] Source #

QuantExpr Lhs Source # 

Methods

bv :: Lhs -> [Ident] Source #

QuantExpr Pattern Source # 

Methods

bv :: Pattern -> [Ident] Source #

QuantExpr Statement Source # 

Methods

bv :: Statement -> [Ident] Source #

QuantExpr e => QuantExpr [e] Source # 

Methods

bv :: [e] -> [Ident] Source #

QuantExpr a => QuantExpr (Field a) Source # 

Methods

bv :: Field a -> [Ident] Source #