Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-12 Thread wren ng thornton
Wolfgang Jeltsch wrote: Am Donnerstag, 11. März 2010 00:37:18 schrieb wren ng thornton: Wolfgang Jeltsch wrote: Hello, some time ago, it was pointed out that generalized newtype deriving could be used to circumvent module borders. Now, I found out that generalized newtype deriving can even be

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-12 Thread Wolfgang Jeltsch
Am Donnerstag, 11. März 2010 00:37:18 schrieb wren ng thornton: > Wolfgang Jeltsch wrote: > > Hello, > > > > some time ago, it was pointed out that generalized newtype deriving could > > be used to circumvent module borders. Now, I found out that generalized > > newtype deriving can even be used to

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-10 Thread wren ng thornton
Wolfgang Jeltsch wrote: Hello, some time ago, it was pointed out that generalized newtype deriving could be used to circumvent module borders. Now, I found out that generalized newtype deriving can even be used to define functions that would be impossible to define otherwise. To me, this is s

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Ryan Ingram
I am pretty sure this problem is known, but you should add this code to the bug report: http://hackage.haskell.org/trac/ghc/ticket/1496 -- ryan On Tue, Mar 9, 2010 at 6:54 AM, Jan-Willem Maessen wrote: > > On Mar 9, 2010, at 5:53 AM, Max Cantor wrote: > >> Isn't this just an extension of the

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread John Meacham
On Tue, Mar 09, 2010 at 09:56:45AM -0500, Jan-Willem Maessen wrote: > It occurs to me to observe: if we give class constraints in data types some > force, and write: > > data Ord a => Set a = ...[internals go here]... > > Would this be enough to cue us that Set has a more interesting kind than j

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Wolfgang Jeltsch
Am Dienstag, 9. März 2010 11:53:14 schrieben Sie: > Isn't this just an extension of the notion that multi-parameter typeclasses > without functional dependencies or type families are dangerous and allow > for type-naughtiness? Multi-parameter typeclasses are dangerous? It’s the first time I hear t

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Wolfgang Jeltsch
Am Dienstag, 9. März 2010 15:54:16 schrieb Jan-Willem Maessen: > On Mar 9, 2010, at 5:53 AM, Max Cantor wrote: > > Isn't this just an extension of the notion that multi-parameter > > typeclasses without functional dependencies or type families are > > dangerous and allow for type-naughtiness? > >

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Jan-Willem Maessen
On Mar 9, 2010, at 5:26 AM, Simon Peyton-Jones wrote: > ... > Stephanie Weirich, Steve Zdancewic, Dimitrios Vytiniotis and I have been > working hard on a development of the FC intermediate language, and hence of > the source language, that will close this (embarrassing) loophole, and allow > s

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Jan-Willem Maessen
On Mar 9, 2010, at 5:53 AM, Max Cantor wrote: > Isn't this just an extension of the notion that multi-parameter typeclasses > without functional dependencies or type families are dangerous and allow for > type-naughtiness? I wondered the same thing, but came up with an analogous problematic

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Max Cantor
Isn't this just an extension of the notion that multi-parameter typeclasses without functional dependencies or type families are dangerous and allow for type-naughtiness? On Mar 9, 2010, at 5:45 AM, Wolfgang Jeltsch wrote: > Hello, > > some time ago, it was pointed out that generalized newt

RE: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Simon Peyton-Jones
| some time ago, it was pointed out that generalized newtype deriving could be | used to circumvent module borders. Now, I found out that generalized newtype | deriving can even be used to define functions that would be impossible to define | otherwise. To me, this is surprising since I thought th

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Wolfgang Jeltsch
Am Dienstag, 9. März 2010 07:24:35 schrieb Steffen Schuldenzucker: > On 03/08/2010 10:45 PM, Wolfgang Jeltsch wrote: > > The point is, of course, that such conversions are not only possible for > > binary operations but for arbitrary values and that these conversions are > > done by a single generi

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-08 Thread Steffen Schuldenzucker
On 03/08/2010 10:45 PM, Wolfgang Jeltsch wrote: > The point is, of course, that such conversions are not only possible for > binary operations but for arbitrary values and that these conversions are > done > by a single generic function conv. I don’t think it would be possible to > implement co

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-08 Thread Wolfgang Jeltsch
Am Montag, 8. März 2010 22:45:19 schrieb Wolfgang Jeltsch: > Hello, > > some time ago, it was pointed out that generalized newtype deriving could > be used to circumvent module borders. Now, I found out that generalized > newtype deriving can even be used to define functions that would be > imposs

[Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-08 Thread Wolfgang Jeltsch
Hello, some time ago, it was pointed out that generalized newtype deriving could be used to circumvent module borders. Now, I found out that generalized newtype deriving can even be used to define functions that would be impossible to define otherwise. To me, this is surprising since I thought