-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e4b7fc
commit 3483508
Showing
9 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use crate::prelude::*; | ||
use crate::statics::{err::*, syntax::*, tyck::*}; | ||
|
||
/// monad transformers | ||
mod r#type; | ||
mod term; | ||
|
||
pub trait MonadTransType { | ||
fn lift(&self, ty_m: Type, ctx: Ctx, span: &Span) -> Result<Type, TyckError>; | ||
fn alg(&self, m: RcValue, ctx: Ctx, span: &Span) -> Result<TermComputation, TyckError>; | ||
} | ||
|
||
pub trait MonadTransTerm: Clone { | ||
fn lift(&self, m: &TermValue) -> Self; | ||
} | ||
|
||
pub trait MonadTrans { | ||
fn lift(self, ctx: Ctx) -> Self; | ||
} | ||
|
||
impl MonadTrans for Sp<Program> { | ||
fn lift(self, _ctx: Ctx) -> Self { | ||
todo!() | ||
} | ||
} |
7 changes: 1 addition & 6 deletions
7
zydeco-lang/src/lift/term.rs → zydeco-lang/src/statics/lift/term.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
zydeco-lang/src/lift/type.rs → zydeco-lang/src/statics/lift/type.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters