Skip to content

Commit

Permalink
Fix headers + add trustworthy/safe (#27)
Browse files Browse the repository at this point in the history
* fix headers + add trustworthy/safe

* better docs

* better docs
  • Loading branch information
emilypi authored Jul 3, 2020
1 parent bb15f29 commit ff26914
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 87 deletions.
11 changes: 6 additions & 5 deletions src/Data/ByteString/Base64.hs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.ByteString.Base64
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64 encoding including
-- unpadded and lenient variants
-- This module contains 'Data.ByteString.ByteString'-valued combinators for
-- implementing the RFC 4648 specification of the Base64
-- encoding format. This includes lenient decoding variants, as well as
-- internal and external validation for canonicity.
--
module Data.ByteString.Base64
( encodeBase64
Expand Down
11 changes: 6 additions & 5 deletions src/Data/ByteString/Base64/URL.hs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.ByteString.Base64.URL
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64url encoding including
-- unpadded and lenient variants
-- This module contains 'Data.ByteString.ByteString'-valued combinators for
-- implementing the RFC 4648 specification of the Base64url
-- encoding format. This includes strictly padded/unpadded and lenient decoding
-- variants, as well as internal and external validation for canonicity.
--
module Data.ByteString.Base64.URL
( encodeBase64
Expand Down
11 changes: 6 additions & 5 deletions src/Data/ByteString/Lazy/Base64.hs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.ByteString.Lazy.Base64
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64 encoding including
-- unpadded and lenient variants
-- This module contains 'Data.ByteString.Lazy.ByteString'-valued combinators for
-- implementing the RFC 4648 specification of the Base64
-- encoding format. This includes lenient decoding variants, as well as
-- internal and external validation for canonicity.
--
module Data.ByteString.Lazy.Base64
( encodeBase64
Expand Down
10 changes: 6 additions & 4 deletions src/Data/ByteString/Lazy/Base64/URL.hs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.ByteString.Lazy.Base64.URL
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64url encoding including
-- unpadded and lenient variants
-- This module contains 'Data.ByteString.Lazy.ByteString'-valued combinators for
-- implementing the RFC 4648 specification of the Base64url
-- encoding format. This includes strictly padded/unpadded and lenient
-- decoding variants, as well as internal and external validation for canonicity.
--
module Data.ByteString.Lazy.Base64.URL
( encodeBase64
Expand Down
12 changes: 7 additions & 5 deletions src/Data/ByteString/Short/Base64.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.ByteString.Short.Base64
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64 encoding including
-- unpadded and lenient variants
-- This module contains 'Data.ByteString.Short.ShortByteString'-valued combinators for
-- implementing the RFC 4648 specification of the Base64
-- encoding format. This includes lenient decoding variants, as well as
-- internal and external validation for canonicity.
--
module Data.ByteString.Short.Base64
( encodeBase64
Expand All @@ -27,7 +29,7 @@ import Data.Text (Text)
import Data.Text.Short (ShortText)
import Data.Text.Short.Unsafe (fromShortByteStringUnsafe)

-- | Encode a 'ShortByteString' value as Base64 'Text' with padding.
-- | Encode a 'ShortByteString' value as Base64 'ShortText' with padding.
--
-- See: <https://tools.ietf.org/html/rfc4648#section-4 RFC-4648 section 4>
--
Expand Down
10 changes: 6 additions & 4 deletions src/Data/ByteString/Short/Base64/URL.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.ByteString.Short.Base64.URL
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64url encoding including
-- unpadded and lenient variants
-- This module contains 'Data.ByteString.Short.ShortByteString'-valued combinators for
-- implementing the RFC 4648 specification of the Base64url
-- encoding format. This includes strictly padded/unpadded and lenient decoding
-- variants, as well as internal and external validation for canonicity.
--
module Data.ByteString.Short.Base64.URL
( encodeBase64
Expand Down
19 changes: 10 additions & 9 deletions src/Data/Text/Encoding/Base64.hs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Safe #-}
-- |
-- Module : Data.Text.Encoding.Base64
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Portability : non-portable
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64 encoding including
-- unpadded and lenient variants
-- This module contains 'Data.Text.Text'-valued combinators for
-- implementing the RFC 4648 specification of the Base64
-- encoding format. This includes lenient decoding variants, as well as
-- internal and external validation for canonicity.
--
module Data.Text.Encoding.Base64
( encodeBase64
Expand Down
11 changes: 6 additions & 5 deletions src/Data/Text/Encoding/Base64/Error.hs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{-# LANGUAGE Safe #-}
-- |
-- Module : Data.Text.Encoding.Base64.Error
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Portability : non-portable
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the error types raised (not as exceptions!)
-- in the decoding process.
Expand Down
19 changes: 10 additions & 9 deletions src/Data/Text/Encoding/Base64/URL.hs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Safe #-}
-- |
-- Module : Data.Text.Encoding.Base64.URL
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Portability : non-portable
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64url encoding including
-- unpadded and lenient variants
-- This module contains 'Data.Text.Text'-valued combinators for
-- implementing the RFC 4648 specification of the Base64url
-- encoding format. This includes strictly padded/unpadded and lenient decoding
-- variants, as well as internal and external validation for canonicity.
--
module Data.Text.Encoding.Base64.URL
( encodeBase64
Expand Down
18 changes: 10 additions & 8 deletions src/Data/Text/Lazy/Encoding/Base64.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{-# LANGUAGE Safe #-}
-- |
-- Module : Data.Text.Lazy.Encoding.Base64
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Portability : non-portable
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64 encoding including
-- unpadded and lenient variants
-- This module contains 'Data.Text.Lazy.Text'-valued combinators
-- implementing the RFC 4648 specification for the Base64
-- encoding format. This includes lenient decoding variants, and
-- external + internal validations for canonicity.
--
module Data.Text.Lazy.Encoding.Base64
( encodeBase64
Expand Down
18 changes: 10 additions & 8 deletions src/Data/Text/Lazy/Encoding/Base64/URL.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{-# LANGUAGE Safe #-}
-- |
-- Module : Data.Text.Lazy.Encoding.Base64.URL
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Portability : non-portable
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64url encoding including
-- unpadded and lenient variants
-- This module contains 'Data.Text.Lazy.Text'-valued combinators for
-- implementing the RFC 4648 specification of the Base64url
-- encoding format. This includes strictly padded/unpadded and lenient decoding
-- variants, as well as internal and external validation for canonicity.
--
module Data.Text.Lazy.Encoding.Base64.URL
( encodeBase64
Expand Down
25 changes: 13 additions & 12 deletions src/Data/Text/Short/Encoding/Base64.hs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.Text.Encoding.Base64
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64 encoding including
-- unpadded and lenient variants
-- Module : Data.Text.Short.Encoding.Base64
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : stable
-- Portability : non-portable
--
-- This module contains 'Data.Text.Short.ShortText'-valued combinators
-- implementing the RFC 4648 specification for the Base64
-- encoding format. This includes lenient decoding variants, and
-- external + internal validations for canonicity.
--
module Data.Text.Short.Encoding.Base64
( encodeBase64
Expand Down
18 changes: 10 additions & 8 deletions src/Data/Text/Short/Encoding/Base64/URL.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Data.Text.Short.Encoding.Base64.URL
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
-- Copyright : (c) 2019-2020 Emily Pillmore
-- License : BSD-style
--
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : Experimental
-- Portability : non-portable
-- Maintainer : Emily Pillmore <[email protected]>
-- Stability : stable
-- Portability : non-portable
--
-- This module contains the combinators implementing the
-- RFC 4648 specification for the Base64url encoding including
-- unpadded and lenient variants
-- This module contains 'Data.Text.Short.ShortText'-valued combinators
-- implementing the RFC 4648 specification for the Base64url
-- encoding format. This includes strictly padded/unpadded and lenient
-- decoding variants, and external + internal validations for canonicity.
--
module Data.Text.Short.Encoding.Base64.URL
( encodeBase64
Expand Down

0 comments on commit ff26914

Please sign in to comment.