cleff-0.2.0.0: Fast and concise extensible effects
Copyright(c) 2021 Xy Ren
LicenseBSD3
Maintainerxy.r@outlook.com
Stabilityunstable
Portabilitynon-portable (GHC only)
Safe HaskellNone
LanguageHaskell2010

Cleff.Internal.Any

Description

This module contains utility functions for Any.

This is an internal module and its API may change even between minor versions. Therefore you should be extra careful if you're to depend on this module.

Synopsis

Documentation

type family Any :: k where ... #

The type constructor Any is type to which you can unsafely coerce any lifted type, and back. More concretely, for a lifted type t and value x :: t, -- unsafeCoerce (unsafeCoerce x :: Any) :: t is equivalent to x.

fromAny :: Any -> a Source #

Coerce Any to a boxed value. This is generally unsafe and it is your responsibility to ensure that the type you're coercing into is the original type that the Any is coerced from.

toAny :: a -> Any Source #

Coerce any boxed value into Any.