aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Shaped/Base.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-06-06 12:15:15 +0200
committerTom Smeding <tom@tomsmeding.com>2025-06-06 12:15:15 +0200
commit3a5d069565cf4a19fbf94c7b548f072bbada265b (patch)
tree98894569990f2db9bcb9fbe50586525340e580d9 /src/Data/Array/Nested/Shaped/Base.hs
parent3b4b5dae625a7781abb59b5d0b593fc077507cf2 (diff)
Bidirectional inference for KnownEltsimplify-castable
Diffstat (limited to 'src/Data/Array/Nested/Shaped/Base.hs')
-rw-r--r--src/Data/Array/Nested/Shaped/Base.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Shaped/Base.hs b/src/Data/Array/Nested/Shaped/Base.hs
index 5c45abd..1d48270 100644
--- a/src/Data/Array/Nested/Shaped/Base.hs
+++ b/src/Data/Array/Nested/Shaped/Base.hs
@@ -173,6 +173,8 @@ instance Elt a => Elt (Shaped sh a) where
vecs)
instance (KnownShS sh, KnownElt a) => KnownElt (Shaped sh a) where
+ type KnownEltC (Shaped sh a) = (KnownShS sh, KnownElt a)
+
memptyArrayUnsafe :: forall sh'. IShX sh' -> Mixed sh' (Shaped sh a)
memptyArrayUnsafe i
| Dict <- lemKnownMapJust (Proxy @sh)