Question: Help with HASKELL CODE please!!! I have the modules set up but I dont know how to do exercise set A numbers 1 and 2.

Help with HASKELL CODE please!!!
I have the modules set up but I dont know how to do exercise set A numbers 1 and 2. I put the descriptions of the function in comments  Help with HASKELL CODE please!!! I have the modules set up

module ExanDsi-1na a ExanDs1.hs (correctchoice, lenquestion, validQuestion, hasTag, eqBag, selectByTags, valdExam, makekey, question2html, exam2html) where - use the type QText to describe the text of a question type QText String use Tag to describe the topic tags we can associate with a question type Tag String can state a possible answer to the quesiotn using the data type Choice, -which has a single constructor answer data Question -Ask [Tag] QText [Choice] deriving Show it has two components, the text of the answer and a Boolean value that indicates - whether this is a correct answer to the question (True or not) type ATextString data ChoiceAnswer AText Bool deriving (Eq, Show) -As above, we use the type AText to describe the text of an answer -EXERCISE SET A---retee. - 1. Develop function correctchoice that takes a choice and determines whether it is marked -as a correct answer or not --correctChoice : Choice -> Boo.l -- correctChoice x 8 - 2. Develop function lenQuest lon that takes a question and returns the number of possible answers 1e 41 42 43 are given. - 1enquestion :: Question -> Int LenQuestion num

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!