Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8829891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:56:22+00:00 2026-06-14T07:56:22+00:00

(My problem is about distribute binaries without haskell-platform, ghc, cabal, …) I need deploy

  • 0

(My problem is about distribute binaries without haskell-platform, ghc, cabal, …)

I need deploy a well cabal formed haskell application (a Yesod scaffolded) but I have disk space restrictions.

GHC size is about 1Gbytes, store all cabal source code, packages, etc… require more disk space, etc…

Obviously, haskell-platform, ghc, … is about development (not deployment).

In my specific case I can generate

cabal clean && cabal configure && cabal build

and run succesfully (some like)

./dist/build/MyEntryPoint/MyEntryPoint arg arg arg

But, what about dependencies?, how move it to production environment? (together my “dist” compilation)

Can I put binary dependencies without cabal? How?

Thank you very much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:56:23+00:00Added an answer on June 14, 2026 at 7:56 am

    By default, ghc uses static linking of the Haskell libraries. So the resulting binary is independent of the Haskell ecosystem. If your program does not need any data files, just copy the binary out from ./dist/build/MyEntryPoint/MyEntryPoint to the host

    If you also have data files (e.g templates, images, static html pages) that are referenced by the binary using the data path finding logic of Cabal, you can use Setup copy as follows (using happy as an example):

    /tmp/happy-1.18.10 $ ./Setup configure
    Warning: defaultUserHooks in Setup script is deprecated.
    Configuring happy-1.18.10...
    /tmp/happy-1.18.10 $ ./Setup build
    Building happy-1.18.10...
    Preprocessing executable 'happy' for happy-1.18.10...
    [ 1 of 18] Compiling NameSet          ( src/NameSet.hs, dist/build/happy/happy-tmp/NameSet.o )
    [..]
    [18 of 18] Compiling Main             ( src/Main.lhs, dist/build/happy/happy-tmp/Main.o )
    Linking dist/build/happy/happy ...
    /tmp/happy-1.18.10 $ ./Setup copy --destdir=/tmp/to_be_deployed/
    Installing executable(s) in /tmp/to_be_deployed/usr/local/bin
    /tmp/happy-1.18.10 $ find /tmp/to_be_deployed
    /tmp/to_be_deployed
    /tmp/to_be_deployed/usr
    /tmp/to_be_deployed/usr/local
    /tmp/to_be_deployed/usr/local/bin
    /tmp/to_be_deployed/usr/local/bin/happy
    /tmp/to_be_deployed/usr/local/share
    /tmp/to_be_deployed/usr/local/share/doc
    /tmp/to_be_deployed/usr/local/share/doc/happy-1.18.10
    /tmp/to_be_deployed/usr/local/share/doc/happy-1.18.10/LICENSE
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/GLR_Lib-ghc-debug
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/GLR_Lib-ghc
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/GLR_Lib
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/GLR_Base
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-arrays-coerce-debug
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-arrays-ghc-debug
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-arrays-debug
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-arrays-coerce
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-arrays-ghc
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-arrays
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-coerce
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate-ghc
    /tmp/to_be_deployed/usr/local/share/happy-1.18.10/HappyTemplate
    /tmp/happy-1.18.10 $ rsync -rva /tmp/to_be_deployed/ production.host:/
    [..]
    

    If you do not want to install into /usr/local then pass the desired prefix to Setup configure.

    This works well if the target host is otherwise similar (same versions of C libraries such as gmp and ffi installed). If you also need to statically link some C library, see the question that hammar has linked in his comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a problem about onbeforeunload recently that I need to pop up a
I need to distribute an application on Google Play. However, my application has a
I have a little problem about the sort direction of a specific column in
I have a great problem about the rotation in three.js I want to rotate
I have a problem about casting a CallableStatement to OracleCallableStatement . It gives ClassCastException
I have a little problem about Google Maps. I'm using Geocoding (xml) for getting
I have a problem about div position relative alignment. I want the second div
I have a little problem about using jQuery (I really do not know jQuery
I get a problem about returning phone keypads. For instance, if I input 1-80-0Apple,
i'm having a weird problem about copying with Xcopy. I'm using Windows Server 2008

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.