Module
Record.Studio.SingletonRecord  
- Package
- purescript-record-studio
- Repository
- rowtype-yoga/purescript-record-studio
#SingletonRecord Source
class SingletonRecord :: forall k1 k2. k1 -> Type -> Row Type -> k2 -> Constraintclass SingletonRecord key value rec recRL | rec -> key value recRL where
Members
Instances
- (RowToList rec recRL, SingletonRecordFields key a rec recRL) => SingletonRecord key a rec rl
- (Fail (Text "The record must have exactly one field")) => SingletonRecord key a rec recRL
#SingletonRecordFields Source
class SingletonRecordFields :: forall k1 k2. k1 -> Type -> Row Type -> k2 -> Constraintclass SingletonRecordFields key value rec recRL | rec -> key value where
Members
- singletonRecordFields :: Proxy recRL -> Record rec -> Proxy key
Get the key of a record with only one field as a
Proxy