/**
 * The `Unify` module defines the type-level protocol Effect uses to collapse
 * unions of protocol-enabled values into their public data types. It is mostly
 * for maintainers of Effect data types and advanced library authors; ordinary
 * application code usually benefits from unification through APIs such as
 * `Effect`, `Option`, `Result`, `Stream`, `Layer`, and `Match`.
 *
 * **Mental model**
 *
 * A type opts in by carrying phantom entries keyed by {@link typeSymbol} and
 * {@link unifySymbol}. {@link Unify} reads those entries, ignores any protocol
 * members listed through {@link ignoreSymbol}, and widens matching union
 * members to the public type each entry returns. The runtime helper
 * {@link unify} is an identity function; it changes only the static type that
 * TypeScript sees.
 *
 * **Common tasks**
 *
 * - Add unification support to a new Effect data type so mixed unions infer as
 *   the public container type instead of an implementation shape.
 * - Normalize the return type of branching APIs, matchers, or builders that can
 *   produce several protocol-enabled values.
 * - Apply unification to a value or curried function result with {@link unify}
 *   while preserving the original runtime behavior.
 *
 * **Gotchas**
 *
 * - Unification is a compile-time protocol, not a runtime conversion hook.
 * - Protocol entries should be specific to the data type they widen; overly
 *   broad entries can make inferred unions less precise.
 *
 * @since 2.0.0
 */
import { identity } from "./Function.js";
/**
 * Applies `Unify` to a value or function return type at compile time.
 *
 * **When to use**
 *
 * Use to keep a value or function unchanged at runtime while normalizing its
 * inferred type with Effect's unification protocol.
 *
 * **Details**
 *
 * This is an identity function at runtime. For functions, the returned function
 * has the same runtime behavior while its return type is normalized with the
 * Effect unification protocol.
 *
 * **Example** (Unifying values and function results)
 *
 * ```ts
 * import { Unify } from "effect"
 *
 * // Unify a simple value
 * const unifiedValue = Unify.unify("hello")
 * // Type: string
 *
 * // Unify a function result
 * const createUnifiableValue = () => ({
 *   value: "test",
 *   [Unify.typeSymbol]: "string" as const,
 *   [Unify.unifySymbol]: { String: () => "test" as const }
 * })
 *
 * const unifiedFunction = Unify.unify(createUnifiableValue)
 * // The result will be properly unified
 *
 * // Unify with curried functions
 * const curriedFunction = (a: string) => (b: number) => ({ result: a + b })
 * const unifiedCurried = Unify.unify(curriedFunction)
 * // Type: (a: string) => (b: number) => Unify<{ result: string }>
 * ```
 *
 * @see {@link Unify} for the type-level normalization applied by this helper
 *
 * @category utility types
 * @since 2.0.0
 */
export const unify = identity;
//# sourceMappingURL=Unify.js.map