Skip to content

Commit

Permalink
change hint
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira authored and lukaszcz committed Sep 9, 2024
1 parent d33dc00 commit dc35409
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Juvix/Compiler/Nockma/Language.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ data AtomHint
| AtomHintNil
| AtomHintVoid
| AtomHintFunctionsPlaceholder
| AtomHintStdlibPlaceholder
| AtomHintString
deriving stock (Show, Eq, Lift, Generic)

Expand Down
1 change: 1 addition & 0 deletions src/Juvix/Compiler/Nockma/Pretty/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Nockma/Translation/FromTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ stdlibPlaceHolder =
AtomInfo
{ _atomInfoLoc = Irrelevant Nothing,
_atomInfoTag = Nothing,
_atomInfoHint = Just AtomHintFunctionsPlaceholder
_atomInfoHint = Just AtomHintStdlibPlaceholder
},
_atom = 0 :: Natural
}
Expand Down
3 changes: 3 additions & 0 deletions src/Juvix/Extra/Strings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit dc35409

Please sign in to comment.