Live data from Hacker News

What I Wish I Knew When Learning Haskell

dev.stephendiehl.com

21–24 of 24 posts

Re: What I Wish I Knew When Learning Haskell

#21
post #19
post #5

Personally, I like to follow the mantra cabal is not a package manager . Because whenever I treat it like one, I get messed up in a bad way. I buy in to this argument[1] as to why it isn't. [1]: http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-...

I wonder if Haskell will ever get a package manager like Nix.(?)

Actually nix is a pretty awesome package manager for haskell. All my projects now have a default.nix and a shell.nix and I have this little snippet in emacs:

  (setq haskell-process-type 'ghci
      haskell-process-path-ghci "/home/ben/.nix-profile/bin/nix-shell"
      haskell-process-args-ghci '("-I" "." "shell.nix" "--pure" "--command" "cabal configure; cabal repl"))
This drops you into a nix shell with all the dependencies for the project you're working on present.

You can also (especially easy if you're using projectile) run compile with the command nix-shell -I . shell.nix --command "cabal configure; cabal build" and that give you a nice list of type errors in your current project.

Repeatable builds with no cabal hell. In the words of disney: "I'm never going back, the past is in the past!"

Re: What I Wish I Knew When Learning Haskell

#23
post #2

I wish I knew what changed from the last time this was posted 2 months ago: https://news.ycombinator.com/item?id=7637278 Also I believe last time Stephen was surprised folks had gotten a hold of content on his "pre-prod" domain (e.g. http://dev.stephendiehl.com/ ), because he was still working on that post, before it was ready. I like points as much as the next person, but maybe "pre-release" content should not be po…

It's a good article, but has had three major discussions in about the last year:

https://hn.algolia.com/?q=What+I+Wish+I+Knew+When+Learning+H...

So I think this one counts as a dupe, even though the content has been augmented.

Re: What I Wish I Knew When Learning Haskell

#24
post #19

Earlier quoted context omitted.

I wonder if Haskell will ever get a package manager like Nix.(?)

Actually nix is a pretty awesome package manager for haskell. All my projects now have a default.nix and a shell.nix and I have this little snippet in emacs: (setq haskell-process-type 'ghci haskell-process-path-ghci "/home/ben/.nix-profile/bin/nix-shell" haskell-process-args-ghci '("-I" "." "shell.nix" "--pure" "--command" "cabal configure; cabal repl")) This drops you into a nix shell with all the dependencies for…

This is awesome! I have nix setup but need to fix some efi boot stuff :/

As soon as I do though, I'll be stealing this emacs snippet and Haskell/Nix development technique.

Post reply on HN