From 0b315bae6e45a5a86c030e49b1641a0d0764f985 Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Thu, 25 Jul 2024 22:16:26 +0100 Subject: [PATCH 1/6] Start making an lsp work --- wasm-calc11/app/Main.hs | 9 +++++++ wasm-calc11/demo/calc-project.json | 3 +++ wasm-calc11/demo/draw.calc | 2 +- wasm-calc11/src/Calc.hs | 2 ++ wasm-calc11/src/Calc/Lsp.hs | 39 ++++++++++++++++++++++++++++++ wasm-calc11/wasm-calc11.cabal | 3 +++ 6 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 wasm-calc11/demo/calc-project.json create mode 100644 wasm-calc11/src/Calc/Lsp.hs diff --git a/wasm-calc11/app/Main.hs b/wasm-calc11/app/Main.hs index 1e947439..9f4b84cb 100644 --- a/wasm-calc11/app/Main.hs +++ b/wasm-calc11/app/Main.hs @@ -1,5 +1,6 @@ module Main where +import Control.Monad (void) import qualified Calc import Control.Applicative import Data.Text (Text) @@ -11,6 +12,7 @@ data AppAction = Repl | Build Text -- given an input path, turn it into a Wasm module or explode with an error | Format Text -- given an input path, format and write new file + | Lsp -- run the language server parseAppAction :: Opt.Parser AppAction parseAppAction = @@ -20,7 +22,13 @@ parseAppAction = ( Opt.info (pure Repl) (Opt.progDesc "Start new calc repl") + ) <> Opt.command + "lsp" + ( Opt.info + (pure Lsp) + (Opt.progDesc "Start calc lsp") ) + <> Opt.command "build" ( Opt.info @@ -63,3 +71,4 @@ main = do Repl -> Calc.repl Build filePath -> Calc.build (T.unpack filePath) Format filePath -> Calc.prettyPrint (T.unpack filePath) + Lsp -> void Calc.lsp diff --git a/wasm-calc11/demo/calc-project.json b/wasm-calc11/demo/calc-project.json new file mode 100644 index 00000000..d04e5684 --- /dev/null +++ b/wasm-calc11/demo/calc-project.json @@ -0,0 +1,3 @@ +{ + "file": "to help lsp" +} diff --git a/wasm-calc11/demo/draw.calc b/wasm-calc11/demo/draw.calc index 304b037f..ad6e30ce 100644 --- a/wasm-calc11/demo/draw.calc +++ b/wasm-calc11/demo/draw.calc @@ -54,4 +54,4 @@ export function test() -> Void { set(index, index + 1) else set(index, 0) -} \ No newline at end of file +} diff --git a/wasm-calc11/src/Calc.hs b/wasm-calc11/src/Calc.hs index bf80f032..e0bba1f9 100644 --- a/wasm-calc11/src/Calc.hs +++ b/wasm-calc11/src/Calc.hs @@ -6,6 +6,7 @@ module Calc module Calc.Repl, module Calc.Wasm, module Calc.PrettyPrint, + module Calc.Lsp ) where @@ -16,3 +17,4 @@ import Calc.PrettyPrint import Calc.Repl import Calc.Types import Calc.Wasm +import Calc.Lsp diff --git a/wasm-calc11/src/Calc/Lsp.hs b/wasm-calc11/src/Calc/Lsp.hs new file mode 100644 index 00000000..dfbc09e0 --- /dev/null +++ b/wasm-calc11/src/Calc/Lsp.hs @@ -0,0 +1,39 @@ +{-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + {-# LANGUAGE ImportQualifiedPost #-} + +module Calc.Lsp (lsp) where + +import Control.Monad.IO.Class +import Language.LSP.Protocol.Message +import Language.LSP.Protocol.Types +import Language.LSP.Server + +handlers :: Handlers (LspM ()) +handlers = + mconcat + [ notificationHandler SMethod_Initialized $ \_not -> do + pure () + , requestHandler SMethod_TextDocumentHover $ \req responder -> do + let TRequestMessage _ _ _ (HoverParams _doc pos _workDone) = req + Position _l _c' = pos + rsp = Hover (InL ms) (Just range) + ms = mkMarkdown "Hello world" + range = Range pos pos + responder (Right $ InL rsp) + ] + +lsp :: IO Int +lsp = + runServer $ + ServerDefinition + { parseConfig = const $ const $ Right () + , onConfigChange = const $ pure () + , defaultConfig = () + , configSection = "demo" + , doInitialize = \env _req -> pure $ Right env + , staticHandlers = \_caps -> handlers + , interpretHandler = \env -> Iso (runLspT env) liftIO + , options = defaultOptions + } diff --git a/wasm-calc11/wasm-calc11.cabal b/wasm-calc11/wasm-calc11.cabal index 4918871d..3c5e8c69 100644 --- a/wasm-calc11/wasm-calc11.cabal +++ b/wasm-calc11/wasm-calc11.cabal @@ -40,6 +40,7 @@ common shared , file-embed , hashable , haskeline + , lsp , megaparsec , mtl , parser-combinators @@ -67,6 +68,7 @@ common shared Calc.Linearity.Error Calc.Linearity.Types Calc.Linearity.Validate + Calc.Lsp Calc.Module Calc.Parser Calc.Parser.Data @@ -192,6 +194,7 @@ executable wasm-calc11 , file-embed , hashable , haskeline + , lsp , megaparsec , mtl , optparse-applicative From 132a49f7bdb5e1497d341a7dad1bda0319453975 Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Thu, 25 Jul 2024 22:16:37 +0100 Subject: [PATCH 2/6] Makies --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile b/Makefile index 5d8f0a80..9a30f609 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,22 @@ watch: --command "cabal repl wasm-calc$(version)-tests" \ --test-ghci 'main' +# run with `make watch version=9` to run tests / ghci for wasm-calc9 +.PHONY: watch-app +version = 11 +watch-app: + ghciwatch --watch wasm-calc$(version) \ + --command "cabal repl exe:wasm-calc$(version)" \ + --test-shell 'cabal install wasm-calc11 --overwrite-policy=always' + +# run with `make watch version=9` to run tests / ghci for wasm-calc9 +.PHONY: lsp +version = 11 +lsp: + ghciwatch --watch wasm-calc$(version) \ + --command "cabal repl calc-language-server$(version)" \ + --test-ghci 'main' + # run with `make run version=8` to run wasm-calc8 .PHONY: run version = 11 From 1babc5e55823bf56326b65b7cb80eb0aeb11c1c8 Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Fri, 26 Jul 2024 23:40:38 +0100 Subject: [PATCH 3/6] Is this something --- lsp-log.txt | 19 +++++++++++ wasm-calc11/app/Main.hs | 14 ++++---- wasm-calc11/demo/draw.calc | 2 +- wasm-calc11/src/Calc.hs | 4 +-- wasm-calc11/src/Calc/Lsp.hs | 67 +++++++++++++++++++++++++++---------- 5 files changed, 79 insertions(+), 27 deletions(-) create mode 100644 lsp-log.txt diff --git a/lsp-log.txt b/lsp-log.txt new file mode 100644 index 00000000..5b35e6df --- /dev/null +++ b/lsp-log.txt @@ -0,0 +1,19 @@ + +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] \ No newline at end of file diff --git a/wasm-calc11/app/Main.hs b/wasm-calc11/app/Main.hs index 9f4b84cb..d122e135 100644 --- a/wasm-calc11/app/Main.hs +++ b/wasm-calc11/app/Main.hs @@ -1,8 +1,8 @@ module Main where -import Control.Monad (void) import qualified Calc import Control.Applicative +import Control.Monad (void) import Data.Text (Text) import qualified Data.Text as T import qualified Options.Applicative as Opt @@ -22,13 +22,13 @@ parseAppAction = ( Opt.info (pure Repl) (Opt.progDesc "Start new calc repl") - ) <> Opt.command - "lsp" - ( Opt.info - (pure Lsp) - (Opt.progDesc "Start calc lsp") ) - + <> Opt.command + "lsp" + ( Opt.info + (pure Lsp) + (Opt.progDesc "Start calc lsp") + ) <> Opt.command "build" ( Opt.info diff --git a/wasm-calc11/demo/draw.calc b/wasm-calc11/demo/draw.calc index ad6e30ce..172a75ed 100644 --- a/wasm-calc11/demo/draw.calc +++ b/wasm-calc11/demo/draw.calc @@ -4,7 +4,7 @@ import imports.draw as draw( x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 ) -> Void -function min(floor: Int64, value: Int64) -> Int64 { +function min(floor: Int64, value: Int64) -> Int64 { if value > floor then value else floor } diff --git a/wasm-calc11/src/Calc.hs b/wasm-calc11/src/Calc.hs index e0bba1f9..5d4ceaa4 100644 --- a/wasm-calc11/src/Calc.hs +++ b/wasm-calc11/src/Calc.hs @@ -6,15 +6,15 @@ module Calc module Calc.Repl, module Calc.Wasm, module Calc.PrettyPrint, - module Calc.Lsp + module Calc.Lsp, ) where import Calc.Build import Calc.ExprUtils +import Calc.Lsp import Calc.Parser import Calc.PrettyPrint import Calc.Repl import Calc.Types import Calc.Wasm -import Calc.Lsp diff --git a/wasm-calc11/src/Calc/Lsp.hs b/wasm-calc11/src/Calc/Lsp.hs index dfbc09e0..9edd5870 100644 --- a/wasm-calc11/src/Calc/Lsp.hs +++ b/wasm-calc11/src/Calc/Lsp.hs @@ -1,39 +1,72 @@ {-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} - {-# LANGUAGE ImportQualifiedPost #-} module Calc.Lsp (lsp) where +import Data.Maybe import Control.Monad.IO.Class import Language.LSP.Protocol.Message import Language.LSP.Protocol.Types import Language.LSP.Server +doLog :: (MonadIO m) => String -> m () +doLog = + liftIO . appendFile "/Users/danielharvey/git/wasm-calc/lsp-log.txt" . (<>) "\n" + handlers :: Handlers (LspM ()) handlers = mconcat - [ notificationHandler SMethod_Initialized $ \_not -> do + [ notificationHandler SMethod_Initialized $ \notification -> do + doLog (show notification) + + workspaceFolders <- fromMaybe [] <$> getWorkspaceFolders + doLog ("workspaceFolders " <> show workspaceFolders) + {- + let opts = + TextDocumentRegistrationOptions + ( InL $ + DocumentSelector + [ DocumentFilter (InL $ TextDocumentFilter (InR $ InR $ + TextDocumentFilterPattern Nothing Nothing "*.calc")) + ] + ) + _ <- registerCapability mempty SMethod_TextDocumentDidOpen opts $ \req -> do + doLog "textDocumentDidOpen register response" + doLog (show req) -} + pure (), + notificationHandler SMethod_TextDocumentDidOpen $ \notification -> do + doLog "textDocumentDidOpen" + doLog (show notification) + pure (), + notificationHandler SMethod_TextDocumentDidChange $ \notification -> do + doLog "textDocumentDidChange" + doLog (show notification) pure () - , requestHandler SMethod_TextDocumentHover $ \req responder -> do - let TRequestMessage _ _ _ (HoverParams _doc pos _workDone) = req - Position _l _c' = pos - rsp = Hover (InL ms) (Just range) - ms = mkMarkdown "Hello world" - range = Range pos pos - responder (Right $ InL rsp) + ] lsp :: IO Int lsp = runServer $ ServerDefinition - { parseConfig = const $ const $ Right () - , onConfigChange = const $ pure () - , defaultConfig = () - , configSection = "demo" - , doInitialize = \env _req -> pure $ Right env - , staticHandlers = \_caps -> handlers - , interpretHandler = \env -> Iso (runLspT env) liftIO - , options = defaultOptions + { parseConfig = const $ const $ Right (), + onConfigChange = const $ pure (), + defaultConfig = (), + configSection = "demo", + doInitialize = \env _req -> pure $ Right env, + staticHandlers = \_caps -> handlers, + interpretHandler = \env -> Iso (runLspT env) liftIO, + options = defaultOptions + { optTextDocumentSync = Just syncOptions + , optServerInfo = Just $ ServerInfo "Calc Language Server" Nothing + } } + where + syncOptions = TextDocumentSyncOptions + (Just True) -- open/close notifications + (Just TextDocumentSyncKind_Full) -- changes + (Just False) -- will save + (Just False) -- will save (wait until requests are sent to server) + (Just $ InR $ SaveOptions $ Just False) -- save From 6e8b86b46322fd9657c2ab7d91b00458701731bd Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Tue, 30 Jul 2024 23:17:54 +0100 Subject: [PATCH 4/6] Woof --- lsp-log.txt | 1122 ++++++++++++++++++++++++++++++++- wasm-calc11/demo/draw.calc | 1 + wasm-calc11/src/Calc/Lsp.hs | 99 ++- wasm-calc11/wasm-calc11.cabal | 2 + 4 files changed, 1191 insertions(+), 33 deletions(-) diff --git a/lsp-log.txt b/lsp-log.txt index 5b35e6df..c78ec682 100644 --- a/lsp-log.txt +++ b/lsp-log.txt @@ -16,4 +16,1124 @@ workspaceFolders [] TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} workspaceFolders [] TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] \ No newline at end of file +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [] +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nh\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nho\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nhor\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 8}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nhors\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nhorse\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\nhorse\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 14}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 16}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 17}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "h\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "ho\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hor\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 21}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "horse\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 22}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "horse\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 24}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hors\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 26}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hor\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 27}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hr\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 28}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "r\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 29}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 30}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 31}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "h\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "ho\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hor\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hors\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "horse \nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 56, _character = 1}, _end = Position {_line = 56, _character = 1}}, _rangeLength = Just 0, _text = "\n"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 57, _character = 0}, _end = Position {_line = 57, _character = 0}}, _rangeLength = Just 0, _text = "\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 0}, _end = Position {_line = 58, _character = 0}}, _rangeLength = Just 0, _text = "h"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 1}, _end = Position {_line = 58, _character = 1}}, _rangeLength = Just 0, _text = "o"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 2}, _end = Position {_line = 58, _character = 2}}, _rangeLength = Just 0, _text = "r"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 3}, _end = Position {_line = 58, _character = 3}}, _rangeLength = Just 0, _text = "s"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 4}, _end = Position {_line = 58, _character = 4}}, _rangeLength = Just 0, _text = "e"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 5}, _end = Position {_line = 58, _character = 5}}, _rangeLength = Just 0, _text = "s"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 0}, _end = Position {_line = 59, _character = 0}}, _rangeLength = Just 7, _text = ""}))]}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 5, _character = 0}, _end = Position {_line = 5, _character = 0}}, _rangeLength = Just 0, _text = "\n"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 6, _character = 0}}, _rangeLength = Just 0, _text = "\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 0, _text = "d"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 1}, _end = Position {_line = 7, _character = 1}}, _rangeLength = Just 0, _text = "o"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 8}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 2}, _end = Position {_line = 7, _character = 2}}, _rangeLength = Just 0, _text = "g"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 3}, _end = Position {_line = 7, _character = 3}}, _rangeLength = Just 0, _text = "s"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 4}, _end = Position {_line = 8, _character = 0}}, _rangeLength = Just 1, _text = "\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 1, _text = ""}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 5, _text = ""}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 1, _text = ""}))]}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\ns\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsd\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsdsdf\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsdsd\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsds\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsd\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 13}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\ns\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 14}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 20}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 21}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\ns\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 23}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdf\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 26}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdfsdf\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 27}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdfsd\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 28}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdfsd\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 29}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "sdfsd\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 30}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 31}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidSave +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 33}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\ns\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 35}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\nsdf\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 36}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\nsd\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 37}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\ns\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 38}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidSave +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 10, _character = 9}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 9}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 8}, _workDoneToken = Nothing}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 5}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 5}, _workDoneToken = Nothing}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\ns\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdfsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdfsd\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdfs\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 13}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 14}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsd\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\ns\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 16}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 17}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 20}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidSave +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 22}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 24}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 26}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 28}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 29}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 30}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\ns\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 32}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdf\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 34}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdfsd\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 35}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdfsdf\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 36}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdfsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 37}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 1 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 2 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 3 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 4 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 5 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 8}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\na\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 6 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\naerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 7 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\naergaerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 8 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 16}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\naergaerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 9 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 17}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\naergaerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 10 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 11 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 12 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 20}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 13 +textDocumentDidSave +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 9}, _workDoneToken = Nothing}} +Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 7, _character = 9}, _end = Position {_line = 7, _character = 9}})} +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 22}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if valuen > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 14 +textDocumentDidChange +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 23}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 15 +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 23, _character = 16}, _workDoneToken = Nothing}} +Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 23, _character = 16}, _end = Position {_line = 23, _character = 16}})} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} +Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 11, _character = 9}, _end = Position {_line = 11, _character = 9}})} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 8}, _workDoneToken = Nothing}} +Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 11, _character = 8}, _end = Position {_line = 11, _character = 8}})} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} +Found the virtual file: "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n" +Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 15, _character = 2}, _end = Position {_line = 15, _character = 2}})} +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} +Found the virtual file: "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n" +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 14, _character = 2}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 5}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 6}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 1 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 2 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 3 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 4 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 5 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 6 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 7 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 8 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 9 +textDocumentDidSave +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 19, _character = 26}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 10 +Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" +Found the virtual file: 11 +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} +workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] +textDocumentDidOpen +TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 5}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + + +textDocumentDidHover +TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} +global mut index: Int64 = 1 + +import imports.draw as draw( + x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 +) -> Void + +function min(floor: Int64, value: Int64) -> Int64 { + if value > floor then value else floor +} + +function max(ceiling: Int64, value: Int64) -> Int64 { + if value < ceiling then value else ceiling +} + +function clamp( + floor: Int64, ceiling: Int64, value: Int64 +) -> Int64 { min(floor, max(ceiling, value))} + +function drawBounded( + x: Int64, y: Int64, color: (Int64,Int64,Int64) +) -> (Int64,Int64,Int64) { + let maxWidth: Int64 = 600; + let maxHeight: Int64 = 600; + let (r,g,b) = color; + draw( + clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b + ); + (r,g,b) +} + +function cycle(color: (Int64,Int64,Int64)) -> (Int64, +Int64, +Int64) { let (r,g,b) = color; (g,b,r)} + +function initial(index: Int64) -> (Int64,Int64,Int64) { + let r = clamp(0, 255, index * 2); + let g = clamp(0, 255, 255 - r); + let b = clamp(0, 255, r * 3); + (r,g,b) +} + +export function test() -> Void { + let color = drawBounded( + index * 2, index * 3, initial(index) + ); + let color2 = drawBounded( + 100 - index, index * 3, cycle(color) + ); + let color3 = drawBounded( + 10 + index * 3, 50 - index * 2, cycle(color2) + ); + drawBounded(index * 4, 200 - index * 3, cycle(color3)); + if index < 200 then + set(index, index + 1) + else + set(index, 0) +} + diff --git a/wasm-calc11/demo/draw.calc b/wasm-calc11/demo/draw.calc index 172a75ed..37cd1772 100644 --- a/wasm-calc11/demo/draw.calc +++ b/wasm-calc11/demo/draw.calc @@ -55,3 +55,4 @@ export function test() -> Void { else set(index, 0) } + diff --git a/wasm-calc11/src/Calc/Lsp.hs b/wasm-calc11/src/Calc/Lsp.hs index 9edd5870..49433aa9 100644 --- a/wasm-calc11/src/Calc/Lsp.hs +++ b/wasm-calc11/src/Calc/Lsp.hs @@ -5,68 +5,103 @@ module Calc.Lsp (lsp) where +import Data.Text.Utf16.Rope.Mixed as TextRope +import qualified Data.Text as T +import Control.Lens hiding (Iso) +import qualified Language.LSP.VFS as LSP import Data.Maybe import Control.Monad.IO.Class import Language.LSP.Protocol.Message -import Language.LSP.Protocol.Types -import Language.LSP.Server +import qualified Language.LSP.Protocol.Types as LSP +import qualified Language.LSP.Server as LSP +import Language.LSP.Protocol.Lens qualified as LSP doLog :: (MonadIO m) => String -> m () doLog = liftIO . appendFile "/Users/danielharvey/git/wasm-calc/lsp-log.txt" . (<>) "\n" -handlers :: Handlers (LspM ()) +handlers :: LSP.Handlers (LSP.LspM ()) handlers = mconcat - [ notificationHandler SMethod_Initialized $ \notification -> do + [ LSP.notificationHandler SMethod_Initialized $ \notification -> do doLog (show notification) - workspaceFolders <- fromMaybe [] <$> getWorkspaceFolders + workspaceFolders <- fromMaybe [] <$> LSP.getWorkspaceFolders doLog ("workspaceFolders " <> show workspaceFolders) - {- - let opts = - TextDocumentRegistrationOptions - ( InL $ - DocumentSelector - [ DocumentFilter (InL $ TextDocumentFilter (InR $ InR $ - TextDocumentFilterPattern Nothing Nothing "*.calc")) - ] - ) - _ <- registerCapability mempty SMethod_TextDocumentDidOpen opts $ \req -> do - doLog "textDocumentDidOpen register response" - doLog (show req) -} pure (), - notificationHandler SMethod_TextDocumentDidOpen $ \notification -> do + LSP.notificationHandler SMethod_TextDocumentDidOpen $ \notification -> do doLog "textDocumentDidOpen" doLog (show notification) pure (), - notificationHandler SMethod_TextDocumentDidChange $ \notification -> do - doLog "textDocumentDidChange" + LSP.notificationHandler SMethod_TextDocumentDidChange $ \notification -> do + -- doLog "textDocumentDidChange" + -- doLog (show notification) + let doc = + notification + ^. LSP.params + . LSP.textDocument + . LSP.uri + . to LSP.toNormalizedUri + doLog ("Processing DidChangeTextDocument for: " <> show doc) + let TNotificationMessage _ _ + (LSP.DidChangeTextDocumentParams + (LSP.VersionedTextDocumentIdentifier textDocumentIdentifier _) _) = notification + file <- findFile textDocumentIdentifier + doLog (show file) + pure (), + LSP.notificationHandler SMethod_TextDocumentDidSave $ \notification -> do + doLog "textDocumentDidSave" doLog (show notification) - pure () + pure (), + LSP.requestHandler SMethod_TextDocumentHover $ \req responder -> do + doLog "textDocumentDidHover" + doLog (show req) + let TRequestMessage _ _ _ (LSP.HoverParams (LSP.TextDocumentIdentifier doc) pos _workDone) = req + file <- findFile doc + doLog (T.unpack file) + + let LSP.Position _l _c' = pos + rsp = LSP.Hover (LSP.InL ms) (Just range) + ms = LSP.mkMarkdown "Poo poo" + range = LSP.Range pos pos + responder (Right $ LSP.InL rsp) ] +findFile :: LSP.Uri -> LSP.LspM config T.Text +findFile doc = do + let uri = LSP.toNormalizedUri doc + mdoc <- LSP.getVirtualFile uri + case mdoc of + Just (LSP.VirtualFile _ _ str) -> do + pure (TextRope.toText str) + Nothing -> do + error ("Didn't find anything in the VFS for: " <> show doc) + + lsp :: IO Int lsp = - runServer $ - ServerDefinition + LSP.runServer $ + LSP.ServerDefinition { parseConfig = const $ const $ Right (), onConfigChange = const $ pure (), defaultConfig = (), configSection = "demo", doInitialize = \env _req -> pure $ Right env, staticHandlers = \_caps -> handlers, - interpretHandler = \env -> Iso (runLspT env) liftIO, - options = defaultOptions - { optTextDocumentSync = Just syncOptions - , optServerInfo = Just $ ServerInfo "Calc Language Server" Nothing + interpretHandler = \env -> LSP.Iso (LSP.runLspT env) liftIO, + options = LSP.defaultOptions + { LSP.optTextDocumentSync = Just syncOptions + , LSP.optServerInfo = Just $ LSP.ServerInfo "Calc Language Server" Nothing } } where - syncOptions = TextDocumentSyncOptions + syncOptions = LSP.TextDocumentSyncOptions (Just True) -- open/close notifications - (Just TextDocumentSyncKind_Full) -- changes - (Just False) -- will save - (Just False) -- will save (wait until requests are sent to server) - (Just $ InR $ SaveOptions $ Just False) -- save + (Just LSP.TextDocumentSyncKind_Full) -- changes + Nothing -- will save + Nothing -- will save (wait until requests are sent to server) + (Just $ LSP.InR $ LSP.SaveOptions $ Just False) -- save + + + diff --git a/wasm-calc11/wasm-calc11.cabal b/wasm-calc11/wasm-calc11.cabal index 3c5e8c69..7ecdd273 100644 --- a/wasm-calc11/wasm-calc11.cabal +++ b/wasm-calc11/wasm-calc11.cabal @@ -40,6 +40,7 @@ common shared , file-embed , hashable , haskeline + , lens , lsp , megaparsec , mtl @@ -49,6 +50,7 @@ common shared , process , string-conversions , text + , text-rope , unix , unordered-containers , wasm From 0ed0e74e52ed5124b3c097c2a4903eaf05faf4fe Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Sat, 14 Sep 2024 23:01:32 +0100 Subject: [PATCH 5/6] YeS --- .gitignore | 2 + Makefile | 7 +- lsp-log.txt | 1139 ----------------------------------- wasm-calc11/src/Calc/Lsp.hs | 95 ++- 4 files changed, 72 insertions(+), 1171 deletions(-) delete mode 100644 lsp-log.txt diff --git a/.gitignore b/.gitignore index 83720d41..b9eaa774 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ file_volume/ ./file-volume/ ./git/ .DS_Store + +lsp-log.txt diff --git a/Makefile b/Makefile index 9a30f609..e3260b7a 100644 --- a/Makefile +++ b/Makefile @@ -85,12 +85,13 @@ version = 11 test: cabal run wasm-calc$(version):tests -# run with `make format-all-files version=7` to format all static `.calc` files for wasm-calc7 +# run with `make format-all-files version=7` to format all `.calc` files for wasm-calc7 .PHONY: format-all-files version = 11 -STATIC_FILES = "./wasm-calc$(version)/test/static/" +STATIC_FILES = "./wasm-calc$(version)/**/*.calc" format-all-files: - find $(STATIC_FILES) -maxdepth 1 -type f -exec cabal run wasm-calc$(version) -- format {} \; + find $(STATIC_FILES) -maxdepth 1 -type f -exec \ + nix run .#wasm-calc$(version) format {} \; # run with `make build-malloc version=9` to build and diff malloc.calc for # wasm-calc9 diff --git a/lsp-log.txt b/lsp-log.txt deleted file mode 100644 index c78ec682..00000000 --- a/lsp-log.txt +++ /dev/null @@ -1,1139 +0,0 @@ - -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [] -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nh\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nho\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nhor\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 8}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nhors\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nhorse\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\nhorse\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 14}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 16}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 17}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "h\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "ho\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hor\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 21}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "horse\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 22}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "horse\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 24}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hors\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 26}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hor\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 27}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hr\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 28}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "r\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 29}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 30}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 31}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "h\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "ho\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hor\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "hors\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "horse \nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}))]}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n"}}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 56, _character = 1}, _end = Position {_line = 56, _character = 1}}, _rangeLength = Just 0, _text = "\n"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 57, _character = 0}, _end = Position {_line = 57, _character = 0}}, _rangeLength = Just 0, _text = "\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 0}, _end = Position {_line = 58, _character = 0}}, _rangeLength = Just 0, _text = "h"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 1}, _end = Position {_line = 58, _character = 1}}, _rangeLength = Just 0, _text = "o"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 2}, _end = Position {_line = 58, _character = 2}}, _rangeLength = Just 0, _text = "r"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 3}, _end = Position {_line = 58, _character = 3}}, _rangeLength = Just 0, _text = "s"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 4}, _end = Position {_line = 58, _character = 4}}, _rangeLength = Just 0, _text = "e"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 5}, _end = Position {_line = 58, _character = 5}}, _rangeLength = Just 0, _text = "s"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 58, _character = 0}, _end = Position {_line = 59, _character = 0}}, _rangeLength = Just 7, _text = ""}))]}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 5, _character = 0}, _end = Position {_line = 5, _character = 0}}, _rangeLength = Just 0, _text = "\n"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 6, _character = 0}}, _rangeLength = Just 0, _text = "\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 0, _text = "d"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 1}, _end = Position {_line = 7, _character = 1}}, _rangeLength = Just 0, _text = "o"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 8}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 2}, _end = Position {_line = 7, _character = 2}}, _rangeLength = Just 0, _text = "g"})),TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 3}, _end = Position {_line = 7, _character = 3}}, _rangeLength = Just 0, _text = "s"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 7, _character = 4}, _end = Position {_line = 8, _character = 0}}, _rangeLength = Just 1, _text = "\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 1, _text = ""}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 5, _text = ""}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InL (TextDocumentContentChangePartial {_range = Range {_start = Position {_line = 6, _character = 0}, _end = Position {_line = 7, _character = 0}}, _rangeLength = Just 1, _text = ""}))]}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\ns\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsd\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 9}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsdsdf\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsdsd\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsds\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nsd\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 13}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\ns\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 14}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\n\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 20}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 21}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\ns\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 23}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdf\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 26}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdfsdf\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 27}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdfsd\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 28}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nsdfsd\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 29}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "sdfsd\n\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 30}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "\nglobal mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 31}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidSave -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 33}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\ns\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 35}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\nsdf\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 36}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\nsd\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 37}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\ns\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 38}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidSave -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 10, _character = 9}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 9}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 8}, _workDoneToken = Nothing}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 5}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 5}, _workDoneToken = Nothing}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\ns\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 10}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdfsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdfsd\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 12}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdfs\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 13}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 14}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nsd\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\ns\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 16}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 17}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 20}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidSave -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 22}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 24}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 26}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 28}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 29}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 30}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\ns\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 32}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdf\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 34}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdfsd\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 35}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdfsdf\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 36}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\nsdfsdf\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 37}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\n\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 3}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 1 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 4}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 2 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 5}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 3 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 6}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 4 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 7}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 5 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 8}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\na\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 6 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 11}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\naerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 7 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 15}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\naergaerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 8 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 16}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\naergaerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 9 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 17}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\naergaerg\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 10 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 18}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 11 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 19}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 12 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 20}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 13 -textDocumentDidSave -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 9}, _workDoneToken = Nothing}} -Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 7, _character = 9}, _end = Position {_line = 7, _character = 9}})} -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 22}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if valuen > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 14 -textDocumentDidChange -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidChange, _params = DidChangeTextDocumentParams {_textDocument = VersionedTextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _version = 23}, _contentChanges = [TextDocumentContentChangeEvent (InR (TextDocumentContentChangeWholeDocument {_text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}))]}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 15 -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 23, _character = 16}, _workDoneToken = Nothing}} -Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 23, _character = 16}, _end = Position {_line = 23, _character = 16}})} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 9}, _workDoneToken = Nothing}} -Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 11, _character = 9}, _end = Position {_line = 11, _character = 9}})} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 8}, _workDoneToken = Nothing}} -Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 11, _character = 8}, _end = Position {_line = 11, _character = 8}})} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} -Found the virtual file: "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n" -Hover {_contents = InL (MarkupContent {_kind = MarkupKind_Markdown, _value = "Poo poo"}), _range = Just (Range {_start = Position {_line = 15, _character = 2}, _end = Position {_line = 15, _character = 2}})} -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} -Found the virtual file: "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n" -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 14, _character = 2}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 15, _character = 2}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 5}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 6}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 1 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 2 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 3 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 4 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 5 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 6 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 7 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 8 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 9 -textDocumentDidSave -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidSave, _params = DidSaveTextDocumentParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _text = Nothing}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 19, _character = 26}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 10 -Processing DidChangeTextDocument for: NormalizedUri (-7880369104437011469) "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc" -Found the virtual file: 11 -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_Initialized, _params = InitializedParams} -workspaceFolders [WorkspaceFolder {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}, _name = "/Users/danielharvey/Git/wasm-calc/wasm-calc11/demo"}] -textDocumentDidOpen -TNotificationMessage {_jsonrpc = "2.0", _method = SMethod_TextDocumentDidOpen, _params = DidOpenTextDocumentParams {_textDocument = TextDocumentItem {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}, _languageId = LanguageKind_Custom "calc", _version = 0, _text = "global mut index: Int64 = 1\n\nimport imports.draw as draw(\n x: Int64, y: Int64, r: Int64, g: Int64, b: Int64\n) -> Void\n\nfunction min(floor: Int64, value: Int64) -> Int64 {\n if value > floor then value else floor\n}\n\nfunction max(ceiling: Int64, value: Int64) -> Int64 { \n if value < ceiling then value else ceiling\n}\n\nfunction clamp(\n floor: Int64, ceiling: Int64, value: Int64\n) -> Int64 { min(floor, max(ceiling, value))}\n\nfunction drawBounded(\n x: Int64, y: Int64, color: (Int64,Int64,Int64)\n) -> (Int64,Int64,Int64) { \n let maxWidth: Int64 = 600; \n let maxHeight: Int64 = 600; \n let (r,g,b) = color; \n draw(\n clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b\n ); \n (r,g,b)\n}\n\nfunction cycle(color: (Int64,Int64,Int64)) -> (Int64,\nInt64,\nInt64) { let (r,g,b) = color; (g,b,r)}\n\nfunction initial(index: Int64) -> (Int64,Int64,Int64) { \n let r = clamp(0, 255, index * 2); \n let g = clamp(0, 255, 255 - r); \n let b = clamp(0, 255, r * 3); \n (r,g,b)\n}\n\nexport function test() -> Void { \n let color = drawBounded(\n index * 2, index * 3, initial(index)\n ); \n let color2 = drawBounded(\n 100 - index, index * 3, cycle(color)\n ); \n let color3 = drawBounded(\n 10 + index * 3, 50 - index * 2, cycle(color2)\n ); \n drawBounded(index * 4, 200 - index * 3, cycle(color3)); \n if index < 200 then\n set(index, index + 1)\n else\n set(index, 0)\n}\n\n"}}} -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 7, _character = 5}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - - -textDocumentDidHover -TRequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = SMethod_TextDocumentHover, _params = HoverParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///Users/danielharvey/Git/wasm-calc/wasm-calc11/demo/draw.calc"}}, _position = Position {_line = 11, _character = 5}, _workDoneToken = Nothing}} -global mut index: Int64 = 1 - -import imports.draw as draw( - x: Int64, y: Int64, r: Int64, g: Int64, b: Int64 -) -> Void - -function min(floor: Int64, value: Int64) -> Int64 { - if value > floor then value else floor -} - -function max(ceiling: Int64, value: Int64) -> Int64 { - if value < ceiling then value else ceiling -} - -function clamp( - floor: Int64, ceiling: Int64, value: Int64 -) -> Int64 { min(floor, max(ceiling, value))} - -function drawBounded( - x: Int64, y: Int64, color: (Int64,Int64,Int64) -) -> (Int64,Int64,Int64) { - let maxWidth: Int64 = 600; - let maxHeight: Int64 = 600; - let (r,g,b) = color; - draw( - clamp(0, maxWidth, x), clamp(0, maxHeight, y), r, g, b - ); - (r,g,b) -} - -function cycle(color: (Int64,Int64,Int64)) -> (Int64, -Int64, -Int64) { let (r,g,b) = color; (g,b,r)} - -function initial(index: Int64) -> (Int64,Int64,Int64) { - let r = clamp(0, 255, index * 2); - let g = clamp(0, 255, 255 - r); - let b = clamp(0, 255, r * 3); - (r,g,b) -} - -export function test() -> Void { - let color = drawBounded( - index * 2, index * 3, initial(index) - ); - let color2 = drawBounded( - 100 - index, index * 3, cycle(color) - ); - let color3 = drawBounded( - 10 + index * 3, 50 - index * 2, cycle(color2) - ); - drawBounded(index * 4, 200 - index * 3, cycle(color3)); - if index < 200 then - set(index, index + 1) - else - set(index, 0) -} - diff --git a/wasm-calc11/src/Calc/Lsp.hs b/wasm-calc11/src/Calc/Lsp.hs index 49433aa9..bc00167d 100644 --- a/wasm-calc11/src/Calc/Lsp.hs +++ b/wasm-calc11/src/Calc/Lsp.hs @@ -1,24 +1,31 @@ {-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Calc.Lsp (lsp) where -import Data.Text.Utf16.Rope.Mixed as TextRope -import qualified Data.Text as T +import Calc.Build.Steps +import Calc.Test +import Calc.Types.Annotation +import Calc.Types.Module +import Calc.Types.Type import Control.Lens hiding (Iso) -import qualified Language.LSP.VFS as LSP -import Data.Maybe +import Control.Monad.Except import Control.Monad.IO.Class -import Language.LSP.Protocol.Message -import qualified Language.LSP.Protocol.Types as LSP -import qualified Language.LSP.Server as LSP +import Data.Maybe +import Data.Text qualified as T +import Data.Text.Utf16.Rope.Mixed as TextRope import Language.LSP.Protocol.Lens qualified as LSP +import Language.LSP.Protocol.Message +import Language.LSP.Protocol.Types qualified as LSP +import Language.LSP.Server qualified as LSP +import Language.LSP.VFS qualified as LSP doLog :: (MonadIO m) => String -> m () doLog = - liftIO . appendFile "/Users/danielharvey/git/wasm-calc/lsp-log.txt" . (<>) "\n" + liftIO . appendFile "/Users/daniel/git/wasm-calc/lsp-log.txt" . (<>) "\n" handlers :: LSP.Handlers (LSP.LspM ()) handlers = @@ -43,9 +50,13 @@ handlers = . LSP.uri . to LSP.toNormalizedUri doLog ("Processing DidChangeTextDocument for: " <> show doc) - let TNotificationMessage _ _ - (LSP.DidChangeTextDocumentParams - (LSP.VersionedTextDocumentIdentifier textDocumentIdentifier _) _) = notification + let TNotificationMessage + _ + _ + ( LSP.DidChangeTextDocumentParams + (LSP.VersionedTextDocumentIdentifier textDocumentIdentifier _) + _ + ) = notification file <- findFile textDocumentIdentifier doLog (show file) pure (), @@ -61,6 +72,12 @@ handlers = doLog (T.unpack file) + res <- runExceptT (lspBuildSteps file) + case res of + Right (_tests, typedModule) -> do + doLog (show typedModule) + Left _e -> doLog ("error") + let LSP.Position _l _c' = pos rsp = LSP.Hover (LSP.InL ms) (Just range) ms = LSP.mkMarkdown "Poo poo" @@ -70,14 +87,13 @@ handlers = findFile :: LSP.Uri -> LSP.LspM config T.Text findFile doc = do - let uri = LSP.toNormalizedUri doc - mdoc <- LSP.getVirtualFile uri - case mdoc of - Just (LSP.VirtualFile _ _ str) -> do - pure (TextRope.toText str) - Nothing -> do - error ("Didn't find anything in the VFS for: " <> show doc) - + let uri = LSP.toNormalizedUri doc + mdoc <- LSP.getVirtualFile uri + case mdoc of + Just (LSP.VirtualFile _ _ str) -> do + pure (TextRope.toText str) + Nothing -> do + error ("Didn't find anything in the VFS for: " <> show doc) lsp :: IO Int lsp = @@ -90,18 +106,39 @@ lsp = doInitialize = \env _req -> pure $ Right env, staticHandlers = \_caps -> handlers, interpretHandler = \env -> LSP.Iso (LSP.runLspT env) liftIO, - options = LSP.defaultOptions - { LSP.optTextDocumentSync = Just syncOptions - , LSP.optServerInfo = Just $ LSP.ServerInfo "Calc Language Server" Nothing + options = + LSP.defaultOptions + { LSP.optTextDocumentSync = Just syncOptions, + LSP.optServerInfo = Just $ LSP.ServerInfo "Calc Language Server" Nothing } } - where - syncOptions = LSP.TextDocumentSyncOptions - (Just True) -- open/close notifications - (Just LSP.TextDocumentSyncKind_Full) -- changes - Nothing -- will save - Nothing -- will save (wait until requests are sent to server) - (Just $ LSP.InR $ LSP.SaveOptions $ Just False) -- save + where + syncOptions = + LSP.TextDocumentSyncOptions + (Just True) -- open/close notifications + (Just LSP.TextDocumentSyncKind_Full) -- changes + Nothing -- will save + Nothing -- will save (wait until requests are sent to server) + (Just $ LSP.InR $ LSP.SaveOptions $ Just False) -- save + +lspBuildSteps :: + (MonadIO m, MonadError BuildError m) => + T.Text -> + m + ( [(T.Text, Bool)], + Module (Type Annotation) + ) +lspBuildSteps input = do + parsedModuleItems <- liftEither (parseModuleStep input) + + parsedModule <- liftEither (resolveModuleStep parsedModuleItems) + + typedModule <- liftEither (typecheckModuleStep input parsedModule) + + liftEither (linearityCheckStep input typedModule) + _ <- liftEither (abilityCheckStep input parsedModule) + testResults <- liftIO (testModule typedModule) + pure (testResults, typedModule) From 447a6bb1750c5fe524a8d4a8ac36f22c7de4301d Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Sun, 15 Sep 2024 22:42:30 +0100 Subject: [PATCH 6/6] Yes --- wasm-calc11/src/Calc/Lsp.hs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/wasm-calc11/src/Calc/Lsp.hs b/wasm-calc11/src/Calc/Lsp.hs index bc00167d..f88394d8 100644 --- a/wasm-calc11/src/Calc/Lsp.hs +++ b/wasm-calc11/src/Calc/Lsp.hs @@ -2,15 +2,15 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE LambdaCase #-} +{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Calc.Lsp (lsp) where import Calc.Build.Steps import Calc.Test -import Calc.Types.Annotation -import Calc.Types.Module -import Calc.Types.Type +import Calc.TypeUtils +import Calc.Types import Control.Lens hiding (Iso) import Control.Monad.Except import Control.Monad.IO.Class @@ -76,6 +76,8 @@ handlers = case res of Right (_tests, typedModule) -> do doLog (show typedModule) + let annotations = extractModuleAnnotations typedModule + doLog (show annotations) Left _e -> doLog ("error") let LSP.Position _l _c' = pos @@ -85,6 +87,14 @@ handlers = responder (Right $ LSP.InL rsp) ] +extractModuleAnnotations :: Module (Type ann) -> [(ann, Type ann)] +extractModuleAnnotations (Module {mdFunctions}) = + concatMap extractFunctionAnnotations mdFunctions + +extractFunctionAnnotations :: Function (Type ann) -> [(ann, Type ann)] +extractFunctionAnnotations (Function {fnBody}) = + foldMap (\ty -> [(getOuterTypeAnnotation ty, ty)]) fnBody + findFile :: LSP.Uri -> LSP.LspM config T.Text findFile doc = do let uri = LSP.toNormalizedUri doc