on master help sign in
Use error instead of ParseD.Error on unreachable state
7594bb7Adithya Kumar
src/Streamly/Internal/Unicode/Stream.hs+1−1
@@ -476,7 +476,7 @@ parseCharUtf8WithD cfm =
476 let msg = prefix
476 let msg = prefix
477 ++ "Invalid first UTF8 byte" ++ show x
477 ++ "Invalid first UTF8 byte" ++ show x
478 in handleError msg False
478 in handleError msg False
479− 0 -> ParserD.Error $ prefix ++ "unreachable state"
479+ 0 -> error $ prefix ++ "unreachable state"
480 _ -> ParserD.Continue 0 (UTF8CharDecoding sv cp)
480 _ -> ParserD.Continue 0 (UTF8CharDecoding sv cp)
481
481
482 step' table (UTF8CharDecoding statePtr codepointPtr) x = return $
482 step' table (UTF8CharDecoding statePtr codepointPtr) x = return $