My custom Prelude
.
Who I am:
sboo
on Hackage (https://hackage.haskell.org/user/sboo).@sboosali
on GitHub (https://github.com/sboosali/)./u/spirosboosalis
on Reddit.
Features:
-
/Portability/:
- JavaScript — tested under GHCJS (
ghcjs-8.4._
). - Static-Linking — tested against
musl
for Static Linking (and withglibc
, 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).
- JavaScript — tested under GHCJS (
-
/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, viaMonadThrow
.Prelude.Spiros.Parse
— ParsingEnum
s.Prelude.Spiros.Print
— Pretty-PrintingEnum
s.Prelude.Spiros.Validator
— ValidationApplicative
(with both “errors” and “warnings”).Prelude.Spiros.Application
— Application-specificXDG BaseDirs
(for a conformant @executable@),Prelude.Spiros.System
— Information about the runtime platform.
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
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 (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
ormusl
gmp
orinteger-simple
GHC Dependencies (Haskell):
base
bytestring
containers
deepseq
directory
filepath
mtl
process
stm
template-haskell
text
time
transformers
unix
orWin32
integer-gmp
orinteger-simple
Reverse Dependencies (Haskell)
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).
The Makefile
has these standard targets:
make build
— invokescabal new-build -fdevelop
.make check
— invokescabal new-test --enable-tests
.make install
— invokescabal new-install
.make dist
— invokescabal new-sdist
.
... and these custom targets:
make static
— builds with-fstatic
. evals./static/default.nix
(which linksghc
againstmusl
and [TODO]integer-simple
).make develop
— builds with-fdevelop
.make publish
– invokesgit tag
. invokescabal new-upload --publish
, which publishes to Hackage, andcurl
s/repos/sboosali/spiros/releases
, which publishes to GitHub.make docs
— invokescabal new-haddock --enable-documentation
.make checkdocs
— invokescabal new-test --enable-tests
on alldoctest
s.make bench
— invokescabal new-bench --enable-benchmarks
.
See <./IMPLEMENTATION.md> (if interested).