In article <[EMAIL PROTECTED]>,
 Brandon Michael Moore <[EMAIL PROTECTED]> wrote:

> Actually, I'm surprised someone else has a use for this. I wanted
> circular instances for playing with the paper "Recursion Schemes from
> Comonads". What are you trying to do?

It's for HScheme. The Object type has a pluggable reference type, so 
that both IO-based and pure functional Scheme variants are possible.

The general idea is something like this:

    data Object ref = NilObject |
      PairObject (ref (Object ref)) (ref Object ref));
    
    instance (Eq (ref (Object ref))) => Eq (Object ref) where
       etc.
    
    newtype Constant a = MkConstant a deriving Eq;

    equalConstant :: Object Constant;
    equalConstant = (==);

    equalIORef :: Object IORef;
    equalIORef = (==);

-- 
Ashley Yakeley, Seattle WA

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to