Commit b4421ab9 authored by simonpj's avatar simonpj
Browse files

[project @ 2003-05-30 14:11:18 by simonpj]

A test for stupid contexts in data types; killed 5.02.3
parent 3d2b2efe
......@@ -31,4 +31,5 @@ test('tcrun025', normal, multimod_compile_and_run, ['tcrun025',''])
test('tcrun026', normal, compile_and_run, [''])
test('tcrun027', normal, compile_and_run, [''])
test('tcrun028', normal, compile_and_run, [''])
test('tcrun029', normal, compile_and_run, [''])
test('church', normal, compile_and_run, [''])
-- Killed GHC 5.02.3
-- Confusion about whether the wrapper for a data constructor
-- with a "stupid context" includes the stupid context or not
-- Core lint catches it, but it seg-faults if it runs
module Main where
data Color = Red
| Black
deriving Show
data Ord k => Tree k d = None
| Node{color::Color,
left::(Tree k d),
right::(Tree k d)}
deriving Show
insert k i t = (insert2 t) {color=Black}
where insert2 None = Node{color=Red,
main = print (insert 1 2 None)
\ No newline at end of file
Node {color = Black, key = 1, item = 2, left = None, right = None}
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