我正在学习Haskell。我想使用if(/CriOS/i.test(navigator.userAgent) &&
/iphone|ipod|ipad/i.test(navigator.userAgent)){
return true;
}else{
return false;
}
库。然而,Ghci似乎无法找到它。这是报告的错误
System.Random
所以我使用Prelude> import System.Random
<no location info>:
Could not find module ‘System.Random’
It is not a module in the current program, or in any known package.
Prelude>
安装了库。同样的问题仍然存在。在我的目录中进行了一些讨论之后,我发现程序包 毕竟是存在的。以下是我cabal install random
的内容
目录
~/.cabal/lib
所以我认为ghci可能不会在这个目录中搜索库?
我必须做什么才能让ghci知道smbud@gedanken:~/.cabal/lib$ ls
bifunctors-4.1.1.1 distributive-0.4.4 lens-family-core-1.0.1 StateVar-1.1.0.3 unix-2.7.1.0
comonad-4.2.7.2 exceptions-0.8.2.1 nats-1.1 tagged-0.8.3 unordered-containers-0.2.7.0
contravariant-1.4 gnuplot-0.5.4.1 process-1.4.2.0 temporary-1.2.0.4 utility-ht-0.0.11
data-accessor-0.2.2.7 graphene-0.1.0.4 random-1.1 time-1.5.0.1 void-0.7.1
data-accessor-transformers-0.2.1.7 hashable-1.1.2.5 semigroupoids-4.3 transformers-compat-0.4.0.3
directory-1.2.5.1 lens-family-1.0.0 semigroups-0.18.1 transformers-compat-0.5.1.4
和另一个的位置
有用的软件包。