owo-lang / minitt-rs Goto Github PK
View Code? Open in Web Editor NEWDependently-typed lambda calculus, Mini-TT, extended and implemented in Rust
License: Apache License 2.0
Dependently-typed lambda calculus, Mini-TT, extended and implemented in Rust
License: Apache License 2.0
const pattern = value;
Like voile-util
.
sum { True | False }
split { True => | False => }
Currently:
=> :load samples\sum-split\maybe.minitt
=> :gamma
Current Gamma:
maybe: Π _: U. U
the: Π t: U. Π _: t. t
unwrap: Π t: U. Π mt: (maybe t). ((unwrap_type t) mt)
unwrap_type: Π t: U. Π _: (maybe t). U
=> :type unwrap (Just 1)
Cannot infer type of: `Just 1`.
At unknown location.
=> :type unwrap (Just 0)
Cannot infer type of: `Just 0`.
At unknown location.
(Version 0.3.1
) An empty input will emit things like this:
=>
Parse failed at: --> 1:1
|
1 |
| ^---
|
= expected expression
which kinda annoys the user.
This reveals another problem with the type check algorithm in the paper.
My implementation can not check
let id_on_id: (A: type_t, A) -> A =
id((A: type_t, A) -> A)(id)
Due to checkI
can not infer type of type_t (the universe).
This can be solved by universe in universe
, but the logic will be unsound.
Can you try the elimBool
of the paper in your implementation ?
I can not check it in my implementation.
I doubt the type check algorithm has a bug.
Syntax:
let bool: Type = Sum { True } ++ Sum { False };
Things to consider:
Expected syntax:
let threee: U = sum { One | Two | Three };
let three: U = sum { Two | Three };
let three_f (a: U) (m: three): 1 = split { Two => 0 | Three => 0 };
let threee_f (a: U) (m: threee): 1 = split { One => 0 | e => (three_f a) e };
This might be:
This is a dependency of #15
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.