@@ -241,7 +241,7 @@ structDecs opts haddockConfig info struct spec fields = do
241241 -- #1286.
242242 where
243243 insts :: Set Hs. TypeClass
244- insts = Hs. getInstances instanceMap structName candidateInsts $
244+ insts = Hs. getInstances instanceMap ( Just structName) candidateInsts $
245245 Hs. fieldType <$> Vec. toList structFields
246246
247247 hsStruct :: Hs. Struct n
@@ -503,7 +503,7 @@ unionDecs haddockConfig info union spec = do
503503 getAccessorDecls :: C. UnionField -> [Hs. Decl ]
504504 getAccessorDecls C. UnionField {.. } =
505505 let hsType = Type. topLevel unionFieldType
506- fInsts = Hs. getInstances instanceMap newtypeName insts [hsType]
506+ fInsts = Hs. getInstances instanceMap ( Just newtypeName) insts [hsType]
507507 getterName = " get_" <> C. nameHs (C. fieldName unionFieldInfo)
508508 setterName = " set_" <> C. nameHs (C. fieldName unionFieldInfo)
509509 commentRefName name = Just $ HsDoc. paragraph [
@@ -822,7 +822,7 @@ typedefDecs opts haddockConfig info typedef spec = do
822822 insts =
823823 Hs. getInstances
824824 instanceMap
825- newtypeName
825+ ( Just newtypeName)
826826 candidateInsts
827827 [Hs. fieldType newtypeField]
828828
@@ -979,7 +979,7 @@ macroDecsTypedef opts haddockConfig info macroType spec = do
979979 fieldType = Type. topLevel ty
980980
981981 insts :: Set Hs. TypeClass
982- insts = Hs. getInstances instanceMap newtypeName candidateInsts [fieldType]
982+ insts = Hs. getInstances instanceMap ( Just newtypeName) candidateInsts [fieldType]
983983
984984 hsNewtype :: Hs. Newtype
985985 hsNewtype = Hs. Newtype {
@@ -1530,7 +1530,7 @@ constGetter ty instsMap info pureStubName = concat [
15301530 -- superclass constraints. See issue #993.
15311531 Hs. Storable
15321532 `elem`
1533- Hs. getInstances instsMap " unused " (Set. singleton Hs. Storable ) [ty]
1533+ Hs. getInstances instsMap Nothing (Set. singleton Hs. Storable ) [ty]
15341534 ]
15351535 where
15361536 -- *** Getter ***
0 commit comments