summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc164.hs
blob: 0faada45bea08ce757c3086a81da7ecf9bdd112f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE ImplicitParams #-}

module ShouldCompile where

data UniqueSupply = US Integer

newUnique :: (?uniqueSupply :: UniqueSupply) => Integer
newUnique = r
    where US r = ?uniqueSupply
        -- The lazy pattern match in the where clause killed GHC 5.04
        -- because the type {?uniqueSupply::UniqueSupply} of the RHS
        -- of the 'where' didn't look like a UniqueSupply