Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SourceGraph(Haskell)的问题_Haskell - Fatal编程技术网

SourceGraph(Haskell)的问题

SourceGraph(Haskell)的问题,haskell,Haskell,我试图用SourceGraph可视化现有的Haskell代码库 SourceGraph mycabal.cabal 但我只收到如下错误消息: Could not parse source file ./src/mysource.hs SourceGraph: Could not find data file templates/default.html 有什么提示要做什么或在哪里查找文档吗 到目前为止,我发现的唯一文档是这一个:不幸的是,它只包含吸引人的图像,但没有提示如何生成它们 关于你眼

我试图用SourceGraph可视化现有的Haskell代码库

SourceGraph mycabal.cabal
但我只收到如下错误消息:

Could not parse source file ./src/mysource.hs
SourceGraph: Could not find data file templates/default.html
有什么提示要做什么或在哪里查找文档吗


到目前为止,我发现的唯一文档是这一个:不幸的是,它只包含吸引人的图像,但没有提示如何生成它们

关于你眼前的问题,这里最好的文档似乎是来源:

我在自己的存储库中尝试了它,也遇到了解析问题。这是haskell src exts无法解析模块。以下修补程序显示了实际错误:

--- Parsing.hs  2013-02-14 12:59:34.000000000 +0100
+++ ../SourceGraph-0.7.0.5-fixed/Parsing.hs 2014-04-08 20:49:54.000000000 +0200
@@ -64,7 +64,7 @@
 parseFile       :: FileContents -> Either FilePath Module
 parseFile (p,f) = case (parseFileContentsWithMode mode f) of
                     (ParseOk hs) -> Right hs
-                    _            -> Left p
+                    x            -> Left $ p ++ ": " ++ show x
     where
       mode = defaultParseMode { parseFilename = p
                               , fixities = Nothing
事实证明,我的大多数失败模块都失败了,因为没有启用MultiparamTypeClass。这显然是haskell src exts的严格要求,而ghc对没有MultiParamTypeClasses扩展感到满意:

因此,作为一个快速修复,尝试添加

{-# LANGUAGE MultiParamTypeClasses #-}

在失败模块的顶部。

关于您的直接问题,这里最好的文档似乎是源代码:

我在自己的存储库中尝试了它,也遇到了解析问题。这是haskell src exts无法解析模块。以下修补程序显示了实际错误:

--- Parsing.hs  2013-02-14 12:59:34.000000000 +0100
+++ ../SourceGraph-0.7.0.5-fixed/Parsing.hs 2014-04-08 20:49:54.000000000 +0200
@@ -64,7 +64,7 @@
 parseFile       :: FileContents -> Either FilePath Module
 parseFile (p,f) = case (parseFileContentsWithMode mode f) of
                     (ParseOk hs) -> Right hs
-                    _            -> Left p
+                    x            -> Left $ p ++ ": " ++ show x
     where
       mode = defaultParseMode { parseFilename = p
                               , fixities = Nothing
事实证明,我的大多数失败模块都失败了,因为没有启用MultiparamTypeClass。这显然是haskell src exts的严格要求,而ghc对没有MultiParamTypeClasses扩展感到满意:

因此,作为一个快速修复,尝试添加

{-# LANGUAGE MultiParamTypeClasses #-}

在失败模块的顶部。

刚刚遇到了类似的问题,所以我想我应该在这里记录我所做的。我将更改放在修补程序文件中。


我的文件中的大多数错误都是由于bang模式和多参数类型类引起的。必须有更好的解决方案使SourceGraph的解析模式默认为与GHC相同。

刚刚遇到了类似的问题,所以我想在这里记录我所做的工作。我将更改放在修补程序文件中。


我的文件中的大多数错误都是由于bang模式和多参数类型类引起的。必须有更好的解决方案使SourceGraph的解析模式默认为与GHC相同。

不幸的是,快速修复没有帮助,我还不知道如何通过cabal修补和重新安装SourceGraph。非常感谢您的回答。不幸的是,快速修复没有帮助,我还没有找到如何通过cabal修补和重新安装SourceGraph。非常感谢你的回答。