【问题标题】:Snap web framework and dynamic recompilationSnap Web 框架和动态重新编译
【发布时间】:2013-10-10 02:53:03
【问题描述】:

我正在使用 Snap Web 框架构建一个 Web 应用程序。我用 snap init 创建了一个项目。

然后我 cabal install -fdevelopment,cabal 运行,当我尝试从 chrome 访问索引页面时看到此错误。

有什么想法吗?

A web handler threw an exception. Details:
Unknown interpreter error:

flags: '-static' not recognized

【问题讨论】:

    标签: haskell haskell-snap-framework


    【解决方案1】:

    这是来自动态加载器的相关评论:

    ------------------------------------------------------------------------------
    -- | Convert the command-line arguments passed in to options for the
    -- hint interpreter. This is somewhat brittle code, based on a few
    -- experimental datapoints regarding the structure of the command-line
    -- arguments cabal produces.
    

    遗憾的是,它仍然像我第一次写它时一样脆弱。这很容易修补,但我仍然更喜欢一个更好的长期解决方案,而不是仅仅将解释器不支持的标志列入黑名单。

    如果您愿意在系统上修补库,则可以将 "-static" 添加到 snap-loader-dynamic 软件包中 Snap/Loader/Dynamic.hs 的第 86 行的黑名单中。否则,您将不得不等到发布新版本。已经在github上打了补丁,等待发布。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多