Skip to content

Questions about Haskell Aliases article #52

@tomjaguarpaw

Description

@tomjaguarpaw

Hi Veronika,

I have some questions about your excellent Haskell Aliases article:

  • alias cdoc="cabal haddock --enable-documentation"

    What happens if you don't use --enable-documentation here? It seems strange to me that Haddock has this option because I thought its sole purpose was to build documentation!

  • I use build + cp the executable

    How do you get the path of the built executable so you can cp it? The trick I know is cabal exec --verbose=0 --offline sh -- -c 'which <binary name>', but that's rather messy.

  • I personally don't experience any issues with the GHC environment files

    It would be interesting to know what problems, if any, others experience with GHC environment files. I'd be quite happy to turn on this option but I don't know what problems it might cause!

  • As I do not own a powerful laptop, sometimes it is too hard for it to build such projects so that it freezes

    I have a similar problem. My laptop has 4GB of RAM and regularly becomes sluggish due to builds or even incapacitated by swapping. I like to do the following to limit the time, memory and IO resources that builds can consume.

    MEM=$[1000 * 1000]; ulimit -d $MEM; ulimit -m $MEM; ulimit -v $MEM
    ionice -c idle nice -n 19 cabal build
    
  • these are completely reasonable use-cases for installation

    Both of these are cases of installing executables rather than libraries. Would it be more precise to say never cabal install libraries and only cabal install executables?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions