Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-12 Thread David Banas
Ah, so is the idea, then, to use *op()* when `n` wasn't actually constructed formally, but rather assembled by the user, so as to match the type of the accessor function normally supplied as the argument to the constructor? On 6/7/2013 4:51 PM, Tom Ellis wrote: On Fri, Jun 07, 2013 at

[Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread David Banas
Hi All, Referring to the following, which is taken from the *Control.Newtype *documentation page: op :: Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) - n -

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Roman Cheplyaka
* David Banas capn.fre...@gmail.com [2013-06-07 07:08:19-0700] Hi All, Referring to the following, which is taken from the *Control.Newtype *documentation page: op :: Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) -

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Tom Ellis
On Fri, Jun 07, 2013 at 07:08:19AM -0700, David Banas wrote: op :: Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) - n - oSourcehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/src/Control-Newtype.html#op

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Joe Q
The phantom parameter solves the same problem as scoped type variables. Granted, if you find yourself in that kind of polymorphic soup you have deeper problems... On Jun 7, 2013 2:53 PM, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: On Fri, Jun 07, 2013 at 07:08:19AM -0700, David

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Tom Ellis
On Fri, Jun 07, 2013 at 04:05:09PM -0400, Joe Q wrote: The phantom parameter solves the same problem as scoped type variables. Granted, if you find yourself in that kind of polymorphic soup you have deeper problems... I don't understand this. Scoped type variables are used when you want to

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Joe Quinn
On 6/7/2013 4:51 PM, Tom Ellis wrote: On Fri, Jun 07, 2013 at 04:05:09PM -0400, Joe Q wrote: The phantom parameter solves the same problem as scoped type variables. Granted, if you find yourself in that kind of polymorphic soup you have deeper problems... I don't understand this. Scoped type