on master help sign in
Add Cast instance for Nat to String
22bcbd3Joomy Korkut
libs/prelude/Prelude/Nat.idr+3
@@ -238,6 +238,9 @@ Cast Integer Nat where
238Cast String Nat where
238Cast String Nat where
239 cast str = cast (the Integer (cast str))
239 cast str = cast (the Integer (cast str))
240
240
241+Cast Nat String where
242+ cast n = cast (the Integer (cast n))
243+
241||| A wrapper for Nat that specifies the semigroup and monoid implementations that use (*)
244||| A wrapper for Nat that specifies the semigroup and monoid implementations that use (*)
242record Multiplicative where
245record Multiplicative where
243 constructor GetMultiplicative
246 constructor GetMultiplicative