kingwither/elmeither/1.0.0

Renamed to davidboers/ElmEither. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as kingwither/elmeither still install under that name. 1 version of 1 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/davidboers/ElmEither.

What we checked: The repo moved to github.com/davidboers/ElmEither and tag 1.0.0 is there; its commit 3daeeb6718bb is from 2021-05-07 18:31 UTC, before the version was published (2021-05-07 18:33 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one (GitHub's zip no longer comes out byte for byte the same), so the contents were checked instead.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/kingwither/elmeither/zipball/1.0.0/

Either Elm

The first time I tried Functional Programming, I thought "What the hell is this? Why would anybody program this way?" Then, I tried it out a little more. Then I realized how fun it is. Particularly the genius that comes with having to be resourceful. In no instance is that clearer than Haskell's Maybe and Either declarations.


-- Basically a nullable value. It could exist (as any type) or it could be Nothing. 
-- Akin to Java's '@nullable' annotation

type Maybe a
    = Just a
    | Nothing

-- Could be of type a or type b.

type Either a b
    = Left a
    | Right b

Although Maybe is implemented in Elm, Either is not; until now. This module contains a declaration of Haskell's Either type, verbatim from the source code of the GHC library. It also contains a couple of other functions related to the declaration.

Just do

elm install kingwither/elmeither

and the package will be installed!

import Either exposing (Either(..))

You're all set! Either is now Either Haskell Elm!