Abstract FilePath Proposal

David Fox dsf at seereason.com
Sat Jun 27 12:56:33 UTC 2015


On Fri, Jun 26, 2015 at 9:08 AM, Herbert Valerio Riedel <hvr at gnu.org> wrote:
>
>
> We (see From: & CC: headers) propose, plain and simple, to turn the
> currently defined type-synonym
>
>   type FilePath = String
>
> into an abstract/opaque data type instead.
>
> Why/How/When?


​I've had success with a slightly different "How":

Phase 1: Replace FilePath with a type class, with instances for the old
FilePath (i.e. String) and the new implementation.

Phase 2:  Wait until a suitable amount of hackage builds without the string
instance.

Phase 3: Deprecate the String instance - move it to an old-filepath package.

Phase 4: Replace the type class with the new implementation
​
This way the new implementation is available immediately, packages can
begin converting at once, benefits can be assessed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150627/512fbb8b/attachment.html>


More information about the Libraries mailing list