thank you for 500 stars ๐
github.com/Gabriella439...
thank you for 500 stars ๐
github.com/Gabriella439...
I wrote a post about a cool feature that's actually been in Grace for a while: type-safe eval
This feature also powers Grace's support for type-safe dynamic imports, a feature which had long been requested in Dhall
haskellforall.com/2026/01/type...
@trygrace.dev now supports chat history, meaning that the prompt keyword now supports a history argument, including support for System/Assistant/User messages
github.com/Gabriella439...
ghci> increment <- load (Code "(input)" "\\x -> x + 1") :: IO (Natural -> IO Natural) ghci> increment 3 4 ghci> generateNumbers <- load (Code "(input)" "\\key -> prompt{ key }") :: IO (Key -> IO [Natural]) ghci> generateNumbers key [0,1,2,3,4,5,6,7,8,9] ghci> generateNumbers key [1,2,3,4,5,6,7,8,9,10]
You can now load Grace functions as Haskell functions
# Grace supports "eval", meaning that you can import code from strings (even # dynamic strings which depend on values in scope) and yet everything is still # type-checked correctly and the compiler infers that the expression's type is: # # Natural -> Natural let one = 1 in import read "\\x -> x + ${show one}"
One cursed/blessed Grace feature that's not well known is that Grace supports type-safe eval
{ "How are you feeling?": fold { "Hungry" { }: 'How hungry are you?' (fold{ succ text: "๐" + text, zero: "" }) , "Full" { }: 'Go get some rest' { } } }
editable version of the same form:
trygrace.dev?edit=true&gi...
Happy Thanksgiving! ๐ฆ
trygrace.dev?github=Gabri...
Screenshot of Grace browser demo in dark mode with the following program: \{ "OpenAI API key" } -> import prompt{ key: .'OpenAI API key' } : { "Job Description": Text } -> { "Is Finance?": Bool, "Rationale": Text } *** Inputs: OpenAI API key: ******* Job Description: artist Outputs: Is Finance?: false Rationale: The brief title 'artist' describes a creative/artistic role and does not indicate responsibilities related to accounting, financial analysis, investment, or other finance functions.
dark mode, too
Screenshot of Grace browser demo with the following program: \{ "OpenAI API key" } -> import prompt{ key: .'OpenAI API key' } : { "Job Description": Text } -> { "Is Finance?": Bool, "Rationale": Text } *** Inputs: OpenAI API key: ******* Job Description: artist Outputs: Is Finance?: false Rationale: The brief title 'artist' describes a creative/artistic role and does not indicate responsibilities related to accounting, financial analysis, investment, or other finance functions.
I got a makeover
you can now render any expression of mine using "export show"
hello world