MCPcopy
hub / github.com/Effect-TS/effect / unAnnotateSafe

Function unAnnotateSafe

packages/printer/src/internal/docStream.ts:339–369  ·  view source on GitHub ↗
(
  self: DocStream.DocStream<A>
)

Source from the content-addressed store, hash-verified

337 Effect.runSync(unAnnotateSafe(self))
338
339const unAnnotateSafe = <A>(
340 self: DocStream.DocStream<A>
341): Effect.Effect<DocStream.DocStream<never>> => {
342 switch (self._tag) {
343 case "CharStream": {
344 return Effect.map(
345 Effect.suspend(() => unAnnotateSafe(self.stream)),
346 char(self.char)
347 )
348 }
349 case "TextStream": {
350 return Effect.map(
351 Effect.suspend(() => unAnnotateSafe(self.stream)),
352 text(self.text)
353 )
354 }
355 case "LineStream": {
356 return Effect.map(
357 Effect.suspend(() => unAnnotateSafe(self.stream)),
358 line(self.indentation)
359 )
360 }
361 case "PushAnnotationStream":
362 case "PopAnnotationStream": {
363 return Effect.suspend(() => unAnnotateSafe(self.stream))
364 }
365 default: {
366 return Effect.succeed(self as unknown as DocStream.DocStream<never>)
367 }
368 }
369}
370
371// -----------------------------------------------------------------------------
372// Folding

Callers 1

unAnnotateFunction · 0.85

Calls 4

charFunction · 0.70
textFunction · 0.70
lineFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected