Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: magnolia-lang
  • License: bsd-3-clause
  • Language: Haskell
  • Default Branch: main
  • Size: 873 KB
Statistics
  • Stars: 8
  • Watchers: 5
  • Forks: 1
  • Open Issues: 11
  • Releases: 3
Created about 5 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

The Magnolia Programming Language

Continuous
integration DOI

Magnolia is a research programming language based on the theory of institutions.

As of May 2022, this repository guides the evolution of Magnolia and hosts the magnoliac compiler.

⚠️ The compiler is still at an experimental stage. Expect bugs, sharp edges, and changing APIs. ⚠️

Getting started

How to install

To install the Magnolia compiler, simply run the following command:

bash make install

magnoliac will then be installed in the default directory for your cabal binaries. By default, this should be ~/.cabal/bin. Make sure that directory is in your PATH.

How to build Magnolia programs

To build a Magnolia program, use the build command as follows:

bash magnoliac build <path/to/package.mg> --output-directory <path/to/generated/files>

By default, this command does NOT overwrite files. In order to re-generate previously generated programs in the same output directory, you can explicitly add the --allow-overwrite flag to your command.

Using the REPL

⚠️ The repl feature, while functional, is outdated, and likely on the way to being deprecated. ⚠️

Another option to explore Magnolia source files is to explore them using the repl option instead:

bash magnoliac repl mgn> help Available commands are: help: show this help menu inspectm: inspect a module inspectp: inspect a package list: list the loaded packages load: load a package reload: reload a package

For example, given a file named "example.mg" at the root of the repo, one can load it and inspect its contents like so:

bash mgn> load example mgn> inspectp example SomeSig SomeConcept SomeOtherConcept

For developers

How to compile

The compiler has been tested with GHC 8.10.3 and is built using cabal. A very simplistic Makefile is provided, and the following should be sufficient to get going with a development version of the compiler:

```bash make build

For convenience, you may define an alias for the compiler

alias magnoliac='cabal exec magnoliac --' ```

How to contribute

Feel free to open issues and pull requests!

Style guide

We roughly follow the same guidelines as specified in the Futhark project. Most importantly:

  • lines should (as much as possible) be under 80 characters long;
  • we use 2 spaces for indent.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - given-names: Benjamin
    family-names: Chetioui
    orcid: https://orcid.org/my-orcid?orcid=0000-0002-7458-9079
title: "magnoliac: A Magnolia Compiler"
url: "https://github.com/magnolia-lang/magnolia-lang"
doi: "10.5281/zenodo.6572953"
date-released: 2020-12-31

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Dependencies

.github/workflows/ci.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • actions/setup-haskell v1 composite
  • actions/setup-python v2 composite