﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related 2595,Implement record update for existential and GADT data types,simonpj,,"Ganesh writes: The most important thing for me is supporting record update for existentially quantified data records, as in the error below. In general I also find working with code that involves existential type variables quite hard work - for example I can't use foo as a record selector either, even if I immediately do something that seals the existential type back up again. I don't understand this stuff well enough to be sure whether it's an impredicativity issue or not, though. {{{ Foo.hs:11:8: Record update for the non-Haskell-98 data type `Foo' is not (yet) supported Use pattern-matching instead In the expression: rec {foo = id} In the definition of `f': f rec = rec {foo = id} }}} Program is: {{{ {-# LANGUAGE Rank2Types #-} module Foo where data Foo = forall a . Foo { foo :: a -> a, bar :: Int } x :: Foo x = Foo { foo = id, bar = 3 } f :: Foo -> Foo f rec = rec { foo = id } g :: Foo -> Foo g rec = rec { bar = 3 } }}} Simon says: Ah now I see. The relevant comment, `TcExpr` line 465, says {{{ -- Doing record updates on -- GADTs and/or existentials is more than my tiny -- brain can cope with today }}} Should be fixable, even with a tiny brain. ",feature request,new,normal,6.12 branch,Compiler,6.8.3,,,noah.easterly@… adam.gundry@… byorgey@…,Unknown/Multiple,Unknown/Multiple,None/Unknown,Unknown,tc244,,,