Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diekmann/isabelle-hello-world
Hello World in Isabelle, compiled to Haskell
https://github.com/diekmann/isabelle-hello-world
functional-programming haskell isabelle-hol
Last synced: 24 days ago
JSON representation
Hello World in Isabelle, compiled to Haskell
- Host: GitHub
- URL: https://github.com/diekmann/isabelle-hello-world
- Owner: diekmann
- License: mit
- Created: 2017-08-11T15:27:19.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2021-10-08T18:34:12.000Z (over 3 years ago)
- Last Synced: 2024-10-29T20:03:21.460Z (2 months ago)
- Topics: functional-programming, haskell, isabelle-hol
- Language: Isabelle
- Size: 57.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Isabelle-Hello-World
Hello World in Isabelle, compiled to Haskell.# Example
Isabelle
```Isabelle
definition main :: "unit io" where
"main ≡ do {
_ ← println (STR ''Hello World! What is your name?'');
name ← getLine;
println (STR ''Hello, '' + name + STR ''!'')
}"
```compiles to
```Haskell
main :: Prelude.IO ();
main =
(StdIO.println
"Hello World! What is your name?") >>= (\ _ ->
StdIO.getLine >>= (\ name -> StdIO.println (("Hello, " ++ name) ++ "!")));
```executes
```
$ runhaskell Main.hs
Hello World! What is your name?
Corny
Hello, Corny!
```# Contributing
* Keep it simple! I want simple, understandable, well-documented examples.
* Don't rewrite simple examples to a super generic, highly abstract meta model.
Feel free to push the super generic, highly abstract meta model in a separate file and explain *how* and *why* the
base model needs to be extended.# Things I'd like to see
* Socket server.
* String handling.
* `println "foo" >> println "bar"` and a *proof* that I got `foo\nbar\n` on my STDOUT [[done]](HelloWorld_Proof.thy).
* `now >>= \time -> println $ "the time is now " ++ time`.
* Read a number from STDIN, increment the number and output it.