Commit ae241b61 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add test for dependency analysis in type checking

parent 72e3be2a
......@@ -216,6 +216,7 @@ test('tc203', normal, compile, [''])
test('tc204', normal, compile, [''])
test('tc205', normal, compile, [''])
test('tc206', normal, compile, [''])
test('tc207', normal, compile, [''])
# Omitting temporarily
# test('syn-perf', normal, compile, ['-fcontext-stack=30'])
......
{-# OPTIONS -fglasgow-exts #-}
-- Tests enhanced polymorphism
module ShouldCompile where
foo xs = let
f :: Eq a => [a] -> [a]
f [] = []
f xs | null (g [True]) = []
| otherwise = tail (g xs)
g :: Eq b => [b] -> [b]
g [] = []
g xs | null (f "hello") = []
| otherwise = tail (f xs)
in f xs
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