Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Type
newtype PConst (a :: S -> Type) (b :: S -> Type) (s :: S) Source #
A value of type a
pretending to a be a value of type b
.
Since: 1.0.0
Instances
Helper functions
preconst :: forall (c :: S -> Type) (a :: S -> Type) (b :: S -> Type) (s :: S). Term s (PConst a b) -> Term s (PConst a c) Source #
Since PConst
is only pretending to be a value of another type, we can
change what we 'pretend to be' without having to rebuild. Essentially, this
is punsafeCoerce
, but because we're only changing a tag, we're not worried.
Since: 1.2.0