Skip to content

Commit 3623249

Browse files
Fix typos in MaybeNumConvert documentation
1 parent de10f8c commit 3623249

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clash-prelude/src/Clash/Class/NumConvert/Internal/MaybeNumConvert.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ failure is expressed by returning 'Nothing', never by an 'Clash.XException.XExce
4848
4949
== __Laws__
5050
A conversion is either successful or it fails gracefully. I.e., it does not
51-
produces produce errors (also see "Clash.XException"). I.e.,
51+
produce errors (also see "Clash.XException"). I.e.,
5252
5353
> x == fromMaybe x (maybeNumConvert @a @b x >>= maybeNumConvert @b @a)
5454
5555
for all values @x@ of type @a@. It should also preserve the numerical value
5656
interpretation of the bits. For types that have an @Integral@ instance, this
5757
intuition is captured by:
5858
59-
> toInteger x == fromMaybe (toInteger x) (toInteger (numConvert @a @b x))
59+
> toInteger x == fromMaybe (toInteger x) (toInteger <$> maybeNumConvert @a @b x)
6060
6161
If a conversion succeeds one way, it should also succeed the other way. I.e.,
6262

0 commit comments

Comments
 (0)