// ets_tracing: off
import * as F from "@effect-ts/system/IO"
import type { IOURI } from "../Modules/index.js"
import type { URI } from "../Prelude/index.js"
import * as P from "../Prelude/index.js"
/**
* The `Any` instance for `IO[+_]`.
*/
export const Any = P.instance
]>>({
any: () => F.succeed({})
})
/**
* The `Covariant` instance for `IO[+_]`.
*/
export const Covariant = P.instance]>>({
map: F.map
})
/**
* The `AssociativeBoth` instance for `IO[+_]`.
*/
export const AssociativeBoth = P.instance]>>({
both: F.zip
})
/**
* The `AssociativeFlatten` instance for `IO[+_]`.
*/
export const AssociativeFlatten = P.instance]>>({
flatten: (ffa) => F.chain_(ffa, (x) => x)
})
/**
* The `IdentityFlatten` instance for `IO[+_]`.
*/
export const IdentityFlatten = P.instance]>>({
...Any,
...AssociativeFlatten
})
/**
* The `Monad` instance for `IO[+_]`.
*/
export const Monad = P.instance]>>({
...Any,
...Covariant,
...AssociativeFlatten
})
/**
* The `Applicative` instance for `IO[+_]`.
*/
export const Applicative = P.instance]>>({
...Any,
...Covariant,
...AssociativeBoth
})