aboutsummaryrefslogtreecommitdiff
path: root/src/Data
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-06-02 23:04:29 +0200
committerTom Smeding <tom@tomsmeding.com>2025-06-02 23:04:29 +0200
commit07970d6a4476fc1d39457193d9f6175fe7b69dad (patch)
tree1f15abe33c7da7a33eb1754a75d15c8c95752f8e /src/Data
parentdfcc1a6972ef724de2fc746e19b6de45d7dc9249 (diff)
Make MapJust injective
Diffstat (limited to 'src/Data')
-rw-r--r--src/Data/Array/Nested/Types.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Data/Array/Nested/Types.hs b/src/Data/Array/Nested/Types.hs
index 4172fa0..b8a9aea 100644
--- a/src/Data/Array/Nested/Types.hs
+++ b/src/Data/Array/Nested/Types.hs
@@ -7,6 +7,7 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}
@@ -111,7 +112,7 @@ type family Replicate n a where
lemReplicateSucc :: (a : Replicate n a) :~: Replicate (n + 1) a
lemReplicateSucc = unsafeCoerceRefl
-type family MapJust l where
+type family MapJust l = r | r -> l where
MapJust '[] = '[]
MapJust (x : xs) = Just x : MapJust xs