imp: ghc9.2: fix an incomplete-uni-pattern warning
This commit is contained in:
		
							parent
							
								
									3eddd913e3
								
							
						
					
					
						commit
						5858bb7b6d
					
				| @ -65,15 +65,15 @@ versionStringWith egitinfo progname packageversion = | |||||||
|         | otherwise       = os |         | otherwise       = os | ||||||
|     version = case egitinfo of |     version = case egitinfo of | ||||||
|       Left _err     -> packageversion |       Left _err     -> packageversion | ||||||
|       Right gitinfo -> intercalate "-" [packageversion , hash, date] |       Right gitinfo ->  | ||||||
|  |         case words $ giCommitDate gitinfo of | ||||||
|  |           -- git log's date format is normally --date=default ("similar to --date=rfc2822") | ||||||
|  |           _weekday:mon:day:_localtime:year:_offset:_ -> | ||||||
|  |             intercalate "-" [packageversion , hash, date] | ||||||
|               where |               where | ||||||
|                 hash = 'g' : take 9 (giHash gitinfo)  -- like git describe |                 hash = 'g' : take 9 (giHash gitinfo)  -- like git describe | ||||||
|                 date = concat [year,mm,dd] |                 date = concat [year,mm,dd] | ||||||
|                   where  |                   where  | ||||||
|               -- XXX PARTIAL: depends on git log's date format, which by default |  | ||||||
|               -- is --date=default ("similar to --date=rfc2822"), but could be |  | ||||||
|               -- overridden by a log.date config variable in repo or user git config. |  | ||||||
|               _weekday:mon:day:_localtime:year:_offset:_ = words $ giCommitDate gitinfo |  | ||||||
|                     mm = fromMaybe mon $ lookup mon $ [ |                     mm = fromMaybe mon $ lookup mon $ [ | ||||||
|                       ("Jan","01") |                       ("Jan","01") | ||||||
|                       ,("Feb","02") |                       ,("Feb","02") | ||||||
| @ -89,6 +89,8 @@ versionStringWith egitinfo progname packageversion = | |||||||
|                       ,("Dec","12") |                       ,("Dec","12") | ||||||
|                       ] |                       ] | ||||||
|                     dd = (if length day < 2 then ('0':) else id) day |                     dd = (if length day < 2 then ('0':) else id) day | ||||||
|  |           -- but could be overridden by a log.date config variable in repo or user git config | ||||||
|  |           _ -> packageversion | ||||||
| 
 | 
 | ||||||
| -- -- | Given a program name, return a precise platform-specific executable | -- -- | Given a program name, return a precise platform-specific executable | ||||||
| -- -- name suitable for naming downloadable binaries.  Can raise an error if | -- -- name suitable for naming downloadable binaries.  Can raise an error if | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user