[Haskell-cafe] Combining Network Descriptions in Reactive.Banana

Sjoerd Visscher sjoerd at w3future.com
Wed Jun 27 18:35:11 CEST 2012

This should work:

    library :: (forall t. NetworkDescription t (Behavior t [Char])) -> IO ()


On Jun 27, 2012, at 4:39 PM, Alexander Foremny wrote:

> Hello list,
> I am currently experimenting with Reactive.Banana and I am trying to
> write a program that simply displays a String which is supplied by the
> user. Thus in Main.hs I'd like to create a Behavior t String from some
> arbitrary sources and pass this to a library function performing the
> printing. However, I am not able to get the desired behavior of my
> program. A sample Main.hs is available as Gist [1].
> The cause of error appears to be that the type t over which
> NetworkDescription and Behavior are parameterized are distinct! I
> tried several variations of the code in [1] using
> ExistentialQuantification over t and/or giving explicit type
> signatures. The error is slightly different in each case, but always
> boils down to the same reason.
> In case explicit error messages are required I can post them to the list.
> Any insight into this would be of great help. And additionally I'd be
> interested if this kind of program is possible with Reactive.Banana at
> all.
> [1] https://gist.github.com/3004430
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

Sjoerd Visscher

More information about the Haskell-Cafe mailing list