diff --git a/exercises/Set5a.hs b/exercises/Set5a.hs index 29db2fd..5ba485c 100644 --- a/exercises/Set5a.hs +++ b/exercises/Set5a.hs @@ -12,7 +12,7 @@ import Mooc.Todo -- Bus, Tram and Train. -- -- The constructors don't need any fields. - +data Vehicle = Bike | Bus | Tram | Train ------------------------------------------------------------------------------ -- Ex 2: Define the type BusTicket that can represent values like these: @@ -20,6 +20,7 @@ import Mooc.Todo -- - MonthlyTicket "January" -- - MonthlyTicket "December" +data BusTicket = SingleTicket | MonthlyTicket String ------------------------------------------------------------------------------ -- Ex 3: Here's the definition for a datatype ShoppingEntry that