GithubHelp home page GithubHelp logo

hiighovuti / catrina Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 1.0 200 KB

a categorical programming language (WIP)

License: GNU General Public License v3.0

Haskell 96.83% Nix 0.99% Vim Script 2.18%
category-theory functional-programming programming-language programming-language-theory

catrina's People

Contributors

hiighovuti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

catrina's Issues

Don't exit the REPL when there is an error

Currently, the REPL will immediately exit if there was an error.

h ~/Catrina > rina repl --load main.rina
Rina> safvsdcnpkznv
rina: Can't find safvsdcnpkznv
CallStack (from HasCallStack):
  error, called at app/Interpreter/BuiltIn.hs:24:27 in main:Interpreter.BuiltIn
h ~/Catrina 1 > 

It should behave like other languages' REPLs in that they do not exit immediately if there is an error with your code.

h ~/Catrina > ipython
Python 3.10.1 (main, Dec 18 2021, 23:53:45) [GCC 11.1.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.30.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: raise Exception()
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-1-32c500991385> in <module>
----> 1 raise Exception()

Exception: 

In [2]: 

Implement foralls

Current typechecking syntax only allows for ad-hoc polymorphism.
Parametric polymorphism could simply be added by creating a new type such that

isSubtype (New name) _ = quit TypeError

this works because the following case also exists

isSubtype a b | a == b = pure ()

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.