Skip to content

Will Haskell on Arch work anytime soon?

Removed before it was archived.

0 points14 comments
Open on Reddit
About this post
Posted
Archived
Deleted on
Score
0 · 100% up
Kind
Text
ID
cyd4dp

19 comments

Haskell on arch have been working poorly for a long time. All haskell packages are dynamically linked and have no documentation. This arguably makes some sense from a maintainer POV if your target audience is people who use programs with Haskell dependencies, but it's not how Haskell is intended to be distributed. It confuses GHC and Haskell developers are lost in a nonstandard GHC distribution that complains about missing files, with little or no documentation.

The biggest problem is that the normal Arch way is not very well suited for distributing a Haskell environment. Haskell does things quite differently, and so the most pragmatic way would be to make exceptions for Haskell and package it in the way that Haskell is meant to be distributed. In my opinion, the current Haskell packaging is so Arch specific that it can in no way be called KISS. It's very confusing for people that want to try Haskell without also learning a complicated build system like Stack or Cabal. An even bigger problem is the fact that if you do use Arch's GHC to build a program, it will be dynamically linked and the next update will break it.

I have full respect for that Felix does the best that he can under the circumstances, he deserves no crap about this. He maintains Haskell on Arch in the way that works best for him and in a way that makes programs written in Haskell available to end users. None of the current TU's use Haskell daily, or they don't have time. For the situation to improve, Haskell needs to be maintained by people who use and know Haskell.

I've been thinking of starting a project to maintain a custom repository for Haskell that packages things differently. Unfortunately I haven't had time to do that. If anyone is interested, please reach out to me and maybe we could start spitballing ideas.

6 points

I never get haskell to work

That's a bit vague. what does not work?

Are there plans to fix haskell packages?

Again what is needed to be fixed?

Don't get me wrong, not trying to be snarky or something but it works for me. I never had any problems with the repo packages and pacman -Q | grep haskell | wc -l tells me I have 220 installed.

5 points
unknown author1 hidden

Deleted before we saved it.

0 points

How did you install ghc? ghcup is not the repo's ghc!

What happens when you run `/usr/bin/ghc test.hs` ?

​

Edit:
I have installed Haskell from the repo and have no problem at all:

denvercoder9> cat test.hs
main = putStrLn "Hello, World!"
denvercoder9> ghc -dynamic test.hs
denvercoder9> ./test
Hello, World!
denvercoder9>
5 points

I have never had a problem using stackage to get the appropriate ghc/package versions..what exactly doesn't work? Are you developing something or trying to build/run another Haskell application and so require specific versions of things?

2 points
unknown author

Deleted before we saved it.

0 points

https://www.reddit.com/r/haskell/comments/8vu73f/haskell_on_arch/

Looks like not much changed over the year. Top comment states:

The only important advice is: Don't install anything haskell-related via

pacman

​

edit: Compile with -dynamic to resolve the problem. In your case:

ghc -dynamic test.hs
1 points

why? I installed Haskell via pacman and everything just works!

5 points

I had some wierd errors because of wrong file extension (hc instead of hs). Now it works. Thanks for pointing. Edited.

2 points

Do you develop with haskell? The repo packages and compiler don't play well with anything else. You can probably compile something if it only needs repo packages and they happen to be the right version and you don't mind the reduced performance from dynamic linking.

1 points

Well, yes. When all of the system haskell packages are dynamically compiled, it does help to dynamically compile said project.

As for the reasons: https://www.reddit.com/r/linux/comments/9emwtu/arch_linux_ama/e5qssdz/?context=3

3 points

IIRC there's actually no combination of haskell programs that take up less space now than they would have before, because in practice the statically linked libraries didn't result in much larger binaries. Pandoc for instance lost like 5 megs of binary size but now has ~500mg of dependencies.

1 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.