Haskell Web框架
|
我正在使用haskell创建简单的Web应用程序。首先,我在前面使用了Snap,可以运行该应用程序,但是我想向该应用程序添加用户输入。
我找不到将用户输入参数输入到函数的方法。我该怎么办?
另一件事,我也使用了Happstack框架,我无法导入\“ Happstack.Server \”。我使用cabal安装配置Happstack。它已成功安装,但是当我尝试导入\“ Happstack.Server \”时,它给了我一个错误:
<no location info>:
Could not find module `Happstack.Server\':
it is not a module in the current program, or in any known package.
如果我使用ghc --make HelloWorld.hs -v
运行程序,则会得到:
Glasgow Haskell Compiler, Version 6.12.1, for Haskell 98, stage 2 booted by GHC version 6.12.1
Using binary package database: /usr/lib/ghc-6.12.1/package.conf.d/package.cache
Using binary package database: /home/udeshika/.ghc/i386-linux-6.12.1/package.conf.d/package.cache
package happstack-6.0.0-0f0c2507d590ebd01e8601c8667ec809 is unusable due to missing or recursive dependencies:
happstack-ixset-6.0.0-4e1b5476a551c4501c5734b22e0b280d happstack-server-6.0.3-6d71e7bb09489130538fb851a694b927 happstack-state-6.0.0-0e753e61d7092b6a5139e473113877a1 happstack-util-6.0.0-4156bd1331b7a0d62e0087101c9eba1c
package happstack-ixset-6.0.0-4e1b5476a551c4501c5734b22e0b280d is unusable due to missing or recursive dependencies:
happstack-util-6.0.0-4156bd1331b7a0d62e0087101c9eba1c
package happstack-server-6.0.3-6d71e7bb09489130538fb851a694b927 is unusable due to missing or recursive dependencies:
happstack-util-6.0.0-4156bd1331b7a0d62e0087101c9eba1c hslogger-1.1.4-90c801c802eec92e4e6a6f83d24d58d9 network-2.2.1.7-72dad7eb07ee7a683982f7475b8a449f network-bytestring-0.1.3.4-937fd511949a2d5ef21e86ec5306c791 sendfile-0.7.3-137cf51cc81a277d724637a7cd1e6b09
package happstack-state-6.0.0-0e753e61d7092b6a5139e473113877a1 is unusable due to missing or recursive dependencies:
happstack-util-6.0.0-4156bd1331b7a0d62e0087101c9eba1c hslogger-1.1.4-90c801c802eec92e4e6a6f83d24d58d9
package happstack-util-6.0.0-4156bd1331b7a0d62e0087101c9eba1c is unusable due to missing or recursive dependencies:
hslogger-1.1.4-90c801c802eec92e4e6a6f83d24d58d9 network-2.2.1.7-72dad7eb07ee7a683982f7475b8a449f
package hslogger-1.1.4-90c801c802eec92e4e6a6f83d24d58d9 is unusable due to missing or recursive dependencies:
...................
没有找到相关结果
已邀请:
3 个回复
逝媳蘑贩茄
如果我请求URL \“ myapp.com/mypage?foo = bar \”,那么我将看到\“ bar \”作为响应。如果我省略\“?foo = bar \”部分,则它将返回\“ no value \”。
剑哎
2)如果您尝试在ghci中导入Happstack.Server怎么办? 3)最好使用cabal-dev或capri安装此类东西并制作沙盒 4)Snap和Yesod相当新,并且正在大量开发中,Happstack很漂亮 稳定牢固。 5)您正在使用什么操作系统?您是如何安装haskell的? Ubuntu + Haskell 6.12 + Happstack开箱即用 关于日志,似乎阴谋诡计被弄乱了。我建议您从.cabal和.ghc中删除所有软件包,重新安装cabal,然后按照以下说明安装cabal-dev: http://www.reddit.com/r/haskell/comments/f3ykj/psa_use_cabaldev_to_solve_dependency_problems/ 然后与Happstack一起玩。有些人实际上使用capri,它也可以正常工作。
可扇胆