From 6fe603c89c59b156b7ecf410b4f39b28d4a22262 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 14 Nov 2024 13:39:59 +0100 Subject: Improve error message --- src/Data/Array/Nested/Internal/Shaped.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Data/Array/Nested/Internal/Shaped.hs b/src/Data/Array/Nested/Internal/Shaped.hs index d8c80d1..e2f65c0 100644 --- a/src/Data/Array/Nested/Internal/Shaped.hs +++ b/src/Data/Array/Nested/Internal/Shaped.hs @@ -199,14 +199,14 @@ instance (NumElt a, PrimElt a, Num a, KnownShS sh) => Num (Shaped sh a) where fromInteger = case knownShS @sh of ZSS -> sscalar . fromInteger - _ -> error "Data.Array.Nested.fromInteger: No singletons available, use explicit sreplicateScal/sscalar" + _ -> error "Data.Array.Nested.fromInteger: No singletons available, use explicit sreplicateScal" -- | TODO: 'KnownShS' is only there for 'fromRational'. instance (FloatElt a, NumElt a, PrimElt a, Fractional a, KnownShS sh) => Fractional (Shaped sh a) where fromRational = case knownShS @sh of ZSS -> sscalar . fromRational - _ -> error "Data.Array.Nested.fromRational: No singletons available, use explicit sreplicateScal/sscalar" + _ -> error "Data.Array.Nested.fromRational: No singletons available, use explicit sreplicateScal" recip = arithPromoteShaped recip (/) = arithPromoteShaped2 (/) @@ -215,7 +215,7 @@ instance (FloatElt a, NumElt a, PrimElt a, Floating a, KnownShS sh) => Floating pi = case knownShS @sh of ZSS -> sscalar pi - _ -> error "Data.Array.Nested.pi: No singletons available, use explicit sreplicateScal/sscalar" + _ -> error "Data.Array.Nested.pi: No singletons available, use explicit sreplicateScal" exp = arithPromoteShaped exp log = arithPromoteShaped log sqrt = arithPromoteShaped sqrt -- cgit v1.2.3-70-g09d2