ghc-9.10.3: The GHC API

Safe Haskell | None
Language | GHC2021

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

Outputable SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods ppr :: SafeHaskellMode -> SDoc Source #
Show SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods showsPrec :: Int -> SafeHaskellMode -> ShowS # show :: SafeHaskellMode -> String # showList :: [SafeHaskellMode] -> ShowS #
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 separate 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 #