$maybe dayEvents <- Map.lookup day events
$maybe slotEvents <- Map.lookup slot dayEvents
$forall scheduleEntry <- slotEvents
$case scheduleEntry
$of ScheduleCourseEvent{sceCourse=Entity _ Course{courseName},sceType,sceRoom,sceOccurrence}
#{CI.original courseName}: #{CI.original sceType}
_{MsgScheduleRoom}: #{sceRoom}
^{formatEitherOccurrenceW sceOccurrence}
$of ScheduleTutorial{stCourse=Entity _ Course{courseName},stName,stType,stRoom,stOccurrence}
#{CI.original courseName}: #{stName} (#{CI.original stType})
_{MsgScheduleRoom}: #{stRoom}
^{formatEitherOccurrenceW stOccurrence}
$of ScheduleExamOccurrence{seoCourse=Entity _ Course{courseName},seoExamName,seoRooms,seoStart,seoEnd}
#{CI.original courseName}: #{seoExamName}
$case toList seoRooms
$of [room]
_{MsgScheduleRoom}: #{room}
$of more
_{MsgScheduleRooms}: #{intercalate ", " more}
_{MsgScheduleOccur}: #
$if Just (utctDay seoStart) == fmap utctDay seoEnd
^{formatTimeRangeW SelFormatTime seoStart seoEnd}
$else
^{formatTimeRangeW SelFormatDateTime seoStart seoEnd}