Skip to main content

oxilean_codegen/idris_backend/
idrisdostmt_traits.rs

1//! # IdrisDoStmt - Trait Implementations
2//!
3//! This module contains trait implementations for `IdrisDoStmt`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::IdrisDoStmt;
12use std::fmt;
13
14impl fmt::Display for IdrisDoStmt {
15    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16        match self {
17            IdrisDoStmt::Bind(x, e) => write!(f, "{} <- {}", x, e),
18            IdrisDoStmt::Let(x, e) => write!(f, "let {} = {}", x, e),
19            IdrisDoStmt::LetTyped(x, t, e) => write!(f, "let {} : {} = {}", x, t, e),
20            IdrisDoStmt::Expr(e) => write!(f, "{}", e),
21            IdrisDoStmt::Ignore(e) => write!(f, "ignore {}", e),
22        }
23    }
24}