Skip to content

Commit

Permalink
Work around for GHC 8.1 issue with associated type heads
Browse files Browse the repository at this point in the history
  • Loading branch information
benl23x5 committed Dec 13, 2017
1 parent 71ca664 commit 4a1c207
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions repa-scalar/Data/Repa/Scalar/Singleton/Nat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{-# LANGUAGE UndecidableInstances #-}

-- | Singleton-typed natural numbers and arithmetic.
--
--
-- Used for indexing into hetrogenous list types.
--
module Data.Repa.Scalar.Singleton.Nat
Expand Down Expand Up @@ -38,7 +38,7 @@ class Add x y where
add :: Nat x -> Nat y -> Nat (AddR x y)

instance Add Z x where
type AddR Z y = y
type AddR Z x = x
add Zero y = y
{-# INLINE add #-}

Expand All @@ -55,10 +55,10 @@ class Mul x y where
mul :: Nat x -> Nat y -> Nat (MulR x y)

instance Mul Z x where
type MulR Z y = Z
type MulR Z x = Z
mul Zero _ = Zero

instance (Mul x y, Add (MulR x y) y)
instance (Mul x y, Add (MulR x y) y)
=> Mul (S x) y where
type MulR (S x) y = AddR (MulR x y) y
mul (Succ x) y = add (mul x y) y
Expand Down
10 changes: 5 additions & 5 deletions repa-scalar/repa-scalar.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: repa-scalar
Version: 4.2.3.1
Version: 4.2.3.2
License: BSD3
License-file: LICENSE
Author: The Repa Development Team
Expand All @@ -18,10 +18,10 @@ source-repository head
location: https://github.com/DDCSF/repa.git

Library
build-Depends:
base == 4.9.*,
primitive == 0.6.*,
vector == 0.10.*,
build-Depends:
base >= 4.9 && < 4.11,
primitive >= 0.6 && < 0.8,
vector >= 0.10 && < 0.13,
bytestring == 0.10.*,
double-conversion == 2.0.*,
time == 1.6.*
Expand Down

0 comments on commit 4a1c207

Please sign in to comment.