diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-06-02 23:04:29 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-06-02 23:04:29 +0200 |
commit | 07970d6a4476fc1d39457193d9f6175fe7b69dad (patch) | |
tree | 1f15abe33c7da7a33eb1754a75d15c8c95752f8e /src/Data | |
parent | dfcc1a6972ef724de2fc746e19b6de45d7dc9249 (diff) |
Make MapJust injective
Diffstat (limited to 'src/Data')
-rw-r--r-- | src/Data/Array/Nested/Types.hs | 3 |
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 |