DA.Record
Exports the record machinery necessary to allow one to annotate code that is polymorphic in the underlying record type.Module Snapshot
Lifecycle
Stable.
Notices
Status:
active
Introduced in: 3.4.9
Removed in: -
Warnings: 0
Deprecations: 0
Deprecated since: -Data Types
type HasField x r a
= (GetField x r a, SetField x r a)
HasField is a class synonym for GetField and SetField, which
respectively give you getter and setter functions for each record field
automatically.
In the vast majority of use-cases, plain Record syntax should be
preferred:
GetField x r a and SetField x r a are typeclasses taking three parameters. The first
parameter x is the field name, the second parameter r is the record type,
and the last parameter a is the type of the field in this record. For
example, if we define a type:
getField method of class GetField:
f @t ) to specify the
field name.
Likewise, if we want to set the value in the field, we can use the setField method of class SetField:
Typeclasses
class GetField x r a
GetField x r a provides the getter part of HasField
Methods:
getField:r->a
- instance
GetField_1(a,b)a - instance
GetField_1(a,b,c)a - instance
GetField_1(a,b,c,d)a - instance
GetField_1(a,b,c,d,e)a - instance
GetField_2(a,b)b - instance
GetField_2(a,b,c)b - instance
GetField_2(a,b,c,d)b - instance
GetField_2(a,b,c,d,e)b - instance
GetField_3(a,b,c)c - instance
GetField_3(a,b,c,d)c - instance
GetField_3(a,b,c,d,e)c - instance
GetField_4(a,b,c,d)d - instance
GetField_4(a,b,c,d,e)d - instance
GetField_5(a,b,c,d,e)e - instance
GetFieldappEndo(Endoa) (a->a) - instance
GetFieldcategoryFailureStatusFailureCategory - instance
GetFielderrorIdFailureStatusText - instance
GetFieldgetAllAllBool - instance
GetFieldgetAnyAnyBool - instance
GetFieldgetAnyViewAnyViewAny - instance
GetFieldgetAnyViewInterfaceTypeRepAnyViewInterfaceTypeRep - instance
GetFieldhd(NonEmptya)a - instance
GetFieldmap(Setk) (Mapk()) - instance
GetFieldmessageFailureStatusText - instance
GetFieldmessageArithmeticErrorText - instance
GetFieldmessageAssertionFailedText - instance
GetFieldmessageGeneralErrorText - instance
GetFieldmessagePreconditionFailedText - instance
GetFieldmetaFailureStatus(TextMapText) - instance
GetFieldrunState(Statesa) (s-> (a,s)) - instance
GetFieldsrcLocEndColSrcLocInt - instance
GetFieldsrcLocEndLineSrcLocInt - instance
GetFieldsrcLocFileSrcLocText - instance
GetFieldsrcLocModuleSrcLocText - instance
GetFieldsrcLocPackageSrcLocText - instance
GetFieldsrcLocStartColSrcLocInt - instance
GetFieldsrcLocStartLineSrcLocInt - instance
GetFieldtl(NonEmptya) [a]
class SetField x r a
SetField x r a provides the setter part of HasField
Methods:
setField:a->r->r
- instance
SetField_1(a,b)a - instance
SetField_1(a,b,c)a - instance
SetField_1(a,b,c,d)a - instance
SetField_1(a,b,c,d,e)a - instance
SetField_2(a,b)b - instance
SetField_2(a,b,c)b - instance
SetField_2(a,b,c,d)b - instance
SetField_2(a,b,c,d,e)b - instance
SetField_3(a,b,c)c - instance
SetField_3(a,b,c,d)c - instance
SetField_3(a,b,c,d,e)c - instance
SetField_4(a,b,c,d)d - instance
SetField_4(a,b,c,d,e)d - instance
SetField_5(a,b,c,d,e)e - instance
SetFieldappEndo(Endoa) (a->a) - instance
SetFieldcategoryFailureStatusFailureCategory - instance
SetFielderrorIdFailureStatusText - instance
SetFieldgetAllAllBool - instance
SetFieldgetAnyAnyBool - instance
SetFieldgetAnyViewAnyViewAny - instance
SetFieldgetAnyViewInterfaceTypeRepAnyViewInterfaceTypeRep - instance
SetFieldhd(NonEmptya)a - instance
SetFieldmap(Setk) (Mapk()) - instance
SetFieldmessageFailureStatusText - instance
SetFieldmessageArithmeticErrorText - instance
SetFieldmessageAssertionFailedText - instance
SetFieldmessageGeneralErrorText - instance
SetFieldmessagePreconditionFailedText - instance
SetFieldmetaFailureStatus(TextMapText) - instance
SetFieldrunState(Statesa) (s-> (a,s)) - instance
SetFieldsrcLocEndColSrcLocInt - instance
SetFieldsrcLocEndLineSrcLocInt - instance
SetFieldsrcLocFileSrcLocText - instance
SetFieldsrcLocModuleSrcLocText - instance
SetFieldsrcLocPackageSrcLocText - instance
SetFieldsrcLocStartColSrcLocInt - instance
SetFieldsrcLocStartLineSrcLocInt - instance
SetFieldtl(NonEmptya) [a]