[Agda] printing infinite structures

Setzer A.G. a.g.setzer at swansea.ac.uk
Tue Feb 26 16:59:12 CET 2019



For printing infinite streams what you can do is to write using the COMPILE directive a function
which when compiled prints out the infinte stream as you wish (you could postulate it as a function from Streams(String) -> IO()  )
The only disadvantage is that you need to compile your code, but I when interacting with students the first thing they want to know is how to compile the code.

Anton



________________________________
From: Agda <agda-bounces at lists.chalmers.se> on behalf of Thorsten Altenkirch <Thorsten.Altenkirch at nottingham.ac.uk>
Sent: 26 February 2019 14:55
To: agda list
Subject: [Agda] printing infinite structures


Hi,



Would it be possible to have a plugin to print infinite structures like streams (as in Haskell)? I have been playing around with streams and conats for my course and it is a bit underwhelming when you can’t see them. Ok ok I can write functions which convert an initial part into a finite structure but this is a lot of extra work and not so much fin.



Cheers,

Thorsten



This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.

Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/agda/attachments/20190226/6453e3fa/attachment.html>


More information about the Agda mailing list