Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / typecheck / should_compile / tc242.hs
1 {-# LANGUAGE ScopedTypeVariables #-}
2 module Bug where
3
4 f1 :: forall a. [a] -> [a]
5 f1 (x:xs) = xs ++ [ x :: a ] -- OK
6
7 f2 :: forall a. [a] -> [a]
8 f2 = \(x:xs) -> xs ++ [ x :: a ] -- OK
9
10 -- This pair is a cut-down version of #2030
11 isSafe alts = isSafeAlts alts
12
13 isSafeAlts :: forall m . Int -> m Int
14 isSafeAlts x = error "urk"
15 where
16 isSafeAlt :: Int -> m Int
17 isSafeAlt alt = isSafe `seq` error "urk"
18