Crash unifying IO and non-IO functions
Bug #912075 reported by
Matt Giuca
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Fix Committed
|
Critical
|
Matt Giuca |
Bug Description
The typedict module (augment_globalref) crashes trying to unify an IO function type with a non-IO function type.
An IO version of curry2_:
def curryio2_(f :: (a, b) ->io r, x :: a) :: b ->io r:
return f(x, ...)
Crashes with the following error:
augment_globalref: Type '((a, b) -> io r, a, b) -> io r' did not unify with '((a, b) -> r, a, b) -> r'.
Related branches
To post a comment you must log in.
Actually, this only happens if you also include a pure function with the same signature (sans io). So if you import the prelude, it will crash because of curry2_, but in isolation the above code won't crash. So here is a complete program that exhibits this error:
def curry2_(f :: (a, b) -> r, x :: a) :: b -> r:
return f(x, ...)
def curryio2_(f :: (a, b) ->io r, x :: a) :: b ->io r:
return f(x, ...)