Frege / frege

Frege is a Haskell for the JVM. It brings purely functional programing to the Java platform.
https://github.com/Frege/frege/wiki/_pages
Other
3.64k stars 145 forks source link

mutable native types must not be subtypes of non mutable ones #125

Closed Ingo60 closed 9 years ago

Ingo60 commented 9 years ago

The following works:

frege> pure native toString :: Object -> String
native function toString :: Object -> String
frege> toString stdin
java.io.BufferedReader@63b7e77

This must be forbidden, as the defining characteristic of a mutable native type like BufferedReader is that it can never appear in a pure native function.

Ingo60 commented 9 years ago

Fixed with commit 2c621fe5c0bcfe60a370807be3db26e434b34fd2