diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-01 17:49:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-01 17:57:31 -0400 |
commit | a8fb97d2ce8e75b36b8e1572a83efd341e67d43e (patch) | |
tree | ab24a8af581281ff8b006309acfb4000317ad072 /TrustLevel.hs | |
parent | 7a3d9d8c2e2bd53d0d4290e99186c6e37f18456d (diff) |
Add --trust, --untrust, and --semitrust options.
Diffstat (limited to 'TrustLevel.hs')
-rw-r--r-- | TrustLevel.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/TrustLevel.hs b/TrustLevel.hs new file mode 100644 index 000000000..5da142ca3 --- /dev/null +++ b/TrustLevel.hs @@ -0,0 +1,23 @@ +{- git-annex trust levels + - + - Copyright 2010 Joey Hess <joey@kitenet.net> + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module TrustLevel ( + TrustLevel(..), +) where + +data TrustLevel = SemiTrusted | UnTrusted | Trusted + deriving Eq + +instance Show TrustLevel where + show SemiTrusted = "?" + show UnTrusted = "0" + show Trusted = "1" + +instance Read TrustLevel where + readsPrec _ "1" = [(Trusted, "")] + readsPrec _ "0" = [(UnTrusted, "")] + readsPrec _ _ = [(SemiTrusted, "")] |