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

Common.Prec

Description

Precedence checking

Synopsis

Documentation

data PrecMap Source #

a precedence map using numbers for faster lookup

Constructors

PrecMap 

Fields

Instances

Data PrecMap Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PrecMap -> c PrecMap

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PrecMap

toConstr :: PrecMap -> Constr

dataTypeOf :: PrecMap -> DataType

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PrecMap)

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PrecMap)

gmapT :: (forall b. Data b => b -> b) -> PrecMap -> PrecMap

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PrecMap -> r

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PrecMap -> r

gmapQ :: (forall d. Data d => d -> u) -> PrecMap -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> PrecMap -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PrecMap -> m PrecMap

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PrecMap -> m PrecMap

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PrecMap -> m PrecMap

Show PrecMap Source # 

Methods

showsPrec :: Int -> PrecMap -> ShowS

show :: PrecMap -> String

showList :: [PrecMap] -> ShowS

getIdPrec :: PrecMap -> Set Id -> Id -> Int Source #

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

drop as many elements as are in the first list

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

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

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

check if a right argument will be added.

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

nextWeight :: AssocEither -> GlobalAnnos -> Id -> Id -> Id Source #

compute the left or right weight for the application

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

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

typeInstTok :: Token Source #

token for instantiation lists of polymorphic operations

polyId :: Id -> Id Source #

mark an identifier as polymorphic with a typeInstTok token

unPolyId :: Id -> Maybe Id Source #

remove the typeInstTok token again

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

get the token lists for polymorphic ids