Skip to content

Manually constructed STG programs compiled with the standard GHC codegen backend.

Notifications You must be signed in to change notification settings

csabahruska/manual-stg-experiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

manual-stg-experiment

Manually constructed STG programs compiled with the standard GHC codegen backend.

The samples show various use cases i.e. (de)construction of (un)boxed tuples and (un)lifted ADTs and using FFI.

This experiment suggests that GHC codegen and RTS can be used as generic compiler backend for strict and lazy functional languages.

Build

stack setup
stack build

Usage

stack ghci StgSample.hs

Run a sample in GHCi. i.e.

*StgSample> sampleADT2

It will generate an executable named a.out also will generate the intermediate output files (out.ll, out.s, out.o).

About

Manually constructed STG programs compiled with the standard GHC codegen backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published