[fix strict newtypes bug
John Meacham <john@repetae.net>**20090905061645
 Ignore-this: 5def4f36458cb6dbec327fe3bdcb3979
] hunk ./src/DataConstructors.hs 259
-mktBox k = ELit (litCons { litName = nameConjured modBox k, litArgs = [], litType = k, litAliasFor = af }) where
+mktBox  k = ELit (litCons { litName = nameConjured modBox k, litArgs = [], litType = k, litAliasFor = af }) where
hunk ./src/DataConstructors.hs 602
-            f (i:j:is) (True:bs) (e:es) = maybe  (Left (e { tvrIdent = i, tvrType = subst (tvrType e) },True):f is bs es) id $ do
-                ELit LitCons { litName = n } <- return $ followAliases fullDataTable (getType e)
-                Constructor { conChildren = DataNormal [dc] } <- getConstructor n fullDataTable
-                [st] <- return $ slotTypes fullDataTable dc (tvrType e)
-                let nv = tvr { tvrIdent = j, tvrType = st }
-                return $ Right (e { tvrIdent = i, tvrType = subst (tvrType e)},dc,[nv]):f is bs es
+            f (i:j:is) (True:bs) (e:es) = maybe  (Left (e { tvrIdent = i, tvrType = subst (tvrType e) },True):f is bs es) id $ g e (tvrType e) where
+                g e te = do
+                    ELit LitCons { litName = n } <- return $ followAliases fullDataTable te
+                    Constructor { conChildren = DataNormal [dc] } <- getConstructor n fullDataTable
+                    con <- getConstructor dc fullDataTable
+                    case (conAlias con,slotTypes fullDataTable dc te) of
+                        (ErasedAlias,[nt]) -> g e nt
+                        (_,[st]) -> do
+                            let nv = tvr { tvrIdent = j, tvrType = st }
+                            return $ Right (e { tvrIdent = i, tvrType = subst (tvrType e)},dc,[nv]):f is bs es
+                        _ -> fail "not unboxable"