Files
2019-01-30 15:38:38 +10:00

13 lines
242 B
Haskell

{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Lens
data Point = Point { _x :: Double, _y :: Double }
makeLenses ''Point
main :: IO ()
main = print (point^.x + point^.y)
where
point = Point { _x = 40.0, _y = 2.0 }