X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=utils%2Fext-core%2FParsecParser.hs;h=41a18a5c3084aedeebf89b832c2114bda9e2d43f;hp=ab0d2845faa6671810803003a001295eda99082f;hb=8bfeb25ae78e99c7014113468b0057342db4208f;hpb=044805225a08d5e370b72d2efed66880912b0806 diff --git a/utils/ext-core/ParsecParser.hs b/utils/ext-core/ParsecParser.hs index ab0d284..41a18a5 100644 --- a/utils/ext-core/ParsecParser.hs +++ b/utils/ext-core/ParsecParser.hs @@ -141,12 +141,10 @@ coreCdef = do tys <- sepBy coreAtySaturated whiteSpace return $ Constr dataConName tBinds tys -coreTRep :: Parser (Maybe Ty) +coreTRep :: Parser Ty -- note that the "=" is inside here since if there's -- no rhs for the newtype, there's no "=" -coreTRep = optionMaybe (do - symbol "=" - try coreType) +coreTRep = symbol "=" >> try coreType coreType :: Parser Ty coreType = coreForallTy <|> (do