module ProjectM36.TypeConstructor where
import ProjectM36.Base
name :: TypeConstructor -> TypeConstructorName
name :: TypeConstructor -> TypeConstructorName
name (ADTypeConstructor TypeConstructorName
name' [TypeConstructor]
_) = TypeConstructorName
name'
name (PrimitiveTypeConstructor TypeConstructorName
name' AtomType
_) = TypeConstructorName
name'
name (RelationAtomTypeConstructor [AttributeExprBase ()]
_) = forall a. HasCallStack => [Char] -> a
error [Char]
"name called on RelationAtomTypeConstructor"
name (TypeVariable TypeConstructorName
_) = forall a. HasCallStack => [Char] -> a
error [Char]
"name called on TypeVariable"
arguments :: TypeConstructor -> [TypeConstructor]
arguments :: TypeConstructor -> [TypeConstructor]
arguments (ADTypeConstructor TypeConstructorName
_ [TypeConstructor]
args) = [TypeConstructor]
args
arguments (PrimitiveTypeConstructor TypeConstructorName
_ AtomType
_) = []
arguments (RelationAtomTypeConstructor [AttributeExprBase ()]
_) = []
arguments (TypeVariable TypeConstructorName
_) = []