On Fri, Oct 17, 2008 at 2:21 PM, leledumbo <[EMAIL PROTECTED]> wrote: > > So, what's the solution? This one: > > (l::[Ord]) <- readLn > > doesn't work (because Ord isn't a type constructor). It doesn't even comply > to Haskell 98 standard. I want to be able to read any list of ordered > elements.
I hope to be enlightened, but I'm pretty sure this is not possible. Your readLn has to present a list of some specific type which can be inferred at compile time. Which type is it? String? Int? Something else? Also, neither Show nor Read relate to Ord, so you cannot ever be sure that all Readable/Showable types are Ordered, or that all Ordered types can be Read/Shown. D _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe