Commit 8e457e29 authored by simonpj's avatar simonpj
Browse files

[project @ 2005-12-01 08:54:57 by simonpj]

Another GADT test
parent 6b0d58fc
......@@ -12,6 +12,7 @@ test('gadt8', normal, compile, [''])
test('gadt9', normal, compile, [''])
test('gadt10', normal, compile_fail, [''])
test('gadt11', normal, compile_fail, [''])
test('gadt13', normal, compile_fail, [''])
test('red-black', normal, compile, [''])
test('type-rep', normal, compile_and_run, [''])
test('equal', normal, compile, [''])
......
{-# OPTIONS -fglasgow-exts #-}
-- This should fail, because there is no annotation on shw,
-- but it succeeds in 6.4.1
module ShouldFail where
data Term a where
B :: Bool -> Term Bool
I :: Int -> Term Int
shw (I t) = ("I "++) . shows t
shw (B t) = ("B "++) . shows t
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