diff options
| author | aarne <aarne@chalmers.se> | 2012-06-25 11:49:50 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2012-06-25 11:49:50 +0000 |
| commit | 98a967a173a0d42e9382b2076a35f0217d33a85d (patch) | |
| tree | 82b6a8d7bedf5355401886512fe9b368312a6f6d /src/compiler/GF/Infra/CheckM.hs | |
| parent | d15e0f775d0eeb82e322f715d9e2a55d90206615 (diff) | |
warnings shown in checkMapRecover
Diffstat (limited to 'src/compiler/GF/Infra/CheckM.hs')
| -rw-r--r-- | src/compiler/GF/Infra/CheckM.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/GF/Infra/CheckM.hs b/src/compiler/GF/Infra/CheckM.hs index c1198dea6..5158382b9 100644 --- a/src/compiler/GF/Infra/CheckM.hs +++ b/src/compiler/GF/Infra/CheckM.hs @@ -70,7 +70,10 @@ checkMapRecover f mp = do let xs = map (\ (k,v) -> (k,runCheck (f k v))) (Map.toList mp) case [s | (_,Bad s) <- xs] of ss@(_:_) -> checkError (text (unlines ss)) - _ -> return (Map.fromAscList [(k,x) | (k, Ok (x,_)) <- xs]) + _ -> do + let (kx,ss) = unzip [((k,x),s) | (k, Ok (x,s)) <- xs] + checkWarn (text (unlines ss)) + return (Map.fromAscList kx) checkErr :: Err a -> Check a checkErr (Ok x) = return x |
