|
|
|
|
|
by mistercow
2880 days ago
|
|
The way to type this would be: String -> Int | String (or, if the bottom type is part of your type system, String -> Int | String | Bottom) And assuming that "eval" is typed as String -> Any, there should be no problem automatically inferring the type signature of this function. I certainly didn't have to solve the halting problem to generate that signature. |
|