Skip to content

lastland/DTScala

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

This is a demonstration of how to implement dependently-typed functions in Scala.

This tutorial is the best place to get started.

For more details, refer to the code:

Nat.scala demonstrates how to define singleton types of natural numbers in Scala.

GADT.scala shows how to use subtyping to model inductive data types (like Haskell's generic algebraic data types, a.k.a GADT).

Vec.scala demonstrates how to use singleton types of natural numbers to encode a vector whose length information is in its type.

RBT.scala shows how to implement a dependently-typed red-black tree.

About

Dependent Types in Scala

Resources

Stars

Watchers

Forks

Packages

No packages published