├── .tmpl ├── fastly-logo.png └── index.html ├── Item.dhall ├── README.md ├── Section.dhall ├── files.dhall ├── patches ├── comonad-5.0.4.patch ├── distributive-0.6.patch ├── http-api-data-0.4.patch ├── jsaddle-0.9.5.0.patch ├── lens-4.17.patch ├── primitive-0.6.4.0.patch ├── semigroupoids-5.3.1.patch ├── semigroupoids-5.3.2.patch ├── servant-0.15.patch └── zlib-0.6.1.2.patch ├── scripts ├── cross-ghc └── make-patch.sh └── template.dhall.html /.tmpl/fastly-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobilehaskell/hackage-overlay/aff24033d2d52a3cdda9a924f0b67a223f6bc5d6/.tmpl/fastly-logo.png -------------------------------------------------------------------------------- /.tmpl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Experimental mobile haskell cross compilers 5 | 6 | 7 |

Experimental mobile haskell hackage overlay

8 |

This hackage overlay is designed to provide patched 9 | packages with patches specifically for use with mobile 10 | haskell cross compilers (iOS/Android/Raspberry Pi...)

11 |
12 | repository hackage.mobilehaskell
13 |   url: http://hackage.mobilehaskell.org/
14 |   secure: True
15 |   root-keys: 8184c1f23ce05ab836e5ebac3c3a56eecb486df503cc28110e699e24792582da
16 |              81ff2b6c5707d9af651fdceded5702b9a6950117a1c39461f4e2c8fc07d2e36a
17 |              8468c561cd02cc7dfe27c56de0da1a5c1a2b1b264fff21f4784f02b8c5a63edd
18 |   key-threshold: 3
19 |         
20 |

The patches contained in the overlay can be found in the mobilehaskell/hackage-overlay repository.

21 |

Experimental relocatable GHC Cross Compiler binary dists

22 |

WARNING: These builds are highly experimental!

23 |

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

24 | 25 |

Installation

26 |

These binary distributions are built off of the llvmNG branch. 27 | They will require clang, opt and llc from llvm-5.0 in PATH 28 | as well as the bootstrapped toolchain-wrapper in PATH. 29 |

30 |

The mobile haskell hackage overlay can be used similar to the one head.hackage overlay. 31 | Compare the how-to-use instructions. 32 |

33 |

NEW There is now a preliminary user guide.

34 |

Filing Issues & Getting Help

35 |

Please file issues against the hackage-overlay issue tracker on GitHub.

36 |

You can also hop on to #mobilehaskell on freenode to chat!

37 |

Downloads

38 |

Note The provided relocatable binary distributions, should work in place. As such simply extracting 39 | them and putting the bin folder in PATH should be enought.

40 |

macOS - Sierra

41 | 49 |

linux - deb8

50 | 56 | 57 |

Support this project

58 |

If you like to support this project, feel free to become a patron on patreon or send cryptocurrencies to 59 |

60 | BTC: 33DT5eYzT6dnL6Qu4yY6Ru4KjzkAsTQxiX
61 | ETH: 0xC9F22EDfa38125Df32036C4D3ADD243599cb2ce4
62 | LTC: LLDZ2xCnEZsKaL7z88EMVnqNk7oxBH1uiM
63 | BCH: 1PAYqrnPuC9U89jfjY5xmTZPhXHeNSz2Yf
64 | ADA: DdzFFzCqrht3wriFx8EPvapx67Vc9T76LNKLqceTLwsSio4bmp3GAdPJFXEgbnGgUQDYAsf231gfQ4PugamxmWtdGyBqBMvTMtcMn7gz
65 |             
66 |

67 | 78 |

Industry Sponsoring

79 |

A big thank you to the following companies for providing services free of charge to this project! 80 |

83 |

84 | 85 | 86 | -------------------------------------------------------------------------------- /Item.dhall: -------------------------------------------------------------------------------- 1 | { file : Text, desc : Text } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hackage-overlay 2 | A hackage-overlay with patched packages for mobile use. 3 | 4 | This repository contains patches to cabal packages specific for mobile haskell development. 5 | 6 | ## Contributing patches 7 | 8 | Please use the `/scripts/make-patch.sh` from https://github.com/hvr/head.hackage for the time being, and 9 | open PR requests against this repository. 10 | 11 | Once merged, they should show up a little later (once the webhook ran its course) on 12 | hackage.mobilehaskell.org 13 | -------------------------------------------------------------------------------- /Section.dhall: -------------------------------------------------------------------------------- 1 | { name : Text, prefix : Text, items : List ./Item.dhall } -------------------------------------------------------------------------------- /files.dhall: -------------------------------------------------------------------------------- 1 | [{ name = "macOS - Sierra" 2 | , prefix = "x86_64-apple-darwin/9824f6e473" 3 | , items = [ { file = "ghc-8.4.0.20180109-x86_64-apple-darwin.tar.xz" 4 | , desc = "compiler used to build the cross compilers" } 5 | , { file = "ghc-8.4.0.20180109-arm-linux-gnueabihf.tar.xz" 6 | , desc = "Raspberry Pi cross compiler" } 7 | , { file = "ghc-8.4.0.20180109-aarch64-apple-ios.tar.xz" 8 | , desc = "64bit arm iOS cross compiler" } 9 | , { file = "ghc-8.4.0.20180109-x86_64-apple-ios.tar.xz" 10 | , desc = "64bit x86 iOS Simulator cross compiler" } 11 | , { file = "ghc-8.4.0.20180109-aarch64-linux-android.tar.xz" 12 | , desc = "32bit arm Android cross compiler" } 13 | , { file = "ghc-8.4.0.20180109-armv7-linux-androideabi.tar.xz" 14 | , desc = "32bit arm Android cross compiler" } 15 | , { file = "ghc-8.4.0.20180109-x86_64-linux-android.tar.xz" 16 | , desc = "64bit x86 Android cross compiler" } ] } 17 | ,{ name = "linux - deb8" 18 | , prefix = "x86_64-linux/9824f6e473" 19 | , items = [ { file = "ghc-8.4.0.20180109-x86_64-unknown-linux.tar.xz" 20 | , desc = "compiler used to build the cross compilers" } 21 | , { file = "ghc-8.4.0.20180109-arm-linux-gnueabihf.tar.xz" 22 | , desc = "Raspberry Pi cross compiler" } 23 | , { file = "ghc-8.4.0.20180109-aarch64-linux-android.tar.xz" 24 | , desc = "64bit arm Android cross compiler" } 25 | , { file = "ghc-8.4.0.20180109-armv7-linux-androideabi.tar.xz" 26 | , desc = "32bit arm Android cross compiler" } 27 | , { file = "ghc-8.4.0.20180109-x86_64-linux-android.tar.xz" 28 | , desc = "64bit x86 Android cross compiler" } ] } ] 29 | 30 | -------------------------------------------------------------------------------- /patches/comonad-5.0.4.patch: -------------------------------------------------------------------------------- 1 | diff -ru comonad-5.0.4/comonad.cabal comonad-5.0.4-patched/comonad.cabal 2 | --- comonad-5.0.4/comonad.cabal 2018-07-02 05:24:59.000000000 +0800 3 | +++ comonad-5.0.4-patched/comonad.cabal 2019-01-07 14:57:25.000000000 +0800 4 | @@ -13,7 +13,7 @@ 5 | Copyright (C) 2004-2008 Dave Menendez 6 | synopsis: Comonads 7 | description: Comonads. 8 | -build-type: Custom 9 | +build-type: Simple 10 | tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.1 11 | extra-source-files: 12 | .ghci 13 | -------------------------------------------------------------------------------- /patches/distributive-0.6.patch: -------------------------------------------------------------------------------- 1 | diff -ru distributive-0.6/distributive.cabal distributive-0.6-patched/distributive.cabal 2 | --- distributive-0.6/distributive.cabal 2018-07-03 06:26:04.000000000 +0800 3 | +++ distributive-0.6-patched/distributive.cabal 2019-01-07 14:56:25.000000000 +0800 4 | @@ -12,7 +12,7 @@ 5 | copyright: Copyright (C) 2011-2016 Edward A. Kmett 6 | synopsis: Distributive functors -- Dual to Traversable 7 | description: Distributive functors -- Dual to @Traversable@ 8 | -build-type: Custom 9 | +build-type: Simple 10 | tested-with: GHC == 7.0.4 11 | , GHC == 7.2.2 12 | , GHC == 7.4.2 13 | -------------------------------------------------------------------------------- /patches/http-api-data-0.4.patch: -------------------------------------------------------------------------------- 1 | diff -ru http-api-data-0.4/http-api-data.cabal http-api-data-0.4-patched/http-api-data.cabal 2 | --- http-api-data-0.4/http-api-data.cabal 2001-09-09 09:46:40.000000000 +0800 3 | +++ http-api-data-0.4-patched/http-api-data.cabal 2019-01-07 15:11:33.000000000 +0800 4 | @@ -15,7 +15,7 @@ 5 | maintainer: Nickolay Kudasov 6 | homepage: http://github.com/fizruk/http-api-data 7 | stability: unstable 8 | -build-type: Custom 9 | +build-type: Simple 10 | 11 | extra-source-files: 12 | include/overlapping-compat.h 13 | -------------------------------------------------------------------------------- /patches/jsaddle-0.9.5.0.patch: -------------------------------------------------------------------------------- 1 | diff -ru jsaddle-0.9.5.0/jsaddle.cabal jsaddle-0.9.5.0-patched/jsaddle.cabal 2 | --- jsaddle-0.9.5.0/jsaddle.cabal 2018-06-30 22:30:10.000000000 +0800 3 | +++ jsaddle-0.9.5.0-patched/jsaddle.cabal 2019-01-08 10:10:21.000000000 +0800 4 | @@ -1,5 +1,6 @@ 5 | name: jsaddle 6 | version: 0.9.5.0 7 | +x-revision: 1 8 | cabal-version: >=1.10 9 | build-type: Simple 10 | license: MIT 11 | @@ -108,7 +109,7 @@ 12 | Language.Javascript.JSaddle.Types 13 | build-depends: 14 | aeson >=0.8.0.2 && <1.3, 15 | - base <5, 16 | + base >= 4.9 && <5, 17 | base64-bytestring >=1.0.0.1 && <1.1, 18 | bytestring >=0.10.6.0 && <0.11, 19 | exceptions >=0.8 && <0.9, 20 | diff -ru jsaddle-0.9.5.0/src/Language/Javascript/JSaddle/Types.hs jsaddle-0.9.5.0-patched/src/Language/Javascript/JSaddle/Types.hs 21 | --- jsaddle-0.9.5.0/src/Language/Javascript/JSaddle/Types.hs 2018-06-30 22:30:10.000000000 +0800 22 | +++ jsaddle-0.9.5.0-patched/src/Language/Javascript/JSaddle/Types.hs 2019-01-07 14:56:33.000000000 +0800 23 | @@ -110,6 +110,7 @@ 24 | import Control.Monad.Trans.Writer.Lazy as Lazy (WriterT(..)) 25 | import Control.Monad.Trans.Writer.Strict as Strict (WriterT(..)) 26 | import Control.Monad.Trans.Class (MonadTrans(..)) 27 | +import Control.Monad.Fail (MonadFail(..)) 28 | import Control.Monad.Fix (MonadFix) 29 | import Control.Monad.Ref (MonadAtomicRef(..), MonadRef(..)) 30 | import Control.Concurrent.STM.TVar (TVar) 31 | @@ -179,6 +180,9 @@ 32 | where q :: (ReaderT JSContextRef IO a -> ReaderT JSContextRef IO a) -> JSM a -> JSM a 33 | q unmask (JSM b) = syncAfter . JSM $ unmask b 34 | 35 | +instance MonadFail JSM where 36 | + fail = error 37 | + 38 | #endif 39 | 40 | -- | Forces execution of pending asyncronous code 41 | -------------------------------------------------------------------------------- /patches/lens-4.17.patch: -------------------------------------------------------------------------------- 1 | diff -ru lens-4.17/lens.cabal lens-4.17-patched/lens.cabal 2 | --- lens-4.17/lens.cabal 2018-07-04 01:04:18.000000000 +0800 3 | +++ lens-4.17-patched/lens.cabal 2019-01-07 14:57:35.000000000 +0800 4 | @@ -10,7 +10,7 @@ 5 | homepage: http://github.com/ekmett/lens/ 6 | bug-reports: http://github.com/ekmett/lens/issues 7 | copyright: Copyright (C) 2012-2016 Edward A. Kmett 8 | -build-type: Custom 9 | +build-type: Simple 10 | -- build-tools: cpphs 11 | tested-with: GHC == 7.4.2 12 | , GHC == 7.6.3 13 | -------------------------------------------------------------------------------- /patches/primitive-0.6.4.0.patch: -------------------------------------------------------------------------------- 1 | diff -ru primitive-0.6.4.0/Data/Primitive/Internal/Operations.hs primitive-0.6.4.0-patched/Data/Primitive/Internal/Operations.hs 2 | --- primitive-0.6.4.0/Data/Primitive/Internal/Operations.hs 2018-05-31 02:38:36.000000000 +0800 3 | +++ primitive-0.6.4.0-patched/Data/Primitive/Internal/Operations.hs 2019-01-07 14:57:20.000000000 +0800 4 | @@ -1,4 +1,4 @@ 5 | -{-# LANGUAGE MagicHash, UnliftedFFITypes #-} 6 | +{-# LANGUAGE MagicHash, UnliftedFFITypes, CApiFFI #-} 7 | 8 | -- | 9 | -- Module : Data.Primitive.Internal.Operations 10 | @@ -30,61 +30,61 @@ 11 | import Foreign.C.Types 12 | import GHC.Prim 13 | 14 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" 15 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word8" 16 | setWord8Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () 17 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" 18 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word16" 19 | setWord16Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () 20 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" 21 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word32" 22 | setWord32Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () 23 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" 24 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word64" 25 | setWord64Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word64_# -> IO () 26 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" 27 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word" 28 | setWordArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () 29 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" 30 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word8" 31 | setInt8Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () 32 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" 33 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word16" 34 | setInt16Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () 35 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" 36 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word32" 37 | setInt32Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () 38 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" 39 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word64" 40 | setInt64Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int64_# -> IO () 41 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" 42 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word" 43 | setIntArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () 44 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Ptr" 45 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Ptr" 46 | setAddrArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Addr# -> IO () 47 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Float" 48 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Float" 49 | setFloatArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Float# -> IO () 50 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Double" 51 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Double" 52 | setDoubleArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Double# -> IO () 53 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Char" 54 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Char" 55 | setWideCharArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Char# -> IO () 56 | 57 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" 58 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word8" 59 | setWord8OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () 60 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" 61 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word16" 62 | setWord16OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () 63 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" 64 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word32" 65 | setWord32OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () 66 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" 67 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word64" 68 | setWord64OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word64_# -> IO () 69 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" 70 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word" 71 | setWordOffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () 72 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" 73 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word8" 74 | setInt8OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () 75 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" 76 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word16" 77 | setInt16OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () 78 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" 79 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word32" 80 | setInt32OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () 81 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" 82 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word64" 83 | setInt64OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int64_# -> IO () 84 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" 85 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Word" 86 | setIntOffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () 87 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Ptr" 88 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Ptr" 89 | setAddrOffAddr# :: Addr# -> CPtrdiff -> CSize -> Addr# -> IO () 90 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Float" 91 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Float" 92 | setFloatOffAddr# :: Addr# -> CPtrdiff -> CSize -> Float# -> IO () 93 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Double" 94 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Double" 95 | setDoubleOffAddr# :: Addr# -> CPtrdiff -> CSize -> Double# -> IO () 96 | -foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Char" 97 | +foreign import capi unsafe "primitive-memops.h hsprimitive_memset_Char" 98 | setWideCharOffAddr# :: Addr# -> CPtrdiff -> CSize -> Char# -> IO () 99 | 100 | diff -ru primitive-0.6.4.0/primitive.cabal primitive-0.6.4.0-patched/primitive.cabal 101 | --- primitive-0.6.4.0/primitive.cabal 2018-05-31 02:38:36.000000000 +0800 102 | +++ primitive-0.6.4.0-patched/primitive.cabal 2019-01-08 10:14:15.000000000 +0800 103 | @@ -1,5 +1,6 @@ 104 | Name: primitive 105 | Version: 0.6.4.0 106 | +x-revision: 1 107 | License: BSD3 108 | License-File: LICENSE 109 | 110 | @@ -53,7 +54,7 @@ 111 | Data.Primitive.Internal.Compat 112 | Data.Primitive.Internal.Operations 113 | 114 | - Build-Depends: base >= 4.5 && < 4.12 115 | + Build-Depends: base >= 4.5 && < 4.13 116 | , ghc-prim >= 0.2 && < 0.6 117 | , transformers >= 0.2 && < 0.6 118 | 119 | -------------------------------------------------------------------------------- /patches/semigroupoids-5.3.1.patch: -------------------------------------------------------------------------------- 1 | diff -ru semigroupoids-5.3.1/semigroupoids.cabal semigroupoids-5.3.1-patched/semigroupoids.cabal 2 | --- semigroupoids-5.3.1/semigroupoids.cabal 2018-07-03 02:08:27.000000000 +0800 3 | +++ semigroupoids-5.3.1-patched/semigroupoids.cabal 2019-01-07 14:57:50.000000000 +0800 4 | @@ -20,7 +20,7 @@ 5 | , GHC == 8.2.2 6 | , GHC == 8.4.3 7 | , GHC == 8.6.1 8 | -build-type: Custom 9 | +build-type: Simple 10 | synopsis: Semigroupoids: Category sans id 11 | extra-source-files: 12 | .travis.yml 13 | -------------------------------------------------------------------------------- /patches/semigroupoids-5.3.2.patch: -------------------------------------------------------------------------------- 1 | diff -ru semigroupoids-5.3.2/semigroupoids.cabal semigroupoids-5.3.2-patched/semigroupoids.cabal 2 | --- semigroupoids-5.3.2/semigroupoids.cabal 2001-09-09 09:46:40.000000000 +0800 3 | +++ semigroupoids-5.3.2-patched/semigroupoids.cabal 2019-01-08 10:44:35.000000000 +0800 4 | @@ -20,7 +20,7 @@ 5 | , GHC == 8.2.2 6 | , GHC == 8.4.4 7 | , GHC == 8.6.3 8 | -build-type: Custom 9 | +build-type: Simple 10 | synopsis: Semigroupoids: Category sans id 11 | extra-source-files: 12 | .travis.yml 13 | -------------------------------------------------------------------------------- /patches/servant-0.15.patch: -------------------------------------------------------------------------------- 1 | diff -ru servant-0.15/servant.cabal servant-0.15-patched/servant.cabal 2 | --- servant-0.15/servant.cabal 2001-09-09 09:46:40.000000000 +0800 3 | +++ servant-0.15-patched/servant.cabal 2019-01-07 15:18:55.000000000 +0800 4 | @@ -18,7 +18,7 @@ 5 | author: Servant Contributors 6 | maintainer: haskell-servant-maintainers@googlegroups.com 7 | copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors 8 | -build-type: Custom 9 | +build-type: Simple 10 | 11 | tested-with: 12 | GHC ==8.0.2 13 | -------------------------------------------------------------------------------- /patches/zlib-0.6.1.2.patch: -------------------------------------------------------------------------------- 1 | diff --git a/Codec/Compression/Zlib/Stream.hsc b/Codec/Compression/Zlib/Stream.hsc 2 | index d47ed92..04e1bbb 100644 3 | --- a/Codec/Compression/Zlib/Stream.hsc 4 | +++ b/Codec/Compression/Zlib/Stream.hsc 5 | @@ -2,6 +2,9 @@ 6 | #if __GLASGOW_HASKELL__ >= 702 7 | {-# LANGUAGE DeriveGeneric #-} 8 | #endif 9 | +#if __GLASGOW_HASKELL__ >= 706 10 | +{-# LANGUAGE CApiFFI #-} 11 | +#endif 12 | ----------------------------------------------------------------------------- 13 | -- | 14 | -- Copyright : (c) 2006-2015 Duncan Coutts 15 | @@ -709,8 +712,8 @@ fromCompressionLevel (CompressionLevel n) 16 | -- usage. 17 | -- 18 | -- The compression window size is the value of the the window bits raised to 19 | --- the power 2. The window bits must be in the range @8..15@ which corresponds 20 | --- to compression window sizes of 256b to 32Kb. The default is 15 which is also 21 | +-- the power 2. The window bits must be in the range @9..15@ which corresponds 22 | +-- to compression window sizes of 512b to 32Kb. The default is 15 which is also 23 | -- the maximum size. 24 | -- 25 | -- The total amount of memory used depends on the window bits and the 26 | @@ -737,19 +740,19 @@ data WindowBits = WindowBits Int 27 | defaultWindowBits :: WindowBits 28 | defaultWindowBits = WindowBits 15 29 | 30 | --- | A specific compression window size, specified in bits in the range @8..15@ 31 | +-- | A specific compression window size, specified in bits in the range @9..15@ 32 | -- 33 | windowBits :: Int -> WindowBits 34 | windowBits n 35 | - | n >= 8 && n <= 15 = WindowBits n 36 | - | otherwise = error "WindowBits must be in the range 8..15" 37 | + | n >= 9 && n <= 15 = WindowBits n 38 | + | otherwise = error "WindowBits must be in the range 9..15" 39 | 40 | fromWindowBits :: Format -> WindowBits-> CInt 41 | fromWindowBits format bits = (formatModifier format) (checkWindowBits bits) 42 | where checkWindowBits DefaultWindowBits = 15 43 | checkWindowBits (WindowBits n) 44 | - | n >= 8 && n <= 15 = fromIntegral n 45 | - | otherwise = error "WindowBits must be in the range 8..15" 46 | + | n >= 9 && n <= 15 = fromIntegral n 47 | + | otherwise = error "WindowBits must be in the range 9..15" 48 | formatModifier Zlib = id 49 | formatModifier GZip = (+16) 50 | formatModifier GZipOrZlib = (+32) 51 | @@ -1008,6 +1011,10 @@ newtype StreamState = StreamState (Ptr StreamState) 52 | -- 53 | -- So we define c_inflateInit2 and c_deflateInit2 here as wrappers around 54 | -- their _ counterparts and pass the extra args. 55 | +-- 56 | +-- As of GHC 7.6, we can import macros directly using the CApiFFI extension. 57 | +-- This avoids the need for the hsc2hs #{const_str} construct, which means 58 | +-- hsc2hs can run in cross-compilation mode. 59 | 60 | ##ifdef NON_BLOCKING_FFI 61 | ##define SAFTY safe 62 | @@ -1015,6 +1022,14 @@ newtype StreamState = StreamState (Ptr StreamState) 63 | ##define SAFTY unsafe 64 | ##endif 65 | 66 | +#if __GLASGOW_HASKELL__ >= 706 67 | +foreign import capi unsafe "zlib.h inflateInit2" 68 | + c_inflateInit2 :: StreamState -> CInt -> IO CInt 69 | + 70 | +foreign import capi unsafe "zlib.h deflateInit2" 71 | + c_deflateInit2 :: StreamState 72 | + -> CInt -> CInt -> CInt -> CInt -> CInt -> IO CInt 73 | +#else 74 | foreign import ccall unsafe "zlib.h inflateInit2_" 75 | c_inflateInit2_ :: StreamState -> CInt -> Ptr CChar -> CInt -> IO CInt 76 | 77 | @@ -1023,15 +1038,6 @@ c_inflateInit2 z n = 78 | withCAString #{const_str ZLIB_VERSION} $ \versionStr -> 79 | c_inflateInit2_ z n versionStr (#{const sizeof(z_stream)} :: CInt) 80 | 81 | -foreign import ccall SAFTY "zlib.h inflate" 82 | - c_inflate :: StreamState -> CInt -> IO CInt 83 | - 84 | -foreign import ccall unsafe "zlib.h &inflateEnd" 85 | - c_inflateEnd :: FinalizerPtr StreamState 86 | - 87 | -foreign import ccall unsafe "zlib.h inflateReset" 88 | - c_inflateReset :: StreamState -> IO CInt 89 | - 90 | foreign import ccall unsafe "zlib.h deflateInit2_" 91 | c_deflateInit2_ :: StreamState 92 | -> CInt -> CInt -> CInt -> CInt -> CInt 93 | @@ -1043,6 +1049,16 @@ c_deflateInit2 :: StreamState 94 | c_deflateInit2 z a b c d e = 95 | withCAString #{const_str ZLIB_VERSION} $ \versionStr -> 96 | c_deflateInit2_ z a b c d e versionStr (#{const sizeof(z_stream)} :: CInt) 97 | +#endif 98 | + 99 | +foreign import ccall SAFTY "zlib.h inflate" 100 | + c_inflate :: StreamState -> CInt -> IO CInt 101 | + 102 | +foreign import ccall unsafe "zlib.h &inflateEnd" 103 | + c_inflateEnd :: FinalizerPtr StreamState 104 | + 105 | +foreign import ccall unsafe "zlib.h inflateReset" 106 | + c_inflateReset :: StreamState -> IO CInt 107 | 108 | foreign import ccall unsafe "zlib.h deflateSetDictionary" 109 | c_deflateSetDictionary :: StreamState 110 | -------------------------------------------------------------------------------- /scripts/cross-ghc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | defaultToolchainWrapperPath="/usr/local/lib/toolchain-wrapper" 4 | defaultLlvmPath="/usr/local/opt/llvm/bin" 5 | defaultLibffiPath="/usr/local/opt/libffi/lib" 6 | crossGhcDistributionPath="/usr/local/lib/cross-ghc" 7 | 8 | # Distribution specific information. 9 | ghcVersion="ghc-8.3.20171020" 10 | commitHash="aa5f532d20" 11 | 12 | validTargetList="{ios-sim[ulator]|ios|android|android-32|raspberry|macos}" 13 | 14 | # Print command line help information. 15 | function helpInformation() { 16 | echo "Usage: cross-ghc [target]" 17 | echo "" 18 | echo "For building to a target:" 19 | echo " cross-ghc $validTargetList [ghc-options] " 20 | echo " cross-ghc static $validTargetList [ghc-options] " 21 | echo "" 22 | echo "the last one adds the -staticlib flag, and other things, to produce" 23 | echo "a static archive in 'hs-libs//libhs.a'." 24 | echo "" 25 | echo "Specifically for building a universal library for iOS:" 26 | echo " cross-ghc universal [ghc-options] " 27 | echo "" 28 | echo "Which builds cross-ghc static ios|ios-sim and then combines the libraries with" 29 | echo "lipo after resulting in a universal library at hs-libs/libhs.a." 30 | echo "" 31 | echo "For compiling the ghc binaries:" 32 | echo " cross-ghc setup-ghc $validTargetList" 33 | echo "" 34 | echo "Finally, for managing the toolchain-wrapper:" 35 | echo " cross-ghc get-toolchain" 36 | echo " cross-ghc update-toolchain" 37 | echo "" 38 | echo "By default the toolchain-wrapper path is set to '/usr/local/lib/toolchain-wrapper'," 39 | echo "you can override this by setting \$ghcCrossToolchainPath, and similarly LLVM5," 40 | echo "which is set to '/usr/local/opt/llvm/bin' can be overridden by setting" 41 | echo "\$ghcCrossLLVMPath." 42 | echo "" 43 | echo "Note that it is assumed that LLVM5 is already installed. If not, you can install" 44 | echo "it on macOS via 'brew install llvm'. On other systems, consult you package manager." 45 | echo "" 46 | echo "cross-ghc also assumes libffi is set up. If not, you can install it on macOS via" 47 | echo "'brew install libffi'. On other systems, consult your package manager." 48 | echo "" 49 | } 50 | 51 | # Set the host configure parameter. 52 | function ensureHostIsSet() { 53 | # Get the platform information. 54 | platform='unknown' 55 | unameStr=`uname` 56 | if [[ "$unameStr" == 'Linux' ]]; then 57 | platform='unknown-linux' 58 | elif [[ "$unameStr" == 'Darwin' ]]; then 59 | platform='apple-darwin' 60 | fi 61 | 62 | # Get the architecture information. 63 | machineType='unknown' 64 | machineStr=`uname -m` 65 | if [[ "$machineStr" == 'x86_64' ]]; then 66 | machineType='x86_64' 67 | elif [[ "$machineStr" == 'arm' ]]; then 68 | machineType='arm' 69 | fi 70 | hostConfigure="$machineType-$platform" 71 | } 72 | 73 | # Set the path to the toolchain-wrapper. 74 | function ensureToolChainPath() { 75 | if [ -n "$ghcCrossToolchainPath" ]; then 76 | toolchainWrapperPath="$ghcCrossToolchainPath" 77 | if [ ! -d "$toolchainWrapperPath" ]; then 78 | >&2 echo "Nothing found at $toolchainWrapperPath, which was specificed as the path to the toolchain-wrapper! Please make sure that the toolchain is setup, e.g. by running 'cross-ghc get-toolchain'." 79 | exit 1 80 | fi 81 | elif [ -d "$defaultToolchainWrapperPath" ]; then 82 | toolchainWrapperPath=$defaultToolchainWrapperPath 83 | else 84 | >&2 echo "Could not find toolchain-wrapper at $defaultToolchainWrapperPath, and an alternative path was not defined in \$ghcCrossToolchainPath." 85 | exit 1 86 | fi 87 | } 88 | 89 | # Set the path to the LLVM5. 90 | function ensureLlvmPath() { 91 | if [ -n "$ghcCrossLLVMPath" ]; then 92 | llvmPath="$ghcCrossLLVMPath" 93 | if [ ! -d "$llvmPath" ]; then 94 | >&2 echo "Nothing found at $llvmPath, which was specificed as the path to LLVM5! Please make sure LLVM is installed." 95 | exit 1 96 | fi 97 | elif [ -d "$defaultLlvmPath" ]; then 98 | llvmPath=$defaultLlvmPath 99 | else 100 | >&2 echo "Could not find LLVM5 at $defaultLlvmPath, and an alternative path was not defined in \$ghcCrossLlvmPath." 101 | exit 1 102 | fi 103 | } 104 | 105 | # Set the path to the LLVM5. 106 | function ensureLibffiPath() { 107 | if [ -n "$ghcCrossLibffiPath" ]; then 108 | libffiPath="$ghcCrossLibffiPath" 109 | if [ ! -d "$llvmPath" ]; then 110 | >&2 echo "Nothing found at $libffiPath, which was specificed as the path to libffi! Please make sure libffi is installed." 111 | exit 1 112 | fi 113 | elif [ -d "$defaultLibffiPath" ]; then 114 | libffiPath=$defaultLibffiPath 115 | else 116 | >&2 echo "Could not find libffi at $defaultLibffiPath, and an alternative path was not defined in \$ghcCrossLibffiPath." 117 | exit 1 118 | fi 119 | } 120 | 121 | function ensureGhcOnPath() { 122 | if [ ! $(which $targetPrefix-ghc) ]; then 123 | >&2 echo "Could not find $targetPrefix-ghc on path! Are you sure you have" 124 | >&2 echo "built the GHC binaries for this distribution? See 'cross-ghc help'" 125 | >&2 echo "for more information." 126 | >&2 echo "" 127 | exit 1 128 | fi 129 | } 130 | 131 | 132 | # Build GHC binaries for a specific target. 133 | function setupGhcBinaries() { 134 | echo "Starting process to build the GHC for the target platform." 135 | echo "" 136 | # Make sure the distribution exists and then configure/build it. 137 | getBinaryDistruibution \ 138 | && (cd $crossGhcDistributionPath/ghc-$targetPrefix && configureAndMakeDistribution) 139 | } 140 | 141 | function getBinaryDistruibution() { 142 | if [ ! -d "$crossGhcDistributionPath/ghc-$targetPrefix" ]; then 143 | # Download the distribution, unzip and untar it, and then finally configure 144 | # and build the GHC binaries. 145 | echo "Choosing distribution: $ghcDistribution" 146 | echo "" 147 | mkdir -p $crossGhcDistributionPath \ 148 | && curl -o $crossGhcDistributionPath/ghc-$targetPrefix.tar.xz \ 149 | -O -L -C - $ghcDistribution \ 150 | --retry 20 \ 151 | && gunzip -c $crossGhcDistributionPath/ghc-$targetPrefix.tar.xz > $crossGhcDistributionPath/ghc-$targetPrefix.tar \ 152 | && tar xf $crossGhcDistributionPath/ghc-$targetPrefix.tar -C $crossGhcDistributionPath \ 153 | && mv $crossGhcDistributionPath/$ghcVersion $crossGhcDistributionPath/ghc-$targetPrefix \ 154 | && echo "Downloaded and unpacking distribution to $crossGhcDistributionPath/ghc-$targetPrefix" \ 155 | && echo "" 156 | else 157 | echo "Using existing GHC distribution for $target." 158 | echo "" 159 | fi 160 | } 161 | 162 | function configureAndMakeDistribution() { 163 | export PATH="$toolchainWrapperPath:$llvmPath:$PATH" 164 | ./configure \ 165 | --prefix=$crossGhcDistributionPath/ghc-$targetPrefix \ 166 | --target=$targetPrefix \ 167 | --host=$hostConfigure \ 168 | --build=$hostConfigure \ 169 | && make install \ 170 | && echo "" \ 171 | && echo "Finished setting up $targetPrefix-ghc." \ 172 | && echo "" 173 | } 174 | 175 | function getToolchain() { 176 | # We manually set the path here, because `ensureToolChainPath` requires 177 | # that the path exists in advance. 178 | toolchainWrapperPath=$defaultToolchainWrapperPath 179 | if [ -n "$ghcCrossToolchainPath" ]; then 180 | toolchainWrapperPath="$ghcCrossToolchainPath" 181 | fi 182 | echo "Cloning down the toolchain-wrapper into $toolchainWrapperPath." 183 | echo "" 184 | git clone https://github.com/zw3rk/toolchain-wrapper.git $toolchainWrapperPath 185 | echo "" 186 | echo "Running ./bootstrap" 187 | (cd $toolchainWrapperPath && exec $toolchainWrapperPath/bootstrap) 188 | echo "" 189 | echo "Finished setting up toolchain" 190 | echo "" 191 | } 192 | 193 | function updateToolchain() { 194 | echo "Updating toolchain-wrapper." 195 | echo "" 196 | git -C $toolchainWrapperPath pull origin master 197 | echo "" 198 | echo "Re-running ./bootstrap" 199 | (cd $toolchainWrapperPath && exec $toolchainWrapperPath/bootstrap) 200 | echo "" 201 | echo "Finished setting up toolchain" 202 | echo "" 203 | } 204 | 205 | # Translate the target into its target string. 206 | function getTarget() { 207 | target=$1 208 | case "$target" in 209 | ios-simulator|ios-sim) 210 | targetPrefix="x86_64-apple-ios" 211 | targetBuildArch="x86_64" 212 | ;; 213 | ios) 214 | targetPrefix="aarch64-apple-ios" 215 | targetBuildArch="arm64" 216 | ;; 217 | macos) 218 | targetPrefix="x86_64-apple-darwin" 219 | targetBuildArch="x86_64" 220 | ;; 221 | android) 222 | targetPrefix="aarch64-unknown-linux-android" 223 | targetBuildArch="arm64-v8a" 224 | ;; 225 | android-32) 226 | targetPrefix="armv7-linux-androideabi" 227 | targetBuildArch="armv7a" 228 | ;; 229 | raspberry) 230 | targetPrefix="arm-linux-gnueabihf" 231 | targetBuildArch="armv6" 232 | ;; 233 | *) 234 | >&2 echo "Invalid target!" 235 | >&2 echo "" 236 | echo "Valid targets are:" 237 | echo " $validTargetList" 238 | echo "" 239 | echo "See 'cross-ghc help' for more information." 240 | echo "" 241 | exit 1 242 | esac 243 | ghcDistribution="http://hackage.mobilehaskell.org/$hostConfigure/$commitHash/$ghcVersion-$targetPrefix.tar.xz" 244 | } 245 | 246 | 247 | # Handle command line arguments. 248 | case "$1" in 249 | ios-simulator|ios-sim|ios|android|android-32|raspberry|macos) 250 | ensureHostIsSet 251 | getTarget $1 252 | ensureToolChainPath 253 | ensureLlvmPath 254 | export PATH="$toolchainWrapperPath:$llvmPath:/usr/local/lib/cross-ghc/ghc-$targetPrefix/bin:$PATH" 255 | ensureGhcOnPath 256 | $targetPrefix-ghc ${@:2} 257 | ;; 258 | static) 259 | ensureHostIsSet 260 | getTarget $2 261 | ensureToolChainPath 262 | ensureLlvmPath 263 | ensureLibffiPath 264 | export PATH="$toolchainWrapperPath:$llvmPath:/usr/local/lib/cross-ghc/ghc-$targetPrefix/bin:$PATH" 265 | ensureGhcOnPath 266 | mkdir -p hs-libs/$targetBuildArch 267 | mkdir -p hs-libs/build-artifacts/$targetBuildArch 268 | $targetPrefix-ghc -lffi -L$libffiPath \ 269 | -staticlib \ 270 | -odir hs-libs/build-artifacts/$targetBuildArch \ 271 | -hidir hs-libs/build-artifacts/$targetBuildArch \ 272 | -o hs-libs/$targetBuildArch/libhs.a \ 273 | ${@:3} 274 | ;; 275 | universal) 276 | cross-ghc static ios ${@:2} \ 277 | && cross-ghc static ios-sim ${@:2} \ 278 | && lipo -create -output hs-libs/libhs.a \ 279 | hs-libs/arm64/libhs.a hs-libs/x86_64/libhs.a \ 280 | && echo "Created universal library in hs-libs/libhs.a." && echo "" 281 | ;; 282 | setup-ghc) 283 | ensureHostIsSet 284 | getTarget $2 285 | ensureToolChainPath 286 | ensureLlvmPath 287 | ensureHostIsSet 288 | setupGhcBinaries 289 | ;; 290 | get-toolchain) 291 | getToolchain 292 | ;; 293 | update-toolchain) 294 | ensureToolChainPath 295 | updateToolchain 296 | ;; 297 | -h|--help|help) 298 | helpInformation 299 | ;; 300 | *) 301 | >&2 echo "Invalid command!" 302 | >&2 echo "" 303 | helpInformation 304 | exit 1 305 | esac 306 | -------------------------------------------------------------------------------- /scripts/make-patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | die () { 5 | echo "ERROR: $1" >& 2 6 | exit 1 7 | } 8 | 9 | OVL_OWNER=mobilehaskell 10 | OVL_REPO=hackage-overlay 11 | OVL_NAME=mobilehaskell 12 | 13 | 14 | usage () { 15 | echo "Usage: 16 | ${0##*/} - 17 | 18 | Will roughly perform the following operations: 19 | $ git fetch \$hvr/head.hackage 20 | $ git checkout -b - \$hvr/head.hackage/master 21 | $ mv - --patched 22 | $ cabal unpack --pristine - 23 | $ diff -ru - --patched > \$head.hackage/patches/-.patch 24 | $ mv -f --patched - 25 | $ git add patches/-.patch 26 | $ git commit -m \"Adds -.patch\" 27 | $ git push 28 | 29 | All that's left is opening the PR against \$hvr/head.hackage" 30 | exit 1 31 | } 32 | 33 | if [ -z "$1" ]; then 34 | usage 35 | fi 36 | 37 | if [ ! -f "$HOME/.hackage.${OVL_NAME}-overlay" ]; then 38 | die "$HOME/.hackage.${OVL_NAME}-overlay file not found." 39 | fi 40 | source "$HOME/.hackage.${OVL_NAME}-overlay" 41 | 42 | if [ -z "$OVL_CLONE_PATH" ]; then 43 | die "${OVL_NAME} local repository ('\$OVL_CLONE_PATH') not set; please edit $HOME/.hackage.${OVL_NAME}-overlay." 44 | fi 45 | if [ ! -d "$OVL_CLONE_PATH" ]; then 46 | die "${OVL_NAME} local repository ('\$OVL_CLONE_PATH') doesn't seem to exist; please edit $HOME/.hackage.${OVL_NAME}-overlay." 47 | fi 48 | if [ ! -d "$OVL_CLONE_PATH/.git" ]; then 49 | die "head.hackage local repository ('\$OVL_CLONE_PATH') doesn't seem to be a git repository; please edit $HOME/.hackage.${OVL_NAME}-overlay." 50 | fi 51 | 52 | UPSTREAM_FETCH_NAME=$(git -C "$OVL_CLONE_PATH" remote -v |grep "${OVL_OWNER}/${OVL_REPO}.*fetch"|awk -F\ '{ print $1 }') 53 | 54 | if [ -z "$UPSTREAM_FETCH_NAME" ] ; then 55 | echo "no ${OVL_OWNER}/${OVL_REPO} remote found. Adding..." 56 | git -C "$OVL_CLONE_PATH" remote add "${OVL_NAME}" "https://github.com/${OVL_OWNER}/${OVL_REPO}.git" 57 | UPSTREAM_FETCH_NAME="${OVL_NAME}" 58 | fi 59 | 60 | git -C "$OVL_CLONE_PATH" fetch "$UPSTREAM_FETCH_NAME" 61 | git -C "$OVL_CLONE_PATH" checkout -b "$1" "$UPSTREAM_FETCH_NAME/master" 62 | 63 | if [ ! -d "$OVL_CLONE_PATH/patches" ]; then 64 | die "$OVL_CLONE_PATH/patches does not exist!" 65 | fi 66 | 67 | if [ -f "$OVL_CLONE_PATH/patches/$1.patch" ]; then 68 | die "$OVL_CLONE_PATH/patches/$1.patch already exists!" 69 | fi 70 | 71 | echo "creating patch..." 72 | mv "$1" "$1-patched" 73 | cabal unpack --pristine "$1" 74 | 75 | # diff returns 0 for no changes; 1 for some changes; and 2 for trouble 76 | set +e 77 | diff -ru "$1" "$1-patched" > "$OVL_CLONE_PATH/patches/$1.patch" 78 | exit_status=$? 79 | set -e 80 | if [ $exit_status -eq 1 ]; then 81 | echo "creating commit..." 82 | git -C "$OVL_CLONE_PATH" add "patches/$1.patch" 83 | git -C "$OVL_CLONE_PATH" commit -m "Adds $1.patch" 84 | git -C "$OVL_CLONE_PATH" push origin 85 | 86 | echo "Please go to https://github.com/${OVL_OWNER}/${OVL_REPO}" 87 | else 88 | echo "failed to create patch... exit: $?" 89 | "$OVL_CLONE_PATH/patches/$1.patch" 90 | git -C "$OVL_CLONE_PATH" checkout master 91 | git -C "$OVL_CLONE_PATH" branch -d "$1" 92 | fi 93 | echo "moving $1-patched to $1" 94 | rm -fR "$1" 95 | mv "$1-patched" "$1" 96 | -------------------------------------------------------------------------------- /template.dhall.html: -------------------------------------------------------------------------------- 1 | let host = "http://releases.mobilehaskell.org" 2 | in let concatMap = https://ipfs.io/ipfs/QmRHdo2Jg59EZUT8Toq7MCZFN6e7wNbBtvaF7HCTrDFPxG/Prelude/Text/concatMap 3 | in \(record : List ./Section.dhall) -> 4 | concatMap ./Section.dhall (\(section : ./Section.dhall) -> 5 | let items = concatMap ./Item.dhall (\(item : ./Item.dhall) -> 6 | let url = ''${host}/${section.prefix}/${item.file}'' in 7 | '' 8 |
  • ${item.file}(.sig) - ${item.desc}
  • 9 | '') section.items in '' 10 |

    ${section.name}

    11 |
      ${items}
    12 | '') record 13 | 14 | --------------------------------------------------------------------------------