Skip to content
forked from agda/agda2hs

Compiling Agda code to readable Haskell

License

Notifications You must be signed in to change notification settings

ioanasv/agda2hs

 
 

Repository files navigation

GitHub CI

agda2hs

The goal of this project is not to translate Agda code to Haskell. Rather it is to carve out a common sublanguage between Agda and Haskell, with a straightforward translation from the Agda side to the Haskell side. This lets you write your program in the Agda fragment, using full Agda to prove properties about it, and then translate it to nice looking readable Haskell code that you can show your Haskell colleagues without shame.

See test/Test.agda for an example.

Future work

  • Compile lambdas #5
  • Sections #21
  • Compile if/then/else #13
  • Literals in patterns
  • Use some Haskell syntax ADT and a proper pretty printing library #4
  • Map instance arguments to Haskell type classes (definitions and use) #3
  • where clauses #23
  • Higher-rank polymorphism
  • More builtin types (Double, Word64) #12
  • Strings
  • Compile case_of_ λ where to Haskell case
  • with?
  • Compile equality proofs to QuickCheck properties?
  • Module export lists (how?)
  • Fixity declarations

About

Compiling Agda code to readable Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Agda 79.4%
  • Haskell 20.1%
  • Other 0.5%