main:: IO()
main = do
    usbContext <- newCtx
    devices <- getDevices usbContext
    temperDevices <- filterM T.isTemperDevice (toList devices)
    if null temperDevices
        then putStrLn "Could not find any temper devices"
        else do
            print (head temperDevices)
            withDeviceHandle (head temperDevices) $ \device -> do
                temp <- T.readTemperature device
                print temp
main:: IO()
main = do
    usbContext <- newCtx
    devices <- getDevices usbContext
    temperDevices <- filterM T.isTemperDevice (toList devices)
    if null temperDevices
        then putStrLn "Could not find any temper devices"
        else do
            print (head temperDevices)
            withDeviceHandle (head temperDevices) $ \device -> do
                temp <- T.readTemperature device
                print temp
main = do
    usbContext <- newCtx
    devices <- getDevices usbContext
    temperDevices <- filterM T.isTemperDevice (toList devices)
    if null temperDevices
        then putStrLn "Could not find any temper devices"
        else do
            print (head temperDevices)
            withDeviceHandle (head temperDevices) $ \device -> do
                temp <- T.readTemperature device
                print temp