追記 2023.07.25
RIOのREADMEに、詳細は追ってませんが、次のような注記あり。
RecordWildCards is really up for debate. It's widely used, but rightfully considered by many to be dangerous. Open question about what we do with it.
(以下原文)
RecordWildCards 拡張を導入すると次のような簡潔な方法でデータを生成できる。
#!/usr/bin/env stack
-- stack --resolver lts-20.7 script
{-# LANGUAGE RecordWildCards #-}
data MyData = MyData
{ foo :: !String
, bar :: !String
} deriving (Show)
main :: IO ()
main = do
let foo = "Foo"
let bar = "Bar"
let myData = MyData {..}
print myData -- Output: MyData {foo = "Foo", bar = "Bar"}