module Test.LeanCheck.Instances.Array () where
import Test.LeanCheck
import Data.Array
instance (Num i, Ix i, Listable i, Listable a) => Listable (Array i a) where
tiers :: [[Array i a]]
tiers = forall a b c. (Listable a, Listable b) => (a -> b -> c) -> [[c]]
cons2 forall {i} {e}. (Ix i, Num i) => i -> [e] -> Array i e
mkArray
where
mkArray :: i -> [e] -> Array i e
mkArray i
l [e]
xs = forall i e. Ix i => (i, i) -> [e] -> Array i e
listArray (i
l, i
l forall a. Num a => a -> a -> a
+ forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall (t :: * -> *) a. Foldable t => t a -> Int
length [e]
xs forall a. Num a => a -> a -> a
- Int
1)) [e]
xs