[Haskell-cafe] Dynamic typing of polymorphic functions

2007-12-20 Thread oleg
Alfonso Acosta wrote: mapSY :: (Typeable a, Typeable b) = (a - b) - Signal a - Signal b mapSY f (Signal primSig) = Signal (PrimSignal (MapSY (toDyn f) primSig)) The following process would be really useful but its compilation obviously fails: mapSnd :: Signal (a, a) - Signal a mapSnd =

[Haskell-cafe] Dynamic typing of polymorphic functions

2007-12-19 Thread Alfonso Acosta
Hi all, As some of you might remember I'm working on a EDSL which models process networks (A process can simply be viewed as a box which has a number of input and output signals and makes computations over them). A simple example of the processes implemented is MapSY, which is similar to

Re: [Haskell-cafe] Dynamic typing of polymorphic functions

2007-12-19 Thread Neil Mitchell
Hi OK, If you managed to read until this point, you might have noticed that, due to the monomorphism restriction implied by Data.Typeable, it is impossible to build polymorphic processes. Tom Shackell had similar issues with passing code around at runtime. As a result Yhc contains the

Re: [Haskell-cafe] Dynamic typing of polymorphic functions

2007-12-19 Thread Alfonso Acosta
On Dec 19, 2007 9:13 PM, Neil Mitchell [EMAIL PROTECTED] wrote: OK, If you managed to read until this point, you might have noticed that, due to the monomorphism restriction implied by Data.Typeable, it is impossible to build polymorphic processes. Tom Shackell had similar issues with