@@ -817,8 +817,8 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
817817 | PInferRef FC Name -- ^ A name to be defined later
818818 | PPatvar FC Name -- ^ A pattern variable
819819 | PLam FC Name FC PTerm PTerm -- ^ A lambda abstraction. Second FC is name span.
820− | PPi Plicity Name FC PTerm PTerm -- ^ (n : t1) -> t2, where the FC is for the variable
821− | PLet FC Name PTerm PTerm PTerm -- ^ A let binding
820+ | PPi Plicity Name FC PTerm PTerm -- ^ (n : t1) -> t2, where the FC is for the precise location of the variable
821+ | PLet FC Name FC PTerm PTerm PTerm -- ^ A let binding (second FC is precise name location)
822822 | PTyped PTerm PTerm -- ^ Term with explicit type
823823 | PApp FC PTerm [PArg] -- ^ e.g. IO (), List Char, length x
824824 | PAppImpl PTerm [ImplicitInfo] -- ^ Implicit argument application (introduced during elaboration only)
@@ -869,7 +869,7 @@ mapPT :: (PTerm -> PTerm) -> PTerm -> PTerm
869869mapPT f t = f (mpt t) where
870870 mpt (PLam fc n nfc t s) = PLam fc n nfc (mapPT f t) (mapPT f s)
871871 mpt (PPi p n nfc t s) = PPi p n nfc (mapPT f t) (mapPT f s)
872− mpt (PLet fc n ty v s) = PLet fc n (mapPT f ty) (mapPT f v) (mapPT f s)
872+ mpt (PLet fc n nfc ty v s) = PLet fc n nfc (mapPT f ty) (mapPT f v) (mapPT f s)
873873 mpt (PRewrite fc t s g) = PRewrite fc (mapPT f t) (mapPT f s)
874874 (fmap (mapPT f) g)
875875 mpt (PApp fc t as) = PApp fc (mapPT f t) (map (fmap (mapPT f)) as)
@@ -959,7 +959,7 @@ type PTactic = PTactic' PTerm
959959data PDo' t = DoExp FC t
960960 | DoBind FC Name FC t -- ^ second FC is precise name location
961961 | DoBindP FC t t [(t,t)]
962− | DoLet FC Name t t
962+ | DoLet FC Name FC t t -- ^ second FC is precise name location
963963 | DoLetP FC t t
964964 deriving (Eq, Functor, Data, Typeable)
965965{-!
@@ -971,7 +971,7 @@ instance Sized a => Sized (PDo' a) where
971971 size (DoExp fc t) = 1 + size fc + size t
972972 size (DoBind fc nm nfc t) = 1 + size fc + size nm + size nfc + size t
973973 size (DoBindP fc l r alts) = 1 + size fc + size l + size r + size alts
974− size (DoLet fc nm l r) = 1 + size fc + size nm + size l + size r
974+ size (DoLet fc nm nfc l r) = 1 + size fc + size nm + size l + size r
975975 size (DoLetP fc l r) = 1 + size fc + size l + size r
976976
977977type PDo = PDo' PTerm
@@ -1028,7 +1028,7 @@ highestFC (PInferRef fc _) = Just fc
10281028highestFC (PPatvar fc _) = Just fc
10291029highestFC (PLam fc _ _ _ _) = Just fc
10301030highestFC (PPi _ _ _ _ _) = Nothing
1031−highestFC (PLet fc _ _ _ _) = Just fc
1031+highestFC (PLet fc _ _ _ _ _) = Just fc
10321032highestFC (PTyped tm ty) = highestFC tm <|> highestFC ty
10331033highestFC (PApp fc _ _) = Just fc
10341034highestFC (PAppBind fc _ _) = Just fc
@@ -1061,7 +1061,7 @@ highestFC (PDoBlock lines) =
10611061 getDoFC (DoExp fc t) = fc
10621062 getDoFC (DoBind fc nm nfc t) = fc
10631063 getDoFC (DoBindP fc l r alts) = fc
1064− getDoFC (DoLet fc nm l r) = fc
1064+ getDoFC (DoLet fc nm nfc l r) = fc
10651065 getDoFC (DoLetP fc l r) = fc
10661066
10671067highestFC (PIdiom fc _) = Just fc
@@ -1455,7 +1455,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe startPrec bnd
14551455 bracket p startPrec . group . align . hang 2 $
14561456 text "\\" <> prettyBindingOf n False <+> text "=>" <$>
14571457 prettySe startPrec ((n, False):bnd) sc
1458− prettySe p bnd (PLet fc n ty v sc) =
1458+ prettySe p bnd (PLet fc n nfc ty v sc) =
14591459 bracket p startPrec . group . align $
14601460 kwd "let" <+> (group . align . hang 2 $ prettyBindingOf n False <+> text "=" <$> prettySe startPrec bnd v) </>
14611461 kwd "in" <+> (group . align . hang 2 $ prettySe startPrec ((n, False):bnd) sc)
@@ -1874,7 +1874,7 @@ instance Sized PTerm where
18741874 size (PRef fc name) = size name
18751875 size (PLam fc name _ ty bdy) = 1 + size ty + size bdy
18761876 size (PPi plicity name fc ty bdy) = 1 + size ty + size fc + size bdy
1877− size (PLet fc name ty def bdy) = 1 + size ty + size def + size bdy
1877+ size (PLet fc name nfc ty def bdy) = 1 + size ty + size def + size bdy
18781878 size (PTyped trm ty) = 1 + size trm + size ty
18791879 size (PApp fc name args) = 1 + size args
18801880 size (PAppBind fc name args) = 1 + size args
@@ -1949,7 +1949,7 @@ boundNamesIn tm = S.toList (ni S.empty tm)
19491949 ni set (PCase _ c os) = niTms (ni set c) (map snd os)
19501950 ni set (PIfThenElse _ c t f) = niTms set [c, t, f]
19511951 ni set (PLam fc n _ ty sc) = S.insert n $ ni (ni set ty) sc
1952− ni set (PLet fc n ty val sc) = S.insert n $ ni (ni (ni set ty) val) sc
1952+ ni set (PLet fc n nfc ty val sc) = S.insert n $ ni (ni (ni set ty) val) sc
19531953 ni set (PPi p n _ ty sc) = niTacImp (S.insert n $ ni (ni set ty) sc) p
19541954 ni set (PEq _ _ _ l r) = ni (ni set l) r
19551955 ni set (PRewrite _ l r _) = ni (ni set l) r