hscdio-0.1.0.0: Haskell bindings to the libcdio disc-reading library.
Copyright(c) 2018-2021 Sam May
LicenseGPL-3.0-or-later
Maintainerag@eitilt.life
Stabilitystable
Portabilitynon-portable (requires libcdio)
Safe HaskellNone
LanguageHaskell2010

Foreign.Libcdio.Version

Description

The values in this module are best treated as informational; it may be helpful to use cdioVersionString in printing copyright, for example, and libcdioVersionNum does serve a purpose in the tests, but all are of little value outside of such very particular situations. Instead, an effort has been made to have all version differences in the base library degrade gracefully, and those fallback values are able to be handled transparently. For example, rather than explicitly testing whether libcdio is new enough to have exposed cdtext_data_init, simply call cdTextDataInit and have a plan for if it returns Nothing rather than a Just CdText.

version.h

Defines

Symbols

Sound.Libcdio

Re-exported unchanged as there is little reason for it to be a separate module, and no changes need to be made to the types.

Documentation

data Version #

A Version represents the version of a software entity.

An instance of Eq is provided, which implements exact equality modulo reordering of the tags in the versionTags field.

An instance of Ord is also provided, which gives lexicographic ordering on the versionBranch fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags "pre1", "pre2", and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the versionTags field and compare those. The bottom line is, don't always assume that compare and other Ord operations are the right thing for every Version.

Similarly, concrete representations of versions may differ. One possible concrete representation is provided (see showVersion and parseVersion), but depending on the application a different concrete representation may be more appropriate.

Instances

Instances details
IsList Version

Since: base-4.8.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item Version #

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Methods

(==) :: Version -> Version -> Bool #

(/=) :: Version -> Version -> Bool #

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Generic Version

Since: base-4.9.0.0

Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

type Rep Version 
Instance details

Defined in Data.Version

type Rep Version = D1 ('MetaData "Version" "Data.Version" "base" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "versionBranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "versionTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])))
type Item Version 
Instance details

Defined in GHC.Exts

makeVersion :: [Int] -> Version #

Construct tag-less Version

Since: base-4.8.0.0

cdioVersionString :: String #

The value of the preprocessor macro CDIO_VERSION, listing both the SemVar-style version of libcdio and the full architecture of the system which compiled it (e.g. 2.0.0 x86_64-pc-linux-gnu).

libcdioVersionNum :: Version #

The value of the preprocessor macro LIBCDIO_VERSION_NUM, containing a numeric representation of the version suitable for arithmetic testing.

apiVersion :: Word #

The value of the preprocessor macro CDIO_API_VERSION, containing a single, monotonically increasing constant representing changes to the public interface. However, as it's somewhat unclear what changes warrant bumping this number, it is typically better to use libcdioVersionNum instead.