Hello,
What's the way to express the following: a compound object
is generally made up of two components with identical type.
For this common case I'd like to provide some default
methods, which take the object apart, operate on the parts
and put the results back together. In other
I had asked a similar question on haskell lists about how to implement
hypergraphs efficiently, which are combinatorics of finite sets (sets of
sets). As a matter of fact, I obtained a nice and small finite set
implementation that works for me, let me see if it is worth posting.
If you are work
G'day all.
On Wed, Jan 01, 2003 at 01:15:09PM +0100, Nicolas.Oury wrote:
> From this, I think the safety become intuitive.
Maybe.
Using the OI module from Richard Kieburtz' paper, I can write
this:
-- Bootstrap into the OI comonad
main :: IO ()
main = return $! comain s
G'day all.
On Thu, Jan 02, 2003 at 05:49:41PM +0100, Ferenc Wagner wrote:
> What's the way to express the following: a compound object
> is generally made up of two components with identical type.
This should work:
\begin{code}
module Test where
class Component b where
property :: b -> Int
In article <[EMAIL PROTECTED]>,
Andrew J Bromage <[EMAIL PROTECTED]> wrote:
> comain :: OI a -> ()
> comain w
> = coeval (w .>> show (a,b) =>> stdPutStrLn)
> where
> a = coeval (w .>> () =>> stdGetChar)
> b = coeval (w .>> () =>> stdGetC
G'day all.
On Thu, Jan 02, 2003 at 08:08:20PM -0800, Ashley Yakeley wrote:
> So is Kieburtz smoking crack, or are we writing OI-style programs
> incorrectly?
I mailed him the example and asked. (I phrased the question a bit
differently, though.)
> One possibility is that comonads are useful f