
#16232: Add setField to HasField -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler (Type | Version: 8.7 checker) | Resolution: | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I suggest taking the direct path, and generate an update function for each field. Its more work than Matthew says because we may need to evaluate the argument (for strict constructors) or unbox it (if the argument is UNPACKed). This would ''replace'' the selector function would it not? The new function is a selector and update function? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16232#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler