[Haskell-cafe] File path programme
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Wed Jan 26 09:29:49 EST 2005
Keean Schupke <k.schupke at imperial.ac.uk> writes:
> >So let's define a new algebraic datatype something like:
>
> I think you can guess what comming - why not use a class for extensibility:
> class Path p where ...
> The path class would provide all the operations for using paths...
Yup, good idea, and I think this would also allow David Roundy's
suggestion of a FastString implementation of filepaths - it becomes
just another instance.
> This has the advantage that people can add instances for platforms
> without having to alter the code in the library...
Exactly. Yes.
Regards,
Malcolm
More information about the Libraries
mailing list