File: version-compatibility-macros.h

package info (click to toggle)
haskell-prettyprinter-ansi-terminal 1.1.3-3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 124 kB
  • sloc: haskell: 341; ansic: 16; makefile: 11
file content (23 lines) | stat: -rw-r--r-- 839 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef VERSION_COMPATIBILITY_MACROS
#define VERSION_COMPATIBILITY_MACROS

#ifndef MIN_VERSION_base
#error "MIN_VERSION_base macro not defined!"
#endif

-- These macros allow writing CPP compatibility hacks in a way that makes their
-- purpose much clearer than just demanding a specific version of a library.

#define APPLICATIVE_MONAD               MIN_VERSION_base(4,8,0)
#define FOLDABLE_TRAVERSABLE_IN_PRELUDE MIN_VERSION_base(4,8,0)
#define FUNCTOR_IDENTITY_IN_BASE        MIN_VERSION_base(4,8,0)
#define MONOID_IN_PRELUDE               MIN_VERSION_base(4,8,0)
#define NATURAL_IN_BASE                 MIN_VERSION_base(4,8,0)

#define SEMIGROUP_IN_BASE               MIN_VERSION_base(4,9,0)

#define SEMIGROUP_MONOID_SUPERCLASS     MIN_VERSION_base(4,11,0)

#define FAIL_IN_MONAD                   !(MIN_VERSION_base(4,13,0))

#endif