From 3a5d069565cf4a19fbf94c7b548f072bbada265b Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 6 Jun 2025 12:15:15 +0200 Subject: Bidirectional inference for KnownElt --- src/Data/Array/Nested/Shaped/Base.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Data/Array/Nested/Shaped/Base.hs') 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) -- cgit v1.2.3-70-g09d2