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 (
|
module Password (
|
||||||
-- * Data Types
|
-- * Data Types
|
||||||
PWPolicy (..)
|
PWPolicy (..),
|
||||||
|
-- ** Lenses
|
||||||
|
-- $lenses
|
||||||
|
pwLength, pwUpper, pwLower, pwDigits, pwSpecial
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Control.Lens (makeLenses)
|
||||||
|
|
||||||
-- | defines a password policy
|
-- | defines a password policy
|
||||||
data PWPolicy = PWPolicy
|
data PWPolicy = PWPolicy
|
||||||
{ _pwLength :: Int
|
{ _pwLength :: Int
|
||||||
|
@ -42,4 +49,11 @@ data PWPolicy = PWPolicy
|
||||||
-- if @"Nothing"@)
|
-- if @"Nothing"@)
|
||||||
} deriving (Eq, Show)
|
} 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
|
--jl
|
||||||
|
|
Loading…
Reference in New Issue
Block a user