Signed-off-by: Petr Pudlak <[email protected]>
---
 src/Ganeti/THH.hs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/Ganeti/THH.hs b/src/Ganeti/THH.hs
index 27b3c17..ce51826 100644
--- a/src/Ganeti/THH.hs
+++ b/src/Ganeti/THH.hs
@@ -73,6 +73,7 @@ module Ganeti.THH ( declareSADT
                   , buildParam
                   , genException
                   , excErrMsg
+                  , ssconfConstructorName
                   ) where
 
 import Control.Arrow ((&&&), second)
@@ -1547,3 +1548,7 @@ genLoadExc tname sname opdefs = do
   let clause2 = Clause [VarP arg_else] (NormalB fail_type) []
   sigt <- [t| JSON.JSValue -> JSON.Result $(conT tname) |]
   return $ (SigD fname sigt, FunD fname [clause1, clause2])
+
+-- | Compute the ssconf constructor name from its file name.
+ssconfConstructorName :: String -> String
+ssconfConstructorName = camelCase . ("s_s_" ++)
-- 
2.4.3.573.g4eafbef

Reply via email to