haskell
Error in nested list comprehension in Haskell code
I am trying to write the following list compre开发者_高级运维hension in Haskell and it doesn\'t typecheck. I am new at this and can\'t really figure out why.[详细]
2023-04-13 09:37 分类:问答Haskell quadratic equation root
Haskell program which shows the two roots and in the case that the equation has no real roots or has all values as roots should return zero.[详细]
2023-04-13 08:28 分类:问答How do I perform IO inside a WAI (Warp) Application
I have a 开发者_JS百科simple WAI application (Warp in this case) that responds to all web requests with \"Hi\".I also want it to display \"Said hi\" on the server each time a request is processed.How[详细]
2023-04-13 06:44 分类:问答Using the Par monad with STM and Deterministic IO
I\'m in the process of writing a report for an assignment in which I implemented a concurrent multicore branch and bound algorithm using the STM package and there was an issue I\'ve come up against.[详细]
2023-04-13 05:59 分类:问答How do write this in do notation?
I\'m working through \"Write yourself a scheme interpreter in 48 hours\" and one exercise is to write a function using do notation. This is the function:开发者_开发知识库[详细]
2023-04-13 05:45 分类:问答Type theory: type kinds
I\'ve read a lot of interesting things about type kinds, higher-kinded types and so on. By default Haskell supports two sorts of kind:[详细]
2023-04-13 05:29 分类:问答Space leaks in Haskell
I have read it many times that lazy evaluation in Haske开发者_如何学Pythonll may sometimes lead to space leaks. What kind of code can lead to space leaks? How to detect them? And what precautions can[详细]
2023-04-13 05:16 分类:问答List of different types?
data Plane = Plane { point :: Point, normal :: Vector Double } data Sphere = Sphere { center :: Point, radius :: Double }[详细]
2023-04-13 04:39 分类:问答Parsec - error "combinator 'many' is applied to a parser that accepts an empty string"
I\'m trying to write a parser using Parsec that will parse literate Haskell files, such as the following:[详细]
2023-04-12 23:05 分类:问答Indexing Recursion without using an index parameter
Am trying to write a recurssive function to do something, but at each step I\'d like to know the 开发者_开发技巧current depth / index in the tree. So how can I achieve this without use of an index par[详细]
2023-04-12 22:48 分类:问答