{-# LANGUAGE ConstraintKinds #-}
module Data.Record.Plugin.Runtime (
Any
, Constraint
, Eq((==))
, Int
, Ord(compare)
, Proxy(Proxy)
, Show(showsPrec)
, Type
, unsafeCoerce
, error
, Vector
, Vector.fromList
, Vector.toList
, Vector.unsafeIndex
, Vector.unsafeUpd
, GRC.HasField(hasField)
, LR.Dict
, LR.FieldMetadata(FieldMetadata)
, LR.FieldStrictness(FieldLazy, FieldStrict)
, LR.Generic(Constraints, MetadataOf, dict, from, metadata, to)
, LR.Metadata(Metadata, recordConstructor, recordFieldMetadata, recordName, recordSize)
, LR.Rep(Rep)
, LR.ThroughLRGenerics(WrapThroughLRGenerics, unwrapThroughLRGenerics)
, LR.gcompare
, LR.geq
, LR.gshowsPrec
, LR.noInlineUnsafeCo
, dictFor
, repFromVector
, repToVector
) where
import Data.Coerce (coerce)
import Data.Kind (Constraint, Type)
import Data.Proxy (Proxy(Proxy))
import Data.Vector (Vector)
import GHC.Exts (Any)
import Unsafe.Coerce (unsafeCoerce)
import qualified Data.Record.Generic as LR
import qualified Data.Record.Generic.Eq as LR
import qualified Data.Record.Generic.GHC as LR
import qualified Data.Record.Generic.Rep.Internal as LR
import qualified Data.Record.Generic.Show as LR
import qualified Data.Vector as Vector
import qualified GHC.Records.Compat as GRC
dictFor :: c x => Proxy c -> Proxy x -> LR.Dict c x
dictFor :: Proxy c -> Proxy x -> Dict c x
dictFor Proxy c
_ Proxy x
_ = Dict c x
forall k (c :: k -> Constraint) (a :: k). c a => Dict c a
LR.Dict
repFromVector :: Vector Any -> LR.Rep LR.I a
repFromVector :: Vector Any -> Rep I a
repFromVector = Vector Any -> Rep I a
coerce
repToVector :: LR.Rep LR.I a -> Vector Any
repToVector :: Rep I a -> Vector Any
repToVector = Rep I a -> Vector Any
coerce