« first day (2 days earlier)      last day (1864 days later) » 

2:30 AM
0
Q: Unification with sequence variables and flexible arity functions

Rob KleffnerToday I wrote an implementation of the unification algorithm found in Temur Kutsia's 2002 paper. I didn't just do this for fun, it's related to other research I'm doing. I'm feeling more confident in my Haskell these days, and I was going to go through this code to clean it up myself but, since t...

 
2:47 AM
0
Q: Can I compile a Haskell project in release mode with Stack?

Oskar K.I wonder, isn't there a way to compile a Haskell project in release mode with Stack? There's no nothing related to "release" in stack --help. How can I compile it in Release mode then?

 
3:28 AM
0
Q: What is the name of this functor that uses RankNTypes?

vierccDuring play around objective package, I noticed following type has interesting property. > {-# LANGUAGE RankNTypes #-} > data N f r = N { unN :: forall x. f x -> (x, r) } It is a Functor. > instance Functor (N f) where > fmap f (N nat) = N $ fmap (fmap f) nat > -- or, = N $ \fx ->...

 
 
2 hours later…
5:47 AM
0
Q: Dealing with "commands" in a haskell parser for the programming langauge tiny

user941027102I am learning Haskell and as such am trying to create a parser for the Tiny Programming language. I think I have implemented dealing with "expressions" but am not sure if I have implemented dealing with "commands". What exactly do I have left to implement? How could I make this better/complete...

0
Q: Haskell parser for the programming language Tiny

user941027102I am learning Haskell and as such am trying to create a parser for the Tiny Programming language. I think I have implemented dealing with "expressions" but am not sure if I have implemented dealing with "commands". What exactly do I have left to implement? How could I make this better/complete...

 
 
3 hours later…
9:06 AM
0
Q: How to make attempted retrieval of not-yet-received messages from state unrepresentable?

runeksI'm writing a Haskell application that talks to a remote end over the network, and accumulates messages received into a state object in a State monad: newtype ProtoS r s a = CProtoS { getProtoS :: S.StateT s (ReaderT r (ExceptT ProtocolError IO)) a } deriving (Monad, Functor, Applicative, Mo...

 
 
2 hours later…
10:55 AM
0
Q: playing with event-sourcing - how to avoiding boiler-plate code

CarstenI'm playing around with some ideas about how to read aggregates from events. From a high-level view I would love to have this: class Apply ev ag where apply :: ag -> ev -> ag which to define how an Event ev should change an Aggregate ag if there is an instance of this class for the pair (if...

 
11:41 AM
0
Q: Concatenate a list of strings to one string haskell

MemphisI have a list of strings (see below) how do I concatenate these strings into one string. ["hello","stack","overflow"] to ["hellostackoverflow"]

 
12:12 PM
0
Q: How do I replace one letter in a string with another

BilowHow do I replace a letter in a string with another? For example replacing "a" with "ß" in "Haskell" --> "Hßskell" Im not allowed to import anything other than Data.List and Data.Char

 
Nice and quiet with the feeds on ignore.
 
1:04 PM
0
Q: Fixed-size non-cryptographic hashing

snørevenI want to generate Int64 IDs from Data.Texts. They will be used as primary keys in a database. I know there is Data.Hashable from the hashable package which looks very nice but unfortunately returns Int, which changes it's size depending on the platform. Is there any well-known hashing package...

 
 
4 hours later…
4:58 PM
0
Q: Looking for `flatten :: Event [a] -> Event a`

SebastianI'm looking for something like flatten :: Event [a] -> Event a (swap [] with Foldable f => f if you want) which would generate a separate event for each a in an Event's list. I suspect that this is somehow possible with switchE, but then I'd need a function of type [a] -> Event a. I could possi...

 
5:22 PM
0
Q: Comparing with List Patterns

J.doeFirst consider the following code, which counts the number of blank spaces in a string: countSpaces :: String -> Int countSpaces [] = 0 countSpaces (c : restOfString) = d + countSpaces restOfString where d = if c == ’ ’ then 1 else 0 Here is my questions...

 
 
5 hours later…
10:05 PM
0
Q: Abstract Data Types vs. Parametric Polymorphism in Haskell

GeorgeI am trying to get a grip on the relationship between these two concepts. First consider an example of an Abstract Data Type: data Tree a = Nil | Node { left :: Tree a, value :: a, right :: Tree a } According to Haskell wiki: This ty...

 

« first day (2 days earlier)      last day (1864 days later) »