[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Patch to increase safety of arch and os computation in haskell-devscript



Never quite sure how to submit patches to haskell-devscripts.  This prevents ghc from looking at .ghci when printing arch and os.  This change was provoked by a .ghci that tried to load source files from the package being configured.
From 6b5eb542a018f966db070fc1ab802f2c94746b51 Mon Sep 17 00:00:00 2001
From: David Fox <dsf@seereason.com>
Date: Tue, 22 Nov 2016 09:28:47 -0800
Subject: =?UTF-8?q?Prevent=20ghc=20from=20looking=20at=20.ghci=20when=20pr?=
 =?UTF-8?q?inting=20arch=20and=20os.=20=20This=0Achange=20was=20provoked?=
 =?UTF-8?q?=20by=20a=20.ghci=20that=20tried=20to=20load=20source=20files?=
 =?UTF-8?q?=20from=0Athe=20package=20being=20configured.?=

---
 Dh_Haskell.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 9f07aff..8203f60 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -6,11 +6,11 @@ run () {
 }
 
 cpu(){
-  ghc -e 'putStr System.Info.arch'
+  ghc -ignore-dot-ghci -e 'putStr System.Info.arch'
 }
 
 os(){
-  ghc -e 'putStr System.Info.os'
+  ghc -ignore-dot-ghci -e 'putStr System.Info.os'
 }
 
 ghcjs_version(){
-- 
1.9.1


Reply to: