Live data from Hacker News

GHC 8.0.1 is available

ghc.haskell.org

21–30 of 38 posts

Re: GHC 8.0.1 is available

#21
post #4

* The introduction of the DuplicateRecordFields language extension, allowing multiple record types to declare fields of the same name Holy hell. Is this the end of the Haskell record field names problem? One of Haskell's great miseries has been that, because record field accessors are declared globally, you couldn't define records with fields of the same names: data Person = Person { name :: String, age :: Int } data…

As a recent beginner to Haskell, are there other big outstanding issues with the GHC to watch out for?

There was a large (but informal) survey done on /r/haskell (one of the largest Haskell communities) last month about "Why Haskell sucks". The results were collated into a presentation linked below. It's a very detailed review that covers just about everything "bad" about Haskell (though I think it views each issue rather optimistically).

Presentation: https://secure.plaimi.net/~alexander/tmp/pres/2016-05-11-why...

EDIT: Also, if you find the colors on the slide show intolerable, the page source is well-formatted and readable. Content starts at line 200.

Re: GHC 8.0.1 is available

#22

* The introduction of the DuplicateRecordFields language extension, allowing multiple record types to declare fields of the same name Holy hell. Is this the end of the Haskell record field names problem? One of Haskell's great miseries has been that, because record field accessors are declared globally, you couldn't define records with fields of the same names: data Person = Person { name :: String, age :: Int } data…

I actually quite like this limitation. It encourages you to separate data structures into their own modules and use qualified names to access their member data, which I think is often the right idea.

Re: GHC 8.0.1 is available

#23
post #4

Earlier quoted context omitted.

As a recent beginner to Haskell, are there other big outstanding issues with the GHC to watch out for?

There was a large (but informal) survey done on /r/haskell (one of the largest Haskell communities) last month about "Why Haskell sucks". The results were collated into a presentation linked below. It's a very detailed review that covers just about everything "bad" about Haskell (though I think it views each issue rather optimistically). Presentation: https://secure.plaimi.net/~alexander/tmp/pres/2016-05-11-why... ED…

about the edit: you can just disable js and read it as a markdown source if you like.

Re: GHC 8.0.1 is available

#24
post #16
post #11

Earlier quoted context omitted.

Hmmm, I've noticed this in the PDF output but haven't yet seen anything similar in the HTML output. Could you point me at a specific example?

Rebuilding the latest release now, was referring to previous RCs. It may very well be just the PDF output. I'll check Sunday and report here.

One example: 3.2.8, the second code box about hsc2hs.

HTML of the same section is fine.

There must be a way to fix this in the pipeline. I mean, you cannot find each and all and try to manually adjust the text.

Re: GHC 8.0.1 is available

#25

Earlier quoted context omitted.

Record issue is more than just an inconvenience. I consider it a genuine issue. Having to add 2 lines of import (unqualified name of the type and qualified record module to get the accessors) for every record type you use is a pain. When you work with data-heavy code this ends up hundred of lines of import (see amazonka packages for instance where each request has a record type).

Even if it doubles the number of import statements, I still don't see how that is more than an inconvenience. Having said that, the record issue alone is not the only reason to need qualified imports (as they are also used to resolve collisions of functions that are not auto generated from records). What would be nice is if Haskell would allow any name collision so long as it could use the type system to disambiguate…

> What would be nice is if Haskell would allow any name collision so long as it could use the type system to disambiguate the function.

That would need very careful design to work well with type inference, I suppose?

Re: GHC 8.0.1 is available

#26
post #22

* The introduction of the DuplicateRecordFields language extension, allowing multiple record types to declare fields of the same name Holy hell. Is this the end of the Haskell record field names problem? One of Haskell's great miseries has been that, because record field accessors are declared globally, you couldn't define records with fields of the same names: data Person = Person { name :: String, age :: Int } data…

I actually quite like this limitation. It encourages you to separate data structures into their own modules and use qualified names to access their member data, which I think is often the right idea.

If only Haskell would be more like OCaml in this regard, and would allow you to eg nest module, instead of saying "One File = One Module".

Re: GHC 8.0.1 is available

#27
post #26
post #22

Earlier quoted context omitted.

I actually quite like this limitation. It encourages you to separate data structures into their own modules and use qualified names to access their member data, which I think is often the right idea.

If only Haskell would be more like OCaml in this regard, and would allow you to eg nest module, instead of saying "One File = One Module".

It goes in that direction with https://ghc.haskell.org/trac/ghc/wiki/Backpack

Re: GHC 8.0.1 is available

#28
post #25

Earlier quoted context omitted.

Even if it doubles the number of import statements, I still don't see how that is more than an inconvenience. Having said that, the record issue alone is not the only reason to need qualified imports (as they are also used to resolve collisions of functions that are not auto generated from records). What would be nice is if Haskell would allow any name collision so long as it could use the type system to disambiguate…

> What would be nice is if Haskell would allow any name collision so long as it could use the type system to disambiguate the function. That would need very careful design to work well with type inference, I suppose?

Idris[1] already has a working system for this, and it's type system is more complicated (it has much more support for dependent typing). It allows this principle for regular function names as well.

[1]: http://www.idris-lang.org/

Re: GHC 8.0.1 is available

#29

Earlier quoted context omitted.

You can't link glibc statically for technical reasons. In some sense, this is the only problem I had. If there was a way to use an alternate libc, it would probably eliminate this issue entirely.

I know there was some work to do a musl and or alpine Linux build. Or both, probably easy to google. Also I'm moderately certain that ghc on FreeBSD and Mac don't need glibc ;)

Targeting musl works out of the box with the musl toolchain and once you have a musl build you can build another ghc with that one with musl as the host.

I haven't tried building a statically linked musl ghc, and I honestly don't know how, but it'd be great to figure out. Any pointers? Speaking of static musl builds, that can be a good choice to create a single bindist of GHC that works on CentOS, Debian, Alpine, and any other Linux distro. Seeing how Docker defaults to Alpine images, it could be beneficial in that regard as well.

Re: GHC 8.0.1 is available

#30
post #4

* The introduction of the DuplicateRecordFields language extension, allowing multiple record types to declare fields of the same name Holy hell. Is this the end of the Haskell record field names problem? One of Haskell's great miseries has been that, because record field accessors are declared globally, you couldn't define records with fields of the same names: data Person = Person { name :: String, age :: Int } data…

As a recent beginner to Haskell, are there other big outstanding issues with the GHC to watch out for?

Here are some useful Haskell extensions:

http://sdegutis.github.io/2015-03-17/haskell-extensions/

Post reply on HN