Commit a312fd1b authored by dimitris's avatar dimitris
Browse files

Following up from the last commit in the constraint solver.

parent c5e6c6d6
......@@ -123,7 +123,7 @@ test('T4801',
[''])
test('T3064',
[ expect_broken( 3064 ),
[# expect_broken( 3064 ),
# expected value: 9 (x86/Linux 30-03-2011):
if_wordsize(32,
compiler_stats_num_field('peak_megabytes_allocated', 7, 12)),
......
{-# LANGUAGE OverlappingInstances, UndecidableInstances, MultiParamTypeClasses,
FunctionalDependencies, FlexibleInstances #-}
module T3108 where
-- Direct recursion terminates (typechecking-wise)
class C0 x
where
m0 :: x -> ()
m0 = const undefined
instance (C0 x, C0 y) => C0 (x,y)
instance C0 Bool
instance C0 (x,Bool) => C0 x
foo :: ()
foo = m0 (1::Int)
-- Indirect recursion does not terminate (typechecking-wise)
class C1 x
where
m1 :: x -> ()
m1 = const undefined
instance (C1 x, C1 y) => C1 (x,y)
instance C1 Bool
instance (C2 x y, C1 (y,Bool)) => C1 x
class C2 x y | x -> y
instance C2 Int Int
-- It is this declaration that causes nontermination of typechecking.
bar :: ()
bar = m1 (1::Int)
......@@ -371,6 +371,7 @@ test('T5643', normal, compile, [''])
test('T5595', normal, compile, [''])
test('T5676', normal, compile, [''])
test('T4310', normal, compile, [''])
test('T3108', normal, compile, [''])
test('T5792',normal,run_command,
['$MAKE -s --no-print-directory T5792'])
Supports Markdown
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