!u      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownNoneSX    4Dennis Gosnell 2017BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownNone&'./124567>SXݫ servant-checked-exceptions-coreThis  . type is a used as a wrapper around either an < with an error or a successful value. It is similar to an  e a, but where the e is specialized to  es'. The most important difference from  is the the  and  instances. Given an   '[, ] ()(, we know that the envelope could be a   and contain (). Or it could be a   that contains either a  or a 6. It might be simpler to think of it as a type like   (  ()).An   can be created with the   and  functions. The s , , and % can be used to get values out of an  . servant-checked-exceptions-core Create an   from a member of the .'For instance, here is how to create an   that contains a :let double = 3.5 :: Double:toErrEnvelope double :: Envelope '[String, Double, Int] ()ErrEnvelope (Identity 3.5)servant-checked-exceptions-coreThis is a function to create a  .3toSuccEnvelope "hello" :: Envelope '[Double] StringSuccEnvelope "hello"servant-checked-exceptions-core is   lifted up to an .3pureErrEnvelope 'c' :: Maybe (Envelope '[Char] Int)!Just (ErrEnvelope (Identity 'c'))servant-checked-exceptions-core is  lifted up to an .2pureSuccEnvelope 3 :: Maybe (Envelope '[Char] Int)Just (SuccEnvelope 3)servant-checked-exceptions-coreCase analysis for  s.Examples$Here is an example of matching on a  :Blet env = toSuccEnvelope "hello" :: Envelope '[Double, Int] String&envelope (const "not a String") id env"hello"$Here is an example of matching on a  :let double = 3.5 :: DoubleAlet env' = toErrEnvelope double :: Envelope '[Double, Int] String'envelope (const "not a String") id env'"not a String"servant-checked-exceptions-core Similar to liftA28, but more general. This allows you to operate on two  0s with different sets of errors. The resulting  6 is a combination of the errors in each of the input  s.ExamplesClet env1 = toSuccEnvelope "hello" :: Envelope '[Double, Int] String=let env2 = toSuccEnvelope " world" :: Envelope '[Char] StringEliftA2Envelope (<>) env1 env2 :: Envelope '[Double, Int, Char] StringSuccEnvelope "hello world"If either of the  s is an  , then return the  .Elet env3 = toErrEnvelope "some err" :: Envelope '[String, Double] Int3let env4 = toSuccEnvelope 1 :: Envelope '[Char] IntDliftA2Envelope (+) env3 env4 :: Envelope '[String, Double, Char] Int!ErrEnvelope (Identity "some err")<let env5 = toSuccEnvelope "hello" :: Envelope '[Char] String=let env6 = toErrEnvelope 3.5 :: Envelope '[(), Double] StringDliftA2Envelope (<>) env5 env6 :: Envelope '[Char, (), Double] StringErrEnvelope (Identity 3.5)If both of the  s is an  0, then short-circuit and only return the first  .=let env7 = toErrEnvelope 3.5 :: Envelope '[(), Double] String<let env8 = toErrEnvelope 'x' :: Envelope '[Int, Char] StringIliftA2Envelope (<>) env7 env8 :: Envelope '[(), Double, Int, Char] StringErrEnvelope (Identity 3.5)servant-checked-exceptions-core This is like  but for monadic bind ().This allows you to bind on   s that contain different errors.The resulting  2 must have a superset of the errors in two input  s.ExamplesClet env1 = toSuccEnvelope "hello" :: Envelope '[Double, Int] String@let f1 str = toSuccEnvelope (length str) :: Envelope '[Char] Int9bindEnvelope env1 f1 :: Envelope '[Double, Int, Char] IntSuccEnvelope 5If either of the  s is an  , then return the  .Elet env2 = toErrEnvelope "some err" :: Envelope '[String, Double] Int9let f2 i = toSuccEnvelope (i + 1) :: Envelope '[Char] Int<bindEnvelope env2 f2 :: Envelope '[String, Double, Char] Int!ErrEnvelope (Identity "some err")<let env3 = toSuccEnvelope "hello" :: Envelope '[Char] String:let f3 _ = toErrEnvelope 3.5 :: Envelope '[(), Double] Int8bindEnvelope env3 f3 :: Envelope '[Char, (), Double] IntErrEnvelope (Identity 3.5)If both of the  s is an  0, then short-circuit and only return the first  .=let env4 = toErrEnvelope 3.5 :: Envelope '[(), Double] String<let f4 _ = toErrEnvelope 'x' :: Envelope '[Int, Char] String@bindEnvelope env4 f4 :: Envelope '[Char, (), Double, Int] StringErrEnvelope (Identity 3.5)servant-checked-exceptions-core Unwrap an   that cannot contain an error.Examples7let env = toSuccEnvelope "hello" :: Envelope '[] StringemptyEnvelope env"hello"servant-checked-exceptions-core Just like   but for  .Examples,Here is an example of successfully matching:Blet env = toSuccEnvelope "hello" :: Envelope '[Double, Int] String'fromEnvelope (const "not a String") env"hello".Here is an example of unsuccessfully matching:let double = 3.5 :: DoubleAlet env' = toErrEnvelope double :: Envelope '[Double, Int] String(fromEnvelope (const "not a String") env'"not a String"servant-checked-exceptions-coreLifted version of .servant-checked-exceptions-coreFlipped version of .servant-checked-exceptions-coreFlipped version of .servant-checked-exceptions-core Convert an   to an .servant-checked-exceptions-core Convert an  to an  .servant-checked-exceptions-coreLens-compatible  from   to .servant-checked-exceptions-coreLens-compatible  to pull out an a from a  .ExamplesUse  to construct an  :9review _SuccEnvelope "hello" :: Envelope '[Double] StringSuccEnvelope "hello"Use  to try to destruct an   into an a:=let env = toSuccEnvelope "hello" :: Envelope '[Double] String)preview _SuccEnvelope env :: Maybe String Just "hello"Use ( to try to destruct a 'Envelope into an a (unsuccessfully):let double = 3.5 :: Double<let env' = toErrEnvelope double :: Envelope '[Double] String*preview _SuccEnvelope env' :: Maybe StringNothingservant-checked-exceptions-coreLens-compatible  to pull out an  es from a  .Most users will not use , but instead .ExamplesUse  to construct an  :let string = "hello" :: StringGreview _ErrEnvelope (openUnionLift string) :: Envelope '[String] DoubleErrEnvelope (Identity "hello")Use  to try to destruct an   into an  es:let double = 3.5 :: Double7let env = toErrEnvelope double :: Envelope '[Double] ()7preview _ErrEnvelope env :: Maybe (OpenUnion '[Double])Just (Identity 3.5)Use ) to try to destruct a 'Envelope into an  es (unsuccessfully):5let env' = toSuccEnvelope () :: Envelope '[Double] ()8preview _ErrEnvelope env' :: Maybe (OpenUnion '[Double])Nothingservant-checked-exceptions-coreLens-compatible  to pull out a specific e from an  .Most users will use  instead of .ExamplesUse  to construct an  :let string = "hello" :: String:review _ErrEnvelopeErr string :: Envelope '[String] DoubleErrEnvelope (Identity "hello")Use  to try to destruct an   into an e:let double = 3.5 :: Double7let env = toErrEnvelope double :: Envelope '[Double] ()+preview _ErrEnvelopeErr env :: Maybe DoubleJust 3.5Use ) to try to destruct a 'Envelope into an e (unsuccessfully):5let env' = toSuccEnvelope () :: Envelope '[Double] (),preview _ErrEnvelopeErr env' :: Maybe DoubleNothing<let env'' = toErrEnvelope 'c' :: Envelope '[Double, Char] ()-preview _ErrEnvelopeErr env'' :: Maybe DoubleNothingservant-checked-exceptions-corePull out a specific e from an  .ExamplesSuccessfully pull out an e:let double = 3.5 :: Double7let env = toErrEnvelope double :: Envelope '[Double] ()$errEnvelopeMatch env :: Maybe DoubleJust 3.5Unsuccessfully pull out an e:5let env' = toSuccEnvelope () :: Envelope '[Double] ()%errEnvelopeMatch env' :: Maybe DoubleNothing<let env'' = toErrEnvelope 'c' :: Envelope '[Double, Char] ()&errEnvelopeMatch env'' :: Maybe DoubleNothing servant-checked-exceptions-core"An alternate case anaylsis for an  Q. This method uses a tuple containing handlers for each potential value of the  $. This is somewhat similar to the   function.When working with an  G with a large number of possible error types, it can be easier to use   than .Examples"Here is an example of handling an  E with two possible error values. Notice that a normal tuple is used:>let env = toSuccEnvelope 2.0 :: Envelope '[Int, String] Double4let intHandler = (\int -> show int) :: Int -> String2let strHandler = (\str -> str) :: String -> String>let succHandler = (\dbl -> "got a double") :: Double -> StringBcatchesEnvelope (intHandler, strHandler) succHandler env :: String"got a double""Here is an example of handling an  Z with two possible error values. Notice that a normal tuple is used to hold the handlers:Dlet env = toErrEnvelope (3 :: Int) :: Envelope '[Int, String] Double4let intHandler = (\int -> show int) :: Int -> String2let strHandler = (\str -> str) :: String -> String>let succHandler = (\dbl -> "got a double") :: Double -> StringBcatchesEnvelope (intHandler, strHandler) succHandler env :: String"3" Given an   like   '[, ] , the type of   becomes the following:    :: ( -> x,  -> x) -> ( -> x) ->   '[, ]  -> x "Here is an example of handling an  P with three possible values. Notice how a 3-tuple is used to hold the handlers:Plet env = toErrEnvelope ("hi" :: String) :: Envelope '[Int, String, Char] Double4let intHandler = (\int -> show int) :: Int -> String2let strHandler = (\str -> str) :: String -> String2let chrHandler = (\chr -> [chr]) :: Char -> String>let succHandler = (\dbl -> "got a double") :: Double -> StringNcatchesEnvelope (intHandler, strHandler, chrHandler) succHandler env :: String"hi" Given an   like   '[, , ] , the type of   becomes the following:    :: ( -> x,  -> x,  -> x) -> ( -> x) ->   '[, , ]  -> x "Here is an example of handling an  Y with only one possible error value. Notice that a normal handler is used (not a tuple):<let env = toErrEnvelope (3 :: Int) :: Envelope '[Int] Double4let intHandler = (\int -> show int) :: Int -> String>let succHandler = (\dbl -> "got a double") :: Double -> String4catchesEnvelope intHandler succHandler env :: String"3" Given an   like   '[] , the type of   becomes the following:    :: ( -> x) -> ( -> x) ->   '[]  -> x !servant-checked-exceptions-coreChange the errors type in an   to a larger set.let double = 3.5 :: Double>let env = toErrEnvelope double :: Envelope '[Double, Int] Char=relaxEnvelope env :: Envelope '[(), Int, Double, String] CharErrEnvelope (Identity 3.5)"servant-checked-exceptions-coreJThis function allows you to try to remove individual error types from an  .:This can be used to handle only certain error types in an  p, instead of having to handle all of them at the same time. This can be more convenient than a function like  .ExamplesPulling out an error in an  :Dlet env1 = toErrEnvelope "hello" :: Envelope '[String, Double] Float?envelopeRemove env1 :: Either (Envelope '[Double] Float) String Right "hello"#Failing to pull out an error in an  :Llet env2 = toErrEnvelope (3.5 :: Double) :: Envelope '[String, Double] Float?envelopeRemove env2 :: Either (Envelope '[Double] Float) String!Left (ErrEnvelope (Identity 3.5))Note that if you have an  S with multiple errors of the same type, they will all be handled at the same time:Zlet env3 = toErrEnvelope (3.5 :: Double) :: Envelope '[String, Double, Char, Double] FloatEenvelopeRemove env3 :: Either (Envelope '[String, Char] Float) Double Right 3.5 ! gets passed through as expected:Alet env4 = toSuccEnvelope 3.5 :: Envelope '[String, Double] Float?envelopeRemove env4 :: Either (Envelope '[Double] Float) StringLeft (SuccEnvelope 3.5)#servant-checked-exceptions-coreHandle a single case in an  . This is similar to * but lets you handle any case within the  , not just the first one.ExamplesHandling the first item in an  :<let env1 = toErrEnvelope 3.5 :: Envelope '[Double, Int] Char*let printDouble = print :: Double -> IO ()5let printEnv = print :: Envelope '[Int] Char -> IO ()(envelopeHandle printEnv printDouble env13.5Handling a middle item in an  :Olet env2 = toErrEnvelope (3.5 :: Double) :: Envelope '[Char, Double, Int] Float<let printEnv = print :: Envelope '[Char, Int] Float -> IO ()(envelopeHandle printEnv printDouble env23.5 Failing to handle an item in an  ". In the following example, the printEnv function is called:Clet env3 = toErrEnvelope 'c' :: Envelope '[Char, Double, Int] Float<let printEnv = print :: Envelope '[Char, Int] Float -> IO ()(envelopeHandle printEnv printDouble env3ErrEnvelope (Identity 'c')If you have duplicates in your  4, they will both get handled with a single call to  unionHandle.Dlet env4 = toErrEnvelope 3.5 :: Envelope '[Double, Double, Int] Char5let printEnv = print :: Envelope '[Int] Char -> IO ()(envelopeHandle printEnv printDouble env43.5 ! gets passed through as expected:Alet env5 = toSuccEnvelope 3.5 :: Envelope '[String, Double] Float9let printEnv = print :: Envelope '[String] Float -> IO ()(envelopeHandle printEnv printDouble env5SuccEnvelope 3.5)servant-checked-exceptions-core'This is only a valid instance when the  instances for the es don't overlap.1For an explanation, see the documentation on the  instance for  .*servant-checked-exceptions-coreThis  instance encodes an  A as an object with one of two keys depending on whether it is a   or an  .Here is an example of a  :let string = "hello" :: String<let env = toSuccEnvelope string :: Envelope '[Double] StringputByteStrLn $ encode env{"data":"hello"}Here is an example of a  :let double = 3.5 :: Double<let env' = toErrEnvelope double :: Envelope '[Double] StringputByteStrLn $ encode env' {"err":3.5}  !"#  !"#Dennis Gosnell 2019BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownNone&'./124567=>?@APSXjf7servant-checked-exceptions-coreThis is  for 4.5pureSuccEnvT "hello" :: EnvelopeT '[] Identity String+EnvelopeT (Identity (SuccEnvelope "hello"))8servant-checked-exceptions-coreThrow an error in an  .let double = 3.5 :: DoubleCthrowErrEnvT double :: EnvelopeT '[String, Double, Int] Identity ()1EnvelopeT (Identity (ErrEnvelope (Identity 3.5)))This is similar to C, but is specialized so you can throw just one of the error types.9servant-checked-exceptions-coreCase analysis for 4.Examples$Here is an example of matching on a  :Blet env = pure "hello" :: EnvelopeT '[Double, Int] Identity String6envelopeT (\_ -> Identity "not a String") Identity envIdentity "hello"$Here is an example of matching on a  :let double = 3.5 :: DoubleJlet env' = throwErrEnvT double :: EnvelopeT '[Double, Int] Identity String7envelopeT (\_ -> Identity "not a String") Identity env'Identity "not a String":servant-checked-exceptions-coreSlight simplification of 9.Examples,Here is an example of successfully matching:Blet env = pure "hello" :: EnvelopeT '[Double, Int] Identity String,fromEnvT (\_ -> Identity "not a String") envIdentity "hello".Here is an example of unsuccessfully matching:let double = 3.5 :: DoubleJlet env' = throwErrEnvT double :: EnvelopeT '[Double, Int] Identity String-fromEnvT (\_ -> Identity "not a String") env'Identity "not a String";servant-checked-exceptions-coreFlipped version of :.<servant-checked-exceptions-coreTry to pull out a specific e from an  .ExamplesSuccessfully pull out an e:let double = 3.5 :: DoubleFlet env = throwErrEnvT double :: EnvelopeT '[Double, Char] Identity ()+errEnvTMatch env :: Identity (Maybe Double)Identity (Just 3.5)Unsuccessfully pull out an e:=let env' = pure () :: EnvelopeT '[String, Double] Identity (),errEnvTMatch env' :: Identity (Maybe Double)Identity Nothing=servant-checked-exceptions-core"An alternate case anaylsis for an 4\. This method uses a tuple containing handlers for each potential value of the underlying  #. This is somewhat similar to the   function.When working with an  G with a large number of possible error types, it can be easier to use = than 9.Examples"Here is an example of handling an  E with two possible error values. Notice that a normal tuple is used:8let env = pure 2.0 :: EnvelopeT '[Int, String] IO Double>let intHandler = (\int -> pure $ show int) :: Int -> IO String:let strHandler = (\str -> pure str) :: String -> IO StringFlet succHandler = (\dbl -> pure "got a double") :: Double -> IO StringAcatchesEnvT (intHandler, strHandler) succHandler env :: IO String"got a double""Here is an example of handling an  Z with two possible error values. Notice that a normal tuple is used to hold the handlers:Mlet env = throwErrEnvT (3 :: Int) :: EnvelopeT '[Int, String] Identity DoubleHlet intHandler = (\int -> Identity $ show int) :: Int -> Identity StringDlet strHandler = (\str -> Identity str) :: String -> Identity StringPlet succHandler = (\dbl -> Identity "got a double") :: Double -> Identity StringGcatchesEnvT (intHandler, strHandler) succHandler env :: Identity String Identity "3" Given an 4 like 4 '[, ]  , the type of = becomes the following:  = :: ( ->  x,  ->  x) -> ( ->  x) -> 4 '[, ]   ->  x "Here is an example of handling an  P with three possible values. Notice how a 3-tuple is used to hold the handlers:Slet env = throwErrEnvT ("hi" :: String) :: EnvelopeT '[Int, String, Char] IO Double>let intHandler = (\int -> pure $ show int) :: Int -> IO String:let strHandler = (\str -> pure str) :: String -> IO String:let chrHandler = (\chr -> pure [chr]) :: Char -> IO StringFlet succHandler = (\dbl -> pure "got a double") :: Double -> IO StringMcatchesEnvT (intHandler, strHandler, chrHandler) succHandler env :: IO String"hi" Given an   like 4 '[, , ]  , the type of = becomes the following:  = :: ( ->  x,  ->  x,  ->  x) -> ( ->  x) -> 4 '[, , ]   -> x >servant-checked-exceptions-core Convert an 4 to an .?servant-checked-exceptions-core Convert an  to an 4.@servant-checked-exceptions-coreSafely unwrap an 4.4let myenvT = pure "hello" :: EnvelopeT '[] IO StringemptyEnvT myenvT :: IO String"hello"Aservant-checked-exceptions-coreChange the errors type in an 4 to a larger set.Exampleslet double = 3.5 :: DoubleJlet envT1 = throwErrEnvT double :: EnvelopeT '[Int, Double] Identity FloatHrelaxEnvT envT1 :: EnvelopeT '[Char, Int, String, Double] Identity Float1EnvelopeT (Identity (ErrEnvelope (Identity 3.5)))Alet envT2 = pure double :: EnvelopeT '[Char, Int] Identity DoubleErelaxEnvT envT2 :: EnvelopeT '[(), Char, String, Int] Identity Double'EnvelopeT (Identity (SuccEnvelope 3.5))Bservant-checked-exceptions-core Combine two 4Bs. Generalize the set of errors to include the errors from both 4s. Similar to liftA2 but more general.ExamplesClet env1 = pure "hello" :: EnvelopeT '[Double, Int] Identity String>let env2 = pure " world" :: EnvelopeT '[Char] Identity StringKliftA2EnvT (<>) env1 env2 :: EnvelopeT '[Double, Int, Char] Identity String1EnvelopeT (Identity (SuccEnvelope "hello world"))If either of the  s is an  , then return the  .Nlet env3 = throwErrEnvT "some err" :: EnvelopeT '[String, Double] Identity Int4let env4 = pure 1 :: EnvelopeT '[Char] Identity IntJliftA2EnvT (+) env3 env4 :: EnvelopeT '[String, Double, Char] Identity Int8EnvelopeT (Identity (ErrEnvelope (Identity "some err")))<let env5 = pure "hello" :: EnvelopeT '[Char] Identity StringFlet env6 = throwErrEnvT 3.5 :: EnvelopeT '[(), Double] Identity StringJliftA2EnvT (<>) env5 env6 :: EnvelopeT '[Char, (), Double] Identity String1EnvelopeT (Identity (ErrEnvelope (Identity 3.5)))If both of the 4s is an  0, then short-circuit and only return the first  .Flet env7 = throwErrEnvT 4.5 :: EnvelopeT '[(), Double] Identity StringElet env8 = throwErrEnvT 'x' :: EnvelopeT '[Int, Char] Identity StringOliftA2EnvT (<>) env7 env8 :: EnvelopeT '[(), Double, Int, Char] Identity String1EnvelopeT (Identity (ErrEnvelope (Identity 4.5)))Cservant-checked-exceptions-core This is like B but for monadic bind ().This allows you to bind on 4 s that contain different errors.The resulting 42 must have a superset of the errors in two input 4s.ExamplesClet env1 = pure "hello" :: EnvelopeT '[Double, Int] Identity String@let f1 str = pure (length str) :: EnvelopeT '[Char] Identity Int?bindEnvT env1 f1 :: EnvelopeT '[Double, Int, Char] Identity Int%EnvelopeT (Identity (SuccEnvelope 5))If either of the 4 s holds an  , then return the  .Nlet env2 = throwErrEnvT "some err" :: EnvelopeT '[String, Double] Identity IntAlet f2 i = pureSuccEnvT (i + 1) :: EnvelopeT '[Char] Identity IntBbindEnvT env2 f2 :: EnvelopeT '[String, Double, Char] Identity Int8EnvelopeT (Identity (ErrEnvelope (Identity "some err")))Dlet env3 = pureSuccEnvT "hello" :: EnvelopeT '[Char] Identity StringClet f3 _ = throwErrEnvT 3.5 :: EnvelopeT '[(), Double] Identity Int>bindEnvT env3 f3 :: EnvelopeT '[Char, (), Double] Identity Int1EnvelopeT (Identity (ErrEnvelope (Identity 3.5)))If both of the  s is an  0, then short-circuit and only return the first  .Clet env4 = throwErrEnvT 3.5 :: EnvelopeT '[(), Double] Maybe StringBlet f4 _ = throwErrEnvT 'x' :: EnvelopeT '[Int, Char] Maybe StringCbindEnvT env4 f4 :: EnvelopeT '[Char, (), Double, Int] Maybe String-EnvelopeT (Just (ErrEnvelope (Identity 3.5)))Dservant-checked-exceptions-coreJThis function allows you to try to remove individual error types from an 4.:This can be used to handle only certain error types in an  p, instead of having to handle all of them at the same time. This can be more convenient than a function like =.ExamplesPulling out an error in an 4:Mlet env1 = throwErrEnvT "hello" :: EnvelopeT '[String, Double] Identity FloatEenvTRemove env1 :: EnvelopeT '[Double] Identity (Either Float String)3EnvelopeT (Identity (SuccEnvelope (Right "hello")))#Failing to pull out an error in an 4:Ulet env2 = throwErrEnvT (3.5 :: Double) :: EnvelopeT '[String, Double] Identity FloatEenvTRemove env2 :: EnvelopeT '[Double] Identity (Either Float String)1EnvelopeT (Identity (ErrEnvelope (Identity 3.5)))Note that if you have an 4S with multiple errors of the same type, they will all be handled at the same time:clet env3 = throwErrEnvT (3.5 :: Double) :: EnvelopeT '[String, Double, Char, Double] Identity FloatKenvTRemove env3 :: EnvelopeT '[String, Char] Identity (Either Float Double)/EnvelopeT (Identity (SuccEnvelope (Right 3.5))) ! gets passed through as expected:Ilet env4 = pureSuccEnvT 3.5 :: EnvelopeT '[String, Double] Identity FloatEenvTRemove env4 :: EnvelopeT '[Double] Identity (Either Float String).EnvelopeT (Identity (SuccEnvelope (Left 3.5)))456789:;<=>?@ABCD456789:;<=>?@ABCDDennis Gosnell 2017BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownSafe-.HUVoTservant-checked-exceptions-core A type-level snoc.Append to an empty list:%Refl :: Snoc '[] Double :~: '[Double]ReflAppend to a non-empty list:/Refl :: Snoc '[Char] String :~: '[Char, String]ReflTTDennis Gosnell 2017BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownNone -.27HUVXservant-checked-exceptions-core Used by the  HasServer and  HasClient instances for Y es  api  apis to detect Y es followed immediately by [ e.Yservant-checked-exceptions-core<This is used internally and should not be used by end-users.Zservant-checked-exceptions-coreZr is used to indicate that an API will not throw an error, but that it will still return a response wrapped in a .ExamplesCreate an API using Z:$import Servant.API (Get, JSON, (:>))%type API = NoThrow :> Get '[JSON] IntEA servant-server handler for this type would look like the following:  apiHandler ::  ( '[] Int) apiHandler =  3 [servant-checked-exceptions-core[Z is used in Servant API definitions and signifies that an API will throw the given error.GHere is an example of how to create an API that potentially returns a  as an error, or an  on success:$import Servant.API (Get, JSON, (:>))+type API = Throws String :> Get '[JSON] IntUVWXYZ[[ZYXVWUDennis Gosnell 2017BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownNone-./=>?@AHPSUVX \servant-checked-exceptions-coreCreate samples for a given list of types, under given ctypes.AAdditional instances of this class should not need to be created.^servant-checked-exceptions-coreCreate a sample for a given e under given ctypes._servant-checked-exceptions-coreWe can generate a sample of an   es a8 as long as there is a way to generate a sample of the a.8This doesn't need to worry about generating a sample of es(, because that is taken care of in the  instance for Y es.`servant-checked-exceptions-coreWhen a [ e comes immediately after a Y es, T the e onto the es.aservant-checked-exceptions-coreWhen Z comes before a +, generate the documentation for the same , but returning an   '[].bservant-checked-exceptions-core Change a [ into Y.cservant-checked-exceptions-core3Create a response body for each of the error types.dservant-checked-exceptions-core&An empty list of types has no samples.eservant-checked-exceptions-coreWhen Y es comes before a +, generate the documentation for the same , but returning an   es-. Also add documentation for the potential es.\]^\]^Dennis Gosnell 2017BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownNoneQUVWXYZ[Dennis Gosnell 2017BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownSafe -.27HUV8fghijklmnopqrstuvwxyz{|}~~}|{zyxwvutsrqponmlkjihgfNoneNO  !"#456789:;<=>?@ABCDTUVWXYZ[fghijklmnopqrstuvwxyz{|}~None+  !"#456789:;<=>?@ABCD+   "#!456789:;<=@DABC>?Dennis Gosnell 2017BSD3(Dennis Gosnell (cdep.illabout@gmail.com) experimentalunknownNonex  !"#456789:;<=>?@ABCDVWZ[fghijklmnopqrstuvwxyz{|}~L[ZVW~}|{zyxwvutsrqponmlkjihgf   "#!456789:;<=@DABC>?NoneHfghijklmnopqrstuvwxyz{|}~~}|{zyxwvutsrqponmlkjihgf !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ >servant-checked-exceptions-core-2.2.0.0-JjWNBThNKuA7FPLuqPs8C0Servant.Checked.Exceptions)Servant.Checked.Exceptions.Internal.Prism,Servant.Checked.Exceptions.Internal.Envelope-Servant.Checked.Exceptions.Internal.EnvelopeT(Servant.Checked.Exceptions.Internal.Util/Servant.Checked.Exceptions.Internal.Servant.API0Servant.Checked.Exceptions.Internal.Servant.Docs)Servant.Checked.Exceptions.Internal.Verbs Data.Either fromEitherControl.Exceptioncatches)Servant.Checked.Exceptions.Internal.UnionUnionEnvelopeServantHandlerpureSuccEnvelope+Servant.Checked.Exceptions.Internal.Servant#Servant.Checked.Exceptions.Internal#Servant.Checked.Exceptions.Envelope Servant.Checked.Exceptions.Verbs(http-types-0.12.3-E5KSR7WXSnOHFYucAejn4UNetwork.HTTP.Types.StatusStatusPrism'PrismIsoisoprismprism'reviewpreview<>~ ErrEnvelope SuccEnvelope toErrEnvelopetoSuccEnvelopepureErrEnvelopeenvelopeliftA2Envelope bindEnvelope emptyEnvelope fromEnvelope fromEnvelopeMfromEnvelopeOrfromEnvelopeOrMenvelopeToEithereitherToEnvelopeisoEnvelopeEither _SuccEnvelope _ErrEnvelope_ErrEnvelopeErrerrEnvelopeMatchcatchesEnvelope relaxEnvelopeenvelopeRemoveenvelopeHandle$fSemigroupEnvelope$fMonadFixEnvelope$fMonadEnvelope$fApplicativeEnvelope$fShow1Envelope$fFromJSONEnvelope$fToJSONEnvelope$fFoldableEnvelope$fFunctorEnvelope$fGenericEnvelope$fTraversableEnvelope$fShowEnvelope$fReadEnvelope $fOrdEnvelope $fEqEnvelope$fDataEnvelope EnvelopeT runEnvelopeT pureSuccEnvT throwErrEnvT envelopeTfromEnvT fromEnvTOr errEnvTMatch catchesEnvT envTToExceptT exceptTToEnvT emptyEnvT relaxEnvT liftA2EnvTbindEnvT envTRemove$fMonadWriterwEnvelopeT$fMonadStatesEnvelopeT$fMonadReaderrEnvelopeT$fMonadErrorerrorEnvelopeT$fMonadRWSrwsEnvelopeT$fContravariantEnvelopeT$fTraversableEnvelopeT$fFoldableEnvelopeT$fMonadIOEnvelopeT$fMonadTransEnvelopeT$fMonadEnvelopeT$fApplicativeEnvelopeT$fShowEnvelopeT$fShow1EnvelopeT$fFunctorEnvelopeTSnoc AllErrStatus ErrStatus toErrStatusThrowingNonterminalThrowingNoThrowThrowsCreateRespBodiesForcreateRespBodiesForcreateRespBodyFor$fToSampleEnvelope$fHasDocsTYPE:>$fHasDocsTYPE:>0$fHasDocsTYPE:>1 $fCreateRespBodiesFor[][]:ctypes $fCreateRespBodiesFor[]k[]ctypes$fHasDocsTYPE:>2GetPartialContentWithErrPutResetContentWithErrPatchResetContentWithErrDeleteResetContentWithErrPostResetContentWithErrGetResetContentWithErrPutNoContentWithErrPatchNoContentWithErrDeleteNoContentWithErrPostNoContentWithErrGetNoContentWithErrPutNonAuthoritativeWithErrPatchNonAuthoritativeWithErrDeleteNonAuthoritativeWithErrPostNonAuthoritativeWithErrGetNonAuthoritativeWithErrPutAcceptedWithErrPatchAcceptedWithErrDeleteAcceptedWithErrPostAcceptedWithErrGetAcceptedWithErrPostCreatedWithErr PatchWithErr DeleteWithErr PutWithErr PostWithErr GetWithErr VerbWithErr$fGenericVerbWithErr*world-peace-1.0.0.0-FDhsoyMvIv39I9fwyC8ZO7Data.WorldPeace.Union OpenUnionbaseEither$aeson-1.4.4.0-HB9k66vrv0B9uTdwqdDf8TData.Aeson.Types.FromJSONFromJSONData.Aeson.Types.ToJSONToJSONGHC.BaseStringghc-prim GHC.TypesDouble Applicative>>=IntCharpure mtl-2.2.2Control.Monad.Error.Class throwErrorIOtransformers-0.5.5.0Control.Monad.Trans.ExceptExceptT%servant-0.16.1-LIdykvshrKCF00oeRFKZooServant.API.Sub:>*servant-docs-0.11.3-EkQVpsg2VtZ3zgGOOumN1MServant.Docs.InternalHasDocsServant.API.VerbsVerbopenUnionHandleopenUnionRemoverelaxOpenUnioncatchesOpenUnionopenUnionMatch openUnionLiftopenUnionPrismfromOpenUnionOr fromOpenUnion openUnion unionHandle unionRemove_That_This relaxUnion catchesUnionumap absurdUnionunionRIndexReturnXNatSZIsMemberContainsThisThatUElem unionPrism unionLift unionMatchRemove ElemRemoveData.WorldPeace.ProducttupleToOpenProducttupleToProductProductNilCons ToProduct OpenProduct ToOpenProduct