papillon 0.0.46 → 0.0.47
raw patch · 7 files changed
+239/−190 lines, 7 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Text.Papillon: ParseError :: String -> String -> String -> drv -> ([String]) -> pos -> ParseError pos drv
- Text.Papillon: pePosition :: ParseError pos drv -> pos
- Text.PapillonCore: ParseError :: String -> String -> String -> drv -> ([String]) -> pos -> ParseError pos drv
- Text.PapillonCore: peCode :: ParseError pos drv -> String
- Text.PapillonCore: peComment :: ParseError pos drv -> String
- Text.PapillonCore: peDerivs :: ParseError pos drv -> drv
- Text.PapillonCore: peMessage :: ParseError pos drv -> String
- Text.PapillonCore: pePosition :: ParseError pos drv -> pos
- Text.PapillonCore: peReading :: ParseError pos drv -> ([String])
+ Text.Papillon: mkParseError :: String -> String -> String -> drv -> [String] -> pos -> ParseError pos drv
+ Text.PapillonCore: mkParseError :: String -> String -> String -> drv -> [String] -> pos -> ParseError pos drv
Files
- bin/Class.hs +19/−0
- bin/papillon.hs +10/−2
- papillon.cabal +2/−2
- src/Text/Papillon.hs +7/−1
- src/Text/Papillon/Papillon.hs +10/−1
- src/Text/Papillon/Parser.hs +183/−182
- src/Text/PapillonCore.hs +8/−2
bin/Class.hs view
@@ -4,6 +4,8 @@ classSourceQ, pePositionST, pePositionSD,+ mkParseErrorTHT,+ mkParseErrorTH, instanceErrorParseError, parseErrorT ) where@@ -17,6 +19,23 @@ errorN False = mkName "Error" strMsgN True = 'strMsg strMsgN False = mkName "strMsg"++stringT :: TypeQ+stringT = varT $ mkName "String"++mkParseErrorTHT :: DecQ+mkParseErrorTHT = sigD (mkName "mkParseError") $+ forallT [PlainTV pos, PlainTV drv] (cxt []) $+ stringT `arrT` stringT `arrT` stringT `arrT` varT drv `arrT`+ listT `appT` stringT `arrT` varT pos `arrT` + varT (mkName "ParseError") `appT` varT pos `appT` varT drv+ where+ pos = mkName "pos"+ drv = mkName "drv"++mkParseErrorTH :: DecQ+mkParseErrorTH = flip (valD $ varP $ mkName "mkParseError") [] $ normalB $+ varE $ mkName "ParseError" parseErrorT :: Bool -> DecQ parseErrorT _ = flip (dataD (cxt []) (mkName "ParseError")
bin/papillon.hs view
@@ -53,10 +53,12 @@ src <- runQ $ do pe <- parseErrorT False iepe <- instanceErrorParseError False+ mkpet <- mkParseErrorTHT+ mkpe <- mkParseErrorTH pepst <- pePositionST pepsd <- pePositionSD cls <- classSourceQ False- return $ [pe, iepe, pepst, pepsd] ++ cls+ return $ [pe, iepe, mkpet, mkpe, pepst, pepsd] ++ cls return $ "{-# LANGUAGE RankNTypes, TypeFamilies #-}\n" ++ "module " ++ mName ++ " (\n\t" ++@@ -79,7 +81,13 @@ exportList :: [String] exportList = [- "ParseError(..)",+ "ParseError",+ "mkParseError",+ "peCode",+ "peMessage",+ "peComment",+ "peDerivs",+ "peReading", "Pos(..)", "pePositionS", "Source(..)",
papillon.cabal view
@@ -2,7 +2,7 @@ cabal-version: >= 1.8 name: papillon-version: 0.0.46+version: 0.0.47 stability: Experimental author: Yoshikuni Jujo <PAF01143@nifty.ne.jp> maintainer: Yoshikuni Jujo <PAF01143@nifty.ne.jp>@@ -25,7 +25,7 @@ source-repository this type: git location: git://github.com/YoshikuniJujo/papillon.git- tag: 0.0.46+ tag: 0.0.47 library hs-source-dirs: src
src/Text/Papillon.hs view
@@ -1,6 +1,12 @@ module Text.Papillon ( papillon,- ParseError(..),+ ParseError,+ mkParseError,+ peCode,+ peMessage,+ peDerivs,+ peComment,+ peReading, Source(..), SourceList(..), Pos(..),
src/Text/Papillon/Papillon.hs view
@@ -1,6 +1,12 @@ {-# LANGUAGE RankNTypes, TypeFamilies #-} module Text.Papillon.Papillon (- ParseError(..),+ ParseError,+ mkParseError,+ peCode,+ peMessage,+ peComment,+ peDerivs,+ peReading, Pos(..), pePositionS, Source(..),@@ -16,6 +22,9 @@ pePosition :: pos} instance Error (ParseError pos drv) where strMsg msg = ParseError "" msg "" undefined undefined undefined+mkParseError :: forall pos drv . String ->+ String -> String -> drv -> [String] -> pos -> ParseError pos drv+mkParseError = ParseError pePositionS :: forall drv . ParseError (Pos String) drv -> (Int, Int) pePositionS (ParseError {pePosition = ListPos (CharPos p)}) = p
src/Text/Papillon/Parser.hs view
@@ -11,6 +11,7 @@ showNameLeaf, nameFromRF, ParseError(..),+ mkParseError, Derivs(peg, pegFile, derivsChars), Pos(..), ListPos(..),@@ -243,7 +244,7 @@ Just (c, s') -> do put (parse0_0 (updatePos c pos) s') return c- _ -> gets derivsPosition >>= (throwError . ParseError "" "end of input" "" undefined [])) d+ _ -> gets derivsPosition >>= (throwError . mkParseError "" "end of input" "" undefined [])) d pegFile4_71 = foldl1 mplus [do pr <- StateT pragmas md <- StateT moduleDec pip <- StateT preImpPap@@ -259,21 +260,21 @@ xx159_141 <- StateT derivsChars case xx159_141 of '|' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'|'" "not match pattern: " "" d160_140 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'|'" "not match pattern: " "" d160_140 ["derivsChars"]) let '|' = xx159_141 return () d162_142 <- get xx161_143 <- StateT derivsChars case xx161_143 of ']' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "']'" "not match pattern: " "" d162_142 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "']'" "not match pattern: " "" d162_142 ["derivsChars"]) let ']' = xx161_143 return () d164_144 <- get xx163_145 <- StateT derivsChars case xx163_145 of '\n' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\n'" "not match pattern: " "" d164_144 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\n'" "not match pattern: " "" d164_144 ["derivsChars"]) let '\n' = xx163_145 return () atp <- StateT afterPeg@@ -290,21 +291,21 @@ xx179_147 <- StateT derivsChars case xx179_147 of '|' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'|'" "not match pattern: " "" d180_146 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'|'" "not match pattern: " "" d180_146 ["derivsChars"]) let '|' = xx179_147 return () d182_148 <- get xx181_149 <- StateT derivsChars case xx181_149 of ']' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "']'" "not match pattern: " "" d182_148 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "']'" "not match pattern: " "" d182_148 ["derivsChars"]) let ']' = xx181_149 return () d184_150 <- get xx183_151 <- StateT derivsChars case xx183_151 of '\n' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\n'" "not match pattern: " "" d184_150 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\n'" "not match pattern: " "" d184_150 ["derivsChars"]) let '\n' = xx183_151 return () atp <- StateT afterPeg@@ -321,21 +322,21 @@ xx195_153 <- StateT derivsChars case xx195_153 of '{' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'{'" "not match pattern: " "" d196_152 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'{'" "not match pattern: " "" d196_152 ["derivsChars"]) let '{' = xx195_153 return () d198_154 <- get xx197_155 <- StateT derivsChars case xx197_155 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d198_154 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d198_154 ["derivsChars"]) let '-' = xx197_155 return () d200_156 <- get xx199_157 <- StateT derivsChars case xx199_157 of '#' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'#'" "not match pattern: " "" d200_156 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'#'" "not match pattern: " "" d200_156 ["derivsChars"]) let '#' = xx199_157 return () _ <- StateT spaces@@ -344,56 +345,56 @@ xx203_159 <- StateT derivsChars case xx203_159 of 'L' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'L'" "not match pattern: " "" d204_158 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'L'" "not match pattern: " "" d204_158 ["derivsChars"]) let 'L' = xx203_159 return () d206_160 <- get xx205_161 <- StateT derivsChars case xx205_161 of 'A' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'A'" "not match pattern: " "" d206_160 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'A'" "not match pattern: " "" d206_160 ["derivsChars"]) let 'A' = xx205_161 return () d208_162 <- get xx207_163 <- StateT derivsChars case xx207_163 of 'N' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'N'" "not match pattern: " "" d208_162 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'N'" "not match pattern: " "" d208_162 ["derivsChars"]) let 'N' = xx207_163 return () d210_164 <- get xx209_165 <- StateT derivsChars case xx209_165 of 'G' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'G'" "not match pattern: " "" d210_164 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'G'" "not match pattern: " "" d210_164 ["derivsChars"]) let 'G' = xx209_165 return () d212_166 <- get xx211_167 <- StateT derivsChars case xx211_167 of 'U' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'U'" "not match pattern: " "" d212_166 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'U'" "not match pattern: " "" d212_166 ["derivsChars"]) let 'U' = xx211_167 return () d214_168 <- get xx213_169 <- StateT derivsChars case xx213_169 of 'A' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'A'" "not match pattern: " "" d214_168 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'A'" "not match pattern: " "" d214_168 ["derivsChars"]) let 'A' = xx213_169 return () d216_170 <- get xx215_171 <- StateT derivsChars case xx215_171 of 'G' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'G'" "not match pattern: " "" d216_170 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'G'" "not match pattern: " "" d216_170 ["derivsChars"]) let 'G' = xx215_171 return () d218_172 <- get xx217_173 <- StateT derivsChars case xx217_173 of 'E' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'E'" "not match pattern: " "" d218_172 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'E'" "not match pattern: " "" d218_172 ["derivsChars"]) let 'E' = xx217_173 return () _ <- StateT spaces@@ -408,21 +409,21 @@ xx227_175 <- StateT derivsChars case xx227_175 of '{' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'{'" "not match pattern: " "" d228_174 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'{'" "not match pattern: " "" d228_174 ["derivsChars"]) let '{' = xx227_175 return () d230_176 <- get xx229_177 <- StateT derivsChars case xx229_177 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d230_176 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d230_176 ["derivsChars"]) let '-' = xx229_177 return () d232_178 <- get xx231_179 <- StateT derivsChars case xx231_179 of '#' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'#'" "not match pattern: " "" d232_178 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'#'" "not match pattern: " "" d232_178 ["derivsChars"]) let '#' = xx231_179 return () _ <- StateT spaces@@ -434,7 +435,7 @@ pragmaStr7_74 = foldl1 mplus [do ddd239_180 <- get do err <- ((do _ <- StateT pragmaEnd return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:pragmaEnd") "not match: " "" ddd239_180 ["pragmaEnd"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:pragmaEnd") "not match: " "" ddd239_180 ["pragmaEnd"])) put ddd239_180 c <- StateT derivsChars s <- StateT pragmaStr@@ -445,7 +446,7 @@ xx248_182 <- StateT derivsChars case xx248_182 of ',' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "','" "not match pattern: " "" d249_181 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "','" "not match pattern: " "" d249_181 ["derivsChars"]) let ',' = xx248_182 return () _ <- StateT spaces@@ -460,21 +461,21 @@ xx258_184 <- StateT derivsChars case xx258_184 of '#' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'#'" "not match pattern: " "" d259_183 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'#'" "not match pattern: " "" d259_183 ["derivsChars"]) let '#' = xx258_184 return () d261_185 <- get xx260_186 <- StateT derivsChars case xx260_186 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d261_185 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d261_185 ["derivsChars"]) let '-' = xx260_186 return () d263_187 <- get xx262_188 <- StateT derivsChars case xx262_188 of '}' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'}'" "not match pattern: " "" d263_187 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'}'" "not match pattern: " "" d263_187 ["derivsChars"]) let '}' = xx262_188 return () return ()]@@ -482,42 +483,42 @@ xx264_190 <- StateT derivsChars case xx264_190 of 'm' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'m'" "not match pattern: " "" d265_189 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'m'" "not match pattern: " "" d265_189 ["derivsChars"]) let 'm' = xx264_190 return () d267_191 <- get xx266_192 <- StateT derivsChars case xx266_192 of 'o' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'o'" "not match pattern: " "" d267_191 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'o'" "not match pattern: " "" d267_191 ["derivsChars"]) let 'o' = xx266_192 return () d269_193 <- get xx268_194 <- StateT derivsChars case xx268_194 of 'd' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'d'" "not match pattern: " "" d269_193 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'d'" "not match pattern: " "" d269_193 ["derivsChars"]) let 'd' = xx268_194 return () d271_195 <- get xx270_196 <- StateT derivsChars case xx270_196 of 'u' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'u'" "not match pattern: " "" d271_195 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'u'" "not match pattern: " "" d271_195 ["derivsChars"]) let 'u' = xx270_196 return () d273_197 <- get xx272_198 <- StateT derivsChars case xx272_198 of 'l' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'l'" "not match pattern: " "" d273_197 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'l'" "not match pattern: " "" d273_197 ["derivsChars"]) let 'l' = xx272_198 return () d275_199 <- get xx274_200 <- StateT derivsChars case xx274_200 of 'e' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'e'" "not match pattern: " "" d275_199 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'e'" "not match pattern: " "" d275_199 ["derivsChars"]) let 'e' = xx274_200 return () _ <- StateT spaces@@ -529,7 +530,7 @@ xx282_202 <- StateT derivsChars case xx282_202 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d283_201 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d283_201 ["derivsChars"]) let '(' = xx282_202 return () _ <- StateT spaces@@ -542,42 +543,42 @@ xx290_204 <- StateT derivsChars case xx290_204 of 'm' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'m'" "not match pattern: " "" d291_203 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'m'" "not match pattern: " "" d291_203 ["derivsChars"]) let 'm' = xx290_204 return () d293_205 <- get xx292_206 <- StateT derivsChars case xx292_206 of 'o' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'o'" "not match pattern: " "" d293_205 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'o'" "not match pattern: " "" d293_205 ["derivsChars"]) let 'o' = xx292_206 return () d295_207 <- get xx294_208 <- StateT derivsChars case xx294_208 of 'd' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'d'" "not match pattern: " "" d295_207 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'d'" "not match pattern: " "" d295_207 ["derivsChars"]) let 'd' = xx294_208 return () d297_209 <- get xx296_210 <- StateT derivsChars case xx296_210 of 'u' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'u'" "not match pattern: " "" d297_209 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'u'" "not match pattern: " "" d297_209 ["derivsChars"]) let 'u' = xx296_210 return () d299_211 <- get xx298_212 <- StateT derivsChars case xx298_212 of 'l' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'l'" "not match pattern: " "" d299_211 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'l'" "not match pattern: " "" d299_211 ["derivsChars"]) let 'l' = xx298_212 return () d301_213 <- get xx300_214 <- StateT derivsChars case xx300_214 of 'e' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'e'" "not match pattern: " "" d301_213 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'e'" "not match pattern: " "" d301_213 ["derivsChars"]) let 'e' = xx300_214 return () _ <- StateT spaces@@ -589,35 +590,35 @@ xx308_216 <- StateT derivsChars case xx308_216 of 'w' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'w'" "not match pattern: " "" d309_215 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'w'" "not match pattern: " "" d309_215 ["derivsChars"]) let 'w' = xx308_216 return () d311_217 <- get xx310_218 <- StateT derivsChars case xx310_218 of 'h' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'h'" "not match pattern: " "" d311_217 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'h'" "not match pattern: " "" d311_217 ["derivsChars"]) let 'h' = xx310_218 return () d313_219 <- get xx312_220 <- StateT derivsChars case xx312_220 of 'e' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'e'" "not match pattern: " "" d313_219 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'e'" "not match pattern: " "" d313_219 ["derivsChars"]) let 'e' = xx312_220 return () d315_221 <- get xx314_222 <- StateT derivsChars case xx314_222 of 'r' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'r'" "not match pattern: " "" d315_221 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'r'" "not match pattern: " "" d315_221 ["derivsChars"]) let 'r' = xx314_222 return () d317_223 <- get xx316_224 <- StateT derivsChars case xx316_224 of 'e' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'e'" "not match pattern: " "" d317_223 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'e'" "not match pattern: " "" d317_223 ["derivsChars"]) let 'e' = xx316_224 return () _ <- StateT spaces@@ -629,7 +630,7 @@ xx322_226 <- StateT derivsChars case xx322_226 of '.' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'.'" "not match pattern: " "" d323_225 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'.'" "not match pattern: " "" d323_225 ["derivsChars"]) let '.' = xx322_226 return () n <- StateT moduleName@@ -639,7 +640,7 @@ moduleDecStr12_79 = foldl1 mplus [do ddd328_227 <- get do err <- ((do _ <- StateT whr return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:whr") "not match: " "" ddd328_227 ["whr"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:whr") "not match: " "" ddd328_227 ["whr"])) put ddd328_227 c <- StateT derivsChars s <- StateT moduleDecStr@@ -651,7 +652,7 @@ xx337_229 <- StateT derivsChars case xx337_229 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d338_228 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d338_228 ["derivsChars"]) let ')' = xx337_229 return () _ <- StateT spaces@@ -660,47 +661,47 @@ xx341_231 <- StateT derivsChars case xx341_231 of 'w' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'w'" "not match pattern: " "" d342_230 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'w'" "not match pattern: " "" d342_230 ["derivsChars"]) let 'w' = xx341_231 return () d344_232 <- get xx343_233 <- StateT derivsChars case xx343_233 of 'h' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'h'" "not match pattern: " "" d344_232 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'h'" "not match pattern: " "" d344_232 ["derivsChars"]) let 'h' = xx343_233 return () d346_234 <- get xx345_235 <- StateT derivsChars case xx345_235 of 'e' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'e'" "not match pattern: " "" d346_234 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'e'" "not match pattern: " "" d346_234 ["derivsChars"]) let 'e' = xx345_235 return () d348_236 <- get xx347_237 <- StateT derivsChars case xx347_237 of 'r' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'r'" "not match pattern: " "" d348_236 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'r'" "not match pattern: " "" d348_236 ["derivsChars"]) let 'r' = xx347_237 return () d350_238 <- get xx349_239 <- StateT derivsChars case xx349_239 of 'e' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'e'" "not match pattern: " "" d350_238 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'e'" "not match pattern: " "" d350_238 ["derivsChars"]) let 'e' = xx349_239 return () return ()] preImpPap14_81 = foldl1 mplus [do ddd351_240 <- get do err <- ((do _ <- StateT importPapillon return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:importPapillon") "not match: " "" ddd351_240 ["importPapillon"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:importPapillon") "not match: " "" ddd351_240 ["importPapillon"])) put ddd351_240 ddd354_241 <- get do err <- ((do _ <- StateT pap return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:pap") "not match: " "" ddd354_241 ["pap"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:pap") "not match: " "" ddd354_241 ["pap"])) put ddd354_241 c <- StateT derivsChars pip <- StateT preImpPap@@ -709,7 +710,7 @@ prePeg15_82 = foldl1 mplus [do ddd361_242 <- get do err <- ((do _ <- StateT pap return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:pap") "not match: " "" ddd361_242 ["pap"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:pap") "not match: " "" ddd361_242 ["pap"])) put ddd361_242 c <- StateT derivsChars pp <- StateT prePeg@@ -723,21 +724,21 @@ xx372_244 <- StateT varToken case xx372_244 of "import" -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "\"import\"" "not match pattern: " "" d373_243 ["varToken"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "\"import\"" "not match pattern: " "" d373_243 ["varToken"]) let "import" = xx372_244 return () d375_245 <- get xx374_246 <- StateT typToken case xx374_246 of "Text" -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "\"Text\"" "not match pattern: " "" d375_245 ["typToken"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "\"Text\"" "not match pattern: " "" d375_245 ["typToken"]) let "Text" = xx374_246 return () d377_247 <- get xx376_248 <- StateT derivsChars case xx376_248 of '.' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'.'" "not match pattern: " "" d377_247 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'.'" "not match pattern: " "" d377_247 ["derivsChars"]) let '.' = xx376_248 return () _ <- StateT spaces@@ -746,7 +747,7 @@ xx380_250 <- StateT typToken case xx380_250 of "Papillon" -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "\"Papillon\"" "not match pattern: " "" d381_249 ["typToken"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "\"Papillon\"" "not match pattern: " "" d381_249 ["typToken"]) let "Papillon" = xx380_250 return () ddd382_251 <- get@@ -754,10 +755,10 @@ xx383_253 <- StateT derivsChars case xx383_253 of '.' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'.'" "not match pattern: " "" d384_252 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'.'" "not match pattern: " "" d384_252 ["derivsChars"]) let '.' = xx383_253 return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "'.':") "not match: " "" ddd382_251 ["derivsChars"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "'.':") "not match: " "" ddd382_251 ["derivsChars"])) put ddd382_251 return ()] varToken18_85 = foldl1 mplus [do v <- StateT variable@@ -772,84 +773,84 @@ xx393_255 <- StateT derivsChars case xx393_255 of '\n' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\n'" "not match pattern: " "" d394_254 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\n'" "not match pattern: " "" d394_254 ["derivsChars"]) let '\n' = xx393_255 return () d396_256 <- get xx395_257 <- StateT derivsChars case xx395_257 of '[' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'['" "not match pattern: " "" d396_256 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'['" "not match pattern: " "" d396_256 ["derivsChars"]) let '[' = xx395_257 return () d398_258 <- get xx397_259 <- StateT derivsChars case xx397_259 of 'p' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'p'" "not match pattern: " "" d398_258 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'p'" "not match pattern: " "" d398_258 ["derivsChars"]) let 'p' = xx397_259 return () d400_260 <- get xx399_261 <- StateT derivsChars case xx399_261 of 'a' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'a'" "not match pattern: " "" d400_260 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'a'" "not match pattern: " "" d400_260 ["derivsChars"]) let 'a' = xx399_261 return () d402_262 <- get xx401_263 <- StateT derivsChars case xx401_263 of 'p' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'p'" "not match pattern: " "" d402_262 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'p'" "not match pattern: " "" d402_262 ["derivsChars"]) let 'p' = xx401_263 return () d404_264 <- get xx403_265 <- StateT derivsChars case xx403_265 of 'i' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'i'" "not match pattern: " "" d404_264 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'i'" "not match pattern: " "" d404_264 ["derivsChars"]) let 'i' = xx403_265 return () d406_266 <- get xx405_267 <- StateT derivsChars case xx405_267 of 'l' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'l'" "not match pattern: " "" d406_266 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'l'" "not match pattern: " "" d406_266 ["derivsChars"]) let 'l' = xx405_267 return () d408_268 <- get xx407_269 <- StateT derivsChars case xx407_269 of 'l' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'l'" "not match pattern: " "" d408_268 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'l'" "not match pattern: " "" d408_268 ["derivsChars"]) let 'l' = xx407_269 return () d410_270 <- get xx409_271 <- StateT derivsChars case xx409_271 of 'o' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'o'" "not match pattern: " "" d410_270 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'o'" "not match pattern: " "" d410_270 ["derivsChars"]) let 'o' = xx409_271 return () d412_272 <- get xx411_273 <- StateT derivsChars case xx411_273 of 'n' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'n'" "not match pattern: " "" d412_272 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'n'" "not match pattern: " "" d412_272 ["derivsChars"]) let 'n' = xx411_273 return () d414_274 <- get xx413_275 <- StateT derivsChars case xx413_275 of '|' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'|'" "not match pattern: " "" d414_274 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'|'" "not match pattern: " "" d414_274 ["derivsChars"]) let '|' = xx413_275 return () d416_276 <- get xx415_277 <- StateT derivsChars case xx415_277 of '\n' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\n'" "not match pattern: " "" d416_276 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\n'" "not match pattern: " "" d416_276 ["derivsChars"]) let '\n' = xx415_277 return () return ()]@@ -864,14 +865,14 @@ xx425_279 <- StateT varToken case xx425_279 of "source" -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "\"source\"" "not match pattern: " "" d426_278 ["varToken"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "\"source\"" "not match pattern: " "" d426_278 ["varToken"]) let "source" = xx425_279 return () d428_280 <- get xx427_281 <- StateT derivsChars case xx427_281 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d428_280 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d428_280 ["derivsChars"]) let ':' = xx427_281 return () _ <- StateT spaces@@ -891,14 +892,14 @@ xx443_283 <- StateT derivsChars case xx443_283 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d444_282 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d444_282 ["derivsChars"]) let ':' = xx443_283 return () d446_284 <- get xx445_285 <- StateT derivsChars case xx445_285 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d446_284 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d446_284 ["derivsChars"]) let ':' = xx445_285 return () _ <- StateT spaces@@ -910,7 +911,7 @@ xx453_287 <- StateT derivsChars case xx453_287 of '=' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'='" "not match pattern: " "" d454_286 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'='" "not match pattern: " "" d454_286 ["derivsChars"]) let '=' = xx453_287 return () _ <- StateT spaces@@ -922,7 +923,7 @@ xx461_289 <- StateT derivsChars case xx461_289 of ';' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "';'" "not match pattern: " "" d462_288 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "';'" "not match pattern: " "" d462_288 ["derivsChars"]) let ';' = xx461_289 return () return (mkDef v t sel)]@@ -933,7 +934,7 @@ xx467_291 <- StateT derivsChars case xx467_291 of '/' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'/'" "not match pattern: " "" d468_290 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'/'" "not match pattern: " "" d468_290 ["derivsChars"]) let '/' = xx467_291 return () _ <- StateT spaces@@ -949,7 +950,7 @@ xx479_293 <- StateT derivsChars case xx479_293 of '{' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'{'" "not match pattern: " "" d480_292 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'{'" "not match pattern: " "" d480_292 ["derivsChars"]) let '{' = xx479_293 return () _ <- StateT spaces@@ -961,7 +962,7 @@ xx487_295 <- StateT derivsChars case xx487_295 of '}' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'}'" "not match pattern: " "" d488_294 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'}'" "not match pattern: " "" d488_294 ["derivsChars"]) let '}' = xx487_295 return () return (mkExpressionHs e h)]@@ -975,7 +976,7 @@ xx495_297 <- StateT derivsChars case xx495_297 of '!' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'!'" "not match pattern: " "" d496_296 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'!'" "not match pattern: " "" d496_296 ["derivsChars"]) let '!' = xx495_297 return () nl <- StateT nameLeafNoCom@@ -986,7 +987,7 @@ do d504_299 <- get xx503_300 <- StateT derivsChars let c = xx503_300- unless (isAmp c) (gets derivsPosition >>= (throwError . ParseError "isAmp c" "not match: " "" d504_299 ["derivsChars"]))+ unless (isAmp c) (gets derivsPosition >>= (throwError . mkParseError "isAmp c" "not match: " "" d504_299 ["derivsChars"])) nl <- StateT nameLeaf return (After nl), do nl <- StateT nameLeaf@@ -999,7 +1000,7 @@ xx515_302 <- StateT derivsChars case xx515_302 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d516_301 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d516_301 ["derivsChars"]) let ':' = xx515_302 return () (rf, p) <- StateT leaf@@ -1018,7 +1019,7 @@ xx531_304 <- StateT derivsChars case xx531_304 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d532_303 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d532_303 ["derivsChars"]) let ':' = xx531_304 return () (rf, p) <- StateT leaf@@ -1031,21 +1032,21 @@ xx539_306 <- StateT derivsChars case xx539_306 of '{' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'{'" "not match pattern: " "" d540_305 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'{'" "not match pattern: " "" d540_305 ["derivsChars"]) let '{' = xx539_306 return () d542_307 <- get xx541_308 <- StateT derivsChars case xx541_308 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d542_307 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d542_307 ["derivsChars"]) let '-' = xx541_308 return () d544_309 <- get xx543_310 <- StateT derivsChars case xx543_310 of '#' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'#'" "not match pattern: " "" d544_309 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'#'" "not match pattern: " "" d544_309 ["derivsChars"]) let '#' = xx543_310 return () _ <- StateT spaces@@ -1054,7 +1055,7 @@ xx547_312 <- StateT derivsChars case xx547_312 of '"' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\"'" "not match pattern: " "" d548_311 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\"'" "not match pattern: " "" d548_311 ["derivsChars"]) let '"' = xx547_312 return () s <- StateT stringLit@@ -1062,7 +1063,7 @@ xx551_314 <- StateT derivsChars case xx551_314 of '"' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\"'" "not match pattern: " "" d552_313 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\"'" "not match pattern: " "" d552_313 ["derivsChars"]) let '"' = xx551_314 return () _ <- StateT spaces@@ -1071,21 +1072,21 @@ xx555_316 <- StateT derivsChars case xx555_316 of '#' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'#'" "not match pattern: " "" d556_315 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'#'" "not match pattern: " "" d556_315 ["derivsChars"]) let '#' = xx555_316 return () d558_317 <- get xx557_318 <- StateT derivsChars case xx557_318 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d558_317 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d558_317 ["derivsChars"]) let '-' = xx557_318 return () d560_319 <- get xx559_320 <- StateT derivsChars case xx559_320 of '}' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'}'" "not match pattern: " "" d560_319 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'}'" "not match pattern: " "" d560_319 ["derivsChars"]) let '}' = xx559_320 return () _ <- StateT spaces@@ -1108,12 +1109,12 @@ d582_321 <- get xx581_322 <- StateT derivsChars let q = xx581_322- unless (isBQ q) (gets derivsPosition >>= (throwError . ParseError "isBQ q" "not match: " "" d582_321 ["derivsChars"]))+ unless (isBQ q) (gets derivsPosition >>= (throwError . mkParseError "isBQ q" "not match: " "" d582_321 ["derivsChars"])) t <- StateT typ d586_323 <- get xx585_324 <- StateT derivsChars let q_ = xx585_324- unless (isBQ q_) (gets derivsPosition >>= (throwError . ParseError "isBQ q_" "not match: " "" d586_323 ["derivsChars"]))+ unless (isBQ q_) (gets derivsPosition >>= (throwError . mkParseError "isBQ q_" "not match: " "" d586_323 ["derivsChars"])) _ <- StateT spaces return () po <- StateT patOp@@ -1129,7 +1130,7 @@ xx599_326 <- StateT derivsChars case xx599_326 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d600_325 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d600_325 ["derivsChars"]) let '(' = xx599_326 return () o <- StateT opConName@@ -1137,7 +1138,7 @@ xx603_328 <- StateT derivsChars case xx603_328 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d604_327 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d604_327 ["derivsChars"]) let ')' = xx603_328 return () _ <- StateT spaces@@ -1152,7 +1153,7 @@ xx613_330 <- StateT variable case xx613_330 of "_" -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "\"_\"" "not match pattern: " "" d614_329 ["variable"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "\"_\"" "not match pattern: " "" d614_329 ["variable"]) let "_" = xx613_330 return () return wildP,@@ -1164,7 +1165,7 @@ xx619_332 <- StateT derivsChars case xx619_332 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d620_331 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d620_331 ["derivsChars"]) let '-' = xx619_332 return () _ <- StateT spaces@@ -1175,7 +1176,7 @@ xx625_334 <- StateT derivsChars case xx625_334 of '\'' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\''" "not match pattern: " "" d626_333 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\''" "not match pattern: " "" d626_333 ["derivsChars"]) let '\'' = xx625_334 return () c <- StateT charLit@@ -1183,7 +1184,7 @@ xx629_336 <- StateT derivsChars case xx629_336 of '\'' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\''" "not match pattern: " "" d630_335 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\''" "not match pattern: " "" d630_335 ["derivsChars"]) let '\'' = xx629_336 return () return (charP c),@@ -1191,7 +1192,7 @@ xx631_338 <- StateT derivsChars case xx631_338 of '"' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\"'" "not match pattern: " "" d632_337 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\"'" "not match pattern: " "" d632_337 ["derivsChars"]) let '"' = xx631_338 return () s <- StateT stringLit@@ -1199,7 +1200,7 @@ xx635_340 <- StateT derivsChars case xx635_340 of '"' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\"'" "not match pattern: " "" d636_339 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\"'" "not match pattern: " "" d636_339 ["derivsChars"]) let '"' = xx635_340 return () return (stringP s),@@ -1207,7 +1208,7 @@ xx637_342 <- StateT derivsChars case xx637_342 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d638_341 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d638_341 ["derivsChars"]) let '(' = xx637_342 return () p <- StateT patList@@ -1215,7 +1216,7 @@ xx641_344 <- StateT derivsChars case xx641_344 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d642_343 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d642_343 ["derivsChars"]) let ')' = xx641_344 return () return (tupP p),@@ -1223,7 +1224,7 @@ xx643_346 <- StateT derivsChars case xx643_346 of '[' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'['" "not match pattern: " "" d644_345 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'['" "not match pattern: " "" d644_345 ["derivsChars"]) let '[' = xx643_346 return () p <- StateT patList@@ -1231,7 +1232,7 @@ xx647_348 <- StateT derivsChars case xx647_348 of ']' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "']'" "not match pattern: " "" d648_347 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "']'" "not match pattern: " "" d648_347 ["derivsChars"]) let ']' = xx647_348 return () return (listP p)]@@ -1242,7 +1243,7 @@ xx653_350 <- StateT derivsChars case xx653_350 of ',' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "','" "not match pattern: " "" d654_349 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "','" "not match pattern: " "" d654_349 ["derivsChars"]) let ',' = xx653_350 return () _ <- StateT spaces@@ -1256,7 +1257,7 @@ xx661_352 <- StateT derivsChars case xx661_352 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d662_351 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d662_351 ["derivsChars"]) let ':' = xx661_352 return () ot <- StateT opTail@@ -1264,13 +1265,13 @@ charLit38_105 = foldl1 mplus [do d666_353 <- get xx665_354 <- StateT derivsChars let c = xx665_354- unless (isAlphaNumOt c) (gets derivsPosition >>= (throwError . ParseError "isAlphaNumOt c" "not match: " "" d666_353 ["derivsChars"]))+ unless (isAlphaNumOt c) (gets derivsPosition >>= (throwError . mkParseError "isAlphaNumOt c" "not match: " "" d666_353 ["derivsChars"])) return c, do d668_355 <- get xx667_356 <- StateT derivsChars case xx667_356 of '\\' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\\\'" "not match pattern: " "" d668_355 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\\\'" "not match pattern: " "" d668_355 ["derivsChars"]) let '\\' = xx667_356 return () c <- StateT escapeC@@ -1278,14 +1279,14 @@ stringLit39_106 = foldl1 mplus [do d672_357 <- get xx671_358 <- StateT derivsChars let c = xx671_358- unless (isStrLitC c) (gets derivsPosition >>= (throwError . ParseError "isStrLitC c" "not match: " "" d672_357 ["derivsChars"]))+ unless (isStrLitC c) (gets derivsPosition >>= (throwError . mkParseError "isStrLitC c" "not match: " "" d672_357 ["derivsChars"])) s <- StateT stringLit return (cons c s), do d676_359 <- get xx675_360 <- StateT derivsChars case xx675_360 of '\\' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\\\'" "not match pattern: " "" d676_359 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\\\'" "not match pattern: " "" d676_359 ["derivsChars"]) let '\\' = xx675_360 return () c <- StateT escapeC@@ -1296,7 +1297,7 @@ xx681_362 <- StateT derivsChars case xx681_362 of '"' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\"'" "not match pattern: " "" d682_361 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\"'" "not match pattern: " "" d682_361 ["derivsChars"]) let '"' = xx681_362 return () return '"',@@ -1304,7 +1305,7 @@ xx683_364 <- StateT derivsChars case xx683_364 of '\'' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\''" "not match pattern: " "" d684_363 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\''" "not match pattern: " "" d684_363 ["derivsChars"]) let '\'' = xx683_364 return () return '\'',@@ -1312,7 +1313,7 @@ xx685_366 <- StateT derivsChars case xx685_366 of '\\' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\\\'" "not match pattern: " "" d686_365 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\\\'" "not match pattern: " "" d686_365 ["derivsChars"]) let '\\' = xx685_366 return () return '\\',@@ -1320,7 +1321,7 @@ xx687_368 <- StateT derivsChars case xx687_368 of 'n' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'n'" "not match pattern: " "" d688_367 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'n'" "not match pattern: " "" d688_367 ["derivsChars"]) let 'n' = xx687_368 return () return '\n',@@ -1328,7 +1329,7 @@ xx689_370 <- StateT derivsChars case xx689_370 of 't' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'t'" "not match pattern: " "" d690_369 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'t'" "not match pattern: " "" d690_369 ["derivsChars"]) let 't' = xx689_370 return () return tab]@@ -1343,7 +1344,7 @@ xx699_372 <- StateT derivsChars case xx699_372 of '*' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'*'" "not match pattern: " "" d700_371 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'*'" "not match pattern: " "" d700_371 ["derivsChars"]) let '*' = xx699_372 return () return (FromList rf),@@ -1352,7 +1353,7 @@ xx703_374 <- StateT derivsChars case xx703_374 of '+' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'+'" "not match pattern: " "" d704_373 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'+'" "not match pattern: " "" d704_373 ["derivsChars"]) let '+' = xx703_374 return () return (FromList1 rf),@@ -1361,7 +1362,7 @@ xx707_376 <- StateT derivsChars case xx707_376 of '?' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'?'" "not match pattern: " "" d708_375 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'?'" "not match pattern: " "" d708_375 ["derivsChars"]) let '?' = xx707_376 return () return (FromOptional rf),@@ -1373,7 +1374,7 @@ xx713_378 <- StateT derivsChars case xx713_378 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d714_377 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d714_377 ["derivsChars"]) let '(' = xx713_378 return () s <- StateT selection@@ -1381,7 +1382,7 @@ xx717_380 <- StateT derivsChars case xx717_380 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d718_379 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d718_379 ["derivsChars"]) let ')' = xx717_380 return () return (FromSelection s)]@@ -1389,7 +1390,7 @@ xx719_382 <- StateT derivsChars case xx719_382 of '[' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'['" "not match pattern: " "" d720_381 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'['" "not match pattern: " "" d720_381 ["derivsChars"]) let '[' = xx719_382 return () h <- StateT hsExpLam@@ -1400,7 +1401,7 @@ xx727_384 <- StateT derivsChars case xx727_384 of ']' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "']'" "not match pattern: " "" d728_383 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "']'" "not match pattern: " "" d728_383 ["derivsChars"]) let ']' = xx727_384 return () return (h, maybe "" id com)]@@ -1408,7 +1409,7 @@ xx729_386 <- StateT derivsChars case xx729_386 of '\\' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\\\'" "not match pattern: " "" d730_385 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\\\'" "not match pattern: " "" d730_385 ["derivsChars"]) let '\\' = xx729_386 return () _ <- StateT spaces@@ -1420,13 +1421,13 @@ xx737_388 <- StateT derivsChars case xx737_388 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d738_387 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d738_387 ["derivsChars"]) let '-' = xx737_388 return () d740_389 <- get xx739_390 <- StateT derivsChars let c = xx739_390- unless (isGt c) (gets derivsPosition >>= (throwError . ParseError "isGt c" "not match: " "" d740_389 ["derivsChars"]))+ unless (isGt c) (gets derivsPosition >>= (throwError . mkParseError "isGt c" "not match: " "" d740_389 ["derivsChars"])) _ <- StateT spaces return () e <- StateT hsExpTyp@@ -1438,14 +1439,14 @@ xx749_392 <- StateT derivsChars case xx749_392 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d750_391 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d750_391 ["derivsChars"]) let ':' = xx749_392 return () d752_393 <- get xx751_394 <- StateT derivsChars case xx751_394 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d752_393 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d752_393 ["derivsChars"]) let ':' = xx751_394 return () _ <- StateT spaces@@ -1467,14 +1468,14 @@ hsOp48_115 = foldl1 mplus [do d772_395 <- get xx771_396 <- StateT derivsChars let c = xx771_396- unless (isOpHeadChar c) (gets derivsPosition >>= (throwError . ParseError "isOpHeadChar c" "not match: " "" d772_395 ["derivsChars"]))+ unless (isOpHeadChar c) (gets derivsPosition >>= (throwError . mkParseError "isOpHeadChar c" "not match: " "" d772_395 ["derivsChars"])) o <- StateT opTail return (varE (mkName (cons c o))), do d776_397 <- get xx775_398 <- StateT derivsChars case xx775_398 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d776_397 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d776_397 ["derivsChars"]) let ':' = xx775_398 return () ddd777_399 <- get@@ -1482,37 +1483,37 @@ xx778_401 <- StateT derivsChars case xx778_401 of ':' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "':'" "not match pattern: " "" d779_400 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "':'" "not match pattern: " "" d779_400 ["derivsChars"]) let ':' = xx778_401 return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "':':") "not match: " "" ddd777_399 ["derivsChars"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "':':") "not match: " "" ddd777_399 ["derivsChars"])) put ddd777_399 o <- StateT opTail return (conE (mkName (':' : o))), do d783_402 <- get xx782_403 <- StateT derivsChars let c = xx782_403- unless (isBQ c) (gets derivsPosition >>= (throwError . ParseError "isBQ c" "not match: " "" d783_402 ["derivsChars"]))+ unless (isBQ c) (gets derivsPosition >>= (throwError . mkParseError "isBQ c" "not match: " "" d783_402 ["derivsChars"])) v <- StateT variable d787_404 <- get xx786_405 <- StateT derivsChars let c_ = xx786_405- unless (isBQ c_) (gets derivsPosition >>= (throwError . ParseError "isBQ c_" "not match: " "" d787_404 ["derivsChars"]))+ unless (isBQ c_) (gets derivsPosition >>= (throwError . mkParseError "isBQ c_" "not match: " "" d787_404 ["derivsChars"])) return (varE (mkName v)), do d789_406 <- get xx788_407 <- StateT derivsChars let c = xx788_407- unless (isBQ c) (gets derivsPosition >>= (throwError . ParseError "isBQ c" "not match: " "" d789_406 ["derivsChars"]))+ unless (isBQ c) (gets derivsPosition >>= (throwError . mkParseError "isBQ c" "not match: " "" d789_406 ["derivsChars"])) t <- StateT typ d793_408 <- get xx792_409 <- StateT derivsChars let c_ = xx792_409- unless (isBQ c_) (gets derivsPosition >>= (throwError . ParseError "isBQ c_" "not match: " "" d793_408 ["derivsChars"]))+ unless (isBQ c_) (gets derivsPosition >>= (throwError . mkParseError "isBQ c_" "not match: " "" d793_408 ["derivsChars"])) return (conE (mkName t))] opTail49_116 = foldl1 mplus [do d795_410 <- get xx794_411 <- StateT derivsChars let c = xx794_411- unless (isOpTailChar c) (gets derivsPosition >>= (throwError . ParseError "isOpTailChar c" "not match: " "" d795_410 ["derivsChars"]))+ unless (isOpTailChar c) (gets derivsPosition >>= (throwError . mkParseError "isOpTailChar c" "not match: " "" d795_410 ["derivsChars"])) s <- StateT opTail return (cons c s), return emp]@@ -1527,7 +1528,7 @@ xx806_413 <- StateT derivsChars case xx806_413 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d807_412 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d807_412 ["derivsChars"]) let '(' = xx806_413 return () l <- optional3_298 (foldl1 mplus [do e <- StateT hsExpTyp@@ -1543,7 +1544,7 @@ xx822_415 <- StateT derivsChars case xx822_415 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d823_414 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d823_414 ["derivsChars"]) let ')' = xx822_415 return () return (infixE l o r),@@ -1551,7 +1552,7 @@ xx824_417 <- StateT derivsChars case xx824_417 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d825_416 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d825_416 ["derivsChars"]) let '(' = xx824_417 return () et <- StateT hsExpTpl@@ -1559,7 +1560,7 @@ xx828_419 <- StateT derivsChars case xx828_419 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d829_418 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d829_418 ["derivsChars"]) let ')' = xx828_419 return () return (tupE et),@@ -1567,7 +1568,7 @@ xx830_421 <- StateT derivsChars case xx830_421 of '[' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'['" "not match pattern: " "" d831_420 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'['" "not match pattern: " "" d831_420 ["derivsChars"]) let '[' = xx830_421 return () et <- StateT hsExpTpl@@ -1575,7 +1576,7 @@ xx834_423 <- StateT derivsChars case xx834_423 of ']' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "']'" "not match pattern: " "" d835_422 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "']'" "not match pattern: " "" d835_422 ["derivsChars"]) let ']' = xx834_423 return () return (listE et),@@ -1591,7 +1592,7 @@ xx844_425 <- StateT derivsChars case xx844_425 of '\'' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\''" "not match pattern: " "" d845_424 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\''" "not match pattern: " "" d845_424 ["derivsChars"]) let '\'' = xx844_425 return () c <- StateT charLit@@ -1599,7 +1600,7 @@ xx848_427 <- StateT derivsChars case xx848_427 of '\'' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\''" "not match pattern: " "" d849_426 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\''" "not match pattern: " "" d849_426 ["derivsChars"]) let '\'' = xx848_427 return () return (litE (charL c)),@@ -1607,7 +1608,7 @@ xx850_429 <- StateT derivsChars case xx850_429 of '"' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\"'" "not match pattern: " "" d851_428 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\"'" "not match pattern: " "" d851_428 ["derivsChars"]) let '"' = xx850_429 return () s <- StateT stringLit@@ -1615,7 +1616,7 @@ xx854_431 <- StateT derivsChars case xx854_431 of '"' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\"'" "not match pattern: " "" d855_430 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\"'" "not match pattern: " "" d855_430 ["derivsChars"]) let '"' = xx854_431 return () return (litE (stringL s)),@@ -1623,7 +1624,7 @@ xx856_433 <- StateT derivsChars case xx856_433 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d857_432 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d857_432 ["derivsChars"]) let '-' = xx856_433 return () _ <- StateT spaces@@ -1636,7 +1637,7 @@ d867_434 <- get xx866_435 <- StateT derivsChars let c = xx866_435- unless (isComma c) (gets derivsPosition >>= (throwError . ParseError "isComma c" "not match: " "" d867_434 ["derivsChars"]))+ unless (isComma c) (gets derivsPosition >>= (throwError . mkParseError "isComma c" "not match: " "" d867_434 ["derivsChars"])) _ <- StateT spaces return () et <- StateT hsExpTpl@@ -1649,13 +1650,13 @@ xx876_437 <- StateT derivsChars case xx876_437 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d877_436 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d877_436 ["derivsChars"]) let '-' = xx876_437 return () d879_438 <- get xx878_439 <- StateT derivsChars let c = xx878_439- unless (isGt c) (gets derivsPosition >>= (throwError . ParseError "isGt c" "not match: " "" d879_438 ["derivsChars"]))+ unless (isGt c) (gets derivsPosition >>= (throwError . mkParseError "isGt c" "not match: " "" d879_438 ["derivsChars"])) _ <- StateT spaces return () r <- StateT hsTypeArr@@ -1671,14 +1672,14 @@ xx892_441 <- StateT derivsChars case xx892_441 of '[' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'['" "not match pattern: " "" d893_440 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'['" "not match pattern: " "" d893_440 ["derivsChars"]) let '[' = xx892_441 return () d895_442 <- get xx894_443 <- StateT derivsChars case xx894_443 of ']' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "']'" "not match pattern: " "" d895_442 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "']'" "not match pattern: " "" d895_442 ["derivsChars"]) let ']' = xx894_443 return () _ <- StateT spaces@@ -1688,7 +1689,7 @@ xx898_445 <- StateT derivsChars case xx898_445 of '[' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'['" "not match pattern: " "" d899_444 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'['" "not match pattern: " "" d899_444 ["derivsChars"]) let '[' = xx898_445 return () t <- StateT hsTypeArr@@ -1696,7 +1697,7 @@ xx902_447 <- StateT derivsChars case xx902_447 of ']' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "']'" "not match pattern: " "" d903_446 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "']'" "not match pattern: " "" d903_446 ["derivsChars"]) let ']' = xx902_447 return () _ <- StateT spaces@@ -1706,7 +1707,7 @@ xx906_449 <- StateT derivsChars case xx906_449 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d907_448 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d907_448 ["derivsChars"]) let '(' = xx906_449 return () _ <- StateT spaces@@ -1716,7 +1717,7 @@ xx912_451 <- StateT derivsChars case xx912_451 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d913_450 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d913_450 ["derivsChars"]) let ')' = xx912_451 return () return (tupT tt),@@ -1726,25 +1727,25 @@ xx916_453 <- StateT derivsChars case xx916_453 of '(' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'('" "not match pattern: " "" d917_452 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'('" "not match pattern: " "" d917_452 ["derivsChars"]) let '(' = xx916_453 return () d919_454 <- get xx918_455 <- StateT derivsChars case xx918_455 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d919_454 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d919_454 ["derivsChars"]) let '-' = xx918_455 return () d921_456 <- get xx920_457 <- StateT derivsChars let c = xx920_457- unless (isGt c) (gets derivsPosition >>= (throwError . ParseError "isGt c" "not match: " "" d921_456 ["derivsChars"]))+ unless (isGt c) (gets derivsPosition >>= (throwError . mkParseError "isGt c" "not match: " "" d921_456 ["derivsChars"])) d923_458 <- get xx922_459 <- StateT derivsChars case xx922_459 of ')' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "')'" "not match pattern: " "" d923_458 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "')'" "not match pattern: " "" d923_458 ["derivsChars"]) let ')' = xx922_459 return () _ <- StateT spaces@@ -1754,7 +1755,7 @@ d929_460 <- get xx928_461 <- StateT derivsChars let c = xx928_461- unless (isComma c) (gets derivsPosition >>= (throwError . ParseError "isComma c" "not match: " "" d929_460 ["derivsChars"]))+ unless (isComma c) (gets derivsPosition >>= (throwError . mkParseError "isComma c" "not match: " "" d929_460 ["derivsChars"])) _ <- StateT spaces return () tt <- StateT hsTypeTpl@@ -1786,24 +1787,24 @@ xx960_464 <- StateT derivsChars case xx960_464 of '\'' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\''" "not match pattern: " "" d961_463 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\''" "not match pattern: " "" d961_463 ["derivsChars"]) let '\'' = xx960_464 return () return '\''] upper62_129 = foldl1 mplus [do d963_465 <- get xx962_466 <- StateT derivsChars let u = xx962_466- unless (isUpper u) (gets derivsPosition >>= (throwError . ParseError "isUpper u" "not match: " "" d963_465 ["derivsChars"]))+ unless (isUpper u) (gets derivsPosition >>= (throwError . mkParseError "isUpper u" "not match: " "" d963_465 ["derivsChars"])) return u] lower63_130 = foldl1 mplus [do d965_467 <- get xx964_468 <- StateT derivsChars let l = xx964_468- unless (isLowerU l) (gets derivsPosition >>= (throwError . ParseError "isLowerU l" "not match: " "" d965_467 ["derivsChars"]))+ unless (isLowerU l) (gets derivsPosition >>= (throwError . mkParseError "isLowerU l" "not match: " "" d965_467 ["derivsChars"])) return l] digit64_131 = foldl1 mplus [do d967_469 <- get xx966_470 <- StateT derivsChars let d = xx966_470- unless (isDigit d) (gets derivsPosition >>= (throwError . ParseError "isDigit d" "not match: " "" d967_469 ["derivsChars"]))+ unless (isDigit d) (gets derivsPosition >>= (throwError . mkParseError "isDigit d" "not match: " "" d967_469 ["derivsChars"])) return d] spaces65_132 = foldl1 mplus [do _ <- StateT space return ()@@ -1814,20 +1815,20 @@ space66_133 = foldl1 mplus [do d973_471 <- get xx972_472 <- StateT derivsChars let s = xx972_472- unless (isSpace s) (gets derivsPosition >>= (throwError . ParseError "isSpace s" "not match: " "" d973_471 ["derivsChars"]))+ unless (isSpace s) (gets derivsPosition >>= (throwError . mkParseError "isSpace s" "not match: " "" d973_471 ["derivsChars"])) return (), do d975_473 <- get xx974_474 <- StateT derivsChars case xx974_474 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d975_473 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d975_473 ["derivsChars"]) let '-' = xx974_474 return () d977_475 <- get xx976_476 <- StateT derivsChars case xx976_476 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d977_475 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d977_475 ["derivsChars"]) let '-' = xx976_476 return () _ <- StateT notNLString@@ -1841,7 +1842,7 @@ notNLString67_134 = foldl1 mplus [do ddd984_477 <- get do err <- ((do _ <- StateT newLine return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:newLine") "not match: " "" ddd984_477 ["newLine"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:newLine") "not match: " "" ddd984_477 ["newLine"])) put ddd984_477 c <- StateT derivsChars s <- StateT notNLString@@ -1851,7 +1852,7 @@ xx991_479 <- StateT derivsChars case xx991_479 of '\n' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'\\n'" "not match pattern: " "" d992_478 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'\\n'" "not match pattern: " "" d992_478 ["derivsChars"]) let '\n' = xx991_479 return () return ()]@@ -1859,14 +1860,14 @@ xx993_481 <- StateT derivsChars case xx993_481 of '{' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'{'" "not match pattern: " "" d994_480 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'{'" "not match pattern: " "" d994_480 ["derivsChars"]) let '{' = xx993_481 return () d996_482 <- get xx995_483 <- StateT derivsChars case xx995_483 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d996_482 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d996_482 ["derivsChars"]) let '-' = xx995_483 return () ddd997_484 <- get@@ -1874,10 +1875,10 @@ xx998_486 <- StateT derivsChars case xx998_486 of '#' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'#'" "not match pattern: " "" d999_485 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'#'" "not match pattern: " "" d999_485 ["derivsChars"]) let '#' = xx998_486 return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "'#':") "not match: " "" ddd997_484 ["derivsChars"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "'#':") "not match: " "" ddd997_484 ["derivsChars"])) put ddd997_484 _ <- StateT comments return ()@@ -1897,12 +1898,12 @@ notComStr71_138 = foldl1 mplus [do ddd1012_487 <- get do err <- ((do _ <- StateT comment return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:comment") "not match: " "" ddd1012_487 ["comment"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:comment") "not match: " "" ddd1012_487 ["comment"])) put ddd1012_487 ddd1015_488 <- get do err <- ((do _ <- StateT comEnd return ()) >> return False) `catchError` const (return True)- unless err (gets derivsPosition >>= (throwError . ParseError ('!' : "_:comEnd") "not match: " "" ddd1015_488 ["comEnd"]))+ unless err (gets derivsPosition >>= (throwError . mkParseError ('!' : "_:comEnd") "not match: " "" ddd1015_488 ["comEnd"])) put ddd1015_488 _ <- StateT derivsChars return ()@@ -1914,14 +1915,14 @@ xx1022_490 <- StateT derivsChars case xx1022_490 of '-' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'-'" "not match pattern: " "" d1023_489 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'-'" "not match pattern: " "" d1023_489 ["derivsChars"]) let '-' = xx1022_490 return () d1025_491 <- get xx1024_492 <- StateT derivsChars case xx1024_492 of '}' -> return ()- _ -> gets derivsPosition >>= (throwError . ParseError "'}'" "not match pattern: " "" d1025_491 ["derivsChars"])+ _ -> gets derivsPosition >>= (throwError . mkParseError "'}'" "not match pattern: " "" d1025_491 ["derivsChars"]) let '}' = xx1024_492 return () return ()]
src/Text/PapillonCore.hs view
@@ -13,6 +13,7 @@ Source(..), SourceList(..), ParseError(..),+ mkParseError, Pos(..), ListPos(..), pePositionS,@@ -147,9 +148,14 @@ needApplicative pg = isListUsed pg || isOptionalUsed pg showParseError :: ParseError (Pos String) Derivs -> String-showParseError (ParseError c m _ d ns (ListPos (CharPos p))) =+showParseError pe = -- (ParseError c m _ d ns (ListPos (CharPos p))) = unwords (map (showReading d) ns) ++ (if null ns then "" else " ") ++ m ++ c ++ " at position: " ++ show p+ where+ [c, m, _] = ($ pe) `map` [peCode, peMessage, peComment]+ ns = peReading pe+ d = peDerivs pe+ p = pePositionS pe showReading :: Derivs -> String -> String showReading d "derivsChars" = case derivsChars d of@@ -207,7 +213,7 @@ (varE $ mkName ">>=") (infixApp (varE $ throwErrorN th) (varE $ mkName ".")- (conE (mkName "ParseError")+ (varE (mkName "mkParseError") `appE` code `appE` msg `appE` com