Commit b9645ab8 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-10-25 14:06:07 by simonpj]

Add Mark Shields IP test
parent 8390afc0
...@@ -26,3 +26,4 @@ test "tcrun015" { vtr("-O", "", "") } ...@@ -26,3 +26,4 @@ test "tcrun015" { vtr("-O", "", "") }
test "tcrun016" { vtr("", "", "") } test "tcrun016" { vtr("", "", "") }
test "tcrun017" { vtr("", "", "") } test "tcrun017" { vtr("", "", "") }
test "tcrun018" { vtr("", "", "") } test "tcrun018" { vtr("", "", "") }
test "tcrun019" { vtr("", "", "") }
{-# OPTIONS -fglasgow-exts #-}
-- GHC 5.02 got this one wrong.
module Main where
-- Implicit parameters bug
-- mbs@cse.ogi.edu 24-Oct-2001 22:21:27
f :: (?x :: Int) => ((?x :: Int) => Int) -> Int -> Int
f g y = if y == 0
then g
else (f g (y - 1) with ?x = ?x + 1)
h :: (?x :: Int) => Int
h = ?x
main = print (f h 10 with ?x = 0)
-- The result should be 10!
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