added lenses to PWPolicy
This commit is contained in:
parent
caf669fef7
commit
3853a32259
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user