-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
I am trying to use Oxpecker + ViewEngine with datastar and for that I decided to use AsyncSeq for the views which are then rendered and sent to the Client via PatchElementsAsync.
When trying to create AsyncSeq of views with computation expression it does not work. I get the error: repro.fsx(10,38): error FS0193: The type 'AsyncSeq.AsyncSeqBuilder' is not compatible with the type 'HtmlContainer'.
Without the computation expression everything works as expected.
Do you know what could be the problem? Is there maybe a workaround so that I can still use asyncSeq CE?
Small repro.fsx:
#r "nuget: Oxpecker.ViewEngine"
#r "nuget: FSharp.Control.AsyncSeq"
open FSharp.Control
open Oxpecker.ViewEngine
let myView (name: string) : HtmlContainer =
h1() { name }
let main : AsyncSeq<HtmlContainer> = asyncSeq {
yield myView "Hello, world"
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels