Created
January 7, 2019 14:42
-
-
Save vvviiimmm/bf9818ca1db557fb82d185fe10e9ab85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Person is a product type consisting of 3 fields | |
data Person = Person | |
{ name :: String | |
, age :: Int | |
, address :: Address | |
} | |
-- Address is a product type on its own | |
data Address = Address | |
{ country :: String | |
, city :: String | |
, street :: String | |
} | |
-- In order to create Position you have to provide all 3 coordinates | |
data Position = Position | |
{ x :: Integer | |
, y :: Integer | |
, z :: Integer | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment