{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_HADDOCK hide #-}
module LLVM.AST.Type.Flags (
NSW(..), NUW(..), FastMathFlags(..)
) where
import Data.Default.Class
import LLVM.AST.Instruction ( FastMathFlags(..) )
data NSW = NoSignedWrap | SignedWrap
data NUW = NoUnsignedWrap | UnsignedWrap
instance Default NSW where
def = SignedWrap
instance Default NUW where
def = UnsignedWrap
instance Default FastMathFlags where
#if MIN_VERSION_llvm_hs_pure(6,0,0)
def = FastMathFlags
{ allowReassoc = True
, noNaNs = True
, noInfs = True
, noSignedZeros = True
, allowReciprocal = True
, allowContract = True
, approxFunc = True
}
#else
def = UnsafeAlgebra
#endif