on master help sign in
Tweak implicit name rules

Qualified names should never be implicits - this may cause some unbound name errors not to be caught (as there was in Classes.Verified)

commitf7a9c280bc895518db82ecc73696dccb73f4f538 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateTue 26 Jan 2016, 19:10 (11 years ago) parentbe33df4
3 files changed+10−3
libs/contrib/Classes/Verified.idr+7 src/Idris/AbsSyntax.hs+2−2 src/Idris/Core/TT.hs+1−1
libs/contrib/Classes/Verified.idr+7
@@ -92,6 +92,11 @@ interface MeetSemilattice a => VerifiedMeetSemilattice a where
9292 total meetSemilatticeMeetIsCommutative : (l, r : a) -> meet l r = meet r l
9393 total meetSemilatticeMeetIsIdempotent : (e : a) -> meet e e = e
9494
95+{- FIXME: Some maintenance required here.
96+ Algebra.top and Algebra.bottom don't exist!
97+-}
98+{-
99+
95100interface (VerifiedJoinSemilattice a, BoundedJoinSemilattice a) => VerifiedBoundedJoinSemilattice a where
96101 total boundedJoinSemilatticeBottomIsBottom : (e : a) -> join e Algebra.bottom = e
97102
@@ -112,3 +117,5 @@ interface (VerifiedBoundedJoinSemilattice a, VerifiedBoundedMeetSemilattice a, V
112117-- total moduleScalarMultDistributiveWRTModuleAddition : (s, t : a) -> (v : b) -> (s <+> t) <#> v = (s <#> v) <+> (t <#> v)
113118
114119--interface (VerifiedField a, VerifiedModule a b) => VerifiedVectorSpace a b where {}
120+
121+-}
src/Idris/AbsSyntax.hs+2−2
@@ -1556,9 +1556,9 @@ implicitise syn ignore ist tm = -- trace ("INCOMING " ++ showImp True tm) $
15561556 implNamesIn uv (PApp fc f args) = concatMap (implNamesIn uv) (map getTm args)
15571557 implNamesIn uv t = namesIn uv ist t
15581558
1559− imps top env (PApp _ f as)
1559+ imps top env ty@(PApp _ f as)
15601560 = do (decls, ns) <- get
1561− let isn = concatMap (namesIn uvars ist) (map getTm as)
1561+ let isn = nub (implNamesIn uvars ty)
15621562 put (decls, nub (ns ++ (isn `dropAll` (env ++ map fst (getImps decls)))))
15631563 imps top env (PPi (Imp l _ _ _) n _ ty sc)
15641564 = do let isn = nub (implNamesIn uvars ty) `dropAll` [n]
src/Idris/Core/TT.hs+1−1
@@ -588,7 +588,7 @@ tcname (SN (MethodN _)) = True
588588tcname (SN (ParentN _ _)) = True
589589tcname _ = False
590590
591−implicitable (NS n _) = implicitable n
591+implicitable (NS n _) = False
592592implicitable (UN xs) | T.null xs = False
593593 | otherwise = isLower (T.head xs) || T.head xs == '_'
594594implicitable (MN _ x) = not (tnull x) && thead x /= '_'