{-# LANGUAGE TemplateHaskell, UndecidableInstances #-}
module Hyper.Unify.Term
( UTerm(..)
, _UUnbound, _USkolem, _UToVar, _UTerm, _UInstantiated
, _UResolving, _UResolved, _UConverted
, UTermBody(..), uBody, uConstraints
) where
import Hyper
import Hyper.Unify.Constraints (TypeConstraintsOf)
import Hyper.Internal.Prelude
data UTermBody v ast = UTermBody
{ UTermBody v ast -> TypeConstraintsOf (GetHyperType ast)
_uConstraints :: TypeConstraintsOf (GetHyperType ast)
, UTermBody v ast -> ast :# v
_uBody :: ast :# v
} deriving (forall x. UTermBody v ast -> Rep (UTermBody v ast) x)
-> (forall x. Rep (UTermBody v ast) x -> UTermBody v ast)
-> Generic (UTermBody v ast)
forall x. Rep (UTermBody v ast) x -> UTermBody v ast
forall x. UTermBody v ast -> Rep (UTermBody v ast) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (v :: HyperType) (ast :: AHyperType) x.
Rep (UTermBody v ast) x -> UTermBody v ast
forall (v :: HyperType) (ast :: AHyperType) x.
UTermBody v ast -> Rep (UTermBody v ast) x
$cto :: forall (v :: HyperType) (ast :: AHyperType) x.
Rep (UTermBody v ast) x -> UTermBody v ast
$cfrom :: forall (v :: HyperType) (ast :: AHyperType) x.
UTermBody v ast -> Rep (UTermBody v ast) x
Generic
data UTerm v ast
= UUnbound (TypeConstraintsOf (GetHyperType ast))
| USkolem (TypeConstraintsOf (GetHyperType ast))
| UToVar (v ast)
| UTerm (UTermBody v ast)
| UInstantiated (v ast)
| UResolving (UTermBody v ast)
| UResolved (Pure ast)
| UConverted Int
deriving (forall x. UTerm v ast -> Rep (UTerm v ast) x)
-> (forall x. Rep (UTerm v ast) x -> UTerm v ast)
-> Generic (UTerm v ast)
forall x. Rep (UTerm v ast) x -> UTerm v ast
forall x. UTerm v ast -> Rep (UTerm v ast) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (v :: HyperType) (ast :: AHyperType) x.
Rep (UTerm v ast) x -> UTerm v ast
forall (v :: HyperType) (ast :: AHyperType) x.
UTerm v ast -> Rep (UTerm v ast) x
$cto :: forall (v :: HyperType) (ast :: AHyperType) x.
Rep (UTerm v ast) x -> UTerm v ast
$cfrom :: forall (v :: HyperType) (ast :: AHyperType) x.
UTerm v ast -> Rep (UTerm v ast) x
Generic
makePrisms ''UTerm
makeLenses ''UTermBody
makeCommonInstances [''UTerm, ''UTermBody]