haskell
Requires MonadPlus (ST a) Instance
I\'m reading the paper Typed Logical Variables in Haskell, but I\'m failing to understand the details of the ultimate implementation. In particular, the backtracking state transformer introduced in se[详细]
2023-04-11 20:58 分类:问答Basic example of using HaskellDB to unmap records of a table
Suppose that I have开发者_如何学Go the following (PostgreSQL) table definition: CREATE TABLE books ([详细]
2023-04-11 20:53 分类:问答How do I use postgresqlConnect in the Database.HaskellDB.HDBC.PostgreSQL module?
I am not quite sure how to use the postgresqlConnect function in module Database.HaskellDB.HDBC.PostgreSQL to connect to a PostgreSQL database. The Haddock documentation page only states the type sign[详细]
2023-04-11 20:41 分类:问答How do I add x tuples into a list x number of times?
I have a question about tuples and lists in Haskell. I know how to add input into a tuple a specific number of times. Now I want to add tuples into a list an unknown number of times; it\'s up to the u[详细]
2023-04-11 20:20 分类:问答How can I take a fractional number and convert it to a list of its digits in Haskell?
I want to take something like 1/7 (0.142857142857...)开发者_如何学运维 and convert it to \"0.142857142857\" or \"142857142857\" [1,4,2,8,5,7,1,4,2,8,5,7]. Using[详细]
2023-04-11 19:47 分类:问答Polynomial factorization in Haskell
With hammar\'s help I have made a template Haskell bit which compiles $(zModP 5) to newtype Z5 = Z5 Int[详细]
2023-04-11 16:43 分类:问答Space leak only in certain cases in GHC interpreter when doing: concat <some list> !! n
I define my own version of concat, myConcat: module Eh where myConcat []= [] myConcat ([]:os)= myConcat os[详细]
2023-04-11 16:26 分类:问答What are the steps involved in writing a Perl Code Generator in Haskell?
Given that Perl 5 does not conform to BNF, I\'m at a loss as to how to think about this problem. Could someone offer some advice to set me off in the right way 开发者_如何学JAVAthinking about this pro[详细]
2023-04-11 16:06 分类:问答Standard web server interface equivalent to WSGI/Rack for Haskell
There are (de facto) standard web server interfaces for programming languages e.g. WSGI for Python, Rack for Ruby. Is there the equivalent thing for Haskell? I found two trials, Hack and HSGI, but am[详细]
2023-04-11 12:55 分类:问答Clean and type-safe state machine implementation in a statically typed language?
I implemented a simple state machine in Python: import time def a(): print \"a()\" return b def b(): print \"b()\"[详细]
2023-04-11 12:26 分类:问答