MP
x { foo = 1 } { bar = "bla" } ... ?
Size: a a a
MP
MP
MP
MP
MK
MP
MK
MK
MP
MP
λ
λ data X = X { i :: Int, s :: String } deriving Show
λ let x = X 2 "aa"
λ :set -ddump-simpl
λ let z = x { i = 1 } { s = "11" }
==================== Simplified expression ====================
GHC.Base.returnIO
@ [()]
(GHC.Types.:
@ ()
(case Ghci2.x of { Ghci1.X ds_a1M7H ds_a1M7I ->
(Ghci1.X (GHC.Types.I# 1#) (GHC.CString.unpackCString# "11"#))
`cast` (UnsafeCo representational Ghci1.X () :: Ghci1.X ~R# ())
})
(GHC.Types.[] @ ()))