File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
- {-# LANGUAGE TypeFamilies #-}
1
+ {-# LANGUAGE FlexibleContexts #-}
2
+ {-# LANGUAGE ScopedTypeVariables #-}
3
+ {-# LANGUAGE TypeFamilies #-}
2
4
3
5
module Text.Megaparsec.Utils
4
6
( boolParser
@@ -44,13 +46,13 @@ boolParser = true <|> false
44
46
-- | Parse a 'Bounded' 'Enum' type that has a 'Show' instance, trying all
45
47
-- possibilities, case-insensitive, in the 'Enum' order.
46
48
boundedEnumShowParser
47
- :: Ord e
49
+ :: forall a e . Ord e
48
50
=> Bounded a
49
51
=> Enum a
50
52
=> Show a
51
53
=> Parsec e String a
52
54
boundedEnumShowParser =
53
- choice . map parseShow $ sortOn (negate . length . show ) [minBound .. ]
55
+ choice . map parseShow $ sortOn (negate . length . show ) [( minBound :: a ) .. ]
54
56
where parseShow a = string' (show a) $> a
55
57
56
58
-- | Parse a comma-separated list of items.
You can’t perform that action at this time.
0 commit comments