pub struct DesugarState<'a> {
    pub errors: Sender<Box<dyn Diagnostic>>,
    pub old_book: &'a Book,
    pub new_book: Book,
    pub name_count: u64,
    pub failed: bool,
}

Fields§

§errors: Sender<Box<dyn Diagnostic>>§old_book: &'a Book§new_book: Book§name_count: u64§failed: bool

Implementations§

source§

impl<'a> DesugarState<'a>

source

pub fn desugar_attributes(&mut self, attrs: &[Attribute]) -> Attributes

source§

impl<'a> DesugarState<'a>

source

pub fn check_implementation( &mut self, name: &str, range: Range, sugar: Sugar ) -> bool

source§

impl<'a> DesugarState<'a>

source

pub fn desugar_argument(&mut self, argument: &Argument) -> Argument

source

pub fn desugar_sum_type(&mut self, sum_type: &SumTypeDecl)

source

pub fn desugar_record_type(&mut self, rec_type: &RecordDecl)

source

pub fn desugar_pair_pat( &mut self, range: Range, fst: &Pat, snd: &Pat ) -> Box<Expr>

source

pub fn desugar_list_pat(&mut self, range: Range, expr: &[Pat]) -> Box<Expr>

source

pub fn desugar_pat(&mut self, pat: &Pat) -> Box<Expr>

source

pub fn desugar_rule(&mut self, args: &Telescope<Argument>, rule: &Rule) -> Rule

source

pub fn desugar_entry(&mut self, entry: &Entry)

source

pub fn desugar_top_level(&mut self, top_level: &TopLevel)

source§

impl<'a> DesugarState<'a>

source

pub fn specialize_on_field( &mut self, typ: Box<Expr> ) -> Option<(QualifiedIdent, &Telescope<Argument>, Telescope<Argument>, Vec<Box<Expr>>)>

source

pub fn desugar_record_field_sequence( &mut self, range: Range, res: &mut Vec<(QualifiedIdent, Ident)>, typ: Box<Expr>, fields: &[Ident] ) -> bool

source§

impl<'a> DesugarState<'a>

source

pub fn desugar_book(&mut self, book: &Book)

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for DesugarState<'a>

§

impl<'a> !Send for DesugarState<'a>

§

impl<'a> !Sync for DesugarState<'a>

§

impl<'a> Unpin for DesugarState<'a>

§

impl<'a> UnwindSafe for DesugarState<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.