repl.it
@therewillbecode/

TenderBoringScales

Haskell

No description

fork
loading
Files
  • main.hs
main.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
newtype SerialNumber = SerialNumber String deriving Show

newtype Replicant = ReplicantModel SerialNumber deriving Show

newtype Name = Name String deriving Show

newtype Human = Person Name deriving Show

data Species = ReplicantSpecies Replicant | HumanSpecies Human deriving Show

newtype BirthYear = Year Int deriving Show

data Citizen = Citizen Species BirthYear deriving Show

main = print $ Citizen (ReplicantSpecies (ReplicantModel (SerialNumber "LUV"))) (Year 2035)
GHCi, version 8.6.5
?