Comments (2)
post-affect
A potential solution based on post-affect is for the following instance
fn f(a : t -owned, b : t -owned) -> b
Found the result is owned -owned -owned
, which derives -owned
, a negative type will get rejected. But consider
fn f (a : t -owned, b : t +owned) -> b
post-affect has more problems that have to consider.
pre-affect
Another potential solution is recognizing the pattern that an expression is trying to modify its mark but also trying to use to pass some gate at the same time.
This requires we make a scope for function call checking, for instance:
fn g : (x : list<a> ordered) -> M
fn f(x : list<a> +ordered, y : M) -> M
f(a, g(a))
When expanding(type checking) f
, we make a scope
f(
checking a
checking g(a)
)
In the same scope, since g(a)
is trying to use a
's ordered
immediately, this makes an error.
However, the solution seems really hard to implement.
from eikyo.
these should basically reconsidered in https://github.com/dannypsnl/violet, here will be archived
from eikyo.
Related Issues (16)
- syntax: data type HOT 1
- semantic: mark and closure
- cli: `eikyo compile <app.kyo>` HOT 1
- compile basic file
- backend: generate C
- backend: Interpreter
- setup type checking in conversion checking style HOT 1
- syntax: function HOT 1
- semantic: type check non parameteric polymorphism part HOT 2
- semantic: eikyo's modules
- syntax: define variable
- syntax: macro
- semantic: mark and contract
- syntax: type with mark
- backend: setup llvm HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eikyo.