@@ -14,6 +14,7 @@ import Data.Maybe (catMaybes, fromMaybe, isJust)
1414import Data.Monoid (Monoid (mempty, mappend))
1515import Data.Set (Set)
1616import qualified Data.Set as S
17+import qualified Data.Text as T (pack, isPrefixOf)
1718
1819import Idris.AbsSyntax (addUsingConstraints, addImpl, getContext, getIState, putIState, implicit)
1920import Idris.AbsSyntaxTree (class_instances, defaultSyntax, Idris,
@@ -76,7 +77,9 @@ searchUsing pred istate ty =
7677 get (CaseOp _ ty _ _ _ _) = Just ty
7778 get _ = Nothing
7879 special :: Name -> Bool
80+ special (NS n ns) = special n
7981 special (SN _) = True
82+ special (UN n) = T.pack "default#" `T.isPrefixOf` n
8083 special _ = False
8184
8285-- Our default search predicate.
@@ -181,7 +184,7 @@ data State = State
181184 , args1 :: !ArgsDAG -- ^ arguments for the left type which have yet to be resolved
182185 , args2 :: !ArgsDAG -- ^ arguments for the right type which have yet to be resolved
183186 , classes1 :: ![(Name, Type)] -- ^ typeclass arguments for the left type which haven't been resolved
184− , classes2 :: ![(Name, Type)] -- & typeclass arguments for the right type which haven't been resolved
187+ , classes2 :: ![(Name, Type)] -- ^ typeclass arguments for the right type which haven't been resolved
185188 , score :: !Score -- ^ the score so far
186189 , usedNames :: ![Name] -- ^ all names that have been used
187190 } deriving Show