summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc130.hs
blob: da91273ff023edca9da83faf342b5869a3deaa64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE ImplicitParams #-}

-- !!! Desugaring of record updates
-- Showed up a bug in the newtype-squashing machinery


module ShouldCompile where

data R = R {field :: Int}

test:: (?param :: R) => a -> Int
test x = field (?param {field = 42})
	-- The type of the record to be updated is 
	-- {?param :: R} as well as plain R
	-- which confused the compiler