The madness of implicit parameters: cured?

2003-08-02 Thread Ben Rudiak-Gould
When I first learned about implicit parameters I thought they were a great idea. The honeymoon ended about the time I wrote some code of the form let ?foo = 123 in expr2, where expr2 used ?foo implicitly, and debugging eventually unearthed the fact that ?foo's implicit value was not being set to

Re: *safe* coerce, for regular and existential types

2003-08-02 Thread oleg
Does this technique extend to polymophic types? Yes, of course. The type F a b in the earlier message was polymorphic. Let's say we have the following type: data D a = C | D a Is it possible to index the type D a? I have just lifted the polymorphic Maybe -- which is isomorphic to your

Re: *safe* coerce: four methods compared

2003-08-02 Thread Ralf Laemmel
[EMAIL PROTECTED] wrote: This is a Related Work section of the previous message. ... again cunning stuff omitted ... I buy most of this but IMHO you should make very clear that there is not just a single safeCoerce, but the TI/init_typeseq argument has to be constructed and supplied by the

Laziness

2003-08-02 Thread Dominic Steinitz
Could someone explain to me why this doesn't work test l = hs where hs = map (\x - [x]) [0..abs(l `div` hLen)] hLen = length $ head hs whereas this does test l = hs where hs = map (\x - [x]) (0:[1..abs(l `div` hLen)]) hLen = length $ head hs I would have thought laziness would allow

Haskell for educative games

2003-08-02 Thread Andre W B Furtado
Does anyone know if Haskell is/was used to develop educative games? Do you recommend some papers on the subject? Thanks a lot, -- Andre Furtado ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Laziness

2003-08-02 Thread Jon Fairbairn
On 2003-08-02 at 14:36PDT Dominic Steinitz wrote: Could someone explain to me why this doesn't work test l = hs where hs = map (\x - [x]) [0..abs(l `div` hLen)] hLen = length $ head hs whereas this does test l = hs where hs = map (\x

Re: The madness of implicit parameters: cured?

2003-08-02 Thread Derek Elkins
On Sat, 2 Aug 2003 00:45:07 -0700 (PDT) Ben Rudiak-Gould [EMAIL PROTECTED] wrote: When I first learned about implicit parameters I thought they were a great idea. The honeymoon ended about the time I wrote some code of the formlet ?foo = 123 in expr2, where expr2 used ?foo implicitly, and

-------|ÓÅ»ÝÐéÄâÖ÷»ú£¡|------

2003-08-02 Thread webmaster
Ç×°®µÄÅóÓÑ£º ÄúºÃ£¡ ÕâÊÇÀ´×ÔÏÃÃÅÊб¦Áé¿Æ¼¼ÍøÂçÓÐÏÞ¹«Ë¾µÄÎʺ¸ÐлÄúÊÕ¿´Õâ·âÓʼþ¡£ÎÒÃÇÕæ³ÏµÄÏ£Íû ÄúÄܳÉΪÎÒÃÇÔÚ¹óµØÇøµÄÖØÒª»ï°é¡£ÎÒÃÇÊÇÒ»¼Ò²ÉÓÃÊÀ½ç¸ßм¼Êõ½á¾§£¬Ñо¿¡¢ÍƹãºÍ·¢Õ¹ м¼Êõ£¬ÖÂÁ¦ÓÚ»¥ÁªÍøÐÅÏ¢·þÎñ¡¢ÓòÃû×¢²á·þÎñºÍÐéÄâÖ÷»ú·þÎñµÄ¸ßм¼ÊõÆóÒµ¡£ÏêÇéÇëä¯ ÀÀ:http://www.host-china.com