Date: Wednesday, December 11, 2019 @ 16:19:23
  Author: felixonmars
Revision: 536906

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-clash-prelude/repos/community-staging-x86_64/
  haskell-clash-prelude/repos/community-staging-x86_64/PKGBUILD
    (from rev 536905, haskell-clash-prelude/trunk/PKGBUILD)
  haskell-clash-prelude/repos/community-staging-x86_64/ghc-8.6.patch
    (from rev 536905, haskell-clash-prelude/trunk/ghc-8.6.patch)

---------------+
 PKGBUILD      |   54 +++++++++
 ghc-8.6.patch |  324 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 378 insertions(+)

Copied: haskell-clash-prelude/repos/community-staging-x86_64/PKGBUILD (from rev 
536905, haskell-clash-prelude/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2019-12-11 16:19:23 UTC (rev 536906)
@@ -0,0 +1,54 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+_hkgname=clash-prelude
+pkgname=haskell-clash-prelude
+pkgver=0.99.3
+pkgrel=79
+pkgdesc="CAES Language for Synchronous Hardware - Prelude library"
+url="https://github.com/clash-lang/clash-prelude";
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-bifunctors' 'haskell-constraints' 
'haskell-data-binary-ieee754'
+         'haskell-data-default' 'haskell-ghc-typelits-extra' 
'haskell-ghc-typelits-knownnat'
+         'haskell-ghc-typelits-natnormalise' 'haskell-half' 'haskell-lens' 
'haskell-quickcheck'
+         'haskell-reflection' 'haskell-singletons' 'haskell-vector')
+makedepends=('ghc' 'haskell-doctest')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+        ghc-8.6.patch)
+sha512sums=('9eb9dc5647a5dc61c9f0b5a9b880ae102e6f26783db0c4b29b4898705c9679c01d6cb96db0b206e327172743189a984299662c91209429f36c1eeb7d1d319bd1'
+            
'52fcf8c2c701d724b55f8dc3a99e2842d26088ce36ae04dea02b104366255a268c83a6c02f1282f4b51795cd5afb3cb8c66d5c7348dc9ee3f149338df7776b87')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p1 -i ../ghc-8.6.patch
+    sed -i -e 's/< *0.3/<1/' -e 's/< *2.14/<3/' -e 's/< *0.6/<1/' -e 's/< 
*2.12/<3/' -e 's/< *0.10/<1/' $_hkgname.cabal
+}
+
+build() {
+    cd $_hkgname-$pkgver
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
+    runhaskell Setup build
+    runhaskell Setup register --gen-script
+    runhaskell Setup unregister --gen-script
+    sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+    sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+    cd $_hkgname-$pkgver
+    # TODO
+    runhaskell Setup test || warning "Tests failed"
+}
+
+package() {
+    cd $_hkgname-$pkgver
+    
+    install -D -m744 register.sh 
"$pkgdir"/usr/share/haskell/register/$pkgname.sh
+    install -D -m744 unregister.sh 
"$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+    runhaskell Setup copy --destdir="$pkgdir"
+    install -D -m644 "LICENSE" 
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}

Copied: haskell-clash-prelude/repos/community-staging-x86_64/ghc-8.6.patch 
(from rev 536905, haskell-clash-prelude/trunk/ghc-8.6.patch)
===================================================================
--- community-staging-x86_64/ghc-8.6.patch                              (rev 0)
+++ community-staging-x86_64/ghc-8.6.patch      2019-12-11 16:19:23 UTC (rev 
536906)
@@ -0,0 +1,324 @@
+From d2f9a0081c4355fdbd1062f3b15fafb3a3572cdc Mon Sep 17 00:00:00 2001
+From: Christiaan Baaij <christiaan.ba...@gmail.com>
+Date: Thu, 26 Jul 2018 16:55:48 +0200
+Subject: [PATCH] Fixes to build on GHC 8.6
+
+---
+ cabal.project                     |  9 ++++++++-
+ clash-prelude.cabal               |  4 ++--
+ src/Clash/Explicit/DDR.hs         |  4 ++++
+ src/Clash/Intel/DDR.hs            |  4 ++++
+ src/Clash/Promoted/Nat.hs         |  9 +++++++--
+ src/Clash/Sized/Internal/Index.hs |  4 ++++
+ src/Clash/Sized/RTree.hs          | 23 ++++++++++++++---------
+ src/Clash/Sized/Vector.hs         | 13 +++++++++----
+ src/Clash/Xilinx/DDR.hs           |  4 ++++
+ 9 files changed, 56 insertions(+), 18 deletions(-)
+
+diff --git a/src/Clash/Explicit/DDR.hs b/src/Clash/Explicit/DDR.hs
+index a22d925..96a9877 100644
+--- a/src/Clash/Explicit/DDR.hs
++++ b/src/Clash/Explicit/DDR.hs
+@@ -17,11 +17,15 @@ dedicated hardware resources use the functions from 
"Clash.Intel.DDR"
+ or "Clash.Xilinx.DDR".
+ -}
+ 
++{-# LANGUAGE CPP                 #-}
+ {-# LANGUAGE DataKinds           #-}
+ {-# LANGUAGE MagicHash           #-}
+ {-# LANGUAGE ScopedTypeVariables #-}
+ {-# LANGUAGE TypeFamilies        #-}
+ {-# LANGUAGE TypeOperators       #-}
++#if __GLASGOW_HASKELL__ >= 806
++{-# LANGUAGE NoStarIsType #-}
++#endif
+ 
+ module Clash.Explicit.DDR
+   ( ddrIn
+diff --git a/src/Clash/Intel/DDR.hs b/src/Clash/Intel/DDR.hs
+index 08d2f67..5841a35 100644
+--- a/src/Clash/Intel/DDR.hs
++++ b/src/Clash/Intel/DDR.hs
+@@ -12,11 +12,15 @@ see ALTDDIO userguide for the specifics:
+ 
https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/ug/ug_altddio.pdf
+ -}
+ 
++{-# LANGUAGE CPP              #-}
+ {-# LANGUAGE DataKinds        #-}
+ {-# LANGUAGE FlexibleContexts #-}
+ {-# LANGUAGE MagicHash        #-}
+ {-# LANGUAGE TypeFamilies     #-}
+ {-# LANGUAGE TypeOperators    #-}
++#if __GLASGOW_HASKELL__ >= 806
++{-# LANGUAGE NoStarIsType #-}
++#endif
+ 
+ module Clash.Intel.DDR
+   ( altddioIn
+diff --git a/src/Clash/Promoted/Nat.hs b/src/Clash/Promoted/Nat.hs
+index 9e0b4aa..369afbc 100644
+--- a/src/Clash/Promoted/Nat.hs
++++ b/src/Clash/Promoted/Nat.hs
+@@ -6,6 +6,7 @@ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ -}
+ 
+ {-# LANGUAGE AllowAmbiguousTypes #-}
++{-# LANGUAGE CPP                 #-}
+ {-# LANGUAGE DataKinds           #-}
+ {-# LANGUAGE GADTs               #-}
+ {-# LANGUAGE KindSignatures      #-}
+@@ -15,6 +16,9 @@ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ {-# LANGUAGE TypeApplications    #-}
+ {-# LANGUAGE TypeOperators       #-}
+ {-# LANGUAGE RankNTypes          #-}
++#if __GLASGOW_HASKELL__ >= 806
++{-# LANGUAGE NoStarIsType #-}
++#endif
+ 
+ {-# LANGUAGE Trustworthy #-}
+ 
+@@ -72,6 +76,7 @@ module Clash.Promoted.Nat
+   )
+ where
+ 
++import Data.Kind          (Type)
+ import GHC.TypeLits       (KnownNat, Nat, type (+), type (-), type (*),
+                            type (^), type (<=), natVal)
+ import GHC.TypeLits.Extra (CLog, FLog, Div, Log, Mod)
+@@ -125,7 +130,7 @@ snatToNum p@SNat = fromInteger (natVal p)
+ -- | Unary representation of a type-level natural
+ --
+ -- __NB__: Not synthesisable
+-data UNat :: Nat -> * where
++data UNat :: Nat -> Type where
+   UZero :: UNat 0
+   USucc :: UNat n -> UNat (n + 1)
+ 
+@@ -283,7 +288,7 @@ pow2SNat SNat = SNat
+ --      @
+ --      __B1__ :: 'BNat' n -> 'BNat' ((2 '*' n) '+' 1)
+ --      @
+-data BNat :: Nat -> * where
++data BNat :: Nat -> Type where
+   BT :: BNat 0
+   B0 :: BNat n -> BNat (2*n)
+   B1 :: BNat n -> BNat ((2*n) + 1)
+diff --git a/src/Clash/Sized/Internal/Index.hs 
b/src/Clash/Sized/Internal/Index.hs
+index a04479f..6d91d04 100644
+--- a/src/Clash/Sized/Internal/Index.hs
++++ b/src/Clash/Sized/Internal/Index.hs
+@@ -5,6 +5,7 @@ License    :  BSD2 (see the file LICENSE)
+ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ -}
+ 
++{-# LANGUAGE CPP                   #-}
+ {-# LANGUAGE DataKinds             #-}
+ {-# LANGUAGE DeriveAnyClass        #-}
+ {-# LANGUAGE DeriveDataTypeable    #-}
+@@ -17,6 +18,9 @@ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ {-# LANGUAGE TypeFamilies          #-}
+ {-# LANGUAGE TypeOperators         #-}
+ {-# LANGUAGE UndecidableInstances  #-}
++#if __GLASGOW_HASKELL__ >= 806
++{-# LANGUAGE NoStarIsType #-}
++#endif
+ 
+ {-# LANGUAGE Unsafe #-}
+ 
+diff --git a/src/Clash/Sized/RTree.hs b/src/Clash/Sized/RTree.hs
+index 175e375..633fdeb 100644
+--- a/src/Clash/Sized/RTree.hs
++++ b/src/Clash/Sized/RTree.hs
+@@ -4,6 +4,7 @@ License    :  BSD2 (see the file LICENSE)
+ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ -}
+ 
++{-# LANGUAGE CPP                  #-}
+ {-# LANGUAGE DataKinds            #-}
+ {-# LANGUAGE GADTs                #-}
+ {-# LANGUAGE InstanceSigs         #-}
+@@ -18,6 +19,9 @@ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ {-# LANGUAGE TypeOperators        #-}
+ {-# LANGUAGE UndecidableInstances #-}
+ {-# LANGUAGE ViewPatterns         #-}
++#if __GLASGOW_HASKELL__ >= 806
++{-# LANGUAGE NoStarIsType #-}
++#endif
+ 
+ {-# LANGUAGE Trustworthy #-}
+ 
+@@ -59,6 +63,7 @@ import Control.Applicative         (liftA2)
+ import qualified Control.Lens      as Lens
+ import Data.Default                (Default (..))
+ import Data.Foldable               (toList)
++import Data.Kind                   (Type)
+ import Data.Singletons.Prelude     (Apply, TyFun, type (@@))
+ import Data.Proxy                  (Proxy (..))
+ import GHC.TypeLits                (KnownNat, Nat, type (+), type (^), type 
(*))
+@@ -101,7 +106,7 @@ let populationCount' :: (KnownNat k, KnownNat (2^k)) => 
BitVector (2^k) -> Index
+ --
+ -- * Only has elements at the leaf of the tree
+ -- * A tree of depth /d/ has /2^d/ elements.
+-data RTree :: Nat -> * -> * where
++data RTree :: Nat -> Type -> Type where
+   LR_ :: a -> RTree 0 a
+   BR_ :: RTree d a -> RTree d a -> RTree (d+1) a
+ 
+@@ -180,7 +185,7 @@ instance KnownNat d => Applicative (RTree d) where
+ instance KnownNat d => Foldable (RTree d) where
+   foldMap f = tfold f mappend
+ 
+-data TraversableTree (g :: * -> *) (a :: *) (f :: TyFun Nat *) :: *
++data TraversableTree (g :: Type -> Type) (a :: Type) (f :: TyFun Nat Type) :: 
Type
+ type instance Apply (TraversableTree f a) d = f (RTree d a)
+ 
+ instance KnownNat d => Traversable (RTree d) where
+@@ -305,7 +310,7 @@ instance (KnownNat d, Undefined a) => Undefined (RTree d 
a) where
+ -- >>> populationCount' (7 :: BitVector 16)
+ -- 3
+ tdfold :: forall p k a . KnownNat k
+-       => Proxy (p :: TyFun Nat * -> *) -- ^ The /motive/
++       => Proxy (p :: TyFun Nat Type -> Type) -- ^ The /motive/
+        -> (a -> (p @@ 0)) -- ^ Function to apply to the elements on the leafs
+        -> (forall l . SNat l -> (p @@ l) -> (p @@ l) -> (p @@ (l+1)))
+        -- ^ Function to fold the branches with.
+@@ -321,7 +326,7 @@ tdfold _ f g = go SNat
+                       in  g sn' (go sn' l) (go sn' r)
+ {-# NOINLINE tdfold #-}
+ 
+-data TfoldTree (a :: *) (f :: TyFun Nat *) :: *
++data TfoldTree (a :: Type) (f :: TyFun Nat Type) :: Type
+ type instance Apply (TfoldTree a) d = a
+ 
+ -- | Reduce a tree to a single element
+@@ -357,7 +362,7 @@ treplicate sn a = go (toUNat sn)
+ trepeat :: KnownNat d => a -> RTree d a
+ trepeat = treplicate SNat
+ 
+-data MapTree (a :: *) (f :: TyFun Nat *) :: *
++data MapTree (a :: Type) (f :: TyFun Nat Type) :: Type
+ type instance Apply (MapTree a) d = RTree d a
+ 
+ -- | \"'tmap' @f t@\" is the tree obtained by apply /f/ to each element of 
/t/,
+@@ -378,7 +383,7 @@ tindices =
+          (\s@SNat l r -> BR l (tmap (+(snatToNum (pow2SNat s))) r))
+          (treplicate SNat 0)
+ 
+-data V2TTree (a :: *) (f :: TyFun Nat *) :: *
++data V2TTree (a :: Type) (f :: TyFun Nat Type) :: Type
+ type instance Apply (V2TTree a) d = RTree d a
+ 
+ -- | Convert a vector with /2^d/ elements to a tree of depth /d/.
+@@ -390,7 +395,7 @@ type instance Apply (V2TTree a) d = RTree d a
+ v2t :: forall d a . KnownNat d => Vec (2^d) a -> RTree d a
+ v2t = dtfold (Proxy @(V2TTree a)) LR (const BR)
+ 
+-data T2VTree (a :: *) (f :: TyFun Nat *) :: *
++data T2VTree (a :: Type) (f :: TyFun Nat Type) :: Type
+ type instance Apply (T2VTree a) d = Vec (2^d) a
+ 
+ -- | Convert a tree of depth /d/ to a vector of /2^d/ elements
+@@ -433,7 +438,7 @@ indexTree t i = (t2v t) !! i
+ replaceTree :: (KnownNat d, Enum i) => i -> a -> RTree d a -> RTree d a
+ replaceTree i a = v2t . replace i a . t2v
+ 
+-data ZipWithTree (b :: *) (c :: *) (f :: TyFun Nat *) :: *
++data ZipWithTree (b :: Type) (c :: Type) (f :: TyFun Nat Type) :: Type
+ type instance Apply (ZipWithTree b c) d = RTree d b -> RTree d c
+ 
+ -- | 'tzipWith' generalises 'tzip' by zipping with the function given as the
+@@ -460,7 +465,7 @@ tzipWith f = tdfold (Proxy @(ZipWithTree b c)) lr br
+ tzip :: KnownNat d => RTree d a -> RTree d b -> RTree d (a,b)
+ tzip = tzipWith (,)
+ 
+-data UnzipTree (a :: *) (b :: *) (f :: TyFun Nat *) :: *
++data UnzipTree (a :: Type) (b :: Type) (f :: TyFun Nat Type) :: Type
+ type instance Apply (UnzipTree a b) d = (RTree d a, RTree d b)
+ 
+ -- | 'tunzip' transforms a tree of pairs into a tree of first components and a
+diff --git a/src/Clash/Sized/Vector.hs b/src/Clash/Sized/Vector.hs
+index cd55a37..b4ec3d6 100644
+--- a/src/Clash/Sized/Vector.hs
++++ b/src/Clash/Sized/Vector.hs
+@@ -6,6 +6,7 @@ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ -}
+ 
+ {-# LANGUAGE BangPatterns         #-}
++{-# LANGUAGE CPP                  #-}
+ {-# LANGUAGE DataKinds            #-}
+ {-# LANGUAGE GADTs                #-}
+ {-# LANGUAGE KindSignatures       #-}
+@@ -20,6 +21,9 @@ Maintainer :  Christiaan Baaij <christiaan.ba...@gmail.com>
+ {-# LANGUAGE TypeOperators        #-}
+ {-# LANGUAGE UndecidableInstances #-}
+ {-# LANGUAGE ViewPatterns         #-}
++#if __GLASGOW_HASKELL__ >= 806
++{-# LANGUAGE NoStarIsType #-}
++#endif
+ 
+ {-# LANGUAGE Trustworthy #-}
+ 
+@@ -105,6 +109,7 @@ import qualified Control.Lens     as Lens hiding (pattern 
(:>), pattern (:<))
+ import Data.Default               (Default (..))
+ import qualified Data.Foldable    as F
+ import Data.Bifunctor.Flip        (Flip (..))
++import Data.Kind                  (Type)
+ import Data.Proxy                 (Proxy (..))
+ import Data.Singletons.Prelude    (TyFun,Apply,type (@@))
+ import GHC.TypeLits               (CmpNat, KnownNat, Nat, type (+), type (-), 
type (*),
+@@ -192,7 +197,7 @@ infixr 5 `Cons`
+ -- * Lists with their length encoded in their type
+ -- * 'Vec'tor elements have an __ASCENDING__ subscript starting from 0 and
+ --   ending at @'length' - 1@.
+-data Vec :: Nat -> * -> * where
++data Vec :: Nat -> Type -> Type where
+   Nil  :: Vec 0 a
+   Cons :: a -> Vec n a -> Vec (n + 1) a
+ 
+@@ -1715,7 +1720,7 @@ lazyV = lazyV' (repeat undefined)
+ -- or delay, of O(@'length' xs@). Look at 'dtfold' for a /dependently/ typed
+ -- fold that produces a structure with a depth of O(log_2(@'length' xs@)).
+ dfold :: forall p k a . KnownNat k
+-      => Proxy (p :: TyFun Nat * -> *) -- ^ The /motive/
++      => Proxy (p :: TyFun Nat Type -> Type) -- ^ The /motive/
+       -> (forall l . SNat l -> a -> (p @@ l) -> (p @@ (l + 1)))
+       -- ^ Function to fold.
+       --
+@@ -1833,7 +1838,7 @@ dfold _ f z xs = go (snatProxy (asNatProxy xs)) xs
+ -- __NB__: The depth, or delay, of the structure produced by
+ -- \"@'dtfold' m f g xs@\" is O(log_2(@'length' xs@)).
+ dtfold :: forall p k a . KnownNat k
+-       => Proxy (p :: TyFun Nat * -> *) -- ^ The /motive/
++       => Proxy (p :: TyFun Nat Type -> Type) -- ^ The /motive/
+        -> (a -> (p @@ 0)) -- ^ Function to apply to every element
+        -> (forall l . SNat l -> (p @@ l) -> (p @@ l) -> (p @@ (l + 1)))
+        -- ^ Function to combine results.
+@@ -1864,7 +1869,7 @@ dtfold _ f g = go (SNat :: SNat k)
+ -- map' :: forall n a b . KnownNat n => (a -> b) -> Vec n a -> Vec n b
+ -- map' f = 'dfold' (Proxy @('VCons' b)) (\_ x xs -> f x :> xs)
+ -- @
+-data VCons (a :: *) (f :: TyFun Nat *) :: *
++data VCons (a :: Type) (f :: TyFun Nat Type) :: Type
+ type instance Apply (VCons a) l = Vec l a
+ 
+ -- | Specialised version of 'dfold' that builds a triangular computational
+diff --git a/src/Clash/Xilinx/DDR.hs b/src/Clash/Xilinx/DDR.hs
+index 27c5573..072d785 100644
+--- a/src/Clash/Xilinx/DDR.hs
++++ b/src/Clash/Xilinx/DDR.hs
+@@ -13,11 +13,15 @@ For more information about the Xilinx DDR primitives see:
+       
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_2/ug953-vivado-7series-libraries.pdf
+ -}
+ 
++{-# LANGUAGE CPP              #-}
+ {-# LANGUAGE DataKinds        #-}
+ {-# LANGUAGE FlexibleContexts #-}
+ {-# LANGUAGE MagicHash        #-}
+ {-# LANGUAGE TypeFamilies     #-}
+ {-# LANGUAGE TypeOperators    #-}
++#if __GLASGOW_HASKELL__ >= 806
++{-# LANGUAGE NoStarIsType #-}
++#endif
+ 
+ module Clash.Xilinx.DDR
+   ( iddr

Reply via email to