From: simonpj Date: Wed, 3 Jan 2001 11:50:23 +0000 (+0000) Subject: [project @ 2001-01-03 11:50:23 by simonpj] X-Git-Tag: Approximately_9120_patches~2981 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=124b7bef99a345201cfdb3bee8af34e33fb54228;p=ghc-hetmet.git [project @ 2001-01-03 11:50:23 by simonpj] Add tc111 --- diff --git a/ghc/tests/typecheck/should_compile/tc111.hs b/ghc/tests/typecheck/should_compile/tc111.hs new file mode 100644 index 0000000..83fffd1 --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc111.hs @@ -0,0 +1,20 @@ +{-# OPTIONS -fglasgow-exts #-} + +-- !!! Test monomorphism + RULES + +module ShouldCompile where + +-- This example crashed GHC 4.08.1. +-- The reason was that foobar is monomorphic, so the RULE +-- should not generalise over it. + +foo 1 = 2 +bar 0 = 1 + +foobar = 2 + +{-# RULES + "foo/bar" foo bar = foobar + #-} + + diff --git a/ghc/tests/typecheck/should_compile/tc111.stderr b/ghc/tests/typecheck/should_compile/tc111.stderr new file mode 100644 index 0000000..e69de29