From: Matthijs Kooijman Date: Tue, 13 Apr 2010 14:48:24 +0000 (+0200) Subject: Improve error message in mkSelCase. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=6da4d5f5547f8107200d1d8766d82e81a626c647;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Improve error message in mkSelCase. --- diff --git "a/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" "b/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" index 0959570..ce42678 100644 --- "a/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" +++ "b/c\316\273ash/CLasH/Utils/Core/CoreTools.hs" @@ -492,4 +492,4 @@ mkSelCase scrut i = do let binders = take i wildbndrs ++ [sel_bndr] ++ drop (i+1) wildbndrs return $ CoreSyn.Case scrut scrut_bndr scrut_ty [(CoreSyn.DataAlt datacon, binders, CoreSyn.Var sel_bndr)] dcs -> error $ "CoreTools.mkSelCase: Scrutinee type must have exactly one datacon. Extracting element " ++ (show i) ++ " from '" ++ pprString scrut ++ "' Datacons: " ++ (show dcs) ++ " Type: " ++ (pprString scrut_ty) - Nothing -> error $ "CoreTools.mkSelCase: Creating extractor case, but scrutinee has no tycon? Extracting element " ++ (show i) ++ " from '" ++ pprString scrut ++ "'" + Nothing -> error $ "CoreTools.mkSelCase: Creating extractor case, but scrutinee has no tycon? Extracting element " ++ (show i) ++ " from '" ++ pprString scrut ++ "'" ++ " Type: " ++ (pprString scrut_ty)