kkiermasz
kkiermasz

Reputation: 463

How to run brick application?

I need to install bhoogle. I've already installed cabal by stack install hoogle command and I've created default database. I don't know how to run application with the GUI. I have bhoogle repo downloaded on my Mac and stack ghci Setup nor stack ghci App/Main doesn't work. No GUI is being displayed. I think that all the requirements are satisfied, but the method of running the app is wrong.

Upvotes: 0

Views: 127

Answers (2)

MikaelF
MikaelF

Reputation: 3644

Although your solution works, I don't think it's ideal, since the point of having entrypoints defined in a .cabal file is so that you can let stack do the grunt work (navigating the directories to the main hs file).

If you want to install bhoogle system-wide, as its purpose suggests, then you can stack install bhoogle from anywhere outside of a stack directory.

If, however, you want to compile and run it without installing it, bhoogle uses make, so you can build it with make and then fetch the executable from the .stack-work directory. Alternatively, from stack 1.9.1, you can use stack run, an analog to cabal run. For earlier versions of stack, you can use stack build --exec bhoogle.

Upvotes: 1

kkiermasz
kkiermasz

Reputation: 463

The key was to run it using the following command: stack App/Main.hs.

Upvotes: 0

Related Questions