Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some web functionality + go coroutines #159

Merged
merged 17 commits into from
May 15, 2016
Merged

Conversation

bvssvni
Copy link
Member

@bvssvni bvssvni commented May 14, 2016

Closes #160

For design, see #163

  • Added "load_meta_url" intrinsic
  • Added "download_url_file" intrinsic
  • Added go for Go-like coroutines, see go coroutine design #163
  • Various improvements in the type checker
  • Updated "functions" intrinsic to include type information

- Added hyper as dependency
- Added `go` keyword to syntax
- Added “typechk/go.dyon”
- Added `ast::Expression::Go`
- Added “join_thread” intrinsic
- Added `Thread` struct
- Added `Variable::Thread`
- Added unsafe impl of `Send` for `Variable`
- Made `Module` clone-able by putting `Module::ext_prelude` in `Arc<_>`
- Added `Kind::Go`
- Require `->` on `go` functions in through type check
- Switched from `ThreadRng` to `StdRng` to make new runtime work in
`move || { … }`
- Added `Runtime::go`
@bvssvni bvssvni changed the title Some web functionality Some web functionality + go coroutines May 14, 2016
bvssvni added 15 commits May 14, 2016 23:38
This prevents panic when printing out a variable that has no valid
input representation.
- Added “typechk/threads.dyon”
- Infer thread type from function
- Infer numbers from short loops
- Make sift infer type from body
- Removed non-existing typechk test
- Made type checker show an error when result is unused
- Added “typechk/unused_result.dyon”
- Fixed “random” intrinsic
- Added “typechk/unused_result_2.dyon”
- Check type of only one child for some nodes
- Check all expressions in body of a functions that does not return
Infer return type from body of functions that are declared as
mathematical expressions.

- Clean up `Type::Void` usage
The refined returned types inferred by the type checker should be
copied to the AST for more accurate type checking when calling loaded
function declared as mathematical expressions.
- Changed “returns” to a string representing the type
- Added “takes” for each argument representing the type
@bvssvni bvssvni merged commit c39a364 into PistonDevelopers:master May 15, 2016
@bvssvni bvssvni deleted the url branch May 15, 2016 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant