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
When generating a function such as Option[A] => Option[A], the preferred implementation would be x => x. Sometimes code such as this is generated:
Warning:(141, 89) type (A⇒Option[B]{None.type+Some[B]}) ⇒ (B⇒Option[C]{None.type+Some[C]}) ⇒A⇒Option[C]{None.type+Some[C]} has 2 implementations (laws need checking?):
a ⇒ b ⇒ c ⇒ a c match { d ⇒ (None() +0); e ⇒ b e.value } [score: (0,0.5,0.0,0,0)];
a ⇒ b ⇒ c ⇒ (None() +0) [score: (3,0.0,0.0,0,0)].
defkleisliOptCompose[A, B, C](f: A⇒Option[B], g: B⇒Option[C]):A⇒Option[C] = implement
It is better to generate code such as x match { d => d }; ... instead of x match { d => None() + 0 }; ... when d is itself already None(). This code would have a lower information loss score.
The text was updated successfully, but these errors were encountered:
When generating a function such as
Option[A] => Option[A]
, the preferred implementation would bex => x
. Sometimes code such as this is generated:It is better to generate code such as
x match { d => d }; ...
instead ofx match { d => None() + 0 }; ...
whend
is itself alreadyNone()
. This code would have a lower information loss score.The text was updated successfully, but these errors were encountered: