[completed tests for interpreter with overloading mail@stefanwehr.de**20050606011616] { hunk ./tests/interpreter/should_pass/overloading/004.phc 1 -data D t = D t; - -class C1 a where { - bar1 :: a; -} - -class C2 a where { - bar2 :: a; -} - -class X a where { - foo :: C2 b => b -> a; -} - -instance C1 a => X (D a) where { - foo x = undefined; -} - --- dict-X: --- --- \d_C1 -> [("foo", (\d_C1' -> \d_C2 -> undefined) d_C1)] --- rmfile ./tests/interpreter/should_pass/overloading/004.phc hunk ./tests/interpreter/should_pass/overloading/005.phc 1 -class S a where { - foo :: a; -} - -class S a => C a where { - bar :: a; -} - -instance S Int where { - foo = 1; -} - -instance S a => S (List a) where { - foo = undefined; -} - -instance C (List Int) where { - bar = undefined; -} - --- dict-S: --- --- [("foo", 1)] - --- dict-S: --- --- \d_S -> [("foo", (\d_S' -> undefined) d_S)] - --- dict-C: --- --- [("bar", undefined), --- ("foo", foo@(dict-S dict-S))] rmfile ./tests/interpreter/should_pass/overloading/005.phc hunk ./tests/interpreter/should_pass/overloading/006.phc 1 -class C a where { - foo :: a -> Int; - bar :: Int -> a; -} - -instance C Int where { - foo i = bar i; - bar i = foo i; -} rmfile ./tests/interpreter/should_pass/overloading/006.phc hunk ./tests/overloading-resolution/should_pass/004.phc 19 --- dict-X: --- --- \d_C1 -> [("foo", (\d_C1' -> \d_C2 -> undefined) d_C1)] --- - hunk ./tests/overloading-resolution/should_pass/005.phc 21 --- dict-S: --- --- [("foo", 1)] - --- dict-S: --- --- \d_S -> [("foo", (\d_S' -> undefined) d_S)] - --- dict-C: --- --- [("bar", undefined), --- ("foo", foo@(dict-S dict-S))] - }