Skip to content

Add a HasLink instance for ServerSentEvents' - #1926

Merged
LaurentRDC merged 2 commits into
haskell-servant:masterfrom
BrianRS:sse-haslink
Oct 29, 2026
Merged

LaurentRDC merged 2 commits into
haskell-servant:masterfrom
BrianRS:sse-haslink

Conversation

@BrianRS

@BrianRS BrianRS commented Oct 26, 2026

Copy link
Copy Markdown

ServerSentEvents' (added with client support in #1811) has no HasLink instance, so safeLink, allLinks and fieldLink fail to type-check on any API that contains an SSE endpoint. This adds the same terminal instance that Verb, Stream and UVerb have.

Test plan

  • cabal test servant: 53 examples, 0 failures, including the new "generates correct links for ServerSentEvents" case.
  • Without the instance, LinksSpec fails to compile at the new case.

@LaurentRDC

Copy link
Copy Markdown
Contributor

Looks good to me, assuming that CI passes

@BrianRS

BrianRS commented Oct 29, 2026

Copy link
Copy Markdown
Author

Thanks, @LaurentRDC. CI is green on every GHC version. Could you merge this when you have a moment?

@LaurentRDC
LaurentRDC merged commit bdfbef7 into haskell-servant:master Oct 29, 2026
10 checks passed
@LaurentRDC

Copy link
Copy Markdown
Contributor

Thanks for the ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants