taolson/Admiran: Admiran is a pure, lazy, functional language and self-hosting compiler based upon Miranda
github.com·2d·
Discuss: r/programming
⚙️Compilers
Preview
Report Post

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 <io> module
%import <io>

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 funct...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help