-- -- Control.Concurrent.Session :: Session Types for Haskell -- Copyright (C) 2007 Matthew Sackman (matthew@wellquite.org) -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public -- License along with this library; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, -- MA 02111-1307 USA -- {-# OPTIONS_GHC -fglasgow-exts #-} module Control.Concurrent.Session.ExtraClasses where import Control.Concurrent.Session.List class UnrollLoop orig result | orig -> result where unroll :: orig -> result class SpecList generalType list class ProcList generalType list class ChoiceSpecsProcs specs procs | procs -> specs class ValidOffer generalType procs specsForOffer | generalType -> specsForOffer , specsForOffer -> procs , procs -> specsForOffer , generalType specsForOffer -> procs class ValidSelect generalType specsForSelect procs selection procSel procOff | generalType -> specsForSelect , specsForSelect -> procs , procs -> specsForSelect , specsForSelect selection -> procSel , specsForSelect selection -> procOff class TypeIndexList list class (TypeIndexList typeIndexes, ListLength typeIndexes len) => Choice generalType typeIndexes len | generalType -> typeIndexes, generalType -> len where typeIndexes :: List generalType typeIndexes