Permalink
Browse files

fix the AlexAction type synonym (it was wrong, but unused)

Thanks to Eric <devnull1999@yahoo.com> for pointing out the problem.
  • Loading branch information...
simonmar committed Jan 10, 2011
1 parent 84074c4 commit 5d6e7490dddfa553a605c725fa39ca9622499226
Showing with 6 additions and 6 deletions.
  1. +6 −6 templates/wrappers.hs
View
@@ -142,7 +142,7 @@ alexMonadScan = do
-- -----------------------------------------------------------------------------
-- Useful token actions
type AlexAction result = AlexInput -> Int -> result
type AlexAction result = AlexInput -> Int -> Alex result
-- just ignore this token and scan another one
-- skip :: AlexAction result
@@ -153,10 +153,10 @@ skip input len = alexMonadScan
begin code input len = do alexSetStartCode code; alexMonadScan
-- perform an action for this token, and set the start code to a new value
-- andBegin :: AlexAction result -> Int -> AlexAction result
andBegin :: AlexAction result -> Int -> AlexAction result
(action `andBegin` code) input len = do alexSetStartCode code; action input len
-- token :: (String -> Int -> token) -> AlexAction token
token :: (AlexInput -> Int -> token) -> AlexAction token
token t input len = return (t input len)
#endif /* ALEX_MONAD */
@@ -231,7 +231,7 @@ alexMonadScan = do
-- -----------------------------------------------------------------------------
-- Useful token actions
type AlexAction result = AlexInput -> Int -> result
type AlexAction result = AlexInput -> Int -> Alex result
-- just ignore this token and scan another one
-- skip :: AlexAction result
@@ -242,10 +242,10 @@ skip input len = alexMonadScan
begin code input len = do alexSetStartCode code; alexMonadScan
-- perform an action for this token, and set the start code to a new value
-- andBegin :: AlexAction result -> Int -> AlexAction result
andBegin :: AlexAction result -> Int -> AlexAction result
(action `andBegin` code) input len = do alexSetStartCode code; action input len
-- token :: (String -> Int -> token) -> AlexAction token
token :: (AlexInput -> Int -> token) -> AlexAction token
token t input len = return (t input len)
#endif /* ALEX_MONAD_BYTESTRING */

0 comments on commit 5d6e749

Please sign in to comment.