Skip to content

sboosali/spiros

Repository files navigation

Build Status Hackage

spiros

Description

My custom Prelude.

Who I am:

Features

Features:

  • /Portability/:

    • JavaScript — tested under GHCJS (ghcjs-8.4._).
    • Static-Linking — tested against musl for Static Linking (and with glibc, obviously).
    • GHC Compatibility — tested under multiple GHCs (from GHC 7.10 (ghc-7.10.3) to GHC 8.6 (ghc-8.6.3).
    • OS Compatibility — tested on Linux, Windows, and MacOS (should work on FreeBSD and Android too, since I removed the clock dependency; please file an issue if you know that it doesn't).
  • /Convenience/:

    • Prelude.Spiros exports hundreds of functions, types, and classes without naming conflicts (renaming or triaging as necessary).

Utilities include:

  • Prelude.Spiros.Exception — /Safe/ partial functions, via MonadThrow.
  • Prelude.Spiros.Parse — Parsing Enums.
  • Prelude.Spiros.Print — Pretty-Printing Enums.
  • Prelude.Spiros.Validator — Validation Applicative (with both “errors” and “warnings”).
  • Prelude.Spiros.Application — Application-specific XDG BaseDirs (for a conformant @executable@),
  • Prelude.Spiros.System — Information about the runtime platform.

Usage

For a @library@:

import "spiros" Prelude.Spiros

For a @*-types@ package:

import "spiros" Prelude.Spiros.Classes

For an @executable@:

import "spiros" Prelude.Spiros
import "spiros" Prelude.Spiros.System
import "spiros" Prelude.Spiros.Application

Requires...

Explicit Dependencies (Haskell):

  • exceptions
  • data-default-class
  • th-lift-instances
  • generic-deriving
  • prettyprinter
  • unordered-containers
  • string-conv
  • case-insensitive
  • split
  • cpuinfo
  • unix-compat

Transitive Dependencies (Haskell):

  • attoparsec
  • scientific
  • integer-logarithms
  • th-abstraction

Graph:

Dependencies

Dependencies (C):

  • libffi

(NOTE these Haskell libraries (/Boot packages/ and /Wired-In packages/) and these system libraries are required by GHC itself (and thus are almost always necessary dependencies for any Haskell program, as far as I know.)

GHC Dependencies (C):

  • glibc or musl
  • gmp or integer-simple

GHC Dependencies (Haskell):

  • base
  • bytestring
  • containers
  • deepseq
  • directory
  • filepath
  • mtl
  • process
  • stm
  • template-haskell
  • text
  • time
  • transformers
  • unix or Win32
  • integer-gmp or integer-simple

Required By...

Reverse Dependencies (Haskell)

Reverse Dependencies

Dependent projects include:

  • the enumerate* packages — enumerate, enumerate-function.
  • the dication* packages — dication, dictation-server, dictation-simple, dictation-tools, natlink-client-dll.
  • the workflow* packages — workflow, workflow-types, workflow-x11-shell, workflow-windows, workflow-osx, workflow-pure.
  • the skeletor* packages — skeletor, skeletor-types, skeletor-haskell, skeletor-elisp, skeletor-nix.
  • the mtg* packages — mtg-types, mtg-json, mtg-csv, mtg-sql, mtg-search, mtg-scryfall, mse.

Other dependent packages include:

  • desktop-entry-files
  • emacs-types
  • genovation-control-pad
  • kbd
  • licenses
  • reflex-fltk

Some of these are /works in progress/. If you're interested in contributing to any of them, note that the utilities in spiros (and the dependencies mentioned) are available to use (and encouraged to be used).

Development

The Makefile has these standard targets:

  • make build — invokes cabal new-build -fdevelop.
  • make check — invokes cabal new-test --enable-tests.
  • make install — invokes cabal new-install.
  • make dist — invokes cabal new-sdist.

... and these custom targets:

  • make static — builds with -fstatic. evals ./static/default.nix (which links ghc against musl and [TODO] integer-simple).
  • make develop — builds with -fdevelop.
  • make publish – invokes git tag. invokes cabal new-upload --publish, which publishes to Hackage, and curls /repos/sboosali/spiros/releases, which publishes to GitHub.
  • make docs — invokes cabal new-haddock --enable-documentation.
  • make checkdocs — invokes cabal new-test --enable-tests on all doctests.
  • make bench — invokes cabal new-bench --enable-benchmarks.

Implementation

See <./IMPLEMENTATION.md> (if interested).