haskell-src-exts-1.24.0: tests/examples/UnicodeSubscript.hs
{-# LANGUAGE UnicodeSyntax #-}
module Main where
data Point = Point
{ pointX, pointY ∷ Double
, name ∷ String
} deriving (Show)
distance ∷ Point → Point → Double
distance x y =
let t₁ = (pointX x - pointX y)^2
t₂ = (pointY x - pointY y)^2
in sqrt $ t₁ + t₂