Johan Tibell | 2 Aug 2012 01:23
Picon
Gravatar

Re: Small problem in containers-0.5.0.0 docs

Fixed. Thanks for the bug report! In the future you can file reports at

    https://github.com/haskell/containers/issues

to make sure I don't forget about them! :)

On Wed, Aug 1, 2012 at 6:30 AM, Christoph Breitkopf
<chbreitkopf <at> gmail.com> wrote:
> Hello,
>
> the haddoc sources refer to the strict/lazy modules using single quotes,
> which does not work, as is is interpreted as a type reference
> (.../Data-Map.html#t:Strict). Replacing the single quotes by double quotes
> for a module reference fixes this. (I just had the same problem in
> IntervalMap).
>
> I spotted the problem in Data.Map, but it's probably also present in other
> modules.
>
> Regards,
>
> Chris
David Fox | 9 Aug 2012 18:28
Favicon

System.Process.ByteString.readProcess, readProcessWithExitCode

Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode.  I use these a lot and would love to see them incorporated into a standard library, though I'm not sure which one.

Attachment (ByteString.hs): application/octet-stream, 3878 bytes
_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
David Fox | 9 Aug 2012 20:33
Favicon

Re: System.Process.ByteString.readProcess, readProcessWithExitCode

On Thu, Aug 9, 2012 at 9:28 AM, David Fox <dsf <at> seereason.com> wrote:
Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode.  I use these a lot and would love to see them incorporated into a standard library, though I'm not sure which one.

Sorry, didn't know attachments were excluded.  The two functions are available in the Unixutils library: http://hackage.haskell.org/packages/archive/Unixutils/1.50/doc/html/System-Unix-Process.html
_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
John Wiegley | 9 Aug 2012 19:19
Picon
Gravatar

Re: System.Process.ByteString.readProcess, readProcessWithExitCode

>>>>> David Fox <dsf <at> seereason.com> writes:

> Attached is a module containing ByteString analogs of two functions from
> System.Process: readProcess and readProcessWithExitCode.  I use these a lot
> and would love to see them incorporated into a standard library, though I'm
> not sure which one.

I agree.  I wrote my own version of readProcessWithExitCode a while back as
well.

John

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
Bas van Dijk | 10 Aug 2012 09:01
Picon
Gravatar

Re: System.Process.ByteString.readProcess, readProcessWithExitCode

On 9 August 2012 20:33, David Fox <dsf <at> seereason.com> wrote:
> On Thu, Aug 9, 2012 at 9:28 AM, David Fox <dsf <at> seereason.com> wrote:
>>
>> Attached is a module containing ByteString analogs of two functions from
>> System.Process: readProcess and readProcessWithExitCode.  I use these a lot
>> and would love to see them incorporated into a standard library, though I'm
>> not sure which one.
>
>
> Sorry, didn't know attachments were excluded.  The two functions are
> available in the Unixutils library:
> http://hackage.haskell.org/packages/archive/Unixutils/1.50/doc/html/System-Unix-Process.html

Some time ago I fixed some asynchronous exception bugs in those
functions. Take a look at the current implementation:

https://github.com/ghc/packages-process/blob/master/System/Process.hs#L392

You might want to incorporate these changes into your library.

Cheers,

Bas
David Fox | 10 Aug 2012 21:13
Favicon

Re: System.Process.ByteString.readProcess, readProcessWithExitCode

On Fri, Aug 10, 2012 at 12:01 AM, Bas van Dijk <v.dijk.bas <at> gmail.com> wrote:
On 9 August 2012 20:33, David Fox <dsf <at> seereason.com> wrote:
> On Thu, Aug 9, 2012 at 9:28 AM, David Fox <dsf <at> seereason.com> wrote:
>>
>> Attached is a module containing ByteString analogs of two functions from
>> System.Process: readProcess and readProcessWithExitCode.  I use these a lot
>> and would love to see them incorporated into a standard library, though I'm
>> not sure which one.
>
>
> Sorry, didn't know attachments were excluded.  The two functions are
> available in the Unixutils library:
> http://hackage.haskell.org/packages/archive/Unixutils/1.50/doc/html/System-Unix-Process.html

Some time ago I fixed some asynchronous exception bugs in those
functions. Take a look at the current implementation:

https://github.com/ghc/packages-process/blob/master/System/Process.hs#L392

You might want to incorporate these changes into your library.

It looks like this will have to wait for bytestring 0.10, which has NFData instances.  I guess there are ways to hack this...

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
David Lazar | 12 Aug 2012 22:53
Favicon
Gravatar

Re: System.Process.ByteString.readProcess, readProcessWithExitCode

David Fox <dsf <at> seereason.com> writes:

> Attached is a module containing ByteString analogs of two functions from
> System.Process: readProcess and readProcessWithExitCode.  I use these a lot
> and would love to see them incorporated into a standard library, though I'm
> not sure which one.

I have the process-extras library on Hackage which contains
readProcessWithExitCode variants for ByteString and Text.

http://hackage.haskell.org/package/process-extras

I'd be happy to apply patches which add readProcess and make other 
improvements :-).

Cheers,
David
Edward Kmett | 13 Aug 2012 10:16
Picon
Gravatar

PolyKinds, Control.Category and GHC 7.6.1

Would it be possible to add something like 


{-# LANGUAGE CPP #-}
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704
{-# LANGUAGE PolyKinds #-}
#endif

to the top of Control.Category before the 7.6.1 final release?

Control.Category.Category is pretty much the only type in base that directly benefits from PolyKinds without any code changes, but without enabling the extension there nobody can define categories for kinds other than *, and most interesting categories actually have more exotic kinds. 

I only noticed that it wasn't there in the release candidate just now.

-Edward Kmett
_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
Dan Burton | 13 Aug 2012 15:55
Picon
Gravatar

Re: PolyKinds, Control.Category and GHC 7.6.1

Control.Category.Category is pretty much the only type in base that directly benefits from PolyKinds without any code changes, but without enabling the extension there nobody can define categories for kinds other than *, and most interesting categories actually have more exotic kinds.  

What, precisely, is the benefit of turning on PolyKinds for that file without changing the code? If we're cpp'ing it in, then are there further benefits that we could also reap by cpp'ing some code changes?

-- Dan Burton
_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
Edward Kmett | 13 Aug 2012 16:12
Picon
Gravatar

Re: PolyKinds, Control.Category and GHC 7.6.1


On Mon, Aug 13, 2012 at 9:55 AM, Dan Burton <danburton.email <at> gmail.com> wrote:
Control.Category.Category is pretty much the only type in base that directly benefits from PolyKinds without any code changes, but without enabling the extension there nobody can define categories for kinds other than *, and most interesting categories actually have more exotic kinds.  

What, precisely, is the benefit of turning on PolyKinds for that file without changing the code? If we're cpp'ing it in, then are there further benefits that we could also reap by cpp'ing some code changes?

The benefit is that the kind of Category changes to

Category :: (x -> x -> *) -> Constraint 

This means I can do things like make

data Dict p where
   Dict :: p => Dict p

newtype a |- b = Sub (a => Dict b)

and then

(|-) :: Constraint -> Constraint -> *

is a valid candidate to become a Category.

Moreover, PolyKinds + DataKinds finally enable us to write product and sum categories, make categories for natural transformations, and generally finally put Category to work. These were all disallowed by the previous simpler kind.

No code changes need be applied beyond permitting the type of Category to generalize and existing code continues to work.

This change actually could have been applied in 7.4.1.

-Edward Kmett

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries

Gmane