Commit d71b65f5 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

holePackageKey and isHoleModule utility functions.

Signed-off-by: default avatarEdward Z. Yang <>
parent 8800a73a
......@@ -42,6 +42,7 @@ module Module
holePackageKey, isHoleModule,
interactivePackageKey, isInteractiveModule,
......@@ -399,9 +400,17 @@ interactivePackageKey = fsToPackageKey (fsLit "interactive")
-- to symbol names, since there can be only one main package per program.
mainPackageKey = fsToPackageKey (fsLit "main")
-- | This is a fake package id used to provide identities to any un-implemented
-- signatures. The set of hole identities is global over an entire compilation.
holePackageKey :: PackageKey
holePackageKey = fsToPackageKey (fsLit "hole")
isInteractiveModule :: Module -> Bool
isInteractiveModule mod = modulePackageKey mod == interactivePackageKey
isHoleModule :: Module -> Bool
isHoleModule mod = modulePackageKey mod == holePackageKey
wiredInPackageKeys :: [PackageKey]
wiredInPackageKeys = [ primPackageKey,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment