Fixed Cookie example from Cookie module #391
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Description:
The original example in the Web.Scotty.Cookie module encountered two primary issues that hindered its functionality:
get
function, was not included in the import list from theWeb.Scotty
module, leading to a missing function error.getCookie
function was expected to return aLazy Text
type, but instead, it returned a strict Text type. This discrepancy caused a type mismatch with theTL.decimal
function, which requires a Lazy Text type.Solution Implemented:
get
function has now been added to the import list within theWeb.Scotty.Cookie
module.TL.fromStrict
function. This conversion aligns with the expected input type for the html function, thereby resolving the type mismatch issue.@ocramz