diff --git a/examples/deploy/Deploy/Cmd.hs b/examples/deploy/Deploy/Cmd.hs
--- a/examples/deploy/Deploy/Cmd.hs
+++ b/examples/deploy/Deploy/Cmd.hs
@@ -169,33 +169,33 @@
 
 p_host_arg :: Parser HostID
 p_host_arg =
-    argument (eitherReader $ maybe (fail "host not recognised") return . decode)
+    argument (eitherReader $ maybe (Left "host not recognised") return . decode)
         $  metavar "HOST"
         <> help    "a host ID"
 
 p_host :: Parser HostID
 p_host =
-    option (eitherReader $ maybe (fail "host not recognised") return . decode)
+    option (eitherReader $ maybe (Left "host not recognised") return . decode)
         $  long "host"
         <> metavar "HOST"
         <> help    "a host ID"
 
 p_section :: Parser SectionID
 p_section =
-    option (eitherReader $ maybe (fail "section not recognised") return . decode)
+    option (eitherReader $ maybe (Left "section not recognised") return . decode)
         $  long "section"
         <> metavar "SECTION"
         <> help "a section ID"
 
 p_a_section :: Parser SectionID
 p_a_section =
-    argument (eitherReader $ maybe (fail "section not recognised") return . decode)
+    argument (eitherReader $ maybe (Left "section not recognised") return . decode)
         $  metavar "SECTION"
         <> help    "a section ID"
 
 p_key :: Parser KeyID
 p_key =
-    option (eitherReader $ maybe (fail "key not recognised") return . decode)
+    option (eitherReader $ maybe (Left "key not recognised") return . decode)
         $  long     "key"
         <> metavar  "KEY"
         <> help     "a key ID"
diff --git a/keystore.cabal b/keystore.cabal
--- a/keystore.cabal
+++ b/keystore.cabal
@@ -1,5 +1,5 @@
 Name:                   keystore
-Version:                0.8.1.1
+Version:                0.8.2.0
 Synopsis:               Managing stores of secret things
 Homepage:               http://github.com/cdornan/keystore
 Author:                 Chris Dornan
diff --git a/src/Data/KeyStore/KS.hs b/src/Data/KeyStore/KS.hs
--- a/src/Data/KeyStore/KS.hs
+++ b/src/Data/KeyStore/KS.hs
@@ -385,7 +385,7 @@
            -> Key
            -> EncrypedCopy
            -> KS Key
-load_key'' nm_s nm key@Key{..} ec =
+load_key'' nm_s nm key ec =
     case nm `elem` nm_s of
       True  -> return key
       False ->
diff --git a/src/Data/KeyStore/PasswordManager.hs b/src/Data/KeyStore/PasswordManager.hs
--- a/src/Data/KeyStore/PasswordManager.hs
+++ b/src/Data/KeyStore/PasswordManager.hs
@@ -878,7 +878,7 @@
     ct_bs = _Binary $ _SecretData _asd_secret_data
 
 get_key :: PW p => PMConfig p -> IO AESKey
-get_key pmc@PMConfig{..} = get_key' pmc >>= maybe (not_logged_in_err pmc) return
+get_key pmc = get_key' pmc >>= maybe (not_logged_in_err pmc) return
 
 not_logged_in_err :: PW p => PMConfig p -> IO a
 not_logged_in_err pmc@PMConfig{..} = do
@@ -1224,7 +1224,7 @@
 
 p_pw_id_opt :: PW p => Parser p
 p_pw_id_opt =
-    option (eitherReader $ maybe (fail "password-id not recognised") return . parsePwName . PasswordName . T.pack)
+    option (eitherReader $ maybe (Left "password-id not recognised") return . parsePwName . PasswordName . T.pack)
         $  long    "id"
         <> short   'p'
         <> metavar "PASSWORD-ID"
@@ -1236,7 +1236,7 @@
 p_comment = unwords <$> many p_word
 
 p_hash :: Parser ()
-p_hash = argument (eitherReader $ \s->if s=="#" then return () else fail "# expected") $ metavar "#"
+p_hash = argument (eitherReader $ \s->if s=="#" then return () else Left "# expected") $ metavar "#"
 
 h_info :: Parser a -> InfoMod a -> ParserInfo a
 h_info pr = O.info (helper <*> pr)
@@ -1262,7 +1262,7 @@
 
 p_pw_id :: PW p => Parser p
 p_pw_id =
-    argument (eitherReader $ maybe (fail "bad password syntax") return . parsePwName . PasswordName . T.pack)
+    argument (eitherReader $ maybe (Left "bad password syntax") return . parsePwName . PasswordName . T.pack)
         $  metavar "PASSWORD-ID"
         <> help    "a password ID"
 
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,13 +1,10 @@
-resolver: lts-12.22
-install-ghc: true
+resolver: nightly-2020-12-07
 ghc-options:
     "$locals": -Werror
-flags: {}
 packages:
 - '.'
-system-ghc: false
+flags:
+  cryptonite:
+    use_target_attributes: false
 extra-deps:
-  - api-tools-0.8.0.2
-  - serialise-0.2.1.0
   - pbkdf-1.1.1.0
-  - regex-1.0.2.0
