summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc189.hs
blob: 400f68dcc6703c91a5810c007f2ef3357ae64ed1 (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
25
26
{-# LANGUAGE NoMonoPatBinds #-}
        -- Disable experimetal monomorphic pattern bindings

-- Nasty test for type signatures
-- In both groups of declarations below, the type variables 'a' and 'b'
-- end up being unified together.

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)