GHC.Types.SafeHaskell

ghc-9.2.1: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Types.SafeHaskell

Description

This stuff here is related to supporting the Safe Haskell extension, primarily about storing under what trust type a module has been compiled.

Synopsis

- type IsSafeImport = Bool
- data SafeHaskellMode
  - = Sf_None
  - | Sf_Unsafe
  - | Sf_Trustworthy
  - | Sf_Safe
  - | Sf_SafeInferred
  - | Sf_Ignore
- data IfaceTrustInfo
- getSafeMode :: IfaceTrustInfo -> SafeHaskellMode
- setSafeMode :: SafeHaskellMode -> IfaceTrustInfo
- noIfaceTrustInfo :: IfaceTrustInfo

# Documentation

type IsSafeImport = Bool Source #

Is an import a safe import?

data SafeHaskellMode Source #

The various Safe Haskell modes

Constructors

Sf_None | inferred unsafe
Sf_Unsafe | declared and checked
Sf_Trustworthy | declared and checked
Sf_Safe | declared and checked
Sf_SafeInferred | inferred as safe
Sf_Ignore | `-fno-safe-haskell` state

#### Instances

Instances details

Show SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods showsPrec :: Int -> SafeHaskellMode -> ShowS Source # show :: SafeHaskellMode -> String Source # showList :: [SafeHaskellMode] -> ShowS Source #
Outputable SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods ppr :: SafeHaskellMode -> SDoc Source #
Eq SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods (==) :: SafeHaskellMode -> SafeHaskellMode -> Bool # (/=) :: SafeHaskellMode -> SafeHaskellMode -> Bool #

data IfaceTrustInfo Source #

Safe Haskell information for `ModIface` Simply a wrapper around SafeHaskellMode to sepperate iface and flags

#### Instances

Instances details

Binary IfaceTrustInfo Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods put_ :: BinHandle -> IfaceTrustInfo -> IO () Source # put :: BinHandle -> IfaceTrustInfo -> IO (Bin IfaceTrustInfo) Source # get :: BinHandle -> IO IfaceTrustInfo Source #
Outputable IfaceTrustInfo Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods ppr :: IfaceTrustInfo -> SDoc Source #

getSafeMode :: IfaceTrustInfo -> SafeHaskellMode Source #

setSafeMode :: SafeHaskellMode -> IfaceTrustInfo Source #

noIfaceTrustInfo :: IfaceTrustInfo Source #