Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the personal timetable for any week, for each location.
- It contains identical information to
Timetable
, but the data has been re-indexed to present it in a form relevant to a location rather than a student.
Synopsis
- type Timetable locationId timeslotId teacherId level = Timetable locationId timeslotId (LessonResourceIds teacherId) level
- fromStudentViewTimetable :: (Ix timeslotId, Enum timeslotId, Eq level, Eq teacherId, Ord locationId, Show level, Show locationId, Show teacherId, Show timeslotId) => Bool -> Timetable locationId timeslotId teacherId level -> Timetable timeslotId locationId teacherId level -> Timetable locationId timeslotId teacherId level
- toStudentViewTimetable :: (Ix timeslotId, Enum timeslotId) => Timetable timeslotId locationId teacherId level -> Timetable locationId timeslotId teacherId level -> Timetable timeslotId locationId teacherId level
- toXHtml :: (Ix timeslotId, Fractional minimumContrastRatio, Ord level, Ord locationId, Ord minimumContrastRatio, Ord teacherId, Show level, Show teacherId, HTML campus, HTML level, HTML locationId, HTML synchronisationId, HTML teacherId, HTML timeslotId) => (locationId -> Lesson teacherId level -> Course synchronisationId level timeslotId) -> LocationCatalogue locationId campus -> GenericTimetableToMarkup locationId minimumContrastRatio teacherId timeslotId (Timetable locationId timeslotId teacherId level)
Types
Type-synonyms
type Timetable locationId timeslotId teacherId level = Timetable locationId timeslotId (LessonResourceIds teacherId) level Source #
An association-list of the timetables for all locations.
Functions
Mutators
Translation
fromStudentViewTimetable Source #
:: (Ix timeslotId, Enum timeslotId, Eq level, Eq teacherId, Ord locationId, Show level, Show locationId, Show teacherId, Show timeslotId) | |
=> Bool | Permit a temporary student-body merger. |
-> Timetable locationId timeslotId teacherId level | An unallocated timetable, supplied for efficiency. |
-> Timetable timeslotId locationId teacherId level | |
-> Timetable locationId timeslotId teacherId level |
- Build a
Timetable
by inverting aTimetable
. - CAVEAT: in the original
Timetable
, different student-bodies may simultaneously reference a single location. This is normal behaviour, provided the location has sufficient capacity, & is implemented seemlessly, as a map-structure with one or more keys referencing a value, containing the same location. - When inverting such a timetable, this many-to-one relationship becomes a one-to-many, & a single location-id must now reference many student-bodies. The map-structure (cf. multi-map), can't directly accommodate multiple identical keys, with different values, so this is achieved by merging the student-bodies into a class of students.
:: (Ix timeslotId, Fractional minimumContrastRatio, Ord level, Ord locationId, Ord minimumContrastRatio, Ord teacherId, Show level, Show teacherId, HTML campus, HTML level, HTML locationId, HTML synchronisationId, HTML teacherId, HTML timeslotId) | |
=> (locationId -> Lesson teacherId level -> Course synchronisationId level timeslotId) | Find the course to which the specified lesson belongs. |
-> LocationCatalogue locationId campus | |
-> GenericTimetableToMarkup locationId minimumContrastRatio teacherId timeslotId (Timetable locationId timeslotId teacherId level) |
Render in XHTML, as a definition-list.