module Template_06(Rat(..), normaliseRat, createRat, MonoidC(..), VoteSeq(..), normaliseVote, combine) where -- IMPORTANT ----------------------------- doNotModify anything above this line = True {- Exercise 1 -} data Rat = Rat Integer Integer -- Question 1 normaliseRat :: Rat -> Rat normaliseRat = undefined createRat :: Integer -> Integer -> Rat createRat = undefined -- Question 2 instance Eq Rat instance Ord Rat -- Question 3 instance Show Rat where show r = undefined -- Question 4 instance Num Rat {- Exercise 2 -} class MonoidC a where binop :: a -> a -> a neutral :: a -- Question 1 instance MonoidC Integer instance MonoidC Bool instance MonoidC [a] -- Question 2 normaliseVote :: String -> String normaliseVote = undefined -- Question 3 data VoteSeq = VS String instance Eq VoteSeq instance Show VoteSeq instance MonoidC VoteSeq -- Question 4 combine = undefined