Coder Social home page Coder Social logo

eggy115 / purescript Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 33 KB

Purescript

Home Page: https://github.com/Eggy115/Purescript

License: GNU General Public License v3.0

PureScript 100.00%
purescript purescript-lang purescript-language pure-script purescript-code purescript-examples purescript-programs purescript-scripts

purescript's Introduction

PureScript

License: GPL v3

This repository contains a collection of PureScript programs and scripts.

Table of Contents

What is PureScript

PureScript is a strongly-typed functional programming language that compiles to JavaScript. It is inspired by Haskell and provides a simple and expressive syntax for writing functional code. PureScript's static type system helps catch many common programming errors at compile-time, making it a powerful language for building robust and maintainable applications.

PureScript is commonly used for frontend web development, where it can be used to build user interfaces with libraries like React or as a replacement for JavaScript in building server-side applications with Node.js. It is also used in other domains like data science, machine learning, and game development.

Installation

Installing PureScript

These are the general steps to install PureScript on different platforms. However, the exact steps may vary depending on the specific operating system and version you are using. It's always a good idea to refer to the official documentation for your platform to get more detailed installation instructions.

Windows

  1. Download and install Node.js from the official Node.js website.
  2. Open a command prompt or PowerShell window and run the following command to install PureScript globally:
npm install -g purescript
  1. Once the installation is complete, you can use any text editor or IDE (Integrated Development Environment) to write and compile PureScript code.

Linux

  1. Install Node.js using the package manager for your Linux distribution. For example, on Ubuntu, you can use the following command:
sudo apt-get install nodejs
  1. Install PureScript globally using npm, the Node.js package manager:
npm install -g purescript
  1. Once PureScript is installed, you can use any text editor or IDE to write and compile PureScript code.

macOS

  1. Install Node.js using a package manager like Homebrew. Open a terminal and run the following command:
brew install node
  1. Install PureScript globally using npm, the Node.js package manager:
npm install -g purescript
  1. Once PureScript is installed, you can use any text editor or IDE to write and compile PureScript code.

Installing Repository

You can download individual files, copy & paste code, or clone the repository

git clone https://github.com/YourUsername/PureScript.git

Usage

Running PureScript Programs

  1. Clone the repository. If you have written your own programs, save the program with a .purs file extension.
  2. Open a terminal or command prompt and navigate to the directory where the PureScript program is saved.
  3. Run the following command to compile and run the PureScript program:
purs compile path/to/program.purs -o output

Using Spago

Spago is a popular package manager and build tool for PureScript projects. You can use Spago to manage dependencies, build, and run your PureScript programs in a more organized and efficient way. Here are some basic commands you can use with Spago:

  • Install Spago globally (if not already installed):
npm install -g spago
  • Initialize a new Spago project:
spago init
  • Install dependencies listed in your spago.dhall file:
spago install
  • Build your PureScript project:
spago build
  • Run your PureScript program:
spago run

For more information on using Spago, refer to the official documentation.

Contributing

Contributions are always welcome! Follow these steps to contribute:

  1. Fork the repository and make your changes.
  2. Submit a pull request with your changes.
  3. Create an issue if you find a bug or have a feature request.

Please make sure to adhere to the code of conduct and the contributing guidelines.

License

This repository is licensed under the GPLv3 License. See the LICENSE file for more information.

purescript's People

Contributors

eggy115 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gitty12341

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.