indent-wheres

DescriptionWhether to full-indent or half-indent 'where' bindings past the preceding body
TypeBool
Defaultfalse
Ormolutrue
Sincev0.2.0.0

Examples

setPassword :: String -> String -> IO ()
setPassword username password = do
    user <- getUser username >>= maybe userNotFound pure
    hash <- hashPassword password
    saveUser user{userPasswordHash = hash}
  where
    userNotFound = error $ "User not found: " ++ username
setPassword :: String -> String -> IO ()
setPassword username password = do
    user <- getUser username >>= maybe userNotFound pure
    hash <- hashPassword password
    saveUser user{userPasswordHash = hash}
    where
        userNotFound = error $ "User not found: " ++ username

For more examples, see the test files.

See also