on e94de40 help sign in
12 lines 242 B history raw
1{-# LANGUAGE TemplateHaskell #-}
2module Main where
4import Control.Lens
6data Point = Point { _x :: Double, _y :: Double }
7makeLenses ''Point
9main :: IO ()
10main = print (point^.x + point^.y)
11 where
12 point = Point { _x = 40.0, _y = 2.0 }