Documentation for (&&) and (&&) states that they are lazy in their second argument...
[ghc.git] / testsuite / tests / typecheck / should_compile / tc164.hs
1 {-# LANGUAGE ImplicitParams #-}
2
3 module ShouldCompile where
4
5 data UniqueSupply = US Integer
6
7 newUnique :: (?uniqueSupply :: UniqueSupply) => Integer
8 newUnique = r
9 where US r = ?uniqueSupply
10 -- The lazy pattern match in the where clause killed GHC 5.04
11 -- because the type {?uniqueSupply::UniqueSupply} of the RHS
12 -- of the 'where' didn't look like a UniqueSupply