mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-11 17:16:30 +03:00
Convenience function for loading watches from regular or test watch
This commit is contained in:
parent
977840e761
commit
3a34bfae8f
@ -203,6 +203,12 @@ getTypeOfConstructor codebase (Reference.DerivedId r) cid = do
|
|||||||
getTypeOfConstructor _ r cid =
|
getTypeOfConstructor _ r cid =
|
||||||
error $ "Don't know how to getTypeOfConstructor " ++ show r ++ " " ++ show cid
|
error $ "Don't know how to getTypeOfConstructor " ++ show r ++ " " ++ show cid
|
||||||
|
|
||||||
|
lookupWatchCache :: (Monad m) => Codebase m v a -> Reference -> m (Maybe (Term v a))
|
||||||
|
lookupWatchCache codebase (Reference.DerivedId h) = do
|
||||||
|
m1 <- getWatch codebase UF.RegularWatch h
|
||||||
|
maybe (getWatch codebase UF.TestWatch h) (pure . Just) m1
|
||||||
|
lookupWatchCache _ Reference.Builtin{} = pure Nothing
|
||||||
|
|
||||||
typeLookupForDependencies
|
typeLookupForDependencies
|
||||||
:: (Monad m, Var v, BuiltinAnnotation a)
|
:: (Monad m, Var v, BuiltinAnnotation a)
|
||||||
=> Codebase m v a -> Set Reference -> m (TL.TypeLookup v a)
|
=> Codebase m v a -> Set Reference -> m (TL.TypeLookup v a)
|
||||||
|
Loading…
Reference in New Issue
Block a user