weekdaze-0.0.0.3: A school-timetable problem-solver.

Safe HaskellNone
LanguageHaskell2010

WeekDaze.Temporal.TimeslotRequest

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Either the ideal time-slot in any day, or the specific set of times in each week, at which to book a lesson of a course.
  • One may for example; prefer to teach a demanding course early, when concentration is relatively high; avoid swimming immediately after lunch; book games in a consecutive sequence of time-slots, during the afternoon.
  • If there are fewer specified times, than there are lessons required per week for the course, then the remainder are booked at arbitrary times.
Synopsis

Types

Data-types

data TimeslotRequest timeslotId Source #

Defines the ideal time-slot on any day, or the specific times in each week, at which to book a lesson of a specific course.

Constructors

Ideally timeslotId

Book as close to the specified time-slot as possible, but on an arbitrary day.

Specifically (TimeSet timeslotId)

Book at the specified times in each week; any remaining lesson required for the course are booked at arbitrary times.

Instances
Eq timeslotId => Eq (TimeslotRequest timeslotId) Source # 
Instance details

Defined in WeekDaze.Temporal.TimeslotRequest

Methods

(==) :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> Bool #

(/=) :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> Bool #

Ord timeslotId => Ord (TimeslotRequest timeslotId) Source # 
Instance details

Defined in WeekDaze.Temporal.TimeslotRequest

Methods

compare :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> Ordering #

(<) :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> Bool #

(<=) :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> Bool #

(>) :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> Bool #

(>=) :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> Bool #

max :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> TimeslotRequest timeslotId #

min :: TimeslotRequest timeslotId -> TimeslotRequest timeslotId -> TimeslotRequest timeslotId #

Show timeslotId => Show (TimeslotRequest timeslotId) Source # 
Instance details

Defined in WeekDaze.Temporal.TimeslotRequest

Methods

showsPrec :: Int -> TimeslotRequest timeslotId -> ShowS #

show :: TimeslotRequest timeslotId -> String #

showList :: [TimeslotRequest timeslotId] -> ShowS #

NFData timeslotId => NFData (TimeslotRequest timeslotId) Source # 
Instance details

Defined in WeekDaze.Temporal.TimeslotRequest

Methods

rnf :: TimeslotRequest timeslotId -> () #

Default (TimeslotRequest timeslotId) Source # 
Instance details

Defined in WeekDaze.Temporal.TimeslotRequest

Methods

def :: TimeslotRequest timeslotId #

(XmlPickler timeslotId, Ord timeslotId) => XmlPickler (TimeslotRequest timeslotId) Source # 
Instance details

Defined in WeekDaze.Temporal.TimeslotRequest

Methods

xpickle :: PU (TimeslotRequest timeslotId) #

Constants

specificallyTag :: String Source #

Used to qualify Output & XML.

Functions

countSpecifiedTimes :: TimeslotRequest timeslotId -> NTimeslots Source #

Counts the number of specified times.

countSpecifiedDays :: TimeslotRequest timeslotId -> NDays Source #

Counts the number of discrete days specified.

getMaybeIdealTimeslotId :: TimeslotRequest timeslotId -> Maybe timeslotId Source #

Accessor, which returns a default value for data constructed by Specifically.

getSpecifiedTimes :: TimeslotRequest timeslotId -> TimeSet timeslotId Source #

Accessor, which returns a default value for data constructed by Ideally.

findDistinctRunlengthsOfSpecifiedTimes :: Enum timeslotId => TimeslotRequest timeslotId -> Set NTimeslots Source #

Find the set of distinct run-lengths of consecutive specified times, occuring within any single day.

Predicates

isIdeally :: TimeslotRequest timeslotId -> Bool Source #

True when the timeslot-request was constructed by Ideally.

isSpecific :: TimeslotRequest timeslotId -> Bool Source #

  • True when the timeslot-request was constructed by Specifically
  • CAVEAT: the set of specified times may still be null.

isNull :: TimeslotRequest timeslotId -> Bool Source #

  • True if there are zero specified times.
  • CAVEAT: an ideal time-slot may still have been defined.

isASpecifiedTime :: Ord timeslotId => Time timeslotId -> TimeslotRequest timeslotId -> Bool Source #

True if the specified time is one of those requested.

isASpecifiedDay :: Day -> TimeslotRequest timeslotId -> Bool Source #

True if one of the specified times falls on the specified day.