[don't rename wildcard patterns until typechecker
John Meacham <john@repetae.net>**20060407144155] {
hunk ./FrontEnd/Rename.hs 615
-      unique <- newUniq
-      mod <- getCurrentModule
-      let hsName' = Qual mod (HsIdent $ show unique ++ "_wild@")
-      return (HsPVar hsName')
+    return HsPWildCard
+--      unique <- newUniq
+--      mod <- getCurrentModule
+--      let hsName' = Qual mod (HsIdent $ show unique ++ "_wild@")
+--      return (HsPVar hsName')
hunk ./FrontEnd/Rename.hs 713
---    unique <- getUnique
---    incUnique
---    mod <- getCurrentModule
---    let hsName'' = (Qual mod (HsIdent $ show unique ++ fromHsName hsName' ++ "_as@"))
---    return (HsAsPat hsName'' $   HsVar hsName' )
+
hunk ./FrontEnd/Rename.hs 717
---    unique <- getUnique
---    incUnique
---    mod <- getCurrentModule
---    let hsName'' = (Qual mod (HsIdent $ show unique ++ fromHsName hsName' ++ "_as@"))
---    return (HsAsPat hsName'' $ HsCon hsName')
hunk ./FrontEnd/Tc/Main.hs 110
-    nn <- newUniq
-    let n = toName Val ("As@",show nn)
+    (e',n) <- wrapInAsPat e
hunk ./FrontEnd/Tc/Main.hs 112
-    return (HsAsPat (nameName n) e)
+    return e'
hunk ./FrontEnd/Tc/Main.hs 116
-    nn <- newUniq
-    let n = toName Val ("As@",show nn)
+    n <- newHsVar "As"
hunk ./FrontEnd/Tc/Main.hs 119
+newHsVar ns = do
+    nn <- newUniq
+    return $ toName Val (ns ++ "@",show nn)
+
hunk ./FrontEnd/Tc/Main.hs 436
-tiPat HsPWildCard typ = unBox typ >> return (HsPWildCard, mempty)
+--tiPat HsPWildCard typ = unBox typ >> return (HsPWildCard, mempty)
+tiPat HsPWildCard typ = do
+    n <- newHsVar "Wild"
+    typ' <- unBox typ
+    addToCollectedEnv (Map.singleton n typ')
+    return (HsPVar (nameName n), Map.singleton n typ')
}
