The vrpn package

[Tags:library, mit, program]

See <> for information on VRPN. This has been tested using VRPN 07.30 on Linux.

If the VRPN libraries are static and this package is used from Template Haskell, then the package needs to be configured with the QuatStatic flag.

[Skip to Readme]


Dependencies base (>=4.8 && <5) [details]
License MIT
Copyright (c) 2015 Brian W Bush
Author Brian W Bush <>
Maintainer Brian W Bush <>
Category Network
Home page
Bug tracker
Source repository head: git clone
Uploaded Sat Apr 16 18:34:23 UTC 2016 by BrianBush
Distributions NixOS:
Downloads 247 total (13 in the last 30 days)
0 []
Status Docs not available [build log]
All reported builds failed as of 2016-11-26 [all 2 reports]
Hackage Matrix CI


  • Network
    • Network.VRPN


quatstaticExplicitly link with static library libquat.a, which is required when using this package with Template Haskell.DisabledAutomatic

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


Maintainer's Corner

For package maintainers and hackage trustees

Readme for vrpn

Readme for vrpn-

Bindings for VRPN

This package contains bindings to VRPN, <> and is loosely modeled on the code in <>. This has been tested using VRPN 07.30 on Linux. It requires the VRPN C++ header files.

Please report issues at <>.

Skeletal example illustrating the use of VRPN bindings

data ButtonType = LeftButton | RightButton
  deriving (Enum, Eq, Show)

main :: IO ()
main =
    putStrLn "Press the left button to exit."
    done <- newEmptyMVar
      -- A remote button that signals completion when the left button is released.
      button :: Device Int ButtonType Double
      button =
        Button "spacenav0@localhost"
          $ Just
          $ \time button state ->
              print (time, button, state)
              if button == LeftButton && not state
                then void $ tryPutMVar done ()
                else return ()
      -- An analog device.
      analog :: Device Int Int Int Double
      analog = Analog "spacenav0@localhost"
        $ Just
        $ curry print
    -- Open the remote devices.
    devices <- sequence [openDevice button, openDevice analog]
    -- Loop until a signal to complete is received.
    mainLoops (not <$> isEmptyMVar done) 10 devices
    -- Close the remote devices.
    mapM_ closeDevice devices