You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scala 3 introduces Opaque Type Aliases. Although Scala 2 already had type aliases and AnyVal, opacity is relevant in two ways:
Opaque types should not be as fragile and restrictive as the AnyVal wrappers were.
Unlike Scala-2 type aliases, opaque types are different symbols for implicit resolution, and thus allows us to define distinct instances of Functor or Monad for OptionT[F, A], which acts differently from that of F[Option[A]] (which is Monad[F]).
Many data types in cats can be seen as mere wrappers, interface adapters, or type renames, of data types. This include IdT, OptionT, EitherT, Kleisli, Cokleisli, ConstT, IorT, Const, Nested, ...
The text was updated successfully, but these errors were encountered:
Scala 3 introduces Opaque Type Aliases. Although Scala 2 already had type aliases and
AnyVal
, opacity is relevant in two ways:AnyVal
wrappers were.Functor
orMonad
forOptionT[F, A]
, which acts differently from that ofF[Option[A]]
(which isMonad[F]
).Many data types in
cats
can be seen as mere wrappers, interface adapters, or type renames, of data types. This includeIdT
,OptionT
,EitherT
,Kleisli
,Cokleisli
,ConstT
,IorT
,Const
,Nested
, ...The text was updated successfully, but these errors were encountered: