red-black-record-2.1.6.0: Extensible records and variants indexed by a type-level Red-Black tree.
Safe HaskellSafe-Inferred
LanguageHaskell2010

TypeLevelRecordDot

Description

This module is for exploring record types in the REPL.

Synopsis
  • type family Dot r n where ...

Documentation

type family Dot r n where ... Source #

Inspect the type of a field in a record

The idea is to use this type family in the REPL, using kind! Mostly useful with complex parameterized records whose fields vary a lot according to the parameters.

If the record is at the "tip" of a function, the type family goes to the tip.

The records must have Generic instances. https://hachyderm.io/@DiazCarrete/112342828307643526

Equations

Dot (a -> b) n = a -> Dot b n 
Dot r n = Value n (RecordCode (Generically r))