1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Compare by striing

This commit is contained in:
zhujinxuan 2020-03-27 00:45:37 -04:00
parent de8db627ba
commit dc90cc950f

View File

@ -117,7 +117,7 @@ instance ( Has (Reader (ModuleTable (Module (ModuleResult address value)))) sig
Load name k -> askModuleTable >>= maybeM (throwLoadError (ModuleNotFoundError name)) . fmap moduleBody . ModuleTable.lookup name >>= k
Lookup path k -> askModuleTable >>= k . fmap moduleBody . ModuleTable.lookup path
Resolve names k -> k (find (`Set.member` paths) (map Path.absRel names))
List dir k -> k (filter ((Path.absRel dir ==) . Path.takeDirectory) (toList paths))
List dir k -> k (filter ((dir ==) . Path.toString . Path.takeDirectory) (toList paths))
alg (R other) = ModulesC (alg (R (handleCoercible other)))
askModuleTable :: Has (Reader (ModuleTable (Module (ModuleResult address value)))) sig m => m (ModuleTable (Module (ModuleResult address value)))