Giter Site home page Giter Site logo

freecat's Introduction

This is a work in progress -- not good for anything yet!

cabal install
cabal build
./test.sh

freecat's People

Contributors

morganthomas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

freecat's Issues

Roll patterns into exprs

Instead of having a Pattern type, use Expr in place of Pattern with the expected invariant that patterns are only made of symbols and applications.

Eliminate egregious performance problems

This issue is done when the program has been analyzed for opportunities to reduce the computational complexity class of algorithms, and all easy opportunities to do so have been pursued.

Break up Core.hs

Suggestion: three files, Core.hs, Digest.hs, Evaluate.hs. Digest and Evaluate depend on Core. Digest depends on Evaluate.

Support unique value inference

Be able to infer the value of an implicit argument by noticing that the context provides exactly one way of constructing a value of the argument's type. This feature should be able to replace simple uses of type classes. Example:

Bool : Type
true : Bool
false : Bool

Eq : Type -> Type
eq : {a : Type} -> {inst : Eq a} -> a -> a -> Bool

Foo : Type
foo : Foo
bar : Foo

eqFoo : Eq Foo
eq foo foo => true
eq bar bar => true
eq {inst = eqFoo} x y => false

example : Bool
example => eq foo bar

Expected result: example => false. eq foo bar is elaborated to eq {a = Foo} {inst = eqFoo} foo bar.

Create end to end test runner

It should run freecat on all the test cases in test/cases. It should check that all equations for each test case are true in the test case's context.

Support implicit arguments

E.g., should be able to write: e.g.: map : {a : Type} -> {b : Type} -> (a -> b) -> List a -> List b, with the values of a and b inferred at the call site during digestion or evaluation if not specified explicitly.

For this issue, it's sufficient to have one tactic for inferring the value of implicit arguments, based on unification of terms and types of terms around the function call site.

Support inferred implicit arguments

Infer implicit argument declarations for free variables in type declarations. E.g., should be able to write: map : (a -> b) -> List a -> List b. This should be equivalent to: map : {a : Type} -> {b : Type} -> (a -> b) -> List a -> List b. The types of a and b should be inferred from the context of the usage of the variables. E.g., here List : Type -> Type, so from the usage List a you can infer a : Type.

Write, test, document reflection library/primitives

Every FreeCat concept should be first-class reflected within FreeCat. There should be types for exprs, symbols, contexts, etc. There should be functions for context loading and expr evaluation. What else?

Implement comments

Implement Haskell-style comments: -- and {- -}. Nested comments should be supported.

Finish out error reporting coverage

This issue is done when every error condition provides meaningful, useful output including line numbers and so forth; when the error and debug output is not excessively verbose by default; when there is no debug output for an error-free program by default; and when error reporting is tested in the automated regression suite.

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.