[Haskell-cafe] First go at reactive programming

Conal Elliott conal at conal.net
Sat Jan 19 11:17:26 EST 2008


Thanks for the TypeCompose>=0.3 tip. I've fixed my local Reactive.cabal and
will push at some point.

Oh yeay -- I'd forgotten about the "deriving" change in 6.8 vs 6.6.

Urg.  I didn't realize that 'forever' isn't in 6.2.  You can use the 6.8def:

-- | @'forever' act@ repeats the action infinitely.
forever     :: (Monad m) => m a -> m ()
forever a   = a >> forever a

I'm wondering how hard to try to get these libs to work with both 6.6 and
6.8.  My hope has been that people will switch to 6.8, but perhaps there are
obstacles I don't know about.  Is there something that keeps you from
upgrading?

  - Conal

On Jan 19, 2008 6:14 AM, Steve Lihn <stevelihn at gmail.com> wrote:

> Reactive-0.3 seems to have a dependency on TypeCompose-0.3. Earlier
> version does not work (for lack of Data.Pair). This probably should be
> specified in Cabal file.
>
> I aslo fixed all the LANGUAGE problems and now encountered the
> following error in TypeCompose:
>
> [4 of 9] Compiling Control.Compose  ( src/Control/Compose.hs,
> dist/build/Control/Compose.o )
> src/Control/Compose.hs:561:0: parse error on input `deriving'
>
> I tried to restored the commented out "deriving Monoid" and got pass
> that. Not sure if that is right though. Back to reactive-0.3, I
> encountered:
>
> src/Data/Future.hs:60:27:
>    Module `Control.Monad' does not export `forever'
>
> Forever is in the latest library, but not in my GHC 6.6. I am not sure
> how to get this fixed. Any suggestion?
>
>
> http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html
>
>
> Steve
>
>
> On Jan 19, 2008 1:31 AM, Conal Elliott <conal at conal.net> wrote:
> > Hi Steve,
> >
> > Thanks for letting me know about the LANGUAGE problem.  Yes, I used
> > 6.8-friendly (6.6-unfriendly) LANGUAGE pragmas.  In retrospect, probably
> not
> > such a great idea, since there seem to be many folks still on 6.6.
> >
> > I just changed the sources (commenting out the LANGUAGE pragmas and
> > inserting -fglasgow-exts pragmas), darcs-pushed, and put a new version (
> 0.3)
> > on hackage.  Please give it another try.
> >
> > Cheers, - Conal
> >
> >
> >
> > On Jan 18, 2008 7:58 PM, Steve Lihn <stevelihn at gmail.com> wrote:
> > > Tried to install reactive-0.2 on GHC-6.6, but failed.
> > >
> > > Building reactive-0.2...
> > > src/Data/Reactive.hs:1:13: cannot parse LANGUAGE pragma
> > >
> > > Is the package for GHC 6.8? Is there an older version (0.0?) for GHC
> > > 6.6 that I can play with your example? (Or advise how to hack that
> > > file to get it work on 6.6)
> > >
> > > Thanks,
> > > Steve
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080119/7c736fe0/attachment.htm


More information about the Haskell-Cafe mailing list