Commit ec4b4437 authored by sewardj's avatar sewardj
Browse files

[project @ 2001-06-20 16:13:06 by sewardj]

Quite a significant number of your typechecker tests are belong to
fptools/testsuite.
parent f888eb87
include ($confdir ++ "/../vanilla-test.T")
-- Args to vtc are: extra compile flags
-- Use this itsy helper fn to pass in an extra flag
def myvtc($extra_comp_args)
{
vtc(" -fno-warn-incomplete-patterns " ++ $extra_comp_args)
}
test "tc001" { myvtc("") }
test "tc002" { myvtc("") }
test "tc003" { myvtc("") }
test "tc004" { myvtc("") }
test "tc005" { myvtc("") }
test "tc006" { myvtc("") }
test "tc007" { myvtc("") }
test "tc008" { myvtc("") }
test "tc009" { myvtc("") }
test "tc010" { myvtc("") }
test "tc011" { myvtc("") }
test "tc012" { myvtc("") }
test "tc013" { myvtc("") }
test "tc014" { myvtc("") }
test "tc015" { myvtc("") }
test "tc016" { myvtc("") }
test "tc017" { myvtc("") }
test "tc018" { myvtc("") }
test "tc019" { myvtc("-fglasgow-exts") }
test "tc020" { myvtc("") }
test "tc021" { myvtc("") }
test "tc022" { myvtc("") }
test "tc023" { myvtc("") }
test "tc024" { myvtc("") }
test "tc025" { myvtc("") }
test "tc026" { myvtc("") }
test "tc027" { myvtc("") }
test "tc028" { myvtc("") }
test "tc029" { myvtc("") }
test "tc030" { myvtc("") }
test "tc031" { myvtc("") }
test "tc032" { myvtc("") }
test "tc033" { myvtc("") }
test "tc034" { myvtc("") }
test "tc035" { myvtc("") }
test "tc036" { myvtc("") }
test "tc037" { myvtc("") }
test "tc038" { myvtc("") }
test "tc039" { myvtc("") }
test "tc040" { myvtc("") }
test "tc041" { myvtc("") }
test "tc042" { myvtc("") }
test "tc043" { myvtc("") }
test "tc044" { myvtc("") }
test "tc045" { myvtc("") }
test "tc046" { myvtc("") }
test "tc047" { myvtc("") }
test "tc048" { myvtc("") }
test "tc049" { myvtc("") }
test "tc050" { myvtc("") }
test "tc051" { myvtc("") }
test "tc052" { myvtc("") }
test "tc053" { myvtc("") }
test "tc054" { myvtc("") }
test "tc055" { myvtc("") }
test "tc056" { myvtc("") }
test "tc057" { myvtc("") }
test "tc058" { myvtc("") }
test "tc059" { myvtc("") }
test "tc060" { myvtc("") }
test "tc061" { myvtc("") }
test "tc062" { myvtc("") }
test "tc063" { myvtc("") }
test "tc064" { myvtc("") }
test "tc065" { myvtc("-package lang -package data") }
test "tc066" { myvtc("") }
test "tc067" { myvtc("") }
test "tc068" { myvtc("") }
test "tc069" { myvtc("") }
test "tc070" { myvtc("") }
test "tc073" { myvtc("") }
test "tc074" { myvtc("") }
test "tc076" { myvtc("") }
test "tc077" { myvtc("") }
test "tc078" { myvtc("") }
test "tc079" { myvtc("") }
test "tc080" { myvtc("") }
test "tc081" { myvtc("") }
test "tc082" { myvtc("") }
test "tc084" { myvtc("") }
test "tc085" { myvtc("-package lang") }
test "tc086" { myvtc("") }
test "tc087" { myvtc("-fglasgow-exts") }
test "tc088" { myvtc("-package lang") }
test "tc089" { myvtc("") }
test "tc090" { myvtc("") }
test "tc091" { myvtc("") }
test "tc092" { myvtc("") }
test "tc093" { myvtc("") }
test "tc094" { myvtc("") }
test "tc095" { myvtc("") }
test "tc096" { myvtc("") }
test "tc097" { myvtc("-fglasgow-exts") }
test "tc098" { myvtc("") }
test "tc099" { myvtc("") }
test "tc100" { myvtc("-O") }
test "tc101" { myvtc("") }
test "tc102" { myvtc("") }
test "tc103" { myvtc("") }
test "tc104" { myvtc("") }
test "tc105" { myvtc("") }
test "tc106" { myvtc("") }
test "tc107" { myvtc("") }
test "tc108" { myvtc("-fglasgow-exts") }
test "tc109" { myvtc("") }
test "tc111" { myvtc("") }
test "tc112" { myvtc("") }
test "tc113" { myvtc("") }
test "tc114" { myvtc("") }
test "tc115" { myvtc("") }
test "tc116" { myvtc("") }
test "tc117" { myvtc("") }
test "tc118" { myvtc("") }
test "tc119" { myvtc("") }
test "tc120" { myvtc("") }
test "tc121" { myvtc("") }
test "tc122" { myvtc("") }
test "tc123" { myvtc("") }
test "tc124" { myvtc("") }
test "tc125" { myvtc("") }
test "tc126" { myvtc("") }
test "tc127" { myvtc("") }
test "tc128" { myvtc("") }
module ShouldSucceed where
a x = y+2 where y = x+3
module ShouldSucceed where
b = if True then 1 else 2
module ShouldSucceed where
-- This is a somewhat surprising program.
-- It shows up the monomorphism restriction, *and* ambiguity resolution!
-- The binding is a pattern binding without a signature, so it is monomorphic.
-- Hence the types of c,d,e are not universally quantified. But then
-- their type variables are ambiguous, so the ambiguity resolution leaps
-- into action, and resolves them to Integer.
-- That's why we check the interface file in the test suite.
(c@(d,e)) = if True then (1,2) else (1,3)
module ShouldSucceed where
f x = case x of
True -> True
False -> x
module ShouldSucceed where
g ((x:z),y) = x
g (x,y) = 2
module ShouldSucceed where
j = 2
k = 1:j:l
l = 0:k
m = j+j
module ShouldSucceed where
n True = 1
n False = 0
module ShouldSucceed where
o (True,x) = x
o (False,y) = y+1
module ShouldSucceed where
p = [(y+2,True) | y <- [1,2]]
module ShouldSucceed where
(r,s) = (1,'a')
module ShouldSucceed where
u x = \ (y,z) -> x
module ShouldSucceed where
v | True = v+1
| False = v
module ShouldSucceed where
w = a where a = y
y = 2
module ShouldSucceed where
(al:am) = [y+1 | (y,z) <- [(1,2)]]
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