Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
chore: adapt to where syntax change
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha authored and tydeu committed Jun 17, 2022
1 parent 521d064 commit 8eb2236
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Lake/DSL/Package.lean
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ def mkPackageDecl (doc? : Option Syntax) (attrs : Array Syntax) : Macro
| `(packageDeclSpec| $id:ident) =>
`($[$doc?:docComment]? @[$attrs,*] def $(mkIdentFrom id packageDeclName) : PackageConfig :=
{name := $(quote id.getId)})
| `(packageDeclSpec| $id:ident where $[$ds]* $[$wds?]?) =>
| `(packageDeclSpec| $id:ident where $ds;* $[$wds?]?) =>
`($[$doc?:docComment]? @[$attrs,*] def $(mkIdentFrom id packageDeclName) : PackageConfig where
name := $(quote id.getId) $[$ds]* $[$wds?]?)
name := $(quote id.getId); $ds;* $[$wds?]?)
| `(packageDeclSpec| $id:ident : $ty := $defn $[$wds?]?) =>
`($[$doc?:docComment]? @[$attrs,*] def $(mkIdentFrom id packageDeclName) : $ty := $defn $[$wds?]?)
| `(packageDeclSpec| $id:ident $[($dir?)]? $[($args?)]? := $defn $[$wds?]?) =>
mkSimplePackageDecl doc? attrs (mkIdentFrom id packageDeclName) defn dir? args? wds?
| `(packageDeclSpec| $id:ident $[($dir?)]? $[($args?)]? { $[$fs $[,]?]* } $[$wds?]?) => do
let defn ← `({ name := $(quote id.getId), $[$fs]* })
let defn ← `({ name := $(quote id.getId), $fs,* })
mkSimplePackageDecl doc? attrs (mkIdentFrom id packageDeclName) defn dir? args? wds?
| `(packageDeclSpec| $id:ident $[($dir?)]? $[($args?)]? do $seq $[$wds?]?) => do
let (_, dir, args) ← expandPackageBinders dir? args?
Expand Down
6 changes: 3 additions & 3 deletions Lake/DSL/Targets.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ def mkTargetDecl
| `(targetDeclSpec| $id:ident) =>
`($[$doc?:docComment]? @[$attrs,*] def $id : $ty :=
{name := $(quote id.getId)})
| `(targetDeclSpec| $id:ident where $[$ds]* $[$wds?]?) =>
| `(targetDeclSpec| $id:ident where $ds;* $[$wds?]?) =>
`($[$doc?:docComment]? @[$attrs,*] def $id : $ty where
name := $(quote id.getId) $[$ds]* $[$wds?]?)
name := $(quote id.getId); $ds;* $[$wds?]?)
| `(targetDeclSpec| $id:ident $[: $ty?]? := $defn $[$wds?]?) =>
`($[$doc?:docComment]? @[$attrs,*] def $id : $(ty?.getD ty) := $defn $[$wds?]?)
| `(targetDeclSpec| $id:ident { $[$fs $[,]?]* } $[$wds?]?) => do
let defn ← `({ name := $(quote id.getId), $[$fs]* })
let defn ← `({ name := $(quote id.getId), $fs,* })
`($[$doc?:docComment]? @[$attrs,*] def $id : $ty := $defn $[$wds?]?)
| stx => Macro.throwErrorAt stx "ill-formed target declaration"

Expand Down

0 comments on commit 8eb2236

Please sign in to comment.