From 8f9c5f1ecec8ee13bb0e803a1f26140bb8d8357e Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Thu, 29 May 2014 02:16:07 -0400 Subject: A simple CatInt monitor --- src/Plugins/Monitors/CatInt.hs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/Plugins/Monitors/CatInt.hs (limited to 'src/Plugins/Monitors') diff --git a/src/Plugins/Monitors/CatInt.hs b/src/Plugins/Monitors/CatInt.hs new file mode 100644 index 0000000..3d19270 --- /dev/null +++ b/src/Plugins/Monitors/CatInt.hs @@ -0,0 +1,25 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Plugins.Monitors.CatInt +-- Copyright : (c) Nathaniel Wesley Filardo +-- License : BSD-style (see LICENSE) +-- +-- Maintainer : Nathaniel Wesley Filardo +-- Stability : unstable +-- Portability : unportable +-- +----------------------------------------------------------------------------- + +module Plugins.Monitors.CatInt where + +import Plugins.Monitors.Common +import Plugins.Monitors.CoreCommon + +catIntConfig :: IO MConfig +catIntConfig = mkMConfig "" ["v"] + +runCatInt :: FilePath -> [String] -> Monitor String +runCatInt p _ = + let failureMessage = "Cannot read: " ++ (show p) + fmt x = show (truncate x :: Int) + in checkedDataRetrieval failureMessage [[p]] Nothing id fmt -- cgit v1.2.3