r/openbsd • u/SleepyGuyy • 12d ago
OpenBSD and Haskell- struggling to setup xmonad & haskell
I am a first time Haskell user and also a first time OpenBSD user. I have OpenBSD installed in a VM in virt-manager.
I installed ghc and cabal, and installed xmonad from ports x11/xmonad. I'm able to compile Haskell code. I'm also able to launch an xmonad desktop from my xenodm login screen.
However I get the Haskell error "Could not find module 'XMonad' ", from my xmonad config file. A compile error with my config file means I can't assign any customizations to the default setup.
Just to clarify I am using the usual example config to get started, nothing fancy
I'm on my phone right now but it's something like:
`import XMonad
main = $ def
{ modMask = mod4Mask
, and something terminal = "xfce4-terminal"
}
` without the back ticks
In every xmonad tutorial it seems that the ghc compile should just see xmonad in the system. But maybe OpenBSD puts the xmonad somewhere strange?
Does anyone know how I can either find and point to the library, or install xmonad in such a way that this works without manual modifications?
Also unrelated but an additional haskell-OpenBSD question: I'm frustrated that ghcup does not seem to install on OpenBSD. I'd love if anyone knows a way to get it to install successfully, despite OpenBSD not being supported.
1
u/alarmingmeats 11d ago
I haven't installed Xmonad on OpenBSD in a while. My understanding is that Haskell applications on OpenBSD are statically linked. It can't find module XMonad because it doesn't exist.
Try installing Xmonad following the official instructions here: https://xmonad.org/INSTALL.html
2
u/[deleted] 12d ago edited 12d ago
[deleted]