Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Provides a catalogue of student-profiles, indexed by the student-body by whom it's shared.
Synopsis
- type StudentBodyRegister level stream teachingRatio = ResourceMap StudentBody (Profile level stream teachingRatio)
- type KnowledgeByStudentBody level = Map StudentBody (Knowledge level)
- tag :: String
- countAvailableStudentDays :: StudentBodyRegister level stream teachingRatio -> NDays
- countSubjectsRequired :: KnowledgeByStudentBody level -> Int
- extractDistinctSubjects :: Ord level => StudentBodyRegister level stream teachingRatio -> Knowledge level
- reduce :: (Ord level, Ord stream, Ord teachingRatio) => MnemonicSeparator -> StudentBodyRegister level stream teachingRatio -> Writer [[StudentBody]] (StudentBodyRegister level stream teachingRatio)
- reduce' :: (Ord level, Ord stream, Ord teachingRatio) => MnemonicSeparator -> StudentBodyRegister level stream teachingRatio -> StudentBodyRegister level stream teachingRatio
- getStudentBodies :: StudentBodyRegister level stream teachingRatio -> [StudentBody]
- hasAnyFreePeriodPreference :: RealFrac teachingRatio => StudentBodyRegister level stream teachingRatio -> Bool
- hasAnyCoreKnowledgeRequirements :: StudentBodyRegister level stream teachingRatio -> Bool
- hasAnyOptionalKnowledgeRequirements :: StudentBodyRegister level stream teachingRatio -> Bool
Types
Type-synonyms
type StudentBodyRegister level stream teachingRatio = ResourceMap StudentBody (Profile level stream teachingRatio) Source #
A map indexed by student-body, of profiles shared amongst students in the body.
type KnowledgeByStudentBody level = Map StudentBody (Knowledge level) Source #
Knowlege-requirement, indexed by student-body.
Constants
Functions
countAvailableStudentDays :: StudentBodyRegister level stream teachingRatio -> NDays Source #
The sum of the number of days worked by each student.
countSubjectsRequired :: KnowledgeByStudentBody level -> Int Source #
Count the total number of subjects required by all students.
extractDistinctSubjects :: Ord level => StudentBodyRegister level stream teachingRatio -> Knowledge level Source #
Extracts the set of distinct subjects required, gathered from all students.
reduce :: (Ord level, Ord stream, Ord teachingRatio) => MnemonicSeparator -> StudentBodyRegister level stream teachingRatio -> Writer [[StudentBody]] (StudentBodyRegister level stream teachingRatio) Source #
- Merges those student-bodies whose profiles are identical, into a single larger student-body.
- Writes the lists of merged student-bodies.
- Checks that any new mnemonics, composed from those of student-bodies with identical profiles, differ from existing ones.
This shouldn't matter, because the key of
StudentBodyRegister
is the whole student-body not just the mnemonic, regrettably, for efficiency, StudentBody implementsEq
&Ord
using only the mnemonic.
reduce' :: (Ord level, Ord stream, Ord teachingRatio) => MnemonicSeparator -> StudentBodyRegister level stream teachingRatio -> StudentBodyRegister level stream teachingRatio Source #
Merges those student-bodies whose profiles are identical, into a single larger student-body.
Accessors
getStudentBodies :: StudentBodyRegister level stream teachingRatio -> [StudentBody] Source #
Accessor.
Predicates
hasAnyFreePeriodPreference :: RealFrac teachingRatio => StudentBodyRegister level stream teachingRatio -> Bool Source #
True if any student-body has specified a free-period preference.
hasAnyCoreKnowledgeRequirements :: StudentBodyRegister level stream teachingRatio -> Bool Source #
True if any student-body has specified a core subject in their knowledge-requirements.
hasAnyOptionalKnowledgeRequirements :: StudentBodyRegister level stream teachingRatio -> Bool Source #
True if any student-body has specified an optional subject in their knowledge-requirements.