unison-parser-typechecker-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Codebase.UniqueTypeGuidLookup

Description

This module contains functionality related to computing a "unique type guid lookup" function, which resolves a name to a unique type's GUID to reuse.

Synopsis

Documentation

loadUniqueTypeGuid :: (ProjectPath -> Transaction (Maybe (Branch Transaction))) -> ProjectPath -> NameSegment -> Transaction (Maybe Text) Source #

loadUniqueTypeGuid loadNamespaceAtPath path name looks up the GUID associated with the unique type named name at child namespace path in the root namespace. If there are multiple such types, an arbitrary one is chosen.

For (potential) efficiency, this function accepts an argument that loads a namespace at a path, which may be backed by a cache.