Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%hint not listed as a pragma #3361

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ This CHANGELOG describes the merged but unreleased changes. Please see [CHANGELO
installed will be ignored by the compiler when it tries to use that library as
a dependency for some other package.

* The `idris2 --help pragma` command now outputs the `%hint` pragma.

* The `idris2 --init` command now ensures that package names are
valid Idris2 identifiers.

Expand Down
8 changes: 6 additions & 2 deletions src/Idris/Syntax/Pragmas.idr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Data.String

public export
data KwPragma
= KwHide
= KwHint
| KwHide
| KwUnhide
| KwLogging
| KwAutoLazy
Expand Down Expand Up @@ -76,6 +77,7 @@ Show PragmaArg where

export
pragmaArgs : KwPragma -> List PragmaArg
pragmaArgs KwHint = []
pragmaArgs KwHide = [AName "nm"]
pragmaArgs KwUnhide = [AName "nm"]
pragmaArgs KwLogging = [AnOptionalLoggingTopic, ANat]
Expand All @@ -101,6 +103,7 @@ pragmaArgs KwSearchTimeOut = [ANat]
export
Show KwPragma where
show kw = case kw of
KwHint => "%hint"
KwHide => "%hide"
KwUnhide => "%unhide"
KwLogging => "%logging"
Expand All @@ -126,7 +129,8 @@ Show KwPragma where
export
allPragmas : List KwPragma
allPragmas =
[ KwHide
[ KwHint
, KwHide
, KwUnhide
, KwLogging
, KwAutoLazy
Expand Down
Loading