Skip to main content

Haskell Users Group (unofficial) reshared this.


!Haskell Users Group (unofficial)
Has anyone successfully cross-compiled a #Haskell project to .exe from a *NIX system (preferably Debian)? I've casually looked into it in the past, but never given it a serious try.
in reply to Jonathan Lamothe Haskell Users Group (unofficial) reshared this.

I'm of the understanding that it can perhaps be done with Haskell.nix?

Edit: typo

This entry was edited (2 weeks ago)


I hate it when I make an official release of a program with an ugly snippet of code that I can't figure out how to write more cleanly, only to come up with a solution 10 minutes after pushing the release. I just make the change in the dev branch so it gets incorporated into the next version.

In my defense, the thing I was overlooking was that #Haskell's Maybe type is an instance of Foldable. It's not the kind of data type that exactly screams Foldable, is it?

Side note: I should use Hoogle's search by type signature feature more frequently. I needed a function that looked like this: Monad m => (a -> m ()) -> Maybe a -> m (), which is literally just mapM_.

in reply to Jonathan Lamothe

I don't use emacs, but it works well in Neovim and VS Codium. I've heard it's better in emacs than in vim, but haven't verified that.

Haskell Users Group (unofficial) reshared this.


!Haskell Users Group (unofficial)
So, I created a #Haskell #TUI program using brick. I wanted to have it support cursor keys, as well as vim and Emacs-style cursor movement, but for whatever reason I can't get it to register C-n and C-p keypresses. C-f and C-b worked fine though.

Anyone have any ideas as to why this might be?

The repository is at: git.fingerprintsoftware.ca/jla…

reshared this



TIL:
data Foo = Bar { val :: Int } | Baz { val :: Int }

is valid #Haskell. I wouldn't have thought you could define val twice like that.


GHCup: Because #Haskell apparently needs a package manager for its various package management systems.


I'm an idiot.

I was trying to install #Haskell on a machine and thought the installer was taking a really long time. In my defense, the last line of text was:

Installation may take a while.

It sat at this stage for over an hour while I did other stuff, because I hadn't bothered to read the previous line:
Press ENTER to proceed or ctrl-c to abort.
in reply to Jonathan Lamothe

It's not you, it's bad design. The prompt should always be the final line of output.


I wonder how many times I'm going to have to re-learn how to use lenses in #Haskell.


Did #Haskell at some point make defining a module without an explicit list of names to be exported illegal? It's yelling at me when I try to do this now.
in reply to Jonathan Lamothe

I noticed a while ago that they added a warning for that but it would still compile, but I wouldn't be completely surprised if it were an error now.
It's actually annoying in ghci because the warning gets repeated every time you define something.
in reply to Jeremy List

@Jeremy List No, it's still just a warning. I was using the --pedantic flag though (which turns warnings into errors).


Okay, I'll admit it. Using #Haskell to talk to an #SQL database is not my favourite thing.

Programming Feed reshared this.

in reply to Boyd Stephen Smith Jr.

@Boyd Stephen Smith Jr. It's not so much the SQL part that's the irritating bit. It's that it doesn't really mesh super well with "the Haskell way of doing things".
in reply to Jonathan Lamothe

@BoydStephenSmithJr understandable. There's always a tension between "pleasant for the Haskeller" and "pleasant for the DBA" (or general SQL knower). We have the same problem at work (we sacrificed our DBA and used flora.pm/packages/@hackage/hpq… and its eDSL)

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.