Addition to unix: raw ByteString APIs

Simon Marlow marlowsd at gmail.com
Mon Nov 14 15:18:35 CET 2011


On 11/11/2011 20:55, Herbert Valerio Riedel wrote:
> On Fri, 2011-11-11 at 16:23 +0000, Simon Marlow wrote:
>> I propose to commit the attached patch to the unix package and release
>> it with GHC 7.4.1.  The commit log is reproduced below.  Comments please!
>
> +1 :-)
>
>
> Just one minor thing:
>
>>         - There is a new type: RawFilePath = ByteString
>
> Can't that be made a proper type (e.g. via a newtype) instead of being a
> mere type-alias?

I'd rather *not* do that:

  - The unix library doesn't generally make newtypes - take a look at
    all the other types it exports.

  - It's a low-level API, abstraction is not the goal here.

  - We know from the POSIX spec that a path is a sequence of bytes
    and nothing more.  This interface makes that explicit.

Cheers,
	Simon



More information about the Libraries mailing list