From d99a48b586234edc7be042abfc99396104a88aae Mon Sep 17 00:00:00 2001 From: Matthew-Mosior Date: Fri, 26 Jul 2024 17:10:17 -0400 Subject: [PATCH] Adding files to address issue #2766. --- CHANGELOG_NEXT.md | 2 ++ src/Idris/Syntax/Pragmas.idr | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG_NEXT.md b/CHANGELOG_NEXT.md index 66f2007fe..72b2ec74d 100644 --- a/CHANGELOG_NEXT.md +++ b/CHANGELOG_NEXT.md @@ -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. + ### Building/Packaging changes * The Nix flake's `buildIdris` function now returns a set with `executable` and diff --git a/src/Idris/Syntax/Pragmas.idr b/src/Idris/Syntax/Pragmas.idr index 8eb487a8d..d7f5f6831 100644 --- a/src/Idris/Syntax/Pragmas.idr +++ b/src/Idris/Syntax/Pragmas.idr @@ -6,7 +6,8 @@ import Data.String public export data KwPragma - = KwHide + = KwHint + | KwHide | KwUnhide | KwLogging | KwAutoLazy @@ -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] @@ -101,6 +103,7 @@ pragmaArgs KwSearchTimeOut = [ANat] export Show KwPragma where show kw = case kw of + KwHint => "%hint" KwHide => "%hide" KwUnhide => "%unhide" KwLogging => "%logging" @@ -126,7 +129,8 @@ Show KwPragma where export allPragmas : List KwPragma allPragmas = - [ KwHide + [ KwHint + , KwHide , KwUnhide , KwLogging , KwAutoLazy