More modules that need LANGUAGE BangPatterns
[ghc-hetmet.git] / compiler / parser / ParserCoreUtils.hs
index a590fb5..2c88aa7 100644 (file)
@@ -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
 
@@ -44,9 +45,10 @@ data Token =
  | TKin
  | TKcase
  | TKof
- | TKcoerce
+ | TKcast
  | TKnote
  | TKexternal
+ | TKlocal
  | TKwild
  | TKoparen
  | TKcparen
@@ -54,7 +56,9 @@ data Token =
  | TKcbrace
  | TKhash
  | TKeq
+ | TKcolon
  | TKcoloncolon
+ | TKcoloneqcolon
  | TKstar
  | TKrarrow
  | TKlambda