Copyright | Christian Maeder and Uni Bremen 2006 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Precedence checking
Synopsis
- data PrecMap = PrecMap {}
- emptyPrecMap :: PrecMap
- mkPrecIntMap :: Rel Id -> PrecMap
- getIdPrec :: PrecMap -> Set Id -> Id -> Int
- getSimpleIdPrec :: PrecMap -> Id -> Int
- dropPrefix :: [a] -> [b] -> [b]
- isLeftArg :: Id -> [a] -> Bool
- isRightArg :: Id -> [a] -> Bool
- joinPlace :: AssocEither -> Id -> Bool
- checkArg :: AssocEither -> GlobalAnnos -> (Id, Int) -> (Id, Int) -> Id -> Bool
- nextWeight :: AssocEither -> GlobalAnnos -> Id -> Id -> Id
- checkPrec :: GlobalAnnos -> (Id, Int) -> (Id, Int) -> [a] -> (AssocEither -> Id) -> Bool
- typeInstTok :: Token
- polyId :: Id -> Id
- unPolyId :: Id -> Maybe Id
- stripPoly :: Id -> Id
- getGenPolyTokenList :: String -> Id -> [Token]
Documentation
a precedence map using numbers for faster lookup
Instances
Data PrecMap Source # | |
Defined in Common.Prec 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 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 :: forall r r'. (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 # | |
Generic PrecMap | |
FromJSON PrecMap | |
Defined in HasCASL.ATC_HasCASL parseJSON :: Value -> Parser PrecMap parseJSONList :: Value -> Parser [PrecMap] | |
ToJSON PrecMap | |
Defined in HasCASL.ATC_HasCASL toEncoding :: PrecMap -> Encoding toJSONList :: [PrecMap] -> Value toEncodingList :: [PrecMap] -> Encoding | |
ShATermConvertible PrecMap | |
Defined in HasCASL.ATC_HasCASL toShATermAux :: ATermTable -> PrecMap -> IO (ATermTable, Int) toShATermList' :: ATermTable -> [PrecMap] -> IO (ATermTable, Int) fromShATermAux :: Int -> ATermTable -> (ATermTable, PrecMap) fromShATermList' :: Int -> ATermTable -> (ATermTable, [PrecMap]) | |
type Rep PrecMap | |
Defined in HasCASL.ATC_HasCASL type Rep PrecMap = D1 ('MetaData "PrecMap" "Common.Prec" "main" 'False) (C1 ('MetaCons "PrecMap" 'PrefixI 'True) (S1 ('MetaSel ('Just "precMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Id Int)) :*: S1 ('MetaSel ('Just "maxWeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) |
getSimpleIdPrec :: PrecMap -> 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.
joinPlace :: AssocEither -> Id -> Bool Source #
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
getGenPolyTokenList :: String -> Id -> [Token] Source #
get the token lists for polymorphic ids