Commit ae1878bf authored by ross's avatar ross
Browse files

[project @ 2005-04-15 16:55:41 by ross]

change to ShouldFail, with a brief explanation.
parent f9178058
......@@ -6,10 +6,15 @@
-- Esa Pulkkinen <esa.pulkkinen@kotiposti.net>
-- Thomas Jäger <ThJaeger@gmail.com>
module ShouldCompile where
module ShouldFail where
class Foo a where foo :: a -> ()
data Bar = forall a. Foo a => Bar a
get :: Bar -> ()
get = proc x -> case x of Bar a -> do foo -< a
get = proc x -> case x of Bar a -> foo -< a
-- This should be rejected because the left side of -< (here foo)
-- should be treated as being outside the scope of the proc: it can't
-- refer to the local variables x and a (this is enforced), nor the
-- existentially quantified type variable introduced by unwrapping x.
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