This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Simpla and Naive type checker ... | |
| # | |
| import inspect | |
| class TypeCheckError(Exception): | |
| pass | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| type Peano interface { isPeano() } | |
| // Zero | |
| type Zero struct {} | |
| func (z Zero) isPeano() {} |
NewerOlder