GeneralizedNewtypeDeriving! is!now!type+safe!
How!roles!save!the!day
Richard!Eisenberg University!of!Pennsylvania eir@cis.upenn.edu Haskell!Implementors’!Workshop Sunday,!September!22,!2013 Boston,!MA,!USA
GeneralizedNewtypeDeriving ! is!now!type+safe! - - PowerPoint PPT Presentation
GeneralizedNewtypeDeriving ! is!now!type+safe! How!roles!save!the!day Richard!Eisenberg University!of!Pennsylvania eir@cis.upenn.edu Haskell!Implementors!Workshop Sunday,!September!22,!2013 Boston,!MA,!USA GHC!7.6.3! !segfault
Richard!Eisenberg University!of!Pennsylvania eir@cis.upenn.edu Haskell!Implementors’!Workshop Sunday,!September!22,!2013 Boston,!MA,!USA
✦Type!families ✦GADT+like!parameters ✦Use!with!(~) ✦Other!nominal!contexts ✦plus!one!more...
✦Type!families ✦GADT+like!parameters ✦Use!with!(~) ✦Other!nominal!contexts ✦Argument!to!another!type!variable
Can't7make7a7derived7instance7of7‛HasSet7Age’ 77(even7with7cunning7newtype7deriving): 77it7is7not7typeSsafe7to7use7GeneralizedNewtypeDeriving7on7this7class; 77the7last7parameter7of7‛HasSet’7is7at7role7nominal
mkTyConAppCo7::7Role7S>7TyCon 7777777777777S>7[Coercion]7S>7Coercion dsTcCoercion7::7Role7S>7TcCoercion 7777777777777S>7(Coercion7S>7CoreExpr) 7777777777777S>7DsM7CoreExpr
maybeSubCo2_maybe7::7Role77SS7desired 777777777777777777S>7Role77SS7current 777777777777777777S>7Coercion7S>7Maybe7Coercion