Safe Haskell | None |
---|---|
Language | Haskell2010 |
Clr.Inheritance
Documentation
type family SuperTypes (t :: Type) :: [Type] Source #
Instances
type SuperTypes (T "System.Byte" ([] Type)) Source # | |
type SuperTypes (T "System.Char" ([] Type)) Source # | |
type SuperTypes (T "System.Double" ([] Type)) Source # | |
type SuperTypes (T "System.Int16" ([] Type)) Source # | |
type SuperTypes (T "System.Int32" ([] Type)) Source # | |
type SuperTypes (T "System.Int64" ([] Type)) Source # | |
type SuperTypes (T "System.IntPtr" ([] Type)) Source # | |
type SuperTypes (T "System.Object" ([] Type)) Source # | |
type SuperTypes (T "System.SByte" ([] Type)) Source # | |
type SuperTypes (T "System.Single" ([] Type)) Source # | |
type SuperTypes (T "System.String" ([] Type)) Source # | |
type SuperTypes (T "System.UInt16" ([] Type)) Source # | |
type SuperTypes (T "System.UInt32" ([] Type)) Source # | |
type SuperTypes (T "System.UInt64" ([] Type)) Source # | |
type SuperTypes (T "System.UIntPtr" ([] Type)) Source # | |
type SuperTypes (T "System.ValueType" ([] Type)) Source # | |
type family SuperTypesL (ts :: [Type]) :: [[Type]] where ... Source #
Equations
SuperTypesL '[] = '['[]] | |
SuperTypesL (x ': xs) = SuperTypes x ': SuperTypesL xs |
type family WithAllSuperTypes (t :: Type) :: [Type] where ... Source #
Equations
WithAllSuperTypes t = Concat (WithAllSuperTypes' '[t]) |
type family WithAllSuperTypes' (ts :: [Type]) :: [[Type]] where ... Source #
Equations
WithAllSuperTypes' '[] = '[] | |
WithAllSuperTypes' (x ': xs) = '[x] ': (SuperTypes x ': WithAllSuperTypes' (Concat (SuperTypesL (SuperTypes x)) `Append` xs)) |
type family Implements (t1 :: Type) (t2 :: Type) :: Bool where ... Source #
Equations
Implements t1 t1 = True | |
Implements t1 t2 = t2 `Elem` WithAllSuperTypes t1 |
type family IsValueType (a :: Type) :: Bool where ... Source #
Equations
IsValueType a = a `Implements` T "System.ValueType" '[] |
type family IsRefType (a :: Type) :: Bool where ... Source #
Equations
IsRefType a = Not (IsValueType a) |
unsafeDownCast :: (t' `Implements` t) ~ True => Object t -> Object t' Source #
type family ResolveBaseType (t :: Type) (m :: Type) :: Type where ... Source #
Equations
ResolveBaseType t m = ResolveBaseType' (WithAllSuperTypes t) m |
type family ResolveBaseType' (ts :: [Type]) (m :: Type) :: Type where ... Source #
Equations
ResolveBaseType' '[] m = TypeError (Text "Could not find declaring base type of member " :<>: ShowType m) | |
ResolveBaseType' (t ': ts) m = If (t `HasMember` m) t (ResolveBaseType' ts m) |