[Haskell-cafe] Combining Network Descriptions in Reactive.Banana
Alexander Foremny
alexanderforemny at gmail.com
Wed Jun 27 20:57:52 CEST 2012
Sweet! Thank you very much!
Just out of curiosity: how does this differ from the following, not
compiling type signature?
> library :: forall t. NetworkDescription t (Behavior t String) -> IO ()
Regards,
Alexander Foremny
2012/6/27 Sjoerd Visscher <sjoerd at w3future.com>:
> This should work:
>
> library :: (forall t. NetworkDescription t (Behavior t [Char])) -> IO ()
>
> greetings,
> Sjoerd
>
> 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
> https://github.com/sjoerdvisscher/blog
>
>
>
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list