summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc130.hs
blob: f9e65431d12845369f0630434a1b7b5b7cf52fc0 (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