l|^c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe  None$*+,/579:;<=?DOQRT`bf (:!!) s l a says that the record s has a field of type a at index l, and provides a  Lens' s a" to get/set that particular field.MIf you are thinking that the syntax is ugly, we can use the utility operator   to write a :~ (s :!! l). which can be read as the equality constraint  a ~ (s !! t). Nice!A labeled strict field.:kind! "foo" :=! Int"foo" :=! Int :: *!= Field 'Strict ('Just "foo") IntA labeled lazy field.:kind! "foo" := Int"foo" := Int :: *= Field 'Lazy ('Just "foo") IntA ; consists of its strictness, an optional label (type-level ) and the field's type: :kind Field-Field :: Strictness -> Maybe Symbol -> * -> *Strictness annotations for a . ^A helper type synonym to convert functional dependencies into nicer type-equality-like syntax.  (:!!) s a tis equivalent to  t :~ (s :!! a)which is roughly equivalent to:  t ~ (s !! a) Strict version of .:t Field' True*Field' True :: Field 'Strict 'Nothing Bool-This can be used to construct a strict tuple:&let !r = R ( True, undefined :: Int )$case r of R ( a :: Bool ) :*: _ -> aTrue7let !r' = R ( Field' True, Field' (undefined :: Int ) ) *** Exception: Prelude.undefined... 2Construct or pattern-match a lazy unlabeled field. :t Field True'Field True :: Field 'Lazy 'Nothing Bool 2Construct or pattern-match a strict labeled field.:t #foo :=! True1#foo :=! True :: Field 'Strict ('Just "foo") Bool0Construct or pattern-match a lazy labeled field.:t #foo := True.#foo := True :: Field 'Lazy ('Just "foo") Bool;A utility constraint for you to write signatures involving H. For example, the following function that deletes the field with label a has the signature::{: let f :: (r :~ R ( "a" := Int ) ::*: ys) => r -> ys/ f (R ( _ :: "a" := Int) :*: ys) = ys :}Merge two records types.1:kind! R ( "foo" := Int ) :*: R ( "bar" := Bool )/R ( "foo" := Int ) :*: R ( "bar" := Bool ) :: *= RecD '[Field 'Lazy ('Just "bar") Bool, Field 'Lazy ('Just "foo") Int]I:kind! R ( Field 'Lazy 'Nothing Int ) :*: ( Field 'Strict 'Nothing Bool )QR ( Field 'Lazy 'Nothing Int ) :*: ( Field 'Strict 'Nothing Bool ) :: GHC.Types.*A= Rec '[Field 'Lazy 'Nothing Int] :*: Field 'Strict 'Nothing Bool takes a tuple, where each non- element a( is wrapped as a lazy non-labeled field Field ' ' t", and performs a merge-sort using  if the fields are labeled.):kind! R ( "foo" := Bool , "bar" := Int )'R ( "foo" := Bool , "bar" := Int ) :: *= RecD '[Field 'Lazy ('Just "bar") Int, Field 'Lazy ('Just "foo") Bool]:kind! R (Int, Bool)R (Int, Bool) :: *<= Rec '[Field 'Lazy 'Nothing Int, Field 'Lazy 'Nothing Bool]eGHC should be capable of inlining most of the label-sorting away, therefore the following expression: 7 R ( #e := (), #d := (), #c := (), #b := (), #a := () )#should have similar performance as: [ (\(e, d, c, b, a) -> (a, b, c, d, e)) ( #e := (), #d := (), #c := (), #b := (), #a := () )?Matching a field that does not occur in the record is an error:(case R () of R ( _ :: "a" := Int ) -> () ... error:$... Label "a" does not occur in R ()... ConstructorMerge two records./R ( #foo := (1 :: Int) ) :*: R ( #bar := True )R ( bar := True, foo := 1 )R ( 1 :: Int ) :*: R ( True ) R ( 1, True )2Merging labeled and unlabeled records is an error:!R ( True ) :*: R ( #foo := True ) ... error:7... RecMerge: Cannot merge labeled and unlabeled fields...Pattern,Partition a record based on the type of LHS.?let r = R ( #a := (1 :: Int), #b := True, #c := "hello world" )Mcase r of R ( _ := a :: "a" := Int, _ := c :: "c" := String ) :*: _ -> (a, c)(1,"hello world")5This means that you can't write the above example as:Mcase r of _ :*: R ( _ := a :: "a" := Int, _ := c :: "c" := String ) -> (a, c) ... error:8... Ambiguous type variable ...  arising from a pattern...@Mismatches between the LHS and the record result in type errors:.case R () of R ( _ :: "a" := Int ) :*: _ -> () ... error:8... RecPartition: Label "a" does not occur in the record...'case R () of R ( a :: Int ) :*: _ -> () ... error:1... RecPartition: Not enough fields in the record...Lcase R ( #a := True, #b := (1 :: Int) ) of R ( _ :: "a" := Int ) :*: _ -> () ... error:A... RecParition: type mismatch between Bool and Int for label "a"...7case R ( True, 1 :: Int ) of R ( a :: Int ) :*: _ -> () ... error:4... RecPartition: type mismatch between Bool and Int...Given a tuple of s, k binds the matching fields from the record. (Note: Partial matching is only available for labeled records.)When ? is used as a constructor, it is equivalent to the type family ), except that it operates at value-level.As a pattern, 2 destructs all fields of a record into a tuple of &s. In the case of labeled record, the s can be in arbitrarily order.       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~            !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~22 0 22111      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     rawr_2RS5M0LLCjI1da1G7GfVBT Data.Rawr Paths_rawr:!! fieldLens:=!:=FieldMkFieldunField StrictnessLazyStrict:~Field'$fIsLabellProxy $fShowField $fShowField0 $fShowField1$fWrapInFieldtField$fWrapInFieldtField0 $fMonoidField $fEqField $fOrdField$fGenericField $fNFDataField::*::*:RP $f::*:xsysr$fRecPartition'ImplGTRec:r$fRecPartition'ImplLTRecysr$fRecPartition'ImplEQRec:r$fRecPartition'ImplEQRec:r0$fRecPartitionImplRec:r$fRecPartitionImplRec:r0$fRecPartitionImplRec:r1$fRecPartitionImplRec[](,)$fRecPartitionImplRec:r2$fRecPartitionImplRec:r3$fRecConsSndImplx(,)r$fRecConsFstImplx(,)r$fRecMerge'ImplGTxsRecr$fRecMerge'ImplLTRecysr$fRecMerge'ImplEQRecRecr$fRecMergeImplRecRecr$fRecMergeImplRecRecr0$fRecMergeImplRecRecr1$fRecMergeImplRecRecr2$fRecMergeImplRecRecRec$fRecMergeImplRecRecRec0$fRecConsImplFieldRecRec$fRecConsImplFieldRecRec0$fRecConsImplFieldRecRec1$fRecConsImplFieldRecRec2$fRecConsImplFieldRecRec3$fRecConsImplFieldRecRec4$fRecConsImplFieldRecRec5$fRecConsImplFieldRecRec6$fRecTailImplRecRec$fRecTailImplRecRec0$fRecTailImplRecRec1$fRecTailImplRecRec2$fRecTailImplRecRec3$fRecTailImplRecRec4$fRecTailImplRecRec5$fRecTailImplRecRec6$fRecHeadImplRecField$fRecHeadImplRecField0$fRecHeadImplRecField1$fRecHeadImplRecField2$fRecHeadImplRecField3$fRecHeadImplRecField4$fRecHeadImplRecField5$fRecHeadImplRecField6$fUnRImplRec(,,,,,,,)$fUnRImplRec(,,,,,,)$fUnRImplRec(,,,,,)$fUnRImplRec(,,,,)$fUnRImplRec(,,,)$fUnRImplRec(,,)$fUnRImplRec(,)$fUnRImplRecField$fUnRImplRec(,,,,,,,)0$fUnRImplRec(,,,,,,)0$fUnRImplRec(,,,,,)0$fUnRImplRec(,,,,)0$fUnRImplRec(,,,)0$fUnRImplRec(,,)0$fUnRImplRec(,)0$fUnRImplRect0$fUnRImplr(,,,,,,,)$fUnRImplr(,,,,,,)$fUnRImplr(,,,,,)$fUnRImplr(,,,,)$fUnRImplr(,,,)$fUnRImplr(,,) $fUnRImplr(,)$fUnRImplrField $fUnRImplr()$fRImpl(,,,,,,,)r$fRImpl(,,,,,,)r$fRImpl(,,,,,)r$fRImpl(,,,,)r $fRImpl(,,,)r $fRImpl(,,)r $fRImpl(,)r $fRImplar $fRImpl()r$fToFieldImplar$fToFieldImplFieldr$fIsLabell(->)$fIsLabell(->)0$f:!!sla $fMonoidRec $fMonoidRec0 $fMonoidRec1 $fMonoidRec2 $fMonoidRec3 $fMonoidRec4 $fMonoidRec5 $fMonoidRec6 $fMonoidRec7 $fNFDataRec $fNFDataRec0 $fNFDataRec1 $fNFDataRec2 $fNFDataRec3 $fNFDataRec4 $fNFDataRec5 $fNFDataRec6 $fNFDataRec7 $fShowRec $fShowRec0 $fShowRec1 $fShowRec2 $fShowRec3 $fShowRec4 $fShowRec5 $fShowRec6 $fShowRec7 $f:!!Reclt $f:!!Reclt0 $f:!!Reclt1 $f:!!Reclt2 $f:!!Reclt3 $f:!!Reclt4 $f:!!Reclt5 $f:!!Reclt6 $f:!!Reclt7 $f:!!Reclt8 $f:!!Reclt9 $f:!!Reclt10 $f:!!Reclt11 $f:!!Reclt12 $f:!!Reclt13 $f:!!Reclt14 $f:!!Reclt15 $f:!!Reclt16 $f:!!Reclt17 $f:!!Reclt18 $f:!!Reclt19 $f:!!Reclt20 $f:!!Reclt21 $f:!!Reclt22 $f:!!Reclt23 $f:!!Reclt24 $f:!!Reclt25 $f:!!Reclt26 $f:!!Reclt27 $f:!!Reclt28 $f:!!Reclt29 $f:!!Reclt30 $f:!!Reclt31 $f:!!Reclt32 $f:!!Reclt33 $f:!!Reclt34$fOrdRec $fOrdRec0 $fOrdRec1 $fOrdRec2 $fOrdRec3 $fOrdRec4 $fOrdRec5 $fOrdRec6 $fOrdRec7$fEqRec$fEqRec0$fEqRec1$fEqRec2$fEqRec3$fEqRec4$fEqRec5$fEqRec6$fEqRec7catchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameghc-prim GHC.TypesSymbolbaseGHC.BaseNothingRecLens' WrapInField wrapInFieldR8R7R6R5R4R3R2R1R0view D:R:Rec:0 D:R:Rec:2 D:R:Rec:4 D:R:Rec:6 D:R:Rec:8 D:R:Rec:10 D:R:Rec:12 D:R:Rec:14 D:R:Rec[]0ShowTypeText:<>:PPFieldPPRec RecFieldListRecPartition'Impl recPartition'RecPartitionImpl recPartition RecPartition' RecPartitionRecConsSndImpl recConsSnd RecConsSndRecConsFstImpl recConsFst RecConsFst RecMerge'Impl recMerge' RecMerge' RecMergeImplrecMergeRecMerge RecConsImplrecConsRecCons RecTailImplrecTailRecTail RecHeadImplrecHeadRecHeadReWrapUnRImplunRRImpltoR ToFieldImpltoFieldToField