From 6a30c57f5267128703c37f0b5f3bc096a7459a86 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Thu, 3 May 2007 23:13:23 +0000 Subject: [PATCH] Resolve named types when checking conversions --- fco2/Parse.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fco2/Parse.hs b/fco2/Parse.hs index ac650cd..cc0f38e 100644 --- a/fco2/Parse.hs +++ b/fco2/Parse.hs @@ -1049,9 +1049,11 @@ conversion :: OccParser A.Expression conversion = do m <- md t <- dataType + baseT <- underlyingType t (c, o) <- conversionMode ot <- typeOfExpression o - c <- case (isPreciseConversion ot t, c) of + baseOT <- underlyingType ot + c <- case (isPreciseConversion baseOT baseT, c) of (False, A.DefaultConversion) -> fail "imprecise conversion must specify ROUND or TRUNC" (False, _) -> return c