blob: 658545e9b27ec7f8132c55f008e0bfd9970568d5 (
plain)
1
2
3
4
5
6
7
|
{-# LANGUAGE ScopedTypeVariables #-}
module ShouldFail where
f3 :: forall a. [a] -> [a]
Just f3 = Just (\(x:xs) -> xs ++ [ x :: a ]) -- Not OK!
-- The type variable does not scope in a pattern binding
|