multipleChoiceExercise :: forall t m c q a e s. (MonadWidget t m, Show a, Eq a, Ord a, Data a, Data c, Ord c,Buttonable a)
  => Int -- maximum number of tries to allow
  -> [a]
  -> m ()
  -> ConfigWidgetBuilder m t c a
  -> AnswerRenderer c a
  -> ExerciseId
  -> c
  -> (Dynamic t (Map a Score) -> Dynamic t (MultipleChoiceStore c a) -> m ())
  -> (c -> [ExerciseDatum] -> IO ([a],a))
  -> (Map c (Map a Score) -> (Int,Int)) -- function to calculate Xp from a map of performance over all configurations
  -> Exercise t m c [a] a (Map a Score) (MultipleChoiceStore c a)

multipleChoiceExercise maxTries answers iWidget cWidget render i c de g calculateXp = Exercise {
  exerciseId = i,
  instructionsWidget = iWidget,
  defaultConfig = c,
  defaultEvaluation = empty,
  displayEvaluation = de,
  generateQuestion = g,
  questionWidget = multipleChoiceQuestionWidget maxTries answers i iWidget cWidget render de calculateXp
  }
multipleChoiceExercise :: forall t m c q a e s. (MonadWidget t m, Show a, Eq a, Ord a, Data a, Data c, Ord c,Buttonable a)
  => Int -- maximum number of tries to allow
  -> [a]
  -> m ()
  -> ConfigWidgetBuilder m t c a
  -> AnswerRenderer c a
  -> ExerciseId
  -> c
  -> (Dynamic t (Map a Score) -> Dynamic t (MultipleChoiceStore c a) -> m ())
  -> (c -> [ExerciseDatum] -> IO ([a],a))
  -> (Map c (Map a Score) -> (Int,Int)) -- function to calculate Xp from a map of performance over all configurations
  -> Exercise t m c [a] a (Map a Score) (MultipleChoiceStore c a)
multipleChoiceExercise maxTries answers iWidget cWidget render i c de g calculateXp = Exercise {
  exerciseId = i,
  instructionsWidget = iWidget,
  defaultConfig = c,
  defaultEvaluation = empty,
  displayEvaluation = de,
  generateQuestion = g,
  questionWidget = multipleChoiceQuestionWidget maxTries answers i iWidget cWidget render de calculateXp
  }
multipleChoiceExercise maxTries answers iWidget cWidget render i c de g calculateXp = Exercise {
  exerciseId = i,
  instructionsWidget = iWidget,
  defaultConfig = c,
  defaultEvaluation = empty,
  displayEvaluation = de,
  generateQuestion = g,
  questionWidget = multipleChoiceQuestionWidget maxTries answers i iWidget cWidget render de calculateXp
  }