Re: Type operators in GHC

2012-01-18 Thread Edward Kmett
I can live with it and I probably have as many packages as anyone that will be broken by it. =/ Things like http://hackage.haskell.org/packages/archive/categories/0.58.0.5/doc/html/src/Control-Category-Cartesian-Closed.html will need a pretty invasive rewrite, but the simplicity is worth it, an

Re: Records in Haskell

2012-01-18 Thread Matthew Farkas-Dyck
On 18/01/2012, Simon Peyton-Jones wrote: > | > Has *is* a type class. It can be used and abused like any other. > | > Record members with the same key ought to have the same semantics; the > | > programmer must ensure this, not just call them all "x" or the like. > | > > | > Weak types these are n

Re: Records in Haskell

2012-01-18 Thread Matthew Farkas-Dyck
On 18/01/2012, Gábor Lehel wrote: > (I *am*, however, uncomfortable with using straight-up type level > strings, without consideration for any particular alternative. If > nothing else they should at least be opaque symbols which can be > passed around and used in the supported contexts but not ma

Re: named pipes

2012-01-18 Thread Albert Y. C. Lai
Main.hs does not open fromA at all. (fromA_IO is dead code.) This causes fifo2.c to be hung whenever it opens fromA. From the man page of mkfifo(3) on Linux: "Opening a FIFO for reading normally blocks until some other process opens the same FIFO for writing, and vice versa. See fifo(7) for n

Re: Records in Haskell

2012-01-18 Thread Johan Tibell
On Wed, Jan 18, 2012 at 9:43 AM, Johan Tibell wrote: > On Mon, Jan 16, 2012 at 2:32 AM, Simon Peyton-Jones > wrote: >> Johan, if you are serious, do add a new wiki page to describe the design. > > I haven't thought trough the issues enough to describe the design just > yet. At the moment I prefer

Re: Type operators in GHC

2012-01-18 Thread Iavor Diatchki
Hello, My preference would be to change the behavior of the "TypeOperator" flag. Here is my reasoning: * Having two operators with slightly different meanings would be very confusing, not just for beginners but for everyone. * The two behaviors are not compatible in the sense that they can't

named pipes

2012-01-18 Thread Serge D. Mechveliani
Dear GHC team, I am testing the IO operations of GHC with the Unix named pipes (in ghc-7.01 under Debian Linux). In the below example, the pipe pair are created by > mkfifo toA > mkfifo fromA, `main' in Main.hs opens toAfor writing,

Re: Records in Haskell

2012-01-18 Thread Johan Tibell
On Mon, Jan 16, 2012 at 2:32 AM, Simon Peyton-Jones wrote: > Johan, if you are serious, do add a new wiki page to describe the design. I haven't thought trough the issues enough to describe the design just yet. At the moment I prefer to discuss a little more to gain some more clarity/insight. >

Re: Type operators in GHC

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 10:42, Brent Yorgey wrote: > I'm not sure at this point which way I would lean on the issue. > Having infix type constructors that don't have to start with : is > something I would like, too. But I just thought I would point out > that code like tc192 is not as esoteric a

Re: Records in Haskell

2012-01-18 Thread Isaac Dupree
On 01/17/2012 03:59 AM, Yitzchak Gale wrote: and whenever E imports M qualified without an import list, as in: import qualified M as Q then the following implied imports would be added to E: import qualified M.T as Q.T import qualified M.S as Q.S Rather, those should be added whether or not

Re: Type operators in GHC

2012-01-18 Thread Brent Yorgey
On Wed, Jan 18, 2012 at 02:27:21PM +, Simon Peyton-Jones wrote: > Dear GHC users > > As part of beefing up the kind system, we plan to implement the "Type > operators" proposal for Haskell Prime > http://hackage.haskell.org/trac/haskell-prime/wiki/InfixTypeConstructors > > GHC has had type o

Type operators in GHC

2012-01-18 Thread Simon Peyton-Jones
Dear GHC users As part of beefing up the kind system, we plan to implement the "Type operators" proposal for Haskell Prime http://hackage.haskell.org/trac/haskell-prime/wiki/InfixTypeConstructors GHC has had type operators for some kind, so you can say data a :+: b = Left a | Right b but

RE: Records in Haskell

2012-01-18 Thread Simon Peyton-Jones
| > Has *is* a type class. It can be used and abused like any other. | > Record members with the same key ought to have the same semantics; the | > programmer must ensure this, not just call them all "x" or the like. | > | > Weak types these are not. The selector type is well-defined. The value | >

Re: Records in Haskell

2012-01-18 Thread Gábor Lehel
On Wed, Jan 18, 2012 at 1:09 PM, Matthew Farkas-Dyck wrote: > On 18/01/2012, Greg Weber wrote: >> On Fri, Jan 13, 2012 at 8:52 PM, Simon Peyton-Jones >> wrote: >> >>> >>> But, the Has constraints MUST exist, in full glory, in the constraint >>> solver.  The only question is whether you can *abstr

Re: Records in Haskell

2012-01-18 Thread Matthew Farkas-Dyck
On 18/01/2012, Greg Weber wrote: > On Fri, Jan 13, 2012 at 8:52 PM, Simon Peyton-Jones > wrote: > >> >> But, the Has constraints MUST exist, in full glory, in the constraint >> solver. The only question is whether you can *abstract* over them. >> Imagine having a Num class that you could not abst

RE: PolyKinds: couldn't match kind `BOX' against `*'

2012-01-18 Thread Simon Peyton-Jones
That's odd. Please do create ticket, thank you! From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users-boun...@haskell.org] On Behalf Of Reiner Pope Sent: 18 January 2012 04:44 To: glasgow-haskell-users@haskell.org Subject: PolyKinds: couldn't match kind `BOX' against `*'

Re: Composition operator [was: Re: Records in Haskell]

2012-01-18 Thread Christian Maeder
ghc could start warning about "missing spaces around dot" immediately, i.e. in the next release. In later releases this can be made an error and then (field) names starting with a dot can be introduced as postfix functions. I think only a space between "." and a following lowercase letter is