From 53bfe9cf58a3c40e6eb7120d25c1633a9cea3126 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Tue, 16 Sep 2014 14:56:59 +0000 Subject: Haskell extraction: use explicit -XMagicHash instead of -fglasgow-exts When Coq's Haskell extraction needs to use unsafeCoerce, it passes the -fglasgow-exts option to GHC, but recent versions of GHC warn against this: xx.hs:1:16: Warning: -fglasgow-exts is deprecated: Use individual extensions instead This patch does as the warning suggests, replacing -fglasgow-exts with the specific option that the extraction needs (-XMagicHash). --- plugins/extraction/haskell.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/extraction/haskell.ml b/plugins/extraction/haskell.ml index 6008dffde6..e63cdfb685 100644 --- a/plugins/extraction/haskell.ml +++ b/plugins/extraction/haskell.ml @@ -40,7 +40,7 @@ let preamble mod_name comment used_modules usf = in (if not usf.magic then mt () else - str "{-# OPTIONS_GHC -cpp -fglasgow-exts #-}" ++ fnl () ++ + str "{-# OPTIONS_GHC -cpp -XMagicHash #-}" ++ fnl () ++ str "{- For Hugs, use the option -F\"cpp -P -traditional\" -}") ++ fnl () ++ fnl () ++ -- cgit v1.2.3