3f9a2879b02383953a38e5696520568e1beac851
[ghc.git] / testsuite / tests / typecheck / should_compile / tc189.hs
1 {-# LANGUAGE NoMonoPatBinds #-}
2 -- Disable experimetal monomorphic pattern bindings
3
4 -- Nasty test for type signatures
5 -- In both groups of declarations below, the type variables 'a' and 'b'
6 -- end up being unified together.
7
8 module ShouldCompile where
9
10 -------------
11 x :: a
12 x = z `asTypeOf` y
13
14 y :: b
15 y = z
16
17 z = x
18 -------------
19 p :: [a]
20 q :: b
21 (p,q,r) = ([q,r], r, head p)
22
23 -------------
24 t :: a
25 u :: b
26 (t,u,v) = (v,v,t)