{"repo":"taolson/Admiran","free":true,"listed":false,"github":"https://github.com/taolson/Admiran","clone":"git clone https://github.com/taolson/Admiran.git","description":"Admiran is a pure, lazy, functional language and self-hosting compiler based upon Miranda","language":"Assembly","stars":114,"topics":["compiler","functional-programming-language","self-hosting-compiler","miranda-lang"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"Admiran: a pure, lazy, functional language and self-hosting compiler Admiran is a pure, lazy, functional language and self-hosting compiler, based upon the original Miranda language designed by David Turner, with additional features from Haskell and other functional languages. Examples Here's a small example of an Admiran program, to generate and print a list of the first 100 primes: primes.am -- generate primes the lazy recursive way From David Turner's original \"sieve\" example io functions which communicate with the outside world (like putStrLn) are defined in the module %import primes :: [int] an optional type spec for primes, which is a list of ints primes = sieve [2 ..] defines primes as the result of calling the sieve function on an infinite list of sequential integers, starting from 2 where the sieve function deconstructs the list into its head (p) and tail (xs) and returns p (the next prime) followed by a recursive call to sieve on a new list made from a list comprehension, which filters the remaining list for only the values that aren't divisible by p sieve (p : xs) = p : sieve x x reverse-apply function defined in the module (implicitly imported). main :: io () main = primes take 100 showlist showint putStrLn Some other small example programs are in the examples directory. They can be built with the Makefile in that directory, or individually by typing amc module name e.g. amc fib . Note that amc is a whole-program compiler, so you only need to specify the top-level","default_branch":null,"files":null,"tree":[],"storefront":"/r/taolson","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/taolson/Admiran/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}