- other -> pprPanic "TcGenDeriv.getFixity" (ppr nm)
-
-isLRAssoc :: GlobalSymbolTable -> Name -> (Bool, Bool)
-isLRAssoc fixs_assoc nm =
- case lookupFixityEnv fixs_assoc nm of
- Just (Fixity _ InfixN) -> (False, False)
- Just (Fixity _ InfixR) -> (False, True)
- Just (Fixity _ InfixL) -> (True, False)
- other -> pprPanic "TcGenDeriv.isLRAssoc" (ppr nm)
+ other -> defaultPrecedence
+
+isLRAssoc :: (Name -> Maybe Fixity) -> Name -> (Bool, Bool)
+isLRAssoc get_fixity nm =
+ case get_fixity nm `orElse` defaultFixity of
+ Fixity _ InfixN -> (False, False)
+ Fixity _ InfixR -> (False, True)
+ Fixity _ InfixL -> (True, False)