From 124b7bef99a345201cfdb3bee8af34e33fb54228 Mon Sep 17 00:00:00 2001 From: simonpj Date: Wed, 3 Jan 2001 11:50:23 +0000 Subject: [PATCH] [project @ 2001-01-03 11:50:23 by simonpj] Add tc111 --- ghc/tests/typecheck/should_compile/tc111.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ghc/tests/typecheck/should_compile/tc111.hs create mode 100644 ghc/tests/typecheck/should_compile/tc111.stderr 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 -- 1.7.10.4