úÎB¦?*.      !"#$%&'()*+,-NoneThe lens for accessing the  of the  . This means that memb is one of the member labels  of o. The ) of the member depends both on the label + and (the underlying types of) the object. o is an  if given its type information, ! there is an equivalence between o and the . The  within an  # that carries all the member data. The   type, where u3 carrying the information of its underlying types. "A utility function for creating a  .  create a  without any default values. Given a pair of * label and a value, create the data field ( for the member and inserts the value.   member label default value, in case  the member is not in the map generated lens .      .NoneUnderlying string types. Underlying integer types. The declaration of instance  obj , instance  obj means  that the obj is an   and is ready to tell the s which type to use  to represent the real numbers. /01/01NoneObject  uses 2 for real numbers, 3 for integers and 4  for strings. Btypechecks :: (UnderlyingReal (Object Precise) ~ Rational) => BoolTrueDtypechecks :: (UnderlyingInteger (Object Precise) ~ Integer) => BoolTrueJtypechecks :: (UnderlyingString (Object Precise) ~ Data.Text.Text) => BoolTrueObject  uses 2 for real numbers, 3 for integers and 4  for strings. <typechecks :: (UnderlyingReal (Object DIT) ~ Double) => BoolTrue<typechecks :: (UnderlyingInteger (Object DIT) ~ Int) => BoolTrueFtypechecks :: (UnderlyingString (Object DIT) ~ Data.Text.Text) => BoolTrue56789:56789:NoneAn empty object.   None DTo define a member with compound types like vector of real numbers,  we use  to C ask the object which real value it prefers, then put the response  into the type constructors. &Now, let us introduce the concepts of , ,   and ". Any such concepts are described  in terms of  labels. :First, let us create a tiny two-dimensional vector class.  We make it an instance of ; to use them later for tests. "+Now we define the accessors. Accessors for s without default methods are  straightforward. #If the #1 field is missing, we attempt to re-calculate it  from the " and $. Here is how we can do that. $If the $& field is missing, we re-calculate it  from the " and #. %% is defined in terms of " and # . &BWe can write functions that would construct a point particle from L its mass and velocity. And we can make the function polymorphic over the : representation of the real numbers the objects prefer. ',We can also construct a point particle from  its mass and momentum. (AWe define an instance of point-like particle. And again, we can B keep it polymorphic, so that anyone can choose its concrete type > later, according to their purpose. Thus we will achieve the B polymorphic encoding of the knowledge of this world, in Haskell. *(laserBeam :: Object DIT) ^? kineticEnergy Just 1631.25.(laserBeam :: Object Precise) ^? kineticEnergyJust (6525 % 4)DMoreover, we can ask Ichiro to sign the ball. Usually, we needed to 5 create a new data-type to add a new field. But with  'dynamic-object'/ we can do so without changing the type of the 7 ball. So, we can put our precious, one-of-a-kind ball A into toybox together with less uncommon balls, and with various A other toys. And still, we can safely access the contents of the H toybox without runtime errors, and e.g. see which toy is the heaviest. Plet (mySpecialBall :: Object DIT) = laserBeam & insert Autograph "Ichiro Suzuki"'let toybox = [laserBeam, mySpecialBall]=let toybox2 = toybox ++ [duck, lens, banana, envelope, ghost]#maximum $ mapMaybe (^?mass) toybox25.2<= !"#$%&'()*+,->?@ABC !"#$%&'()*+,- !"#$%&'()*+,-<= !"#$%&'()*+,->?@ABCD        !"#$%&'()*+,-./012312456789:;<=>?@AABCDEFGHdynamic-object-0.2Data.Object.Dynamic.TypesData.Object.Dynamic.UnderlyingData.Object.Dynamic.PresetsData.Object.Dynamic*Data.Object.Dynamic.Examples.PointParticle MemberLensMemberValType ObjectivetabletableMapTableunTableObjectunObject memberLensDef memberLensinsert UseStringUnderlyingString UseIntegerUnderlyingIntegerUseRealUnderlyingRealPreciseDITempty KineticEnergyMomentumVelocityMassVecmassvelocitymomentum kineticEnergyfromMassVelocityfromMassMomentum laserBeamducklensbananaenvelopeghost$fObjectiveObject$fUseStringObject$fUseIntegerObject$fUseRealObjectghc-prim GHC.TypesDoubleInt text-0.11.2.3Data.Text.InternalText$fUseStringPrecise$fUseIntegerPrecise$fUseRealPrecise$fUseStringDIT$fUseIntegerDIT $fUseRealDITQuickCheck-2.5.1.1Test.QuickCheck.Arbitrary Arbitrary Autograph$fMemberoAutograph$fMemberoKineticEnergy$fMemberoMomentum$fMemberoVelocity $fMemberoMass$fArbitraryVec