Add some resources

This commit is contained in:
greg 2017-10-03 21:28:17 -07:00
parent 3025af3ded
commit dd7736e32d
2 changed files with 17 additions and 0 deletions

View File

@ -48,8 +48,12 @@ much like Haskell
Here's a partial list of resources I've made use of in the process
of learning how to write a programming language.
### Type-checking
https://skillsmatter.com/skillscasts/10868-inside-the-rust-compiler
### Evaluation
*Understanding Computation*, Tom Stuart, O'Reilly 2013
*Basics of Compiler Design*, Torben Mogensen
### Parsing

View File

@ -108,6 +108,19 @@ impl ReplState {
}
}
// from Niko's talk
/* fn type_check(expression, expected_ty) -> Ty {
let ty = bare_type_check(expression, expected_type);
if ty icompatible with expected_ty {
try_coerce(expression, ty, expected_ty)
} else {
ty
}
}
fn bare_type_check(exprssion, expected_type) -> Ty { ... }
*/
pub enum TypeCheck {
OK,
Error(String)