matsubara0507
TermSucc TermZero などが書けるTermSucc TermZero などが書けるforall f => id' . f = f . id'
a -> a で theorem を取得するといいと思います.id' (const x y) = const x (id' y) <=> id' x = x
f :: a -> a; \x -> x が一意に決まりますfmap' id = id を仮定した時に fmap' :: (a -> b) -> (f a -> f b) の free theorem から fmap' f = fmap f が示せるため一意であるという感じですねextensible についてです。newtype Required a = Required a newtype Optional a = Optional (Maybe a) type PersonParams = Record '[ "name" >: Required Text , "age" >: Optional Int ]
type PersonRequiredParams = RecordOf Required '[ "name" >: Text ] type PersonOptionalParams = RecordOf Optional '[ "age" >: Int ]
Required a や Optional b は知らないです。hello :: Associate "name" Text xs => Record xs -> Text hello r = mconcat [ "Hello ", r ^. #name, "!"]