ghc
Haskell Error - Naked Expression at Top Level
I have the following code: fib n n == 0= 0 n == 1= 1 n > 1= fib (n-1) + fib (n-2) print fib 5 And for some reason, it\'s throwing an error:[详细]
2023-03-23 20:24 分类:问答Defining your own Typeable instances for GADTs
Can someone point me at a good set of examples for defining Typeable or Typeable1 instances for GADTs in Haskell.[详细]
2023-03-23 14:44 分类:问答Understanding BlockedIndefinitelyOnMVar in Concurrent code
I asked this question on the ghc-users mailing list and got some helpful responses, but still don\'t understand what is happening in this code.[详细]
2023-03-23 02:20 分类:问答Understanding GHC assembly output
When compiling a haskell source fil开发者_如何学运维e using the -S option in GHC the assembly code generated is not clear. There\'s no clear distinction between which parts of the assembly code belong[详细]
2023-03-23 01:41 分类:问答How to rebind Haskell's proc-notation to user defined Arrows?
To rebind Haskell\'s proc-notation, paragraph 7.3.11 \"Rebindable syntax and the implicit Prelude import\" of the GHC User\'s Guide states that the Arrow notation uses the arr, first, ... functions th[详细]
2023-03-23 01:19 分类:问答HUnit not importing on Mac
On a fresh install of Haskell Platform for Max OSX, the foll开发者_StackOverflow社区owing code fails on import Test.HUnit when run using the runghc interpreter.[详细]
2023-03-21 15:33 分类:问答On improving Haskell's performance compared to C in fibonacci micro-benchmark
I came across this question, which compared the performance of various compilers on computing fibonaci numbers the naive way.[详细]
2023-03-20 14:01 分类:问答haskell GHC error
How do I resolve this warning? (I never got it before, but did a new install of a package, and it seems to have now given errors on a previous working package.)[详细]
2023-03-20 00:11 分类:问答Supero (Haskell supercompiler) usage?
I\'m having a look at this project http://community.haskell.org/~ndm/supero/ I have downloaded and compiled the program, and could use it on the included samples. But I tried it on my source code and[详细]
2023-03-19 19:18 分类:问答GHC chooses different instances for the same expression?
I want to implement an arrow with an arr-member-function showing a different behavior for function arguments with different types, for instance arr (\\x -> (x,x)) should behave differently from arr[详细]
2023-03-19 18:40 分类:问答