mitar avatar mitar committed cf90424

Small documentation change.

Comments (0)

Files changed (4)

 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
   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
                        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

lib/Robotics/NXT/Errors.hs

 {-|
 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

lib/Robotics/NXT/Internals.hs

     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.
 -}

lib/Robotics/NXT/Protocol.hs

   
   -- * 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,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.