HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulehosc-0.21.1Haskell2010

Sound.Osc.Datum

Osc data types.

  • 6 types
  • 28 values
  • Packagehosc-0.21.1
  • Exports34
  • LanguageHaskell2010
  • LicenceGPL-3.0-only
  • SourceDatum.hs

Datum

15 declarations
typetype Ascii = ByteString
#

Type for Ascii strings (strict Char8 ByteString)

typetype Time = Double
#

A real-valued time stamp. For Osc proper this is an Ntp64 time in real-valued (fractional) form. For SuperCollider Nrt programs this is elapsed time since the start of the score. This is the primary form of timestamp used by hosc.

Datum types

7 declarations

Generalised element access

2 declarations
valuedatum_integral :: Integral i => Datum -> Maybe i
#

Datum as Integral if Int32 or Int64.

Example2 expressions
let d = [Int32 5,Int64 5,Float 5.5,Double 5.5]map datum_integral d == [Just (5::Int),Just 5,Nothing,Nothing]True
valuedatum_floating :: Floating n => Datum -> Maybe n
#

Datum as Floating if Int32, Int64, Float, Double or TimeStamp.

Example2 expressions
let d = [Int32 5,Int64 5,Float 5,Double 5,TimeStamp 5]mapMaybe datum_floating d == replicate 5 (5::Double)True

Constructors

7 declarations
valueint32 :: Integral n => n -> Datum
#

Type generalised Int32.

Example1 expression
int32 (1::Int32) == int32 (1::Integer)True
Example1 expression
d_int32 (int32 (maxBound::Int32)) == maxBoundTrue
Example1 expression
int32 (((2::Int) ^ (64::Int))::Int) == Int32 0True
valueint64 :: Integral n => n -> Datum
#

Type generalised Int64.

Example1 expression
int64 (1::Int32) == int64 (1::Integer)True
Example1 expression
d_int64 (int64 (maxBound::Int64)) == maxBoundTrue
valuefloat :: Real n => n -> Datum
#

Type generalised Float.

Example1 expression
float (1::Int) == float (1::Double)True
Example1 expression
floatRange (undefined::Float)(-125,128)
Example1 expression
isInfinite (d_float (float (encodeFloat 1 256 :: Double)))True
valuedouble :: Real n => n -> Datum
#

Type generalised Double.

Example1 expression
double (1::Int) == double (1::Double)True
Example1 expression
double (encodeFloat 1 256 :: Double) == Double 1.157920892373162e77True
valuestring :: String -> Datum
#

AsciiString of pack.

Example1 expression
string "string" == AsciiString (ByteString.Char8.pack "string")True

Descriptor

3 declarations
valuesignatureFor :: [Datum] -> String
#

Message argument types are given by a signature.

Example1 expression
signatureFor [Int32 1,Float 1,string "1"]",ifs"
valuedescriptor :: [Datum] -> Ascii
#

The descriptor is an Ascii encoded signature.

Example1 expression
descriptor [Int32 1,Float 1,string "1"] == ascii ",ifs"True