1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 • Overlapping instances for Data.Type.Map.Submap
(Data.Type.Map.Nub
(Data.Type.Set.Sort
(Rgr.Pipeline.Internal.Grid.MappingsF UVector gridFields)))
'["alpha" 'Data.Type.Map.:> Data.Vector.Unboxed.Base.Vector Int,
...]
arising from a use of ‘project’
Matching instances:
two instances involving outofscope types
instance [overlappable] [safe] Data.Type.Map.Submap s t =>
Data.Type.Map.Submap s (x : t)
instance [overlap ok] [safe] Data.Type.Map.Submap s t =>
Data.Type.Map.Submap (x : s) (x : t)
This is the code for Submap and instances (the module uses the IncoherentInstances extension):
class Submap s t where
submap :: Map t > Map s
instance Submap '[] '[] where
submap xs = Empty
instance Submap s t => Submap s (x ': t) where
submap (Ext _ _ xs) = submap xs
instance Submap s t => Submap (x ': s) (x ': t) where
submap (Ext k v xs) = Ext k v (submap xs)
