Permalink
Browse files

fix typo breaking underscoreFields

  • Loading branch information...
1 parent e517b48 commit ea44bea6c4165079b8697c5464fc1ff97ec04503 @mikeplus64 mikeplus64 committed Feb 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Control/Lens/TH.hs
@@ -790,7 +790,7 @@ underscoreFields = FieldRules prefix rawLens niceLens classNaming
prefix ('_':xs) | '_' `List.elem` xs = Just (takeWhile (/= '_') xs)
prefix _ = Nothing
rawLens x = x ++ "_lens"
- niceLens x = prefix x <&> \n -> drop (length n + 2) n
+ niceLens x = prefix x <&> \n -> drop (length n + 2) x
classNaming x = niceLens x <&> ("Has_" ++)
-- | Field rules for fields in the form @ prefixFieldname @

0 comments on commit ea44bea

Please sign in to comment.