ghcide-2.4.0.0: The core of an IDE

Safe Haskell | Safe-Inferred
Language | Haskell2010

Development.IDE.GHC.CoreFile

Description

CoreFiles let us serialize Core to a file in order to later recover it without reparsing or retypechecking

Synopsis

- data CoreFile = CoreFile {
  - cf_bindings :: [TopIfaceBinding IfaceId]
  - cf_iface_hash :: !Fingerprint
  }
- codeGutsToCoreFile :: Fingerprint -> CgGuts -> CoreFile
- typecheckCoreFile :: Module -> IORef TypeEnv -> CoreFile -> IfG CoreProgram
- readBinCoreFile :: NameCacheUpdater -> FilePath -> IO (CoreFile, Fingerprint)
- writeBinCoreFile :: FilePath -> CoreFile -> IO Fingerprint
- getImplicitBinds :: TyCon -> [CoreBind]
- occNamePrefixes :: [Text]

# Documentation

data CoreFile #

Constructors

CoreFile |
Fields cf_bindings :: [TopIfaceBinding IfaceId] The actual core file bindings, deserialized lazily cf_iface_hash :: !Fingerprint

#### Instances

Instances details

Binary CoreFile # |
Instance details Defined in Development.IDE.GHC.CoreFile Methods put_ :: BinHandle -> CoreFile -> IO () put :: BinHandle -> CoreFile -> IO (Bin CoreFile) get :: BinHandle -> IO CoreFile

codeGutsToCoreFile #

Arguments

:: Fingerprint | Hash of the interface this was generated from
-> CgGuts |
-> CoreFile |

typecheckCoreFile :: Module -> IORef TypeEnv -> CoreFile -> IfG CoreProgram #

readBinCoreFile :: NameCacheUpdater -> FilePath -> IO (CoreFile, Fingerprint) #

writeBinCoreFile :: FilePath -> CoreFile -> IO Fingerprint #

Write a core file

getImplicitBinds :: TyCon -> [CoreBind] #

occNamePrefixes :: [Text] #

Prefixes that can occur in a GHC OccName