Add some resources
This commit is contained in:
parent
3025af3ded
commit
dd7736e32d
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user