A
A
afiskon2011-06-13 15:42:56
Haskell
afiskon, 2011-06-13 15:42:56

Haskell and static linking of modules?

Has anyone managed to statically link modules like Regex.PCRE or Graphics.UI.WX? In the case of wxHaskell, the program itself turns out to be 15 megabytes, plus you need to carry a 10 MB library with it. A similar program in C++ will weigh only 1-2 MB ( ten times less!), so I would really like to "lose excess weight." I use GHC, tried various flags, googled - nothing helped.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wiz, 2020-12-29
@wiz

In the new cabal and stack, you can use the GHC flag --split-sections(or the corresponding fields in the project configs).
Moderately old GHCs have an outdated counterpart - split-objs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question