Skip to content

Commit

Permalink
Specialize ‘parser’ and ‘parserBs’
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Oct 29, 2017
1 parent 5aace61 commit 02c3897
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Text/URI/Parser/ByteString.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Data.Char
import Data.List (intercalate)
import Data.Maybe (isNothing, catMaybes, maybeToList)
import Data.Text (Text)
import Data.Void
import Data.Word (Word8)
import Text.Megaparsec
import Text.Megaparsec.Byte
Expand All @@ -51,6 +52,7 @@ parserBs = do
uriFragment <- optional pFragment
return URI {..}
{-# INLINEABLE parserBs #-}
{-# SPECIALIZE parserBs :: Parsec Void ByteString URI #-}

pScheme :: MonadParsec e ByteString m => m (RText 'Scheme)
pScheme = do
Expand Down
1 change: 1 addition & 0 deletions Text/URI/Parser/Text.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ parser = do
uriFragment <- optional pFragment
return URI {..}
{-# INLINEABLE parser #-}
{-# SPECIALIZE parser :: Parsec Void Text URI #-}

pScheme :: MonadParsec e Text m => m (RText 'Scheme)
pScheme = do
Expand Down

0 comments on commit 02c3897

Please sign in to comment.