added lenses to PWPolicy

This commit is contained in:
Jonathan Lamothe 2018-12-12 17:04:23 -05:00
parent caf669fef7
commit 3853a32259

View File

@ -22,11 +22,18 @@ License along with this program. If not, see
-}
{-# LANGUAGE TemplateHaskell #-}
module Password (
-- * Data Types
PWPolicy (..)
PWPolicy (..),
-- ** Lenses
-- $lenses
pwLength, pwUpper, pwLower, pwDigits, pwSpecial
) where
import Control.Lens (makeLenses)
-- | defines a password policy
data PWPolicy = PWPolicy
{ _pwLength :: Int
@ -42,4 +49,11 @@ data PWPolicy = PWPolicy
-- if @"Nothing"@)
} deriving (Eq, Show)
-- $lenses The following functions are automatically generated by
-- @makeLenses@. See the
-- [lens](http://hackage.haskell.org/package/lens) package for further
-- details.
makeLenses ''PWPolicy
--jl