2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,14 +1,14 @@
type Point = Point x y
instance Show Point where
showf _ (Point x y) = "Point " ++ (show x) ++ " " ++ (show y)
show (Point x y) = "Point " ++ (show x) ++ " " ++ (show y)
instance Name Point where
getField nm (Point x y)
| nm == "x" = x
| nm == "y" = y
| else = fail "Undefined name."
isField nm _ = nm == "x" or nm == "y"
isField nm _ = nm == "x" || nm == "y"
pointX = flip Point 0
@ -19,7 +19,7 @@ pointEmpty = Point 0 0
type Circle = Circle x y z
instance Show Circle where
showf _ (Circle x y z) =
show (Circle x y z) =
"Circle " ++ (show x) ++ " " ++ (show y) ++ " " ++ (show z)
instance Name Circle where
@ -28,7 +28,7 @@ instance Name Circle where
| nm == "y" = y
| nm == "z" = z
| else = fail "Undefined name."
isField nm _ = nm == "x" or nm == "y" or nm == "z"
isField nm _ = nm == "x" || nm == "y" || nm == "z"
circleXZ = flip Circle 0
@ -41,5 +41,3 @@ circleY y = Circle 0 y 0
circleZ = Circle 0 0
circleEmpty = Circle 0 0 0
circleX 1 2