diff --git a/node-scripts/src/async-promises.ts b/node-scripts/src/async-promises.ts index 72373d8..40a0a2c 100644 --- a/node-scripts/src/async-promises.ts +++ b/node-scripts/src/async-promises.ts @@ -1,5 +1,5 @@ import * as Node from '@effect/platform-node/Runtime' -import { Cause, Duration, Effect } from 'effect' +import { Duration, Effect } from 'effect' import { TaggedClass } from 'effect/Data' // --- HELPERS --- @@ -48,4 +48,4 @@ const main = Effect.gen(function* ($) { console.log('Got result 3:', result3) }) -Node.runMain(main.pipe(Effect.tapErrorCause((_) => Effect.log(Cause.pretty(_))))) +Node.runMain(main.pipe(Effect.tapErrorCause(Effect.log))) diff --git a/node-scripts/src/fs-write-file.ts b/node-scripts/src/fs-write-file.ts index 57244c9..6cf0926 100644 --- a/node-scripts/src/fs-write-file.ts +++ b/node-scripts/src/fs-write-file.ts @@ -1,7 +1,7 @@ import * as FS from '@effect/platform/FileSystem' import * as Node from '@effect/platform-node/Runtime' import * as NodeContext from '@effect/platform-node/NodeContext' -import { Cause, Effect } from 'effect' +import { Effect } from 'effect' const main = Effect.gen(function* ($) { const fs = yield* $(FS.FileSystem) @@ -12,9 +12,4 @@ const main = Effect.gen(function* ($) { console.log('Wrote file (output/fs-write-file.txt)') }) -Node.runMain( - main.pipe( - Effect.provideSomeLayer(NodeContext.layer), - Effect.tapErrorCause((_) => Effect.log(Cause.pretty(_))), - ), -) +Node.runMain(main.pipe(Effect.provideSomeLayer(NodeContext.layer), Effect.tapErrorCause(Effect.log)))