This one bounced, so I'm forwarding it back to the list:
> From: "Stefan Westmeier (Diplomand" <[EMAIL PROTECTED]>
>
> My first attempt to define a MPC and some instances failed partially.
> I am not sure, if it is a bug or a feature. The class OMSObjAttrAppC
> should restrict the possible combinations of objects and attributes,
> so that attributes can only be read from objects to which they
> belong. Every Object which is an instance of Class OMSIdObjectC has a
> certain Attribute. So every instance of that class should be in the
> combinations that are permitted to use oAGet e.g.
>
> The MPC is:
>
> class (OMSObjectC o,OMSObjAttrC a,OMSAttrValC av) =>
> OMSObjAttrAppC o a av where
> oAGet :: IO (a o) -> IO av
> oAGet' :: (a o) -> IO av
> oASet :: IO (a o) -> av -> IO ()
> oASet' :: (a o) -> av -> IO ()
>
> ...
>
> class (OMSObjectC oid) => OMSIdObjectC oid where
> ...
>
> instance OMSIdObjectC OMSIdObject where
> ...
>
> The following instances are OK, says the compiler.
>
> instance OMSObjAttrAppC OMSIdObject OMSPoidObjAttr PcteAttributeValue
> instance OMSObjAttrAppC OMSIdObject OMSPoidObjAttr PcteNatural
>
> The following attempt fails:
>
> instance (OMSIdObjectC o) => OMSObjAttrAppC o OMSPoidObjAttr PcteAttributeValue
> instance (OMSIdObjectC o) => OMSObjAttrAppC o OMSPoidObjAttr PcteNatural
>
>
> The Compiler says:
>
> /usr/local/pub-bkb/ghc/ghc-3.00/bin/ghc -c OMSIdObject.hs -syslib posix -syslib ghc
>-fglasgow-exts -concurrent -cpp -hi-diffs -fvia-C -dcore-lint
>-I/usr/local/pub-bkb/ghc/ghc-3.00/lib/includes
>-I/usr/local/pub-bkb/hpcte/v2.9/include
>-i.:../cencap:../cencap/notification:../oms:/home/litfox/uniform/revoms/workbench/util:/home/litfox/uniform/revoms/workbench/concurrency:/home/litfox/uniform/revoms/workbench/reactor
> -H15M -K5M -recomp -DSOLARIS -DNOTI -DHPCTE29 -DWITH_HPCTE_APPEND_LINK_ERROR
>'-#include "omsstate.h"'
>
> typecheck/TcInstDcls.lhs:723: Irrefutable pattern failed for pattern (Just
>(inst_tycon, arg_tys))
> gmake: *** [OMSIdObject.o] Error 1
>
>
> Thanks, Stefan.
> --
> Stefan Westmeier [EMAIL PROTECTED]
> BISS vox humana: +(49) 421 218 4228
> FB3 Uni Bremen fax machina: +(49) 421 218 3054
>
> Stefan Westmeier [EMAIL PROTECTED]
> Schaphuser Str. 24 vox humana: +(49) 421 424001
> D-28307 Bremen fax machina: +(49) 421 424045
> Germany cellular: +(49) 171 2672149
>