spiros: Spiros Boosalis's Custom Prelude

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

My custom prelude. I'm user/sboo on Hackage, @sboosali on GitHub, and /u/spirosboosalis on reddit.

Diverges slightly from base's: adding, removing, and shadowing.

Compatible with (and built/tested against):


[Skip to Readme]

Properties

Versions 0.0.0, 0.4.0, 0.4.0, 0.4.2
Change log None available
Dependencies base (>=4.7 && <5.0), bytestring, case-insensitive, containers, cpuinfo (>=0.1.0.1), data-default-class, deepseq (>=1.0), directory (>=1.3), exceptions (>=0.10), filepath (>=1.4), generic-deriving (>=1.11), hashable (>=1.2.5), mtl, optparse-applicative, prettyprinter, process, safe, semigroups (>=0.16.2), show-prettyprint, spiros, split, stm, string-conv, template-haskell (>=2.10), text, time (>=1.8), transformers, unix-compat (>=0.5), unordered-containers, vector, vinyl [details]
License Apache-2.0
Copyright 2019 Sam Boosalis
Author Spiros Boosalis
Maintainer samboosalis@gmail.com
Category Prelude
Home page https://github.com/sboosali/spiros#readme
Bug tracker https://github.com/sboosali/spiros#issues
Source repo head: git clone https://github.com/sboosali/spiros(spiros)
Uploaded by sboo at 2019-04-05T04:41:26Z

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
develop

Exposed internals and/or dynamic typechecking (for development).

Disabled
static

Build a statically-linked dynamic-library andor statically-linked executables (NOTE you should also, via « .nix/static.nix », provision an environment with « musl » and other statically-linkable C Libraries.)

Disabled
examples

Build the « example-spiros » executable.

Disabled
cpphs

Use « cpphs » as a C-Pre-Procesor (instead of « gcc », « clang », etc).

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for spiros-0.4.0

[back to package description]

Build Status Hackage

spiros

my custom prelude

reverse dependencies

Notes

Haskell CPP Macros:

Checking for minimal package versions

#if MIN_VERSION_process(1,2,0)
    -- ...
#else
    -- ...
#endif

Checking GHC version

either indirectly via base:

#if MIN_VERSION_base(4,7,0)

or directly:

#if MIN_VERSION_GLASGOW_HASKELL(7,6,0,0)

or, with an older macro:

#if __GLASGOW_HASKELL__ >= 706

Checking host platform

#if defined(mingw32_HOST_OS)
#if defined(cygwin32_HOST_OS) 
#if defined(darwin_HOST_OS)
#if defined(aix_HOST_OS)

Custom macros

In your Cabal file, [1] add a custom flag:

Flag development
  Description:   Turn on development settings.
  Default:       False

that defines a custom CPP flag:

library
  ...
  if flag(development)
    cpp-options: -DDEVELOPMENT
  ...

which you can then condition on in your Haskell files (as normal):

#if DEVELOPMENT
...

Similarly, your Cabal file can set flags given the: current architecture, package versions, etc.

For example, if you need a more fine-grained check for the GHC version (GLASGOW_HASKELL gives major and minor version number but not patch level) you can add

library
  if impl(ghc == 7.6.1)
    cpp-options: -DGHC_761