@@ -90,7 +90,7 @@ elabVal info tm
90 = do ctxt <- getContext
90 = do ctxt <- getContext
91 logLvl 10 (showImp True tm)
91 logLvl 10 (showImp True tm)
92 ((tm', defer), _) <- tclift $ elaborate ctxt (MN 0 "val") infP
92 ((tm', defer), _) <- tclift $ elaborate ctxt (MN 0 "val") infP
93− (build info False (infTerm tm))
93+ (build info True (infTerm tm))
94 logLvl 3 ("Value: " ++ show tm')
94 logLvl 3 ("Value: " ++ show tm')
95 let vtm = getInferTerm tm'
95 let vtm = getInferTerm tm'
96 logLvl 2 (show vtm)
96 logLvl 2 (show vtm)
@@ -241,18 +241,30 @@ elab info pattern tm = do elab' tm
244+ elab' (PLet n Placeholder val sc)
245+ = do attack; -- (h:_) <- get_holes
246+ tyn <- unique_hole (MN 0 "letty")
249+ valn <- unique_hole (MN 0 "letval")
250+ claim valn (Var tyn)
251+ letbind n (Var tyn) (Var valn)
244 elab' (PApp fc (PRef _ f) args)
257 elab' (PApp fc (PRef _ f) args)
245 | Just ps <- lookupCtxt f (inblock info)
258 | Just ps <- lookupCtxt f (inblock info)
246 = erun fc $
259 = erun fc $
247 elabApp (liftname info f) (map (PExp . (PRef fc)) ps ++ args)
260 elabApp (liftname info f) (map (PExp . (PRef fc)) ps ++ args)
248 | otherwise = erun fc $ elabApp f args
261 | otherwise = erun fc $ elabApp f args
249 where elabApp f args
262 where elabApp f args
250− = -- erun (FC "FOO" 42) $
251− try (do ns <- apply (Var f) (map isph args)
263+ = try (do ns <- apply (Var f) (map isph args)
253− elabArgs ns (map getTm args))
265+ elabArgs ns (map getTm args))
254− (do apply_elab f (map toElab args)
266+ (do apply_elab f (map toElab args)
256 elab' (PApp fc f [arg])
268 elab' (PApp fc f [arg])
257 = erun fc $
269 = erun fc $
258 do simple_app (elab' f) (elab' (getTm arg))
270 do simple_app (elab' f) (elab' (getTm arg))