如何确定我的哪些进口商品来自Haskell? [英] How do I figure out which of my imports are from in Haskell?

查看:71
本文介绍了如何确定我的哪些进口商品来自Haskell?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的包裹中有一堆进口商品,需要整理出哪些是来自特定包裹的( MissingH).除了在Hoogle上搜索每个内容外,我不确定如何执行此操作.是否可以通过扫描软件包的文件来以编程方式或在命令行中执行此操作?

I have a bunch of imports in my package and need to sort out which ones are coming from a specific package (MissingH). I'm not sure how to do this other than by searching for each on Hoogle. Is there a way to do this programmatically or at the command line by just scanning my package's files?

这是我的导入列表(来自我的包的所有文件):

Here's my list of imports (from all files of my package):

import           Control.Arrow
import           Control.Exception      (assert)
import           Control.Monad          (unless)
import           Control.Monad.Except
import           Control.Monad.Zip
import           Control.Applicative
import           Data.Monoid
import           Data.List
import           Data.List.Split        (splitOn)
import qualified Data.Map               as M
import           Data.Maybe
import           Text.Printf            (printf)
import           Data.Char              (toUpper)
import           Data.String.Utils      (replace)

import Data.Char (chr, ord)
import Data.List (sort)

import Control.Applicative
import Data.Monoid
import Data.Char
import Data.List
import Data.List.Split          (chunksOf)
import Data.String.Utils        (replace)
import Text.Printf              (printf)

推荐答案

如果软件包在Stackage中,则可以检查模块列表中的快照以获取Map ModuleName [PackageName]对应关系.是的,每个快照的多个软件包中可能出现一个模块名称.这是一个示例清单:

If the packages are in Stackage, you can check the module list for a snapshot to get the Map ModuleName [PackageName] correspondence. Yes, a module name may appear in multiple packages per snapshot. Here's an example listing:

https://www.stackage.org/lts-12.12/docs

这篇关于如何确定我的哪些进口商品来自Haskell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆