Commit 424cd45b authored by simonpj's avatar simonpj
Browse files

[project @ 2001-11-02 09:54:42 by simonpj]

Test for record update failure
parent 16564aa3
......@@ -100,3 +100,4 @@ test "tcfail099" { vtcf("") }
test "tcfail100" { vtcf("") }
test "tcfail101" { vtcf("") }
test "tcfail102" { vtcf("") }
module ShouldFail where
import Ratio
data Integral a => P a = P { p :: a }
f :: Integral a => P (Ratio a) -> P (Ratio a)
f x = x { p = p x }
tcfail102.hs:8:
Could not deduce (Integral (Ratio a)) from the context (Integral a)
Probable fix:
Add (Integral (Ratio a)) to the type signature(s) for f
Or add an instance declaration for (Integral (Ratio a))
arising from a record update at tcfail102.hs:8
In the record update: x {p = p x}
In the definition of `f': x {p = p x}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment