Safe Haskell | None |
---|---|
Language | Haskell2010 |
Debug.RecoverRTTI
Description
Recover runtime type information
Synopsis
- anythingToString :: forall a. a -> String
- traceAnything :: a -> b -> b
- traceAnythingId :: a -> a
- newtype AnythingToString a = AnythingToString a
- data BoxAnything = forall a. BoxAnything a
- classify :: a -> Either Closure (Classifier a)
- type Classifier = Classifier_ IsUserDefined
- data PrimClassifier (a :: Type) where
- C_Bool :: PrimClassifier Bool
- C_Char :: PrimClassifier Char
- C_Double :: PrimClassifier Double
- C_Float :: PrimClassifier Float
- C_Int :: PrimClassifier Int
- C_Int16 :: PrimClassifier Int16
- C_Int8 :: PrimClassifier Int8
- C_Int32 :: PrimClassifier Int32
- C_Int64 :: PrimClassifier Int64
- C_Integer :: PrimClassifier Integer
- C_Ordering :: PrimClassifier Ordering
- C_Unit :: PrimClassifier ()
- C_Word :: PrimClassifier Word
- C_Word8 :: PrimClassifier Word8
- C_Word16 :: PrimClassifier Word16
- C_Word32 :: PrimClassifier Word32
- C_Word64 :: PrimClassifier Word64
- C_String :: PrimClassifier String
- C_BS_Strict :: PrimClassifier ByteString
- C_BS_Lazy :: PrimClassifier ByteString
- C_BS_Short :: PrimClassifier ShortByteString
- C_Text_Strict :: PrimClassifier Text
- C_Text_Lazy :: PrimClassifier Text
- C_Value :: PrimClassifier Value
- C_STRef :: PrimClassifier SomeSTRef
- C_TVar :: PrimClassifier SomeTVar
- C_MVar :: PrimClassifier SomeMVar
- C_Fun :: PrimClassifier SomeFun
- C_IntSet :: PrimClassifier IntSet
- C_Prim_ArrayM :: PrimClassifier SomePrimArrayM
- C_Vector_Storable :: PrimClassifier SomeStorableVector
- C_Vector_StorableM :: PrimClassifier SomeStorableVectorM
- C_Vector_Primitive :: PrimClassifier SomePrimitiveVector
- C_Vector_PrimitiveM :: PrimClassifier SomePrimitiveVectorM
- data IsUserDefined a where
- data Classifier_ (o :: Type -> Type) (a :: Type) :: Type where
- C_Prim :: PrimClassifier a -> Classifier_ o a
- C_Other :: o a -> Classifier_ o a
- C_Maybe :: Elems o '[a] -> Classifier_ o (Maybe a)
- C_Either :: Elems o '[a, b] -> Classifier_ o (Either a b)
- C_List :: Elems o '[a] -> Classifier_ o [a]
- C_Ratio :: Elems o '[a] -> Classifier_ o (Ratio a)
- C_Set :: Elems o '[a] -> Classifier_ o (Set a)
- C_Map :: Elems o '[a, b] -> Classifier_ o (Map a b)
- C_IntMap :: Elems o '[a] -> Classifier_ o (IntMap a)
- C_Sequence :: Elems o '[a] -> Classifier_ o (Seq a)
- C_Tree :: Elems o '[a] -> Classifier_ o (Tree a)
- C_HashSet :: Elems o '[a] -> Classifier_ o (HashSet a)
- C_HashMap :: Elems o '[a, b] -> Classifier_ o (HashMap a b)
- C_HM_Array :: Elems o '[a] -> Classifier_ o (Array a)
- C_Prim_Array :: Elems o '[a] -> Classifier_ o (Array a)
- C_Vector_Boxed :: Elems o '[a] -> Classifier_ o (Vector a)
- C_Tuple :: (SListI xs, IsValidSize (Length xs)) => Elems o xs -> Classifier_ o (WrappedTuple xs)
- data Elem o a where
- newtype Elems o xs = Elems (NP (Elem o) xs)
- newtype SomeSTRef = SomeSTRef (STRef Any Any)
- newtype SomeTVar = SomeTVar (TVar Any)
- newtype SomeMVar = SomeMVar (MVar Any)
- newtype SomeFun = SomeFun (Any -> Any)
- newtype SomePrimArrayM = SomePrimArrayM (MutableArray RealWorld Any)
- newtype SomeStorableVector = SomeStorableVector Any
- newtype SomeStorableVectorM = SomeStorableVectorM Any
- newtype SomePrimitiveVector = SomePrimitiveVector Any
- newtype SomePrimitiveVectorM = SomePrimitiveVectorM Any
- mapClassifier :: forall m o o'. Applicative m => (forall a. o a -> m (o' a)) -> forall a. Classifier_ o a -> m (Classifier_ o' a)
- samePrim :: PrimClassifier a -> PrimClassifier b -> Maybe (a :~: b)
- sameClassifier_ :: forall o. (forall a b. o a -> o b -> Maybe (a :~: b)) -> forall a b. Classifier_ o a -> Classifier_ o b -> Maybe (a :~: b)
- sameElem :: forall o. (forall a b. o a -> o b -> Maybe (a :~: b)) -> forall a b. Elem o a -> Elem o b -> Maybe (a :~: b)
- sameElems :: forall o r. (forall a b. o a -> o b -> Maybe (a :~: b)) -> forall as bs. Elems o as -> Elems o bs -> (as ~ bs => r) -> Maybe r
- data UserDefined
- data Classified a = Classified (Classifier a) a
- fromUserDefined :: UserDefined -> (String, [Some Classified])
- canShowClassified :: Classifier a -> Dict Show a
- canShowPrim :: PrimClassifier a -> Dict Show a
- canShowClassified_ :: forall o. (forall a. o a -> Dict Show a) -> forall a. Classifier_ o a -> Dict Show a
- type PrimSatisfies (c :: Type -> Constraint) = (c Bool, c Char, c Double, c Float, c Int, c Int16, c Int8, c Int32, c Int64, c Integer, c Ordering, c (), c Word, c Word8, c Word16, c Word32, c Word64, c String, c ByteString, c ByteString, c ShortByteString, c Text, c Text, c Value, c SomeSTRef, c SomeTVar, c SomeMVar, c SomeFun, c IntSet, c SomePrimArrayM, c SomeStorableVector, c SomeStorableVectorM, c SomePrimitiveVector, c SomePrimitiveVectorM)
- primSatisfies :: forall c. PrimSatisfies c => forall a. PrimClassifier a -> Dict c a
- class (PrimSatisfies c, forall a. c a => c (Maybe a), forall a b. (c a, c b) => c (Either a b), forall a. c a => c [a], forall a. c a => c (Ratio a), forall a. c a => c (Set a), forall a b. (c a, c b) => c (Map a b), forall a. c a => c (IntMap a), forall a. c a => c (Seq a), forall a. c a => c (Tree a), forall a. c a => c (HashSet a), forall a b. (c a, c b) => c (HashMap a b), forall a. c a => c (Array a), forall a. c a => c (Array a), forall a. c a => c (Vector a), forall xs. (All c xs, IsValidSize (Length xs)) => c (WrappedTuple xs)) => ClassifiedSatisfies (c :: Type -> Constraint)
- classifiedSatisfies :: forall c o. (ClassifiedSatisfies c, c Void) => (forall a. o a -> Dict c a) -> forall a. Classifier_ o a -> Dict c a
- data Reclassified o a where
- Reclassified :: o b -> FromUsr a b -> Reclassified o a
- reclassify_ :: forall m o o'. Applicative m => (forall a. o a -> m (Reclassified o' a)) -> forall a. Classifier_ o a -> m (Classifier_ (Reclassified o') a)
- distribReclassified :: forall o. forall a. Classifier_ (Reclassified o) a -> Reclassified (Classifier_ o) a
- data FromUsr :: Type -> Type -> Type where
- coerceFromUsr :: FromUsr a b -> a -> b
- newtype WrappedTuple xs where
- WrappedTuple (Tuple xs)
- pattern TNil :: forall xs. (SListI xs, IsValidSize (Length xs)) => xs ~ '[] => WrappedTuple xs
- pattern TCons :: forall xs'. (SListI xs', IsValidSize (Length xs')) => forall x xs. (xs' ~ (x ': xs), SListI xs, IsValidSize (Length xs)) => x -> WrappedTuple xs -> WrappedTuple xs'
- unwrapTuple :: WrappedTuple xs -> Tuple xs
- type family Tuple xs where ...
- tupleFromNP :: forall xs. (SListI xs, IsValidSize (Length xs)) => NP I xs -> WrappedTuple xs
- tupleToNP :: (SListI xs, IsValidSize (Length xs)) => WrappedTuple xs -> NP I xs
- class KnownNat n => IsValidSize n where
- isValidSize :: ValidSize n
- data ValidSize (n :: Nat) where
- data TooBig (n :: Nat) where
- TooBig :: TooBig ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S n)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
- smallerIsValid :: forall n r. IsValidSize ('S n) => Proxy ('S n) -> (IsValidSize n => r) -> r
- toValidSize :: Int -> Maybe (Some ValidSize)
- liftValidSize :: forall n. ValidSize n -> Dict IsValidSize n
- data Nat
- data SNat (n :: Nat) where
- class KnownNat (n :: Nat) where
- type family Length (xs :: [k]) :: Nat where ...
- data Some (f :: k -> Type) where
- mapSome :: (forall x. f x -> g x) -> Some f -> Some g
Take advance of the recovered type information
anythingToString :: forall a. a -> String Source #
Show any value
This shows any value, as long as it's not unlifted. The result should be equal to show instances, with the following caveats:
- User-defined types (types not explicitly known to this library) with a custom Show instance will still be showable, but the result will be what the derived show instance would have done.
- Record field names are not known at runtime, so they are not shown.
- UNPACKed data is not visible to this library (if you compile with
-O0
ghc
will not unpack data, so that might be a workaround if necessary).
If classification fails, we show the actual closure.
Debugging support
Tracing
traceAnything :: a -> b -> b Source #
Like traceShow
, but using anythingToString
traceAnythingId :: a -> a Source #
Like traceShowId
, but using anythingToString
Deriving-via
newtype AnythingToString a Source #
Deriving-via support for anythingToString
If for debugging purposes you want to temporarily add a Show
instance to
an arbitrary datatype in terms of anythingToString
, you can do so using
data T = MkT ... deriving Show via AnythingToString T
This is equivalent to saying
instance Show T where show = anythingToString
Constructors
AnythingToString a |
Instances
Show (AnythingToString a) Source # | |
Defined in Debug.RecoverRTTI.Debugging Methods showsPrec :: Int -> AnythingToString a -> ShowS # show :: AnythingToString a -> String # showList :: [AnythingToString a] -> ShowS # |
data BoxAnything Source #
Add level of indirection on the heap
(Advanced users only, for most use cases this should not be necessary.)
Type recovery in recover-rtti
(through classify
) works by looking at the
values on the heap. For example, if we see a list, we then look at the first
element of that list (if any), and if that element happens to be an Int
,
the inferred type is [Int]
. When we show such a list (anythingToString
),
every element of the list is interpreted as an Int
, without doing further
type recovery.
This works for normal use cases, but fails in low-level code that uses Any
to squeeze values of different types into a data structure not designed for
that purpose. For example, consider
data T f = T [f Any]
If we call anythingToString
on a T
value with elements of different
types in the list, we get some unexpected results:
anythingToString (T [unsafeCoerce (1 :: Int), unsafeCoerce False]) == "T [1,14355032]"
The reason is that the type of the list was inferred as [Int]
, and hence
the Bool
was subsequently also interpreted as an Int
.
BoxAnything
helps to resolve the problem. There are ways in which it can
be used. First, we can derive the following entirely reasonable Show
instance for T
:
deriving instance Show a => Show (T (K a))
We then get
show (T [K $ BoxAnything (1 :: Int), K $ BoxAnything False]) == "T [K 1,K False]"
Alternatively, we can omit the Show
instance for T
, to get
anythingToString (T [K $ BoxAnything (1 :: Int), K $ BoxAnything False]) == "T [BoxAnything 1,BoxAnything False]"
For this second use case to work, it is critical that BoxAnything
is a
datatype, not a newtype, so that it actually appears on the heap.
Constructors
forall a. BoxAnything a |
Instances
Show BoxAnything Source # | |
Defined in Debug.RecoverRTTI.Debugging Methods showsPrec :: Int -> BoxAnything -> ShowS # show :: BoxAnything -> String # showList :: [BoxAnything] -> ShowS # |
Recover type information
classify :: a -> Either Closure (Classifier a) Source #
Classify a value
Given a value of some unknown type a
and a classifier Classifier a
,
it should be sound to coerce the value to the type indicated by the
classifier.
This is also the reason not all values can be classified; in particular, we cannot classify values of unlifted types, as for these types coercion does not work (this would result in a ghc runtime crash).
type Classifier = Classifier_ IsUserDefined Source #
Classifier
Given a value of some unknown type a
, a Classifier a
will tell you what
the type of a
is. This is similar to a TypeRep
, but since we recover
this information from the heap, we have less accurate type information than
TypeRep
does.
data PrimClassifier (a :: Type) where Source #
Classifier for primitive types
Constructors
Instances
Show (PrimClassifier a) Source # | |
Defined in Debug.RecoverRTTI.Classifier Methods showsPrec :: Int -> PrimClassifier a -> ShowS # show :: PrimClassifier a -> String # showList :: [PrimClassifier a] -> ShowS # |
data IsUserDefined a where Source #
User-defined types
If we classify a type as user-defined, we pair the classifier with the
original value. This means that a Classifier
is sufficient information
for staged inference by client code that may wish to further classify these
types given additional domain knowledge (see also reclassify_
).
Constructors
IsUserDefined :: UserDefined -> IsUserDefined UserDefined |
Instances
Show (IsUserDefined a) Source # | |
Defined in Debug.RecoverRTTI.Classifier Methods showsPrec :: Int -> IsUserDefined a -> ShowS # show :: IsUserDefined a -> String # showList :: [IsUserDefined a] -> ShowS # |
Generalizations
data Classifier_ (o :: Type -> Type) (a :: Type) :: Type where Source #
Generalization of Classifier
Type arguments:
o
: Classification of " other " types (not explicitly known to the lib)
Normally we instantiate this to IsUserDefined
, classifying all unknown
types as UserDefined
.
a
: The type we're actually classifying
Constructors
C_Prim :: PrimClassifier a -> Classifier_ o a | |
C_Other :: o a -> Classifier_ o a | |
C_Maybe :: Elems o '[a] -> Classifier_ o (Maybe a) | |
C_Either :: Elems o '[a, b] -> Classifier_ o (Either a b) | |
C_List :: Elems o '[a] -> Classifier_ o [a] | |
C_Ratio :: Elems o '[a] -> Classifier_ o (Ratio a) | |
C_Set :: Elems o '[a] -> Classifier_ o (Set a) | |
C_Map :: Elems o '[a, b] -> Classifier_ o (Map a b) | |
C_IntMap :: Elems o '[a] -> Classifier_ o (IntMap a) | |
C_Sequence :: Elems o '[a] -> Classifier_ o (Seq a) | |
C_Tree :: Elems o '[a] -> Classifier_ o (Tree a) | |
C_HashSet :: Elems o '[a] -> Classifier_ o (HashSet a) | |
C_HashMap :: Elems o '[a, b] -> Classifier_ o (HashMap a b) | |
C_HM_Array :: Elems o '[a] -> Classifier_ o (Array a) | |
C_Prim_Array :: Elems o '[a] -> Classifier_ o (Array a) | |
C_Vector_Boxed :: Elems o '[a] -> Classifier_ o (Vector a) | |
C_Tuple :: (SListI xs, IsValidSize (Length xs)) => Elems o xs -> Classifier_ o (WrappedTuple xs) |
Instances
(forall x. Show (o x)) => Show (Classifier_ o a) Source # | |
Defined in Debug.RecoverRTTI.Classifier Methods showsPrec :: Int -> Classifier_ o a -> ShowS # show :: Classifier_ o a -> String # showList :: [Classifier_ o a] -> ShowS # |
Unknown or partially known type arguments
Newtype wrappers for unshowable types
Functions
We do not try to infer the domain or codomain of the function.
Mutable arrays
newtype SomePrimArrayM Source #
Constructors
SomePrimArrayM (MutableArray RealWorld Any) |
Instances
Show SomePrimArrayM Source # | |
Defined in Debug.RecoverRTTI.Wrappers Methods showsPrec :: Int -> SomePrimArrayM -> ShowS # show :: SomePrimArrayM -> String # showList :: [SomePrimArrayM] -> ShowS # |
newtype SomeStorableVector Source #
Storable vector (Data.Vector.Storable)
For storable arrays we have no hope of inferring the type of the elements:
the elements are not stored as pointers, but rather as " serialized " data
through the Storable
type class. In order to get at any element, we'd need
to have the corresponding Storable
instance, but of course we don't have it
if we don't have the type.
Constructors
SomeStorableVector Any |
Instances
Show SomeStorableVector Source # | |
Defined in Debug.RecoverRTTI.Wrappers Methods showsPrec :: Int -> SomeStorableVector -> ShowS # show :: SomeStorableVector -> String # showList :: [SomeStorableVector] -> ShowS # |
newtype SomeStorableVectorM Source #
Mutable storage vector (Data.Vector.Storable)
See SomeStorableVector
for some details on why we don't infer anything here.
Constructors
SomeStorableVectorM Any |
Instances
Show SomeStorableVectorM Source # | |
Defined in Debug.RecoverRTTI.Wrappers Methods showsPrec :: Int -> SomeStorableVectorM -> ShowS # show :: SomeStorableVectorM -> String # showList :: [SomeStorableVectorM] -> ShowS # |
newtype SomePrimitiveVector Source #
Primitive vector (Data.Vector.Primitive)
See SomeStorableVector
for why we can't classify elements of these vectors.
Constructors
SomePrimitiveVector Any |
Instances
Show SomePrimitiveVector Source # | |
Defined in Debug.RecoverRTTI.Wrappers Methods showsPrec :: Int -> SomePrimitiveVector -> ShowS # show :: SomePrimitiveVector -> String # showList :: [SomePrimitiveVector] -> ShowS # |
newtype SomePrimitiveVectorM Source #
Mutable primitive vector
Constructors
SomePrimitiveVectorM Any |
Instances
Show SomePrimitiveVectorM Source # | |
Defined in Debug.RecoverRTTI.Wrappers Methods showsPrec :: Int -> SomePrimitiveVectorM -> ShowS # show :: SomePrimitiveVectorM -> String # showList :: [SomePrimitiveVectorM] -> ShowS # |
Working with classifiers
Mapping
mapClassifier :: forall m o o'. Applicative m => (forall a. o a -> m (o' a)) -> forall a. Classifier_ o a -> m (Classifier_ o' a) Source #
Equality
samePrim :: PrimClassifier a -> PrimClassifier b -> Maybe (a :~: b) Source #
sameClassifier_ :: forall o. (forall a b. o a -> o b -> Maybe (a :~: b)) -> forall a b. Classifier_ o a -> Classifier_ o b -> Maybe (a :~: b) Source #
Check that two classifiers are the same
If they are the same, additionally return a proof that that means the types they classify must be equal (note that equality on the classifiers is strictly stronger than equality on the types: for example, non-empty and empty lists have different classifiers, but classify the same type).
This is defined on the general type Classifier_
rather than on Classifier
because different user-defined types may both be classified as UserDefined
yet not be equal to each other
sameElem :: forall o. (forall a b. o a -> o b -> Maybe (a :~: b)) -> forall a b. Elem o a -> Elem o b -> Maybe (a :~: b) Source #
sameElems :: forall o r. (forall a b. o a -> o b -> Maybe (a :~: b)) -> forall as bs. Elems o as -> Elems o bs -> (as ~ bs => r) -> Maybe r Source #
User-defined types
data UserDefined Source #
User-defined type
We defer classification of the arguments to the constructor (the type might be recursive, so if we tried to classify all arguments, we might end up unrolling the recursion at the type level).
Instances
Show UserDefined Source # | |
Defined in Debug.RecoverRTTI.Classify Methods showsPrec :: Int -> UserDefined -> ShowS # show :: UserDefined -> String # showList :: [UserDefined] -> ShowS # |
Classify constructor arguments
data Classified a Source #
Bundle a value with its classifier
Constructors
Classified (Classifier a) a |
Instances
Show (Classified a) Source # | |
Defined in Debug.RecoverRTTI.Classify Methods showsPrec :: Int -> Classified a -> ShowS # show :: Classified a -> String # showList :: [Classified a] -> ShowS # | |
Show (Some Classified) Source # | |
Defined in Debug.RecoverRTTI.Classify |
fromUserDefined :: UserDefined -> (String, [Some Classified]) Source #
Classify the arguments to the constructor
Additionally returns the constructor name itself.
Recovering type class instances
Show
canShowClassified :: Classifier a -> Dict Show a Source #
canShowPrim :: PrimClassifier a -> Dict Show a Source #
canShowClassified_ :: forall o. (forall a. o a -> Dict Show a) -> forall a. Classifier_ o a -> Dict Show a Source #
Generic
type PrimSatisfies (c :: Type -> Constraint) = (c Bool, c Char, c Double, c Float, c Int, c Int16, c Int8, c Int32, c Int64, c Integer, c Ordering, c (), c Word, c Word8, c Word16, c Word32, c Word64, c String, c ByteString, c ByteString, c ShortByteString, c Text, c Text, c Value, c SomeSTRef, c SomeTVar, c SomeMVar, c SomeFun, c IntSet, c SomePrimArrayM, c SomeStorableVector, c SomeStorableVectorM, c SomePrimitiveVector, c SomePrimitiveVectorM) Source #
primSatisfies :: forall c. PrimSatisfies c => forall a. PrimClassifier a -> Dict c a Source #
class (PrimSatisfies c, forall a. c a => c (Maybe a), forall a b. (c a, c b) => c (Either a b), forall a. c a => c [a], forall a. c a => c (Ratio a), forall a. c a => c (Set a), forall a b. (c a, c b) => c (Map a b), forall a. c a => c (IntMap a), forall a. c a => c (Seq a), forall a. c a => c (Tree a), forall a. c a => c (HashSet a), forall a b. (c a, c b) => c (HashMap a b), forall a. c a => c (Array a), forall a. c a => c (Array a), forall a. c a => c (Vector a), forall xs. (All c xs, IsValidSize (Length xs)) => c (WrappedTuple xs)) => ClassifiedSatisfies (c :: Type -> Constraint) Source #
Instances
(PrimSatisfies c, forall a. c a => c (Maybe a), forall a b. (c a, c b) => c (Either a b), forall a. c a => c [a], forall a. c a => c (Ratio a), forall a. c a => c (Set a), forall a b. (c a, c b) => c (Map a b), forall a. c a => c (IntMap a), forall a. c a => c (Seq a), forall a. c a => c (Tree a), forall a. c a => c (HashSet a), forall a b. (c a, c b) => c (HashMap a b), forall a. c a => c (Array a), forall a. c a => c (Array a), forall a. c a => c (Vector a), forall (xs :: [Type]). (All c xs, IsValidSize (Length xs)) => c (WrappedTuple xs)) => ClassifiedSatisfies c Source # | |
Defined in Debug.RecoverRTTI.Constraint |
classifiedSatisfies :: forall c o. (ClassifiedSatisfies c, c Void) => (forall a. o a -> Dict c a) -> forall a. Classifier_ o a -> Dict c a Source #
Reclassification
data Reclassified o a where Source #
Reclassified values
Reclassification can be done by user code which want to take advantage of
the classification infrastructure for recover-rtti
but add some additional
classification for domain-specific types known only to that client code.
When we reclassify a value, a value that might previously be classified as
UserDefined
may now be classified as some concrete type; therefore we
compute a classifier for a potentially different type along with
evidence that we can coerce between the two.
Constructors
Reclassified :: o b -> FromUsr a b -> Reclassified o a |
reclassify_ :: forall m o o'. Applicative m => (forall a. o a -> m (Reclassified o' a)) -> forall a. Classifier_ o a -> m (Classifier_ (Reclassified o') a) Source #
distribReclassified :: forall o. forall a. Classifier_ (Reclassified o) a -> Reclassified (Classifier_ o) a Source #
Lift Reclassified
to the top-level
Given a classifier with user-defined classifiers at the levels, along with coercion functions, leave the user-defined classifiers in place but lift the coercion function to the top-level.
data FromUsr :: Type -> Type -> Type where Source #
Evidence that we can convert between two types
The only actual conversion we ever do is from UserDefined
(aka Any
) to
whatever type the reclassification gives.
Constructors
Id :: FromUsr a a | |
Absurd :: FromUsr Void a | |
FromUsr :: FromUsr UserDefined a | |
F1 :: FromUsr a1 b1 -> FromUsr (f a1) (f b1) | |
F2 :: FromUsr a1 b1 -> FromUsr a2 b2 -> FromUsr (f a1 a2) (f b1 b2) | |
FN :: PairWise FromUsr as bs -> FromUsr (f as) (f bs) | |
Compose :: FromUsr b c -> FromUsr a b -> FromUsr a c |
coerceFromUsr :: FromUsr a b -> a -> b Source #
Coerce, given some evidence that the coercion is sound.
Inductive tuples
newtype WrappedTuple xs Source #
Inductive tuple
Inductive view on tuples that can be constructed with or pattern matched on
using TNil
and TCons
. The underlying representation is a true tuple
however; for example, Tuple '[Int, Bool, Char] ~ (Int, Bool, Char)
.
Constructors
WrappedTuple (Tuple xs) |
Bundled Patterns
pattern TNil :: forall xs. (SListI xs, IsValidSize (Length xs)) => xs ~ '[] => WrappedTuple xs | |
pattern TCons :: forall xs'. (SListI xs', IsValidSize (Length xs')) => forall x xs. (xs' ~ (x ': xs), SListI xs, IsValidSize (Length xs)) => x -> WrappedTuple xs -> WrappedTuple xs' |
Instances
(SListI xs, IsValidSize (Length xs), All Eq xs) => Eq (WrappedTuple xs) Source # | |
Defined in Debug.RecoverRTTI.Tuple Methods (==) :: WrappedTuple xs -> WrappedTuple xs -> Bool # (/=) :: WrappedTuple xs -> WrappedTuple xs -> Bool # | |
(SListI xs, IsValidSize (Length xs), All Show xs) => Show (WrappedTuple xs) Source # | |
Defined in Debug.RecoverRTTI.Tuple Methods showsPrec :: Int -> WrappedTuple xs -> ShowS # show :: WrappedTuple xs -> String # showList :: [WrappedTuple xs] -> ShowS # |
unwrapTuple :: WrappedTuple xs -> Tuple xs Source #
type family Tuple xs where ... Source #
Equations
Tuple '[] = () | |
Tuple '[x1] = x1 | |
Tuple '[x1, x2] = (x1, x2) | |
Tuple '[x1, x2, x3] = (x1, x2, x3) | |
Tuple '[x1, x2, x3, x4] = (x1, x2, x3, x4) | |
Tuple '[x1, x2, x3, x4, x5] = (x1, x2, x3, x4, x5) | |
Tuple '[x1, x2, x3, x4, x5, x6] = (x1, x2, x3, x4, x5, x6) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7] = (x1, x2, x3, x4, x5, x6, x7) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8] = (x1, x2, x3, x4, x5, x6, x7, x8) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9] = (x1, x2, x3, x4, x5, x6, x7, x8, x9) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61) | |
Tuple '[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61, x62] = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61, x62) |
Translation to/from NP
tupleFromNP :: forall xs. (SListI xs, IsValidSize (Length xs)) => NP I xs -> WrappedTuple xs Source #
tupleToNP :: (SListI xs, IsValidSize (Length xs)) => WrappedTuple xs -> NP I xs Source #
Valid tuple size
class KnownNat n => IsValidSize n where Source #
Valid tuple sizes
GHC does not support tuples larger than 62 fields. We do allow for tuples of
zero size (which we interpret as unit ()
) and tuples of size one
(where Tuple '[x] ~ x
).
Methods
isValidSize :: ValidSize n Source #
Instances
IsValidSize 'Z Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize 'Z Source # | |
IsValidSize ('S 'Z) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S 'Z)) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S 'Z))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S 'Z)))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S 'Z))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S 'Z)))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S 'Z))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
IsValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # | |
Defined in Debug.RecoverRTTI.Tuple.Size Methods isValidSize :: ValidSize ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S 'Z)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Source # |
data TooBig (n :: Nat) where Source #
Tuples with too many fields (more than 62)
Constructors
TooBig :: TooBig ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) |
smallerIsValid :: forall n r. IsValidSize ('S n) => Proxy ('S n) -> (IsValidSize n => r) -> r Source #
Smaller tuple sizes are always valid
This function is primarily useful when doing recursion on tuples: we may have
in scope evidence that ('S n)
is a valid tuple size, and need to know that
n
is a valid tuple size in order to be able to make the recursive call.
liftValidSize :: forall n. ValidSize n -> Dict IsValidSize n Source #
Lift term-level evidence to type-level
Util
Type-level naturals
Natural numbers
Intended to be used lifted to the type level; unlike ghc
's type level
natural numbers, these are inductive.
Existentials
data Some (f :: k -> Type) where Source #
Instances
Show (Some Classified) Source # | |
Defined in Debug.RecoverRTTI.Classify |