@@ -27,17 +27,22 @@ spec = do
27 Nothing -> null p
27 Nothing -> null p
28 Just pConverted -> p == pConverted
28 Just pConverted -> p == pConverted
30− prop "toPathPiece <=> fromPathPiece String" $ \(p::T.Text) ->
30+ prop "toPathPiece <=> fromPathPiece Text" $ \(p::T.Text) ->
31 case (fromPathPiece . toPathPiece) p of
31 case (fromPathPiece . toPathPiece) p of
32 Nothing -> T.null p
32 Nothing -> T.null p
33 Just pConverted -> p == pConverted
33 Just pConverted -> p == pConverted
35− prop "toPathPiece <=> fromPathPiece String" $ \(p::Int) ->
35+ prop "toPathPiece <=> fromPathPiece Int" $ \(p::Int) ->
36 case (fromPathPiece . toPathPiece) p of
36 case (fromPathPiece . toPathPiece) p of
37 Nothing -> False
37 Nothing -> False
38 Just pConverted -> p == pConverted
38 Just pConverted -> p == pConverted
40− prop "toPathPiece <=> fromPathPiece String" $ \(p::Bool) ->
40+ prop "toPathPiece <=> fromPathPiece Bool" $ \(p::Bool) ->
41+ case (fromPathPiece . toPathPiece) p of
43+ Just pConverted -> p == pConverted
45+ prop "toPathPiece <=> fromPathPiece Maybe String" $ \(p::Maybe String) ->
41 case (fromPathPiece . toPathPiece) p of
46 case (fromPathPiece . toPathPiece) p of
42 Nothing -> False
47 Nothing -> False
43 Just pConverted -> p == pConverted
48 Just pConverted -> p == pConverted
@@ -46,7 +51,7 @@ spec = do
46 prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[String]) ->
51 prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[String]) ->
47 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
52 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
49− prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[T.Text]) ->
54+ prop "toPathMultiPiece <=> fromPathMultiPiece Text" $ \(p::[T.Text]) ->
50 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
55 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
@@ -56,12 +61,12 @@ spec = do
56 Nothing -> null p
61 Nothing -> null p
57 Just pConverted -> p == pConverted
62 Just pConverted -> p == pConverted
59− prop "toPathPiece <=> fromPathPiece String" $ \(p::T.Text) ->
64+ prop "toPathPiece <=> fromPathPiece Text" $ \(p::T.Text) ->
60 case (fromPathPiece . toPathPiece) p of
65 case (fromPathPiece . toPathPiece) p of
61 Nothing -> T.null p
66 Nothing -> T.null p
62 Just pConverted -> p == pConverted
67 Just pConverted -> p == pConverted
64− prop "toPathPiece <=> fromPathPiece String" $ \(p::Int) ->
69+ prop "toPathPiece <=> fromPathPiece Int" $ \(p::Int) ->
65 case (fromPathPiece . toPathPiece) p of
70 case (fromPathPiece . toPathPiece) p of
66 Nothing -> p < 0
71 Nothing -> p < 0
67 Just pConverted -> p == pConverted
72 Just pConverted -> p == pConverted
@@ -70,7 +75,7 @@ spec = do
70 prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[String]) ->
75 prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[String]) ->
71 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
76 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
73− prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[T.Text]) ->
78+ prop "toPathMultiPiece <=> fromPathMultiPiece Text" $ \(p::[T.Text]) ->
74 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
79 p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
76 it "bad ints are rejected" $ fromPathPiece (T.pack "123hello")
81 it "bad ints are rejected" $ fromPathPiece (T.pack "123hello")