on master help sign in
Split Tactics.intro into two versions

Most uses in my real code called the (Just n) variant, and this was needlessly noisy. Now, the surface API just takes a name, and there's an alternate version to figure out the name.

commitce764bf33f29dc0b4348ce7e0a949018eb14400a authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateTue 25 Aug 2015, 12:16 (11 years ago) parent9e8a976
1 file changed+8−4
libs/prelude/Language/Reflection/Elab.idr+8−4
libs/prelude/Language/Reflection/Elab.idr+8−4
@@ -326,10 +326,14 @@ namespace Tactics
326326 ||| the body. Requires that the hole be in binding form (use
327327 ||| `attack`).
328328 |||
329− ||| @ n the name to use for the argument, or `Nothing` to use the name
330− ||| in the corresponding hole type (a dependent function)
331− intro : (n : Maybe TTName) -> Elab ()
332− intro n = prim__Intro n
329+ ||| @ n the name to use for the argument
330+ intro : (n : TTName) -> Elab ()
331+ intro n = prim__Intro (Just n)
332+
333+ ||| Introduce a lambda binding around the current hole and focus on
334+ ||| the body, using the name provided by the type of the hole.
335+ intro' : Elab ()
336+ intro' = prim__Intro Nothing
333337
334338 ||| Introduce a dependent function type binding into the current hole,
335339 ||| and focus on the body.