@@ -92,7 +92,7 @@ build ist info emode opts fn tm
92 hs <- get_holes
92 hs <- get_holes
93 ivs <- get_instances
93 ivs <- get_instances
94 ptm <- get_term
94 ptm <- get_term
95− -- Resolve remaining type classes. Two passes - first to get the
95+ -- Resolve remaining interfaces. Two passes - first to get the
96 -- default Num instances, second to clean up the rest
96 -- default Num instances, second to clean up the rest
97 when (not pattern) $
97 when (not pattern) $
98 mapM_ (\n -> when (n `elem` hs) $
98 mapM_ (\n -> when (n `elem` hs) $
@@ -152,7 +152,7 @@ build ist info emode opts fn tm
152 (h: hs) -> do patvar h; mkPat
152 (h: hs) -> do patvar h; mkPat
153 [] -> return ()
153 [] -> return ()
155−-- | Build a term autogenerated as a typeclass method definition.
155+-- | Build a term autogenerated as an interface method definition.
157-- (Separate, so we don't go overboard resolving things that we don't
157-- (Separate, so we don't go overboard resolving things that we don't
158-- know about yet on the LHS of a pattern def)
158-- know about yet on the LHS of a pattern def)
@@ -393,7 +393,7 @@ elab ist info emode opts fn tm
393 TType _ -> elab' ina (Just fc) (PRef fc [] unitTy)
393 TType _ -> elab' ina (Just fc) (PRef fc [] unitTy)
394 UType _ -> elab' ina (Just fc) (PRef fc [] unitTy)
394 UType _ -> elab' ina (Just fc) (PRef fc [] unitTy)
395 _ -> elab' ina (Just fc) (PRef fc [] unitCon)
395 _ -> elab' ina (Just fc) (PRef fc [] unitCon)
396− elab' ina fc (PResolveTC (FC "HACK" _ _)) -- for chasing parent classes
396+ elab' ina fc (PResolveTC (FC "HACK" _ _)) -- for chasing parent interfaces
397 = do g <- goal; resolveTC False False 5 g fn elabRec ist
397 = do g <- goal; resolveTC False False 5 g fn elabRec ist
398 elab' ina fc (PResolveTC fc')
398 elab' ina fc (PResolveTC fc')
399 = do c <- getNameFrom (sMN 0 "__class")
399 = do c <- getNameFrom (sMN 0 "__class")
@@ -620,7 +620,7 @@ elab ist info emode opts fn tm
620 let defined = case lookupTy n ctxt of
620 let defined = case lookupTy n ctxt of
621 [] -> False
621 [] -> False
622 _ -> True
622 _ -> True
623− -- this is to stop us resolve type classes recursively
623+ -- this is to stop us resolve interfaces recursively
624 -- trace (show (n, guarded)) $
624 -- trace (show (n, guarded)) $
625 if (tcname n && ina && not intransform)
625 if (tcname n && ina && not intransform)
626 then erun fc $
626 then erun fc $
@@ -863,10 +863,10 @@ elab ist info emode opts fn tm
864 do ivs <- get_instances
864 do ivs <- get_instances
865 ps <- get_probs
865 ps <- get_probs
866− -- HACK: we shouldn't resolve type classes if we're defining an instance
866+ -- HACK: we shouldn't resolve interfaces if we're defining an instance
867 -- function or default definition.
867 -- function or default definition.
868 let isinf = f == inferCon || tcname f
868 let isinf = f == inferCon || tcname f
869− -- if f is a type class, we need to know its arguments so that
869+ -- if f is an interface, we need to know its arguments so that
870 -- we can unify with them
870 -- we can unify with them
871 case lookupCtxt f (idris_interfaces ist) of
871 case lookupCtxt f (idris_interfaces ist) of
872 [] -> return ()
872 [] -> return ()
@@ -877,7 +877,7 @@ elab ist info emode opts fn tm
877-- trace ("args is " ++ show args) $ return ()
877-- trace ("args is " ++ show args) $ return ()
878 ns <- apply (Var f) (map isph args)
878 ns <- apply (Var f) (map isph args)
879-- trace ("ns is " ++ show ns) $ return ()
879-- trace ("ns is " ++ show ns) $ return ()
880− -- mark any type class arguments as injective
880+ -- mark any interface arguments as injective
881-- when (not pattern) $
881-- when (not pattern) $
882 mapM_ checkIfInjective (map snd ns)
882 mapM_ checkIfInjective (map snd ns)
883 unifyProblems -- try again with the new information,
883 unifyProblems -- try again with the new information,
@@ -914,7 +914,7 @@ elab ist info emode opts fn tm
914 _ -> do solve
914 _ -> do solve
915 hs <- get_holes
915 hs <- get_holes
916 ivs' <- get_instances
916 ivs' <- get_instances
917− -- Attempt to resolve any type classes which have 'complete' types,
917+ -- Attempt to resolve any interfaces which have 'complete' types,
918 -- i.e. no holes in them
918 -- i.e. no holes in them
919 when (not pattern || (e_inarg ina && not tcgen)) $
919 when (not pattern || (e_inarg ina && not tcgen)) $
920 mapM_ (\n -> do focus n
920 mapM_ (\n -> do focus n
@@ -963,7 +963,7 @@ elab ist info emode opts fn tm
963 (P _ c _, args) ->
963 (P _ c _, args) ->
964 case lookupCtxtExact c (idris_interfaces ist) of
964 case lookupCtxtExact c (idris_interfaces ist) of
965 Nothing -> return ()
965 Nothing -> return ()
966− Just ci -> -- type class, set as injective
966+ Just ci -> -- interface, set as injective
967 do mapM_ setinjArg (getDets 0 (interface_determiners ci) args)
967 do mapM_ setinjArg (getDets 0 (interface_determiners ci) args)
968 -- maybe we can solve more things now...
968 -- maybe we can solve more things now...
969 ulog <- getUnifyLog
969 ulog <- getUnifyLog
@@ -1738,7 +1738,7 @@ pruneByType env (P _ n _) goalty ist as
1738pruneByType _ t _ _ as = as
1738pruneByType _ t _ _ as = as
1740-- Could the name feasibly be the return type?
1740-- Could the name feasibly be the return type?
1741−-- If there is a type class constraint on the return type, and no instance
1741+-- If there is an interface constraint on the return type, and no instance
1742-- in the environment or globally for that name, then no
1742-- in the environment or globally for that name, then no
1743-- Otherwise, yes
1743-- Otherwise, yes
1744-- (FIXME: This isn't complete, but I'm leaving it here and coming back
1744-- (FIXME: This isn't complete, but I'm leaving it here and coming back
@@ -1809,7 +1809,7 @@ solveAutos ist fn ambigok
1809 = do autos <- get_autos
1809 = do autos <- get_autos
1810 mapM_ (solveAuto ist fn ambigok) (map (\(n, (fc, _)) -> (n, fc)) autos)
1810 mapM_ (solveAuto ist fn ambigok) (map (\(n, (fc, _)) -> (n, fc)) autos)
1812−-- Return true if the given error suggests a type class failure is
1812+-- Return true if the given error suggests an interface failure is
1813-- recoverable
1813-- recoverable
1814tcRecoverable :: ElabMode -> Err -> Bool
1814tcRecoverable :: ElabMode -> Err -> Bool
1815tcRecoverable ERHS (CantResolve f g _) = f
1815tcRecoverable ERHS (CantResolve f g _) = f
@@ -2820,7 +2820,7 @@ processTacticDecls info steps =
2820 -- TODO: inaccessible
2820 -- TODO: inaccessible
2822 RAddInstance interfaceName instName ->
2822 RAddInstance interfaceName instName ->
2823− do -- The type class resolution machinery relies on a special
2823+ do -- The interface resolution machinery relies on a special
2824 logElab 2 $ "Adding elab script instance " ++ show instName ++
2824 logElab 2 $ "Adding elab script instance " ++ show instName ++
2825 " for " ++ show interfaceName
2825 " for " ++ show interfaceName
2826 addInstance False True interfaceName instName
2826 addInstance False True interfaceName instName