mimsa

所属分类:编程语言基础
开发工具:Haskell
文件大小:0KB
下载次数:0
上传日期:2023-08-06 21:32:01
上 传 者sh-1993
说明:  小型编程语言。请温柔一点。,
(small programming language. pls be gentle.,)

文件列表:
mimsa-trunk/ (0, 2023-10-24)
mimsa-trunk/.envrc (48, 2023-10-24)
mimsa-trunk/Makefile (2511, 2023-10-24)
mimsa-trunk/backends/ (0, 2023-10-24)
mimsa-trunk/backends/.dockerignore (26, 2023-10-24)
mimsa-trunk/backends/LICENSE (1529, 2023-10-24)
mimsa-trunk/backends/backends.cabal (2704, 2023-10-24)
mimsa-trunk/backends/src/ (0, 2023-10-24)
mimsa-trunk/backends/src/Language/ (0, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/ (0, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend.hs (64, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/ (0, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/BackendError.hs (1260, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Javascript/ (0, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Javascript/Printer.hs (4320, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Output.hs (10455, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Shared.hs (1873, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Types.hs (474, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/ (0, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/DataType.hs (3671, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/FromDataType.hs (970, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/FromExpr.hs (9291, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/FromType.hs (3254, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/Monad.hs (5452, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/Patterns.hs (6130, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/Printer.hs (6639, 2023-10-24)
mimsa-trunk/backends/src/Language/Mimsa/Backend/Typescript/Types.hs (3696, 2023-10-24)
mimsa-trunk/backends/static/ (0, 2023-10-24)
mimsa-trunk/backends/static/backend/ (0, 2023-10-24)
mimsa-trunk/backends/static/backend/es-modules-js/ (0, 2023-10-24)
mimsa-trunk/backends/static/backend/es-modules-js/stdlib.mjs (320, 2023-10-24)
... ...

# mimsa Mimsa is a small programming language. It is inspired syntactically by `Elm` and `Haskell`. It works by saving expressions into a database and referencing them by hashes like `Unison`. It can be used through a `repl` or it's own web-based editor. It compiles to readable Javascript. It aims to become a specialised DSL for small backend services, much like `Elm` is for frontends, however currently it's just a fun way to play with functional programming without installing anything. Try it at [mimsa.isverymuchmybusiness.com](https://mimsa.isverymuchmybusiness.com/) ### Getting started #### Scratch When you open Mimsa, you'll see the `Scratch` screen. This is like a repl where you can try out expressions. Screenshot 2021-07-10 at 18 44 24 Let's try making a simple expression: Screenshot 2021-07-10 at 18 44 41 Note that now we have some input, the `Evaluate` button has appeared. Let's click it: Screenshot 2021-07-10 at 18 44 47 It's evaluated the expression, `20`, in pink, and the type of the expression, `Int`, in blue. Note we have not had to mention any types - in Mimsa they are all inferred. #### Exploring expressions At the bottom of the screen we have a set of names. These are all the expressions bound to names in our project. Screenshot 2021-07-10 at 18 48 22 If we click on any of them we can view the code for the expression. Screenshot 2021-07-10 at 18 49 06 We can change the code here, and even press `Update` to save a new expression and bind it to the name. This means any new users of the function will use your new version, but any old versions will still use the old version of the function. Note the `Compile export` button - this allows us to turn this expression into Javascript and download it. `Export` is the default runtime which just exports the function. There are a few other runtimes which allow Mimsa to do various side effects (more on this stuff soon). There is more info on the [syntax](https://github.com/danieljharvey/mimsa/blob/trunk/compiler/README.md). #### Other menu items to try Add a new binding, ie, make a new expression and then give it a name, so that it can be used in other expressions. Add a new datatype that can be used in other expressions. The compiler will also try and create you helper functions for manipulating your datatype and save those in another expression. Add a unit test. As all values and expressions in Mimsa are immutable, this test will only be run once, and the output stored and linked to all the expressions it uses. Type search - find useful functions by searching the type you are looking for, ala [Hoogle](https://hoogle.haskell.org/).

近期下载者

相关文件


收藏者