Wed, 28 Jul 1999 22:31:41 +0400 (MSD), Grigoriy Strokin <[EMAIL PROTECTED]> pisze:

> - In TclPrims.g302.hs some functions looked like
>       primInitTcl:: IO Bool
>       primInitTcl = map int2bool (_ccall_ primInitTcl)
>   I can't understand why (map int2bool) is applied to
>   a non-list, neither can Haskell98.

map used to be the today's fmap method from the Functor class,
here instanced for Monad type.

BTW, what are the reasons that this changed? Why the "generic"
functions like map, filter, foldr, elem, concat etc. are for lists
only and not in some appropriate classes? Other types have to invent
their own names like mapFM, elemFM etc.

> - There is no 'accumulate' function in Haskell98 prelude/libraries, so I
>   have borrowed it from 1.4 prelude and inserted into Tcl.hs and
>   TclPrims.hs

This is called sequence now.

> - There was a type conflict in TclGUI.hs:
>       failGUI err = G__ (\_ -> fail err)
>   Fail required String, err was of a different type, so I changed
>   it to:
>       failGUI err = G__ (\_ -> fail "GUI error (can't diagnose)!")
>   Not very convenient, but works.

I guess that its callers should have `userError' removed.

> - ghc-4.02, when run with the option -fglasgow-exts, gives parse error when
>   it sees the definition of function (##), I don't know why. I have changed
>   ## to +++ everywhere.  

(# ... #) are unboxed tuples, a ghc extension. You could write
( ## ) instead.

-- 
 __("<    Marcin Kowalczyk * [EMAIL PROTECTED] http://kki.net.pl/qrczak/
 \__/          GCS/M d- s+:-- a22 C+++>+++$ UL++>++++$ P+++ L++>++++$ E-
  ^^                W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP->+ t
QRCZAK                  5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-



Reply via email to