
29 Jan
2007
29 Jan
'07
3:08 a.m.
Alfonso Acosta wrote:
fstSY = mapSY fst No instance for (Synchronous s ((a, b) -> a) (a, b) a)... ...no error arises if I explicitly give the type signature of fstSY fstSY :: Signal (a,b) -> Signal a
This is the notorious Monomorphism Restriction. See http://www.haskell.org/haskellwiki/Monomorphism_restriction You can get around it either by specifying the type, as you discovered, or by using the -fno-monomorphism-restriction flag for ghc or ghci. In ghci you can also specify this as a :set command, hence also in your .ghci file if you'd like. Hope this helps, Yitz