@@ -93,10 +93,12 @@ elabImplementation info syn doc argDocs what fc cs parents acc opts n nfc ps pex
93 -- if the implementation type matches any of the implementations we have already,
93 -- if the implementation type matches any of the implementations we have already,
94 -- and it's not a named implementation, then it's overlapping, so report an error
94 -- and it's not a named implementation, then it's overlapping, so report an error
95 case expn of
95 case expn of
97+ | OverlappingDictionary `notElem` opts ->
96− Nothing -> do mapM_ (maybe (return ()) overlapping . findOverlapping ist (interface_determiners ci) (delab ist nty))
98+ do mapM_ (maybe (return ()) overlapping . findOverlapping ist (interface_determiners ci) (delab ist nty))
97 (map fst $ interface_implementations ci)
99 (map fst $ interface_implementations ci)
98 addImplementation intImpl True n iname
100 addImplementation intImpl True n iname
99− Just _ -> addImplementation intImpl False n iname
101+ _ -> addImplementation intImpl False n iname
100 when (what /= ETypes && (not (null ds && not emptyinterface))) $ do
102 when (what /= ETypes && (not (null ds && not emptyinterface))) $ do
101 -- Add the parent implementation names to the privileged set
103 -- Add the parent implementation names to the privileged set
102 oldOpen <- addOpenImpl parents
104 oldOpen <- addOpenImpl parents
@@ -255,6 +257,8 @@ elabImplementation info syn doc argDocs what fc cs parents acc opts n nfc ps pex
256 findOverlapping i dets t n
258 findOverlapping i dets t n
257 | SN (ParentN _ _) <- n = Nothing
259 | SN (ParentN _ _) <- n = Nothing
260+ | Just opts <- lookupCtxtExact n (idris_flags i),
261+ OverlappingDictionary `elem` opts = Nothing
258 | otherwise
262 | otherwise
259 = case lookupTy n (tt_ctxt i) of
263 = case lookupTy n (tt_ctxt i) of
260 [t'] -> let tret = getRetType t
264 [t'] -> let tret = getRetType t