From 11b65903d634be6ba500a5f3ea38e6ad8a4722c8 Mon Sep 17 00:00:00 2001 From: Jan Mas Rovira Date: Mon, 9 Sep 2024 10:40:18 +0200 Subject: [PATCH] change hint --- src/Juvix/Compiler/Nockma/Language.hs | 1 + src/Juvix/Compiler/Nockma/Pretty/Base.hs | 1 + src/Juvix/Compiler/Nockma/Translation/FromTree.hs | 2 +- src/Juvix/Extra/Strings.hs | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Juvix/Compiler/Nockma/Language.hs b/src/Juvix/Compiler/Nockma/Language.hs index 9aef3f6b83..2fadde74b7 100644 --- a/src/Juvix/Compiler/Nockma/Language.hs +++ b/src/Juvix/Compiler/Nockma/Language.hs @@ -122,6 +122,7 @@ data AtomHint | AtomHintNil | AtomHintVoid | AtomHintFunctionsPlaceholder + | AtomHintStdlibPlaceholder | AtomHintString deriving stock (Show, Eq, Lift, Generic) diff --git a/src/Juvix/Compiler/Nockma/Pretty/Base.hs b/src/Juvix/Compiler/Nockma/Pretty/Base.hs index be58c50aae..b164fa81b3 100644 --- a/src/Juvix/Compiler/Nockma/Pretty/Base.hs +++ b/src/Juvix/Compiler/Nockma/Pretty/Base.hs @@ -44,6 +44,7 @@ instance forall a. (PrettyCode a, NockNatural a) => PrettyCode (Atom a) where AtomHintNil -> return (annotate (AnnKind KNameConstructor) Str.nil) AtomHintVoid -> return (annotate (AnnKind KNameAxiom) Str.void) AtomHintFunctionsPlaceholder -> return (annotate (AnnKind KNameAxiom) Str.functionsPlaceholder) + AtomHintStdlibPlaceholder -> return (annotate (AnnKind KNameAxiom) Str.stdlibPlaceholder) AtomHintString -> atomToText atm >>= ppCode instance PrettyCode Text where diff --git a/src/Juvix/Compiler/Nockma/Translation/FromTree.hs b/src/Juvix/Compiler/Nockma/Translation/FromTree.hs index 3caa4aa51d..08613b1619 100644 --- a/src/Juvix/Compiler/Nockma/Translation/FromTree.hs +++ b/src/Juvix/Compiler/Nockma/Translation/FromTree.hs @@ -1009,7 +1009,7 @@ stdlibPlaceHolder = AtomInfo { _atomInfoLoc = Irrelevant Nothing, _atomInfoTag = Nothing, - _atomInfoHint = Just AtomHintFunctionsPlaceholder + _atomInfoHint = Just AtomHintStdlibPlaceholder }, _atom = 0 :: Natural } diff --git a/src/Juvix/Extra/Strings.hs b/src/Juvix/Extra/Strings.hs index b9a3698a68..f3607b646b 100644 --- a/src/Juvix/Extra/Strings.hs +++ b/src/Juvix/Extra/Strings.hs @@ -1022,6 +1022,9 @@ version = "version" functionsPlaceholder :: (IsString s) => s functionsPlaceholder = "functionsLibrary_placeholder" +stdlibPlaceholder :: (IsString s) => s +stdlibPlaceholder = "stdlib_placeholder" + theFunctionsLibrary :: (IsString s) => s theFunctionsLibrary = "the_functionsLibrary"