X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FParserCoreUtils.hs;h=2c88aa79e356176379744cdc5cad1ecff5d080ad;hp=4aa33410bc4c3cb0ed776640cd5c4c634fc1aef2;hb=59300a7161f44b3a2afe381a6ccd914043a32c4f;hpb=819d8189dddeb05e881bc641f0a6ab2cd14ee1ad diff --git a/compiler/parser/ParserCoreUtils.hs b/compiler/parser/ParserCoreUtils.hs index 4aa3341..2c88aa7 100644 --- a/compiler/parser/ParserCoreUtils.hs +++ b/compiler/parser/ParserCoreUtils.hs @@ -1,6 +1,6 @@ module ParserCoreUtils where -import IO +import System.IO data ParseResult a = OkP a | FailP String type P a = String -> Int -> ParseResult a @@ -30,6 +30,7 @@ getCoreModuleName fpath = (\ _ -> return "Main") where findMod [] = "Main" + -- TODO: this should just return the module name, without the package name findMod ("%module":m:_) = m findMod (_:xs) = findMod xs @@ -47,6 +48,7 @@ data Token = | TKcast | TKnote | TKexternal + | TKlocal | TKwild | TKoparen | TKcparen @@ -54,7 +56,9 @@ data Token = | TKcbrace | TKhash | TKeq + | TKcolon | TKcoloncolon + | TKcoloneqcolon | TKstar | TKrarrow | TKlambda