Git Product home page Git Product logo

sharade's Introduction

Sharade - In progress

This is a simple functional nondeterministic language that combines share and no-share semantics.

This language serves as a frontend of monadic programming in Haskell and the explicit-sharing library of Sebastian Fischer.

Specifications

This language supports

  • Lazy evaluation
  • Pattern matching
  • High-order functions
  • Non-determinism
  • Share semantics

Installation

This guide assumes that you have cabal and haskell interpreter installed.

First of all, you have to install a specific version of a package that does not exists on Hackage, https://github.com/ManuelVs/explicit-sharing. The original author, Sebastian Fischer, has not updated the library to the modern Haskell language (as of 2019). You can install that package this way:

# Choose one of the following!
git clone [email protected]:ManuelVs/explicit-sharing.git
# git clone https://github.com/ManuelVs/explicit-sharing
cabal update
cabal sdist
cabal install dist/explicit-sharing*.tar.gz
cabal clean # this is optional

Now, you are prepared to clone, build and install this project:

# Choose one of the following!
git clone [email protected]:ManuelVs/Sharade.git
# git clone https://github.com/ManuelVs/Sharade.git
cabal update
cabal sdist
cabal install dist/Sharade*.tar.gz
cabal clean # this is optional

Cabal should put on the PATH a program called Sharade, which can compile programs written in Sharade into Haskell. In case you can not execute it, you maybe can find it on /home/username/.cabal/bin.

Usage

The workflow is very simple:

  • Write a program in this language
  • Compile it to Haskell by running
    Sharade file
  • Launch a Haskell interpreter and load it! In this earlier versions, the module generated does not export friendly-functions to work with. You should use it this way:
    -- Imagine you have in Sharade the following function:
    mRepeat a = a ? mRepeat (a + 1) ;
    
    -- In Haskell, you can use the function this way:
    > unsafeResults $ mRepeat <#> (return 1)

Examples

The examples can be found on /code_examples folder.

Issues report

You can report issues by using the GitHub - standard way or by sending me an email to [email protected].

sharade's People

Contributors

manuelvs avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.