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

Alexander Foremny alexanderforemny at googlemail.com
Wed Jun 27 16:39:39 CEST 2012


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



More information about the Haskell-Cafe mailing list