indique/n/1.0.0

NOTE: the latest version is 2.0.1

This package shouldn't have to exist.

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

A natural number type is build like this:

module N exposing (..)

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

type alias Nat1Plus more =
    S more

type alias Nat2Plus more =
    S (Nat1Plus more)

-- ...

type alias Nat192Plus more =
    S (Nat191Plus more)

Elm cashes this in elm-stuff like this:

Nat100Plus??????nlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNSlue-birdelm-bounded-natNS
lue-birdelm-bounded-natNZlue-birdelm-bounded-natTypeNats.............

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?

  • NS NZ are very common, but we can't shorten these any further
  • lue-birdelm-bounded-nat fills nearly every character!

If we replaced every

lue-birdelm-bounded-nat with
indiquen

we would save a ton of space.

Nat100Plus??????nindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNS
indiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNS
indiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNS
indiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNS
indiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNSindiquenNS
indiquenNSindiquenNZindiquenTypeNats.........

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