Skip to content

Commit a0ee260

Browse files
committed
Fix accidental loss of try in URIRef parser
1 parent ed35231 commit a0ee260

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/URI/URIRef.purs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import Prelude
2525
import Control.Alt ((<|>))
2626
import Data.Either (Either(..), either)
2727
import Text.Parsing.Parser (Parser)
28+
import Text.Parsing.Parser.Combinators (try)
2829
import URI.Authority (Authority(..))
2930
import URI.Common (URIPartParseError)
3031
import URI.Fragment (Fragment)
@@ -108,7 +109,9 @@ parser
108109
userInfo hosts path hierPath relPath query fragment r
109110
. Record (URIRefParseOptions userInfo hosts path hierPath relPath query fragment r)
110111
Parser String (URIRef userInfo hosts path hierPath relPath query fragment)
111-
parser opts = (Left <$> URI.parser opts) <|> (Right <$> RelativeRef.parser opts)
112+
parser opts
113+
= try (Left <$> URI.parser opts)
114+
<|> (Right <$> RelativeRef.parser opts)
112115

113116
-- | A printer for a general URI.
114117
print

0 commit comments

Comments
 (0)