{- |
Module : Referees
Description : Main public interface
Copyright : (c) Pablo Couto 2014
License : GPL-3
Maintainer : pablo@infty.in
Stability : experimental

Utility for computing distributions of material to review among reviewers.

Example of use:

* First, load the CSV files representing referees and proposals:

>>> referees <- fromCSVtoReferees "referees.csv"
>>> proposals <- fromCSVtoProposals "proposals.csv"

Each line in these files obeys the following format:

@
'Name','Capacity','Language';…;'Language','Area','Subarea';…;'Subarea'
@

'Area' and 'Subarea' fields can be empty but they must be present. 'Capacity'
and 'Language' fields are optional. If only one of them is included, the parser
will detect which one on the basis of whether it contains digits.

If there are many areas (and corresponding subareas) for some 'Name', these go
in different lines, as in the following example:

@
RefereeA,3,Spanish,Metaphysics,Identity
RefereeA,Greek,Aesthetics
RefereeB,1,PoliticalPhilosophy,State;Justice
RefereeC,Catalan,PhilosophyOfMind,Perception
@

* Then, use the 'distributeWith' function; the 'ProfitFunction' used in the
example is provided by the library:

>>> let Just bnds = mkBounds 1 3
>>> match <- distributeWith profitRefProp referees 3 bnds (Just "Greek") proposals

Now you can pretty print the outcome:

>>> putStr $ ppDistribution match

-}


module Referees
  ( module Referees.Types
     -- * Parsing
  , fromCSVtoReferees
  , fromCSVtoProposals
    -- * Assignment of proposals to referees
  , distributeWith
  , profitRefProp
  , mkBounds
    -- * Querying
  , whichRefereesForProposal
  , whichProposalsForReferee
    -- * Pretty printing
  , ppDistribution )
where

import           Referees.Internal
import           Referees.Types