Hets - the Heterogeneous Tool Set

CopyrightChristian Maeder and Uni Bremen 2006
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred

Common.Prec

Description

Precedence checking

Synopsis

Documentation

data PrecMap

a precedence map using numbers for faster lookup

Constructors

PrecMap 

Fields

precMap :: Map Id Int
 
maxWeight :: Int
 

dropPrefix :: [a] -> [b] -> [b]

drop as many elements as are in the first list

isLeftArg :: Id -> [a] -> Bool

check if a left argument will be added. (The Int is the number of current arguments.)

isRightArg :: Id -> [a] -> Bool

check if a right argument will be added.

checkArg :: AssocEither -> GlobalAnnos -> (Id, Int) -> (Id, Int) -> Id -> Bool

nextWeight :: AssocEither -> GlobalAnnos -> Id -> Id -> Id

compute the left or right weight for the application

checkPrec :: GlobalAnnos -> (Id, Int) -> (Id, Int) -> [a] -> (AssocEither -> Id) -> Bool

check precedence of an argument and a top-level operator.

typeInstTok :: Token

token for instantiation lists of polymorphic operations

polyId :: Id -> Id

mark an identifier as polymorphic with a typeInstTok token

unPolyId :: Id -> Maybe Id

remove the typeInstTok token again

getGenPolyTokenList :: String -> Id -> [Token]

get the token lists for polymorphic ids