You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like headerContentID is not a valid Lens, because parse failure maps to Nothing, whilst setting Nothing removes the header in question from the list of headers. Thus set l (view l s) s = s is violated. Perhaps consider making it a Traversal' a ContentID instead?
> import Data.MIME> import Data.IMF.Syntax> import Data.String>let l = headerContentID
>let s =Headers [(mk (fromString "Message-ID"), fromString "! unparseable !")]
> import Control.Lens> set l (view l s) s
Headers[]> s
Headers [("Message-ID","! unparseable !")]
It looks like
headerContentID
is not a validLens
, because parse failure maps toNothing
, whilst settingNothing
removes the header in question from the list of headers. Thusset l (view l s) s = s
is violated. Perhaps consider making it aTraversal' a ContentID
instead?(Using
Message-ID
in this example because of #75)purebred-email/src/Data/MIME.hs
Lines 922 to 926 in 84ab531
The text was updated successfully, but these errors were encountered: