Skip to content

mthom/abominable-klambda-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Abominable KLambda->Haskell Compiler

A hastily written, undocumented KLambda->Haskell Compiler

Abominable converts KLambda code to Haskell code. It was written in March 2015, and is a cautionary lesson in the importance of documenting your code as a key to later understanding of that code.

http://vignette1.wikia.nocookie.net/headhuntersholosuite/images/d/da/Lexx_3x03_001.jpg/revision/latest?cb=20110609174657

Abominable is responsible for generating the backend of Shentong, a Haskell port of the Shen programming language.

Abominable is incapable of generating code that can be parsed with any GHC version later than 7.6.3. This is definitely due to a lingering bug in Template Haskell that someone really ought to correct.

Usage

Abominable reads from a list of files specified in Compiler/Backend.hs :

klFiles = [ "klambda/toplevel.kl"
          , "klambda/core.kl"
          , "klambda/sys.kl"
          , "klambda/sequent.kl"
          , "klambda/yacc.kl"
          , "klambda/reader.kl"
          , "klambda/prolog.kl"
          , "klambda/track.kl"
          , "klambda/load.kl"
          , "klambda/writer.kl"
          , "klambda/macros.kl"  
          , "klambda/declarations.kl"
          , "klambda/types.kl"
          , "klambda/t-star.kl"]

All paths are relative to the directory in which Abominable is stored. The Backend *.hs files are output to Shentong/Backend, and if that directory doesn’t already exist in the pwd, Abominable throws an exception and returns to the command line.

About

A hastily written KLambda->Haskell compiler.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published