rest-gen 0.16.1.4 → 0.16.1.5
raw patch · 3 files changed
+10/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- rest-gen.cabal +1/−1
- src/Rest/Gen/Haskell.hs +5/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +#### 0.16.1.5++* Haskell: Escape special characters in parameter names+ #### 0.16.1.4 * Allow Cabal 1.22.*.
rest-gen.cabal view
@@ -1,5 +1,5 @@ name: rest-gen-version: 0.16.1.4+version: 0.16.1.5 description: Documentation and client generation from rest definition. synopsis: Documentation and client generation from rest definition. maintainer: code@silk.co
src/Rest/Gen/Haskell.hs view
@@ -4,6 +4,7 @@ , LambdaCase , PatternGuards , TemplateHaskell+ , ViewPatterns #-} module Rest.Gen.Haskell ( HaskellContext (..)@@ -337,7 +338,10 @@ hsName (x : xs) = H.Ident $ cleanHsName $ downFirst x ++ concatMap upFirst xs cleanHsName :: String -> String-cleanHsName s = if s `elem` reservedNames then s ++ "_" else s+cleanHsName s =+ if s `elem` reservedNames+ then s ++ "_"+ else intercalate "" . cleanName $ s where reservedNames = ["as","case","class","data","instance","default","deriving","do"