From 2e411664ce8da96fd50340b1ecb9e6e2e16f6ca2 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 26 Mar 2016 20:29:15 +0100 Subject: Parse durations --- Data/ConfigManager/Types/Internal.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Data/ConfigManager/Types/Internal.hs') diff --git a/Data/ConfigManager/Types/Internal.hs b/Data/ConfigManager/Types/Internal.hs index c4d5d0e..4459b01 100644 --- a/Data/ConfigManager/Types/Internal.hs +++ b/Data/ConfigManager/Types/Internal.hs @@ -4,10 +4,11 @@ module Data.ConfigManager.Types.Internal , Name , Value , Requirement(..) + , Configured + , convert ) where import Data.Text (Text) - import Data.HashMap.Strict -- | Configuration data. @@ -37,3 +38,9 @@ data Requirement = Required | Optional deriving (Eq, Read, Show) + +-- | This class represents types that can be converted /from/ a value /to/ a +-- destination type + +class Configured a where + convert :: Value -> Maybe a -- cgit v1.2.3