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

Type information loss #13

Open
int-index opened this issue May 20, 2015 · 0 comments
Open

Type information loss #13

int-index opened this issue May 20, 2015 · 0 comments
Labels

Comments

@int-index
Copy link
Owner

This code:

var
 x: integer;
begin
 readln(x);
 writeln(x);
end.

translates into this code:

main :: IO ()
main = void (readLn >>= print)

Type information about x is lost, so the resulting code is ambigious and doesn't compile. This is due to excessive optimizations that don't always preserve type information.

@int-index int-index added the bug label May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant