GithubHelp home page GithubHelp logo

indique / n Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 29 KB

supplies elm-bounded-nat with shortened names

Home Page: https://package.elm-lang.org/packages/indique/n/latest/

License: MIT License

Elm 100.00%
elm

n's Introduction

Moved into bounded-nat.

type alias Nat192Plus more =
    S (S ... (S more)...)

improved compiling performance drastically over

type alias Nat192Plus more =
    Nat191Plus (S more)

This package shouldn't have to exist.

It supplies the package elm-bounded-nat with shortened names.

A natural number type could be build like this:

module N exposing (...)

type S more = ...
type Z = ...

type alias Nat1Plus more =
    S more

type alias Nat2Plus more =
    Nat1Plus (S more)

...

type alias Nat192Plus more =
    Nat191Plus (S more)

Elm cashes this in elm-stuff like this:

Nat100Plus??????��n��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S��lue-bird�elm-bounded-nat�N�S
��lue-bird�elm-bounded-nat�N�Z���lue-bird�elm-bounded-nat�TypeNats.............

Every alias gets expanded instantly. This gets extremely long extremely fast!

As a result, elm-stuff is likely to corrupt & the compilation is slow.

What could shorten it down?

  • N�S N�Z are very common, but we can't shorten these any further

  • lue-bird�elm-bounded-nat fills nearly every character!

    • if we replaced every

    lue-bird�elm-bounded-nat

with

indique�n

we would save a ton of space.

Nat100Plus??????��n��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S
��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S
��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S
��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S
��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S��indique�n�N�S
��indique�n�N�S��indique�n�N�Z���indique�n�TypeNats.........

I'm very sad to say that this is significantly better :(

n's People

Contributors

elm-review-bot avatar indique avatar

Watchers

 avatar

Forkers

elm-review-bot

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.