Re: Records in Haskell: Explicit Classy Records

2012-04-23 Thread Strake
On 22/04/2012, AntC anthony_clay...@clear.net.nz wrote: Matthew Farkas-Dyck strake888 at gmail.com writes: I made another proposal for records in Haskell, meant to solve just the namespace problem, and no more. http://hackage.haskell.org/trac/ghc/wiki/Records/ExplicitClassyRecords Thanks

Re: default instance for IsString

2012-04-23 Thread Yitzchak Gale
Jeremy Shaw wrote: I have often wished for something like: {-# LANGUAGE StringLiteralsAs Text #-} where all string literals like: f = foo would be translated to: f = (fromString foo :: Text) Agreed, I would also really like this. I find that OverloadedStrings is too general

Re: default instance for IsString

2012-04-23 Thread Greg Weber
On Mon, Apr 23, 2012 at 9:58 AM, Yitzchak Gale g...@sefer.org wrote: Jeremy Shaw wrote: I have often wished for something like:     {-# LANGUAGE StringLiteralsAs Text #-} where all string literals like:     f = foo would be translated to:     f = (fromString foo :: Text) Agreed, I would

Re: default instance for IsString

2012-04-23 Thread Greg Weber
The defaulting is very good for most use cases, however I am discovering it won't default when I try to build up a list or tuple. This does not work: {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleInstances #-} module Default (noDefault) where import

Re: default instance for IsString

2012-04-23 Thread J. Garrett Morris
On Mon, Apr 23, 2012 at 9:58 AM, Yitzchak Gale g...@sefer.org wrote: In addition, OverloadedStrings is unsound. No. OverloadedStrings treats string literals as applications of fromString to character list constants. fromString can throw errors, just like fromInteger; this is no less sound than

Re: default instance for IsString

2012-04-23 Thread Bas van Dijk
On 23 April 2012 20:34, J. Garrett Morris jgmor...@cs.pdx.edu wrote: On Mon, Apr 23, 2012 at 9:58 AM, Yitzchak Gale g...@sefer.org wrote: In addition, OverloadedStrings is unsound. No.  OverloadedStrings treats string literals as applications of fromString to character list constants.