{-# LANGUAGE RecordWildCards #-} main = transport ("2025-09-05T09:00:00Z", "2025-09-05T11:00:00Z") foo123 kwargs where foo123 = Foo kwargs = Kwargs {..} bar = Bar person = Person {..} name = "Alex Smith" phone = "+1 (555) 555-5555" options = Opts {..} fragile = True window = PM data Foo = Foo data Bar = Bar data Kwargs = Kwargs { bar :: Bar , person :: Person , options :: Opts } data Person = Person { name :: String , phone :: String } data Opts = Opts { fragile :: Bool , window :: HalfDay } data HalfDay = AM | PM transport (start, end) foo Kwargs { person = Person{ name = who, ..}, options = Opts{..}, ..} = do doStuff who foo moreStuff phone end window otherThings start fragile bar doStuff who foo = print "called doStuff" moreStuff phone end window = print "called moreStuff" otherThings start fragile bar = print "calle otherThings"