pub struct IdrisBackend {
pub add_header: bool,
pub default_total: bool,
pub auto_implicit: bool,
pub options: IdrisBackendOptions,
}Expand description
The Idris 2 code generation backend.
Converts IdrisModule / individual declarations into .idr source text.
Fields§
§add_header: boolWhether to add -- AUTO-GENERATED header.
default_total: boolWhether to emit %default total at the top of each module.
auto_implicit: boolWhether to emit %auto_implicit pragmas.
options: IdrisBackendOptionsConfiguration options.
Implementations§
Source§impl IdrisBackend
impl IdrisBackend
Sourcepub fn proof_mode() -> Self
pub fn proof_mode() -> Self
Create a backend optimised for proof-oriented Idris 2 output.
Sourcepub fn emit_module(&self, module: &IdrisModule) -> String
pub fn emit_module(&self, module: &IdrisModule) -> String
Emit a complete IdrisModule as .idr source text.
Sourcepub fn emit_function(&self, func: &IdrisFunction) -> String
pub fn emit_function(&self, func: &IdrisFunction) -> String
Emit a single function.
Sourcepub fn emit_record(&self, rec: &IdrisRecord) -> String
pub fn emit_record(&self, rec: &IdrisRecord) -> String
Emit a single record.
Sourcepub fn emit_interface(&self, iface: &IdrisInterface) -> String
pub fn emit_interface(&self, iface: &IdrisInterface) -> String
Emit a single interface.
Trait Implementations§
Source§impl Debug for IdrisBackend
impl Debug for IdrisBackend
Source§impl Default for IdrisBackend
impl Default for IdrisBackend
Source§fn default() -> IdrisBackend
fn default() -> IdrisBackend
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IdrisBackend
impl RefUnwindSafe for IdrisBackend
impl Send for IdrisBackend
impl Sync for IdrisBackend
impl Unpin for IdrisBackend
impl UnsafeUnpin for IdrisBackend
impl UnwindSafe for IdrisBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more