Silence compiler warnings

This commit is contained in:
2020-04-09 19:53:22 +02:00
parent 1a5876a074
commit 3496f24f6e
10 changed files with 40 additions and 248 deletions

View File

@@ -232,7 +232,7 @@ execLogged exe spath args lfile chdir env = do
readTilEOF action' fd' = do
bs <- readLine fd'
action' bs
void $ action' bs
readTilEOF action' fd'
@@ -309,7 +309,7 @@ captureOutStreams action = do
readTilEOF ~action' fd' = do
bs <- SPIB.fdRead fd' 512
action' bs
void $ action' bs
readTilEOF action' fd'

View File

@@ -1,4 +1,5 @@
{-# OPTIONS_GHC -Wno-orphans #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE FlexibleInstances #-}
@@ -11,6 +12,9 @@ module GHCup.Utils.Version.QQ where
import Data.Data
import Data.Text ( Text )
import Data.Versions
#if !MIN_VERSION_base(4,13,0)
import GHC.Base
#endif
import Language.Haskell.TH
import Language.Haskell.TH.Quote ( QuasiQuoter(..) )
import Language.Haskell.TH.Syntax ( Lift
@@ -36,6 +40,11 @@ deriving instance Data VSep
deriving instance Lift VUnit
deriving instance Data VUnit
#if !MIN_VERSION_base(4,13,0)
deriving instance Lift (NonEmpty Word)
instance Lift Text
#endif
qq :: (Text -> Q Exp) -> QuasiQuoter
qq quoteExp' = QuasiQuoter
{ quoteExp = (\s -> quoteExp' . T.pack $ s)