pub struct HaskellBackend { /* private fields */ }Expand description
The Haskell code generation backend.
Implementations§
Source§impl HaskellBackend
impl HaskellBackend
Sourcepub fn new(module_name: impl Into<String>) -> Self
pub fn new(module_name: impl Into<String>) -> Self
Create a new backend targeting the named module.
Sourcepub fn compile_decl(&mut self, decl: &LcnfFunDecl)
pub fn compile_decl(&mut self, decl: &LcnfFunDecl)
Compile a single LCNF function declaration into Haskell and add it to the module.
Sourcepub fn emit_module(&self) -> String
pub fn emit_module(&self) -> String
Emit the complete Haskell module source.
Auto Trait Implementations§
impl Freeze for HaskellBackend
impl RefUnwindSafe for HaskellBackend
impl Send for HaskellBackend
impl Sync for HaskellBackend
impl Unpin for HaskellBackend
impl UnsafeUnpin for HaskellBackend
impl UnwindSafe for HaskellBackend
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