idris-cil

by bamboo

bamboo / idris-cil

A Common Intermediate Language backend for Idris.

126 Stars 9 Forks Last release: Not found Other 299 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

idris-cil Build Status

A Common Intermediate Language backend for Idris.

Why

Because programmers targeting the CLR deserve a modern pure functional language with dependent types.

Usage

Given a

Main.idr
file:
module Main

main : IO () main = putStrLn "Hello, Idris!"

Compile it to cil and execute it with .NET Core:

idris --codegen cil Main.idr -o HelloWorld.exe \
  && dotnet HelloWorld.exe

The resulting assemblies can also be used with Mono or Unity.

Installing

It's important that the version of the Idris executable matches the version used to build idris-cil:

git clone [email protected]:bamboo/idris-cil
cd idris-cil
stack install idris
stack install

Contributing

Issue reports and PRs are welcome.

Brought to you by @bamboo, @sangamon and contributors.

License

BSD3

Requirements

.NET Core 1.1 with ilasm

Install

ilasm
using nuget:
dotnet new console -o ilasm-setup
cd ilasm-setup
dotnet add package runtime.osx.10.10-x64.Microsoft.NETCore.ILAsm
cd .. && rm -fr ilasm-setup

Replace the

runtime.osx.10.10-x64
prefix above with the right value for your system, for instance,
ubuntu.14.04-x64
.

Add

ilasm
to your
PATH
with something like:
export PATH=$(find $HOME/.nuget/packages -name ilasm | xargs dirname):$PATH

If you get an error from

ilasm
saying it cannot load
libcoreclr.dylib
, add the
dotnet/shared
dir to
DYLD_LIBRARY_PATH
:
export DYLD_LIBRARY_PATH=/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.2:$DYLD_LIBRARY_PATH

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.