bracket_

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
15 Oct 2001 13:19:40 GMT


Sun, 14 Oct 2001 23:25:40 -0400, Ken Shan <ken@digitas.harvard.edu> pisze:

> In Haskell's standard IO module, bracket_ is defined to have type
> 
>     IO a -> (a -> IO b) -> IO c -> IO c
> 
> However, in the Exception module in hslibs, bracket_ has type
> 
>     IO a -> IO b -> IO c -> IO c
> 
> which IMHO is much less useful, not to mention confusing.

Why less useful? There is already bracket which provides the value
produced by initialization. IMHO Exception.bracket_ is more useful
when there is really no initialization, only closing.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK