Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Small documentation change.

  • Loading branch information...
commit cb6e348cadbf4a9690a19e15dbb3c436e090f960 1 parent 3c5fd76
@mitar authored
View
6 NXT.cabal
@@ -1,5 +1,5 @@
Name: NXT
-Version: 0.1.3
+Version: 0.1.4
Synopsis: A Haskell interface to Lego Mindstorms NXT
Description: A Haskell interface to Lego Mindstorms NXT over Bluetoooth. It supports direct commands, messages and
many sensors (also unofficial). It has also support for a simple message-based control of a NXT brick
@@ -59,7 +59,7 @@ Executable nxt-shutdown
HS-source-dirs: src
Build-depends: base >= 4 && < 5,
mtl >= 1.1 && < 2,
- NXT == 0.1.3
+ NXT == 0.1.4
GHC-options: -Wall
Executable nxt-upload
@@ -69,7 +69,7 @@ Executable nxt-upload
mtl >= 1.1 && < 2,
bytestring >= 0.9 && < 1,
filepath >= 1.1 && < 2,
- NXT == 0.1.3
+ NXT == 0.1.4
GHC-options: -Wall
GHC-prof-options: -Wall
GHC-shared-options: -Wall
View
4 lib/Robotics/NXT/Errors.hs
@@ -60,6 +60,6 @@ failNXT' msg = throwIO . NXTException $ msg
{-|
Exception for NXT interface errors. Currently only one exception is defined which takes textual description as an argument.
-}
-data (Show a, Typeable a) => NXTException a = NXTException a deriving (Show, Typeable)
+data NXTException = NXTException String deriving (Show, Typeable)
-instance (Show a, Typeable a) => Exception (NXTException a)
+instance Exception NXTException
View
3  lib/Robotics/NXT/Internals.hs
@@ -24,6 +24,9 @@ data NXTInternals = NXTInternals {
lastkeepalive :: Maybe POSIXTime -- last time keep alive has been sent
}
+instance Show NXTInternals where
+ show _ = "NXTInternals"
+
{-|
Runs a computation in a context of a given 'NXTInternals' token, returning a value and a new token.
-}
View
8 lib/Robotics/NXT/Protocol.hs
@@ -93,11 +93,9 @@ module Robotics.NXT.Protocol (
-- * Internals
-- | Be careful when using those functions as you have to assure your program is well-behaved: you should see 'NXTInternals' as a
- -- token you have to pass around in order, not reusing or copying values. They are exposed so that you can decouple initalization,
- -- execution and termination phase. If you do not need that use 'withNXT'.
- --
- -- For example, using 'bracket' is not the best way to combine them together as token returned from 'initialize' in \"acquire resource\"
- -- phase is reused in \"release resource\" phase even if it was otherwise used in-between. Really use 'withNXT' for that.
+ -- token you have to pass around in order, not reusing or copying values. (The only exception is that you can reuse the token
+ -- initally returned by 'initialize' in 'terminate' call, even if you have used it in-between.) They are exposed so that you can
+ -- decouple initalization, execution and termination phase. If you do not need that use 'withNXT'.
initialize,
terminate,
runNXT,
Please sign in to comment.
Something went wrong with that request. Please try again.