summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc189.hs
blob: a6e440a06dac923a49e9597a1c6057d5ea2f09ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- Nasty test for type signatures
-- In both groups of declarations below, the type variables 'a' and 'b'
-- end up being unified together.
{-# OPTIONS_GHC -Wno-x-partial #-}

module ShouldCompile where

-------------
  x :: a
  x = z `asTypeOf` y

  y :: b
  y = z

  z = x
-------------
  p :: [a]
  q :: b
  (p,q,r) = ([q,r], r, head p)

-------------
  t :: a
  u :: b
  (t,u,v) = (v,v,t)