Code Monkey home page Code Monkey logo

type-level's Introduction

type-level: Type-level programming library

DESCRIPTION


 This library permits performing computations on the type-level. Type-level 
 functions are implemented using functional dependencies of multi
 parameter type classes. 

 To date, Booleans and Numerals (Naturals and Positives) are
 supported. With regard to Numerals, there is support for common
 arithmetic operations (addition, substraction, multiplication,
 division, exponientation, logarithm, maximum, comparison, GCD) 
 over natural numbers (using a decimal representation to make 
 compile-time errors friendlier).

 Although making use of type-level computations might seem devious and
 obfuscated at first sight, it is indeed useful in practice to implement 
 lightweight dependent types such us number-parameterized types (e.g. an array 
 type parameterized by the array's size or a modular group type Zn 
 parameterized by the modulus).

 Here is a tutorial on type-level numerals and how to use them to
implement numerically-parameterized vectors: https://forsyde.ict.kth.se/trac/wiki/ForSyDe/Haskell/ForSyDeTutorial#FSVec

DEPENDENCIES
 
 type-level depends on GHC (due to the use of Multiparameter Type Classes and 
 infix type constructors) and Template Haskell

INSTALLATION

to install globally, for the whole system (requires admin permissions):

$ ./Setup.hs configure
$ ./Setup.hs build
$ ./Setup.hs haddock # generate documentation, optional, 
                     # requires Haddock > 2.0 due to the use of TH
$ ./Setup.hs install

to install locally and just for your own user:

$ ./Setup.hs configure --prefix=The/selected/local/directory
$ ./Setup.hs build
$ ./Setup.hs haddock  # generate documentation, optional, 
                      # requires Haddock > 2.0 due to the use of TH

$ ./Setup.hs install --user

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.