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.Coding.Decode.Binary

Optimised decode function for Osc packets.

  • 8 values
  • Packagehosc-0.21.1
  • Exports8
  • LanguageHaskell2010
  • LicenceGPL-3.0-only
  • SourceBinary.hs

Decode an Osc Message from a lazy ByteString.

Example2 expressions
let b = ByteString.Lazy.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0]decodeMessage b == Message "/g_free" [Int32 0]True

Decode an Osc packet from a lazy ByteString.

Example2 expressions
let b = ByteString.Lazy.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0]decodePacket b == Packet_Message (Message "/g_free" [Int32 0])True

Either decode Osc message or return an error message. Prevents application halt for non-valid messagebundlepacket arrives.

Example2 expressions
let b = ByteString.Lazy.pack [1,2,3,2,1]decodePacketOr bLeft "not enough bytes"