- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.7k
Haskell package guidelines
        Aditya Alok edited this page Apr 1, 2022 
        ·
        1 revision
      
    For Haskell packages we follow ArchLinux's policy to only provide dynamic libs and executables by default, except that there is no seperate ghc-pkg database for static packages.
Since there is no seperate ghc-pkg database for static packages, installing and using static libs should work out of the box, without any extra work from users side.
See also: https://wiki.archlinux.org/title/Haskell
Although Termux build system can automatically build Haskell packages, still following paramaters are available for overriding default.
Following variables store flags to be passed to termux-ghc-setup (specify them if overriding build steps):
- 
TERMUX_HASKELL_LLVM_BACKENDstores flags to enable LLVM Backend for archs other thani686.
- 
TERMUX_HASKELL_OPTIMISATIONstores flags for level of optimisation of package depending on whetherTERMUX_DEBUG_BUILDistrueorfalse.
GHC Cross compiler bins are available as following:
| Original name | Available as(during build) | 
|---|---|
| ghc | termux-ghc | 
| ghc-pkg | termux-ghc-pkg | 
| hsc2hs | termux-hsc2hs | 
| hp2ps | termux-hp2ps | 
- To preserve space and avoid installing ghc for host until necessary, we provide pre-compiled Setup.hsscript astermux-ghc-setup.
- It can handle simple,configureandmaketargets. Forcustomtarget we install ghc for host, compileSetup.hswith it and make it available astermux-ghc-setup.
- Do not use runhaskell Setup. All its functionality is made available bytermux-ghc-setup.
- Same naming scheme is used for ghc tools for on-device build. So, you do not have to handle anything specific for it.
- Currently we have no way to compile packages using template-haskell.