
23 May
2021
23 May
'21
2:32 p.m.
On Sun, May 23, 2021 at 07:38:53AM -0700, David Banas wrote:
Is it possible to use record field accessors both in their “normal” way and as values, via RecordWildCards and MyData{..}, in the same block of code?
{-# LANGUAGE RecordWildCards #-} module M where data X = X { a :: Int , b :: String } doubleTrouble :: X -> (Int, String) doubleTrouble rec@X{..} = (a + a, b <> M.b rec) -- Viktor.