owo-lang / voile-rs Goto Github PK
View Code? Open in Web Editor NEWDependently-typed row-polymorphic programming language, evolved from minitt-rs
License: Apache License 2.0
Dependently-typed row-polymorphic programming language, evolved from minitt-rs
License: Apache License 2.0
Or is my DBI context is cumulative so I don't need to lift anything?
Dunno, need to test it.
Lines 86 to 88 in 39c039d
Currently, the desugar functions have too many repetitive parameters:
env
global_map
local_env
local_map
Consider putting them together.
Or I may need to write a translator from Axi
-based core terms to Var
-based
Currently, we have already got DBI in our abstract syntax.
This is causing problems -- type checking against DBI-based lambdas is difficult.
I want to redesign the abstract syntax according to MiniAgda, which have a similar architecture of Voile (Concrete (syntax-checked), Abstract (scope-checked), Value (type-checked)) but does not use DBI in abstract. Instead, it uses DBI in values but UIDs in abstract.
We can replace VecDbiEnv
with a Vec
.
These codes are affected:
Lines 24 to 36 in 12194c7
voile-rs/src/syntax/abs/tests.rs
Line 32 in 88b2aa3
voile-rs/src/syntax/abs/tests.rs
Line 38 in 88b2aa3
after all these we can start testing our trans/check functions
Useful for REPLs
Because an axiom can be unimplemented (recursive-calls) or postulated. There can be many kinds of axioms.
Extracting a standalone type will also be helpful for map_axioms
.
voile-rs/src/syntax/abs/ast.rs
Line 18 in 5633dc8
Currently there's only a label -- without a type expression that represents its argument type.
If I write an expression 'Label ParamType
, it'll be parsed as App(ConsType(Label), Expr(Ident))
,
which indicates that the type of 'Label
is Lam(Type /* param type */, Sum(Ref(0 /* DBI */)))
, right?
Does that look good to you guys?
Assigned people are supposed to participate the discussion.
According to @molikto
We may need a parser that produces well-typed terms for testing purpose.
#16 depends on this.
Should be possible after #77
Which are bottom-eliminator and pattern matching fallbacker.
We need a way to compile abs to core without typechecking.
This is useful when we can successfully infer the type of some expressions but we also need their values. These expressions are supposed to be well-typed thus can be unsafe-compile.
voile-rs/src/syntax/abs/trans.rs
Line 102 in 178c67f
voile-rs/src/syntax/abs/trans.rs
Line 40 in 5092a41
voile-rs/src/syntax/abs/ast.rs
Line 19 in 2188402
... and we need to invent a way to merge two SyntaxInfo
s
Because I feel like it's rather important
voile-rs/src/syntax/abs/trans.rs
Line 112 in 178c67f
Remove these things:
TCS::compile
eval::Strategy
Use use abs::Abs::*
in check::check_type
.
First of all, \x.\y.y
is Lam(Lam(Dbi(0))
.
Instantiate this (e.g. with a value 114514
), according to our current strategy, will produce Lam(114514)
, which means that our implementation is evaluating (\x.\y.y) 114514
to \y.114514
.
Junk! Need to fix it asap.
As title
But we can replace DbiEnv
with Vec
Originally posted by @ice1000 in #15 (comment)
voile-rs/src/syntax/abs/trans.rs
Line 103 in 178c67f
.. and Pi/Sigma should keep
Line 15 in 12194c7
s/dtlac/dtalc/g
Due to the presence of Abs
, we won't be able to resolve implicit parameters when translating String-based variables to DBI, thus giving up implicit parameters.
And I'm looking for a better name for the function
DBI-based lambda does not need a capturing list and it should always be lifted during instantiation. Current lambda instantiation is completely wrong.
Originally posted by @ice1000 in #16 (comment)
This is a subtask of #16
This is intended to be a discussion thread about focuses of Voile.
There is also a bikeshedding here: do we need to change the org name to owo-lab for storing these kinds of PoC languages?
voile-rs/src/check/monad/state.rs
Lines 22 to 23 in c9f8870
Because we're already splitting the local and global typing context, should we split the value context as well?
As described by @uHOOCCOOHu
As title.
Let's vote.
Option 0 (Haskell, add a ๐ to vote for this):
\x -> x
\x y -> y x
Option 1 (Idris, add a ๐ to vote for this):
\x => y
\x => \y => y x
Option 2 (Mini-TT, add a โค๏ธ to vote for this):
\x. x
\x y. y x
Line 13 in a65c2a1
Currently it panics when level check failed
Let's test lambda translation
Originally posted by @ice1000 in #44 (comment)
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.