A collection of libraries patched for cross compilation to ARM
root
- Cabal
- Chart
- JuicyPixels
- X11
- acid-state
- aeson
- alex
- bench
- bytes
- cabal-install
- clock
- cmark
- code-page
- comonad
- darcs
- digest
- distributive
- entropy
- foundation
- happy
- hinotify
- hsc2hs
- hslua
- http-api-data
- http-client
- http-client-tls
- idris
- intervals
- keter
- language-javascript
- lens
- madlang
- math-functions
- memory
- network
- old-time
- optparse-applicative
- pandoc
- parsers
- profunctors
- purescript
- recursion-schemes
- regex-pcre-builtin
- regex-posix
- semigroupoids
- simple-sendfile
- skein
- spock-example
- statistics
- stm-chans
- system-filepath
- terminal-size
- terminfo
- trifecta
- tweet-hs
- uniplate
- unix-compat
- unix-time
- uri-bytestring
- wai-app-static
- weeder
- wordchoice
- zip-archive
- zlib
- LICENSE
- README.md
- cabal.project
Patched haskell libraries
These are a set of haskell libraries that I patched to work with ghc 8.2.0 and Cabal 2.1.0.0; some of them were also patched so as to work when cross-compiling for ARM.
Stuff that works
- [x] madlang
- [x] tweet-hs
- [x] pandoc
- [x] keter
- [x] cabal-install
- [ ] idris
- [ ] purescript
- [x] spock
- [ ] yesod
- [x] happy
- [x] alex
- [x] hsc2hs
Use
To build them (I used cabal-install 2.1.0.0):
cabal new-build --allow-newer --with-ghc=ghc-8.0.2 --with-ghc-pkg=ghc-pkg-8.0.2
Cross-compiling
The command I use for cross-compiling is:
cabal new-build --allow-newer --with-ghc=arm-unknown-linux-gnueabihf-ghc-8.2.0.20170404 --with-ghc-pkg=arm-unknown-linux-gnueabihf-ghc-pkg-8.2.0.20170404 --constraint="cryptonite -integer-gmp" --ghc-options="-opta-mcpu=cortex-a53" --hsc2hs-options=-x --configure-option='--host=x86_64-unknown-linux-gnu' --configure-option='--build=arm-unknown-linux-gnueabihf' --extra-lib-dirs="$PATH_TO_ZLIB" --extra-include-dirs="$PATH_TO_ZLIB"
You can test this out on keter
, for instance. Do be forewarned that some of the libraries had template haskell stripped out, so expect the same behavior but not always the same functions available.