mirror of
https://github.com/simplex-chat/haskell.nix.git
synced 2026-06-03 09:17:32 +00:00
13 lines
242 B
Haskell
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 }
|