[make sure a default case always exists for typecases, even if it is just bottom.
John Meacham <john@repetae.net>**20060124045414] hunk ./E/TypeAnalysis.hs 145
-    cd _ = Nothing
+    cd Nothing = Nothing
+    -- The reason we do this is because for a typecase, we need a valid default in order to get the most general type
+    cd (Just d) = Just $ EError "pruneCase: default pruned" (getType d)
hunk ./E/TypeCheck.hs 102
+    fc ec@(ECase e@ELit {} b as (Just d)) | sortTypeLike e = do   -- TODO - this is a hack to get around case of constants.
+        et <- rfc e
+        eq et (getType b)
+        dt <- rfc d
+        verifyPats (casePats ec)
+        -- skip checking alternatives
+        ps <- mapM (strong' . getType) $ casePats ec
+        eqAll (et:ps)
+        return dt