Giter Club home page Giter Club logo

dpq's Introduction

Dependently Typed Proto-Quipper (Proto-Quipper-D)

Installation

  1. Set the environment variable DPQ to the dpq project directory. E.g. add export DPQ=<path-to-dpq-directory> to your .bashrc file.

  2. Install via stack: stack install. Please see here for instructions on installing stack. We recommend using stack.

  3. Or install via cabal (>= 3.0.0.0):

    cabal v1-sandbox init

    cabal v1-install --only-dependencies

    cabal v1-build

  4. Once 2 is done, you should have two executables, i.e., dpq and dpqi somewhere in you computer. Add <path-to-dpqi>, <path-to-dpq> to your PATH variable.

  5. Optional: if you are an emacs user, you may want to add the following to your .emacs file

    (load "<path>/dpq-mode.el")
    
    (require 'dpq-mode)
    

    You should now be able to use C-c C-l to type check your dpq file.

  6. Test your installation. Just type dpqi in the terminal to invoke the interpretor. In the dpqi interpretor, type :h to see a list of options.

Upgrade dpq

Assuming you have managed to install dpqi and dpq. run git pull first, then redo the second step in the installation guide.

Using dpq executable

In command line, run dpq to see further instructions.

Syntax and examples

see the lib/ and test/ directory for syntax and examples.

FAQ

  1. Why export DPQ="~/dpq" does not work?

    The '~' symbol in double quotes will not get expanded, so if the dpq installation directory is under you home directory, you may want to use export DPQ=~/dpq instead.

  2. How does the import work? Can I try import "~/lib/Prelude.dpq" ?

    The importing mechanism we implemented is not very polished. When you want to import another dpq file, you can either use the absolute path, or a relative path relative to the DPQ environment variable. For example, import "lib/Prelude.dpq" will import the file at $DPQ/lib/Prelude.dpq. On the other hand, import "/home/username/lib/Prelude.dpq" will import the file at /home/username/lib/Prelude.dpq.

  3. Why C-c C-l does not work for my emacs?

    One possible reason is that you forget to restart emacs if you just modified your .emacs file, or restart the terminal if you just modified your .bashrc file.

dpq's People

Contributors

fermat avatar paulgustafson avatar selinger avatar

Watchers

 avatar  avatar  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.