links
links copied to clipboard
Roundtripping on negative floats
It isn't possible to write negative float values without using -. syntax, even though the output does not use that syntax.
links> var y= -.0.328;
y = -0.328 : Float
links> var y = -0.328;
<stdin>:1: Type error: The unary operator
`-'
has type
`(Int) -a-> Int'
while the argument passed to it has type
`Float'
and the currently allowed effects are
`wild:()'
Good catch! This is actually a slightly tricky issue to fix. If we ever decide to fix this issue, it may be useful to know that -. is an alias of the function negatef.