Skip to content

Instantly share code, notes, and snippets.

@csabahruska
Last active November 17, 2019 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csabahruska/1cb5a2fad4692cae1af6a63b05b56bc0 to your computer and use it in GitHub Desktop.
Save csabahruska/1cb5a2fad4692cae1af6a63b05b56bc0 to your computer and use it in GitHub Desktop.
Hello world program for Intel Labs Functional Language Research Compiler (FLRC)
(*
only block comment exists
https://github.com/IntelLabs/flrc
compile: hrc minimal.mil
*)
Includes:
"stdio" : C
{ v1_printf : (CcUnmanaged cdecl; CStr, SInt64) -> ()
}
Externs:
Globals:
v2_ : CStr = CString("Hello FLRC!\n")
v3_main : (CcCode;) -> () =
Code^(CcCode;){PINRWTXgrw} : ()
{
Entry L1
L1()
Call(v1_printf) ?{} (v2_, I(0)) -> () L2 {I}
L2()
Return()
}
Entry: v3_main
@csabahruska
Copy link
Author

The Functional Language Research Compiler (FLRC) was designed to be a general compiler framework for functional languages.
https://github.com/IntelLabs/flrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment