{-# LANGUAGE ExplicitForAll #-}
module Witch.Lift where
import qualified Data.Typeable as Typeable
import qualified Language.Haskell.TH.Syntax as TH
import qualified Witch.TryFrom as TryFrom
import qualified Witch.Utility as Utility
liftedFrom ::
forall source target m.
( TryFrom.TryFrom source target,
TH.Lift target,
Show source,
Typeable.Typeable source,
Typeable.Typeable target,
TH.Quote m
) =>
source ->
TH.Code m target
liftedFrom :: forall source target (m :: * -> *).
(TryFrom source target, Lift target, Show source, Typeable source,
Typeable target, Quote m) =>
source -> Code m target
liftedFrom = target -> Code m target
forall t (m :: * -> *). (Lift t, Quote m) => t -> Code m t
forall (m :: * -> *). Quote m => target -> Code m target
TH.liftTyped (target -> Code m target)
-> (source -> target) -> source -> Code m target
forall b c a. (b -> c) -> (a -> b) -> a -> c
. source -> target
forall source target.
(HasCallStack, TryFrom source target, Show source, Typeable source,
Typeable target) =>
source -> target
Utility.unsafeFrom
liftedInto ::
forall target source m.
( TryFrom.TryFrom source target,
TH.Lift target,
Show source,
Typeable.Typeable source,
Typeable.Typeable target,
TH.Quote m
) =>
source ->
TH.Code m target
liftedInto :: forall target source (m :: * -> *).
(TryFrom source target, Lift target, Show source, Typeable source,
Typeable target, Quote m) =>
source -> Code m target
liftedInto = source -> Code m target
forall source target (m :: * -> *).
(TryFrom source target, Lift target, Show source, Typeable source,
Typeable target, Quote m) =>
source -> Code m target
liftedFrom