小编Eld*_*dar的帖子

无法使新数据类型Hashable

尝试在OS X 10.9.3上使用ghc 7.8.2编译以下内容

import Data.Hashable (Hashable, hash)

data Edge v = Edge v v deriving (Show)

instance (Eq v) => Eq (Edge v) where
  Edge x1 x2 == Edge y1 y2 =
    x1 == y1 && x2 == y2 || x1 == y2 && x2 == y1

instance (Hashable v) => Hashable (Edge v) where
  hash (Edge x1 x2) = (hash x1) + (hash x2)
Run Code Online (Sandbox Code Playgroud)

失败了

Could not deduce (hashable-1.2.1.0:Data.Hashable.Class.GHashable
                    (GHC.Generics.Rep (Edge v)))
  arising from a use of ‘hashable-1.2.1.0:Data.Hashable.Class.$gdmhashWithSalt’ …
Run Code Online (Sandbox Code Playgroud)

haskell

6
推荐指数
1
解决办法
838
查看次数

在chrome性能标签的“用户计时”部分中,子组件的统计信息并非始终可用

下面是我尝试分析一些React应用程序的屏幕截图。

屏幕截图

如您所见,选中了InspectionPage组件,但是在“自下而上”选项卡中没有显示有关子组件的信息,例如,例如,我们可以在此处看到-https: //twitter.com/dan_abramov/status/994577100077191168

奇怪的是-并非总是如此。有时它可用,有时似乎没有给出完全相同的条件。

profiler google-chrome google-chrome-devtools reactjs

5
推荐指数
1
解决办法
115
查看次数