Skip to content

adamrk/ouroboros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ouroboros

An OCaml -> Haskell -> OCaml Ouroboros Quine

Usage

$ ocaml ouroboros.ml > ouroboros.hs
$ ghc ouroboros.hs
$ ./ouroboros > ouroboros_again.ml
$ diff ouruboros.ml ouroboros_again.ml
$ echo $?
0

This is an OCaml program that outputs a Haskell program which outputs the original Ocaml program.

Hints

Here are some hints if you'd like to try this yourself, but are getting stuck. There are other ways to do this without using these hints though.

Hint 1 (Ocaml)
  Printf.printf "%S" "hello \"world\""
Hint 2 (Haskell)
  putStrLn $ show "hello \"world\""

About

An OCaml -> Haskell -> OCaml Ouroboros Quine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published