With the new OverloadedRecordDot language extension, we can use the . character to access stuff on records. {-# language OverloadedRecordDot #-} data User = User { name :: String } main :: IO () main = do let user = User { name = "Matt" } putStrLn user.name
Stealing Impl from Rust
Stealing Impl from Rust
Stealing Impl from Rust
With the new OverloadedRecordDot language extension, we can use the . character to access stuff on records. {-# language OverloadedRecordDot #-} data User = User { name :: String } main :: IO () main = do let user = User { name = "Matt" } putStrLn user.name