[Agda] String -> Nat

Andreas Abel andreas.abel at ifi.lmu.de
Mon Apr 15 13:15:00 CEST 2013


There is one in the Agda Prelude,

https://github.com/fkettelhoit/agda-prelude/blob/master/Prelude.agda

On 15.04.2013 10:23, Serge D. Mechveliani wrote:
> Please,
> what Standard library has for reading (parsing)  Nat  from String
> (or List Char) ?
> For example,  "10" -> suc suc suc suc suc suc suc suc suc suc zero.
>
> I need to input Nat from a file, and use  readFile.
> This produces  str : String  (may be Costring),
> then,  str  needs to convert to Nat.
>
> Thanks,
>
> ------
> Sergei
> _______________________________________________
> Agda mailing list
> Agda at lists.chalmers.se
> https://lists.chalmers.se/mailman/listinfo/agda
>


-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel at ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/


More information about the Agda mailing list