[web-devel] FilePath in WAI

Simon Marlow marlowsd at gmail.com
Mon Jun 25 14:29:24 CEST 2012


On 15/06/2012 22:47, Johan Tibell wrote:
> On Fri, Jun 15, 2012 at 2:41 PM, Greg Weber<greg at gregweber.info>  wrote:
>> The ticket would be to switch the standard libraries to use
>> system-filepath, which probably requires a mailing list discussion
>> somewhere, a lot of boring changes of code, and a more inconvenient
>> API for end users. I will wait for Text to become standardized first
>> :)
>
> The FilePath issue has been discussed at length before. The problem is
> that different OS:es define file paths to be different things (i.e.
> Unicode or bytes.) The FilePath type somehow has to bridge that, that
> will be difficult. My main grip with FilePath right now is that it's
> not an abstract type.

FYI, in case it wasn't clear, the system-filepath package provides such 
an abstract FilePath type, which I imagine is why some people prefer to 
use it even though it means adding some extra conversions when using the 
System.IO API (conversions which are fragile because we keep changing 
the meaning of the String version of FilePath, sigh).

system-filepath looks slightly odd to be because I would have expected 
the representation internally to be platform-specific (e.g. either 
ByteString or Text for Unix or Windows respectively), but it just uses 
String.

Cheers,
	Simon



More information about the web-devel mailing list