Trait arithmetic_typing::arith::MapPrimitiveType[][src]

pub trait MapPrimitiveType<Val> {
    type Prim: PrimitiveType;
    fn type_of_literal(&self, lit: &Val) -> Self::Prim;
}
Expand description

Maps a literal value from a certain Grammar to its type. This assumes that all literals are primitive.

Associated Types

type Prim: PrimitiveType[src]

Types of literals output by this mapper.

Required methods

fn type_of_literal(&self, lit: &Val) -> Self::Prim[src]

Gets the type of the provided literal value.

Implementors

impl<Val> MapPrimitiveType<Val> for NumArithmetic where
    Val: Clone + NumOps + PartialEq
[src]

type Prim = Num

fn type_of_literal(&self, _: &Val) -> Self::Prim[src]