diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-05-19 11:57:48 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-05-19 11:57:48 +0200 |
commit | b22366401ee4bfead4ba6789937acdb7274d175c (patch) | |
tree | 5a8194ab03d726b1f2f9100191e76907d8e51fb5 /src/Data/Array/Mixed.hs | |
parent | 5a754a575d0a5e1bc9874d7cdfdc87de0c4cae45 (diff) |
SNat has COMPLETE in ghc 9.8
Diffstat (limited to 'src/Data/Array/Mixed.hs')
-rw-r--r-- | src/Data/Array/Mixed.hs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/Data/Array/Mixed.hs b/src/Data/Array/Mixed.hs index 94e161f..31a4e69 100644 --- a/src/Data/Array/Mixed.hs +++ b/src/Data/Array/Mixed.hs @@ -46,12 +46,6 @@ import Unsafe.Coerce (unsafeCoerce) data Dict c a where Dict :: c a => Dict c a --- | The 'SNat' pattern synonym is complete, but it doesn't have a --- @COMPLETE@ pragma. This copy of it does. -pattern GHC_SNat :: () => KnownNat n => SNat n -pattern GHC_SNat = SNat -{-# COMPLETE GHC_SNat #-} - fromSNat' :: SNat n -> Int fromSNat' = fromIntegral . fromSNat @@ -669,7 +663,7 @@ fromList1 :: forall n sh a. Storable a fromList1 ssh l | Dict <- lemKnownNatRankSSX ssh = case ssh of - SKnown m@GHC_SNat :!% _ | natVal m /= fromIntegral (length l) -> + SKnown m@SNat :!% _ | natVal m /= fromIntegral (length l) -> error $ "Data.Array.Mixed.fromList: length of list (" ++ show (length l) ++ ")" ++ "does not match the type (" ++ show (natVal m) ++ ")" _ -> XArray (S.ravel (ORB.fromList [length l] (coerce @[XArray sh a] @[S.Array (Rank sh) a] l))) |