[Haskell-cafe] Re: exceptions vs. Either

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Fri Aug 6 07:45:26 EDT 2004

> correctly sorted lists under _all_ circunstances. This type signature
> is much simpler than the actual sort - hence is useful.
> 	sort :: (HList l,HOrderedList l') => l -> l'
> Nice and readable, and much simpler than the actual algorithm (be
> it bubble sort, or a quick sort)

The type signature you give is no different from

sort :: (C1 l, C2 l') => l -> l'

and conveys no more information.  You should include the definitions
of the classes before saying "this is much simpler than the actual

--KW 8-)

More information about the Haskell-Cafe mailing list