？ Transparently implementing a particular form of dynamic typing
The basic idea is that I have a range of functions that work on any types from a particular class, but at runtime the program is supposed to read a configuration file and extract an element of one of
？ Get a sublist in Haskell
Probably an easy one, but I've looked through the docs and googled for examples and I'm still not sure of the answer.If I have a list like this:[1,2,3,4,5,6,7,8,9,0]and I want to extract a slice, say
？ Remove every nth element from string
How can you remove every nth element of a string?I'm guessing you would use the drop function in some kind of way.Like this drops the first n, how can you change this so only drops the nth, and then t
？ Idiomatic way to take a substring of a ByteString
I need to make extensive use of:slice :: Int -> Int -> ByteString -> ByteStringslice start len = take len . drop startTwo part question:Does this already have a name? I can't find anything se
？ What does the "@" symbol mean in reference to lists in Haskell?
I've come across a piece of Haskell code that looks like this:ps@(p:pt)What does the @ symbol mean in this context? I can't seem to find any info on Google (it's unfortunately hard to search for symbo
？ Haskell idiom for setting up a collection of indexed structured values
I have a collection of about a dozen structured things of a type I've defined (say Component), each of which can be identified by a "name", and am struggling to sort out an idiomatic Haskell way of in
？ Haskell Applicative idiom?
I'm new to Haskell and am puzzling over how to best express some operations in the most idiomatic and clear way. Currently (there will be more to come) I'm puzzling over <*> (I'm not even sure w
？ how to refactor this Haskell chain of functions code?
I have some software design experience, and I am learning Haskell now. In many real world software developments, one faces a situation like the one given, for instance, below:Suppose, I have this code
？ Case sensitive/insensitive comparisons for Data.Text?
I often need to do comparisons of Data.Text values with differing requirements for case sensitivity - this comes up frequently when I'm using chatter for NLP tasks.For example, when searching tokens f
？ Futures in Haskell
Does Haskell have an equivalent of Alice's ability to bind a variable to a future?val a = spawn foo;where foo is some function.I know Haskell supports channels and threads; I'm hoping for syntax as na
？ Redirect old URLs (and subdomains) with Hakyll
I'm trying to migrate my site from Blogger to Hakyll (which I'll then deploy to Github pages), but I don't want all old links to break. Also, my old posts were all in blog.domain.com/, whereas now the
？ gtk2hs - Getting back a ListStore from a TreeView
I have a handle to a TreeView that happens to have a ListStore as its model. What I want to do is get back a handle to that ListStore from my handle to the TreeView.As pointed out here, the treeViewGe
？ Converting HSL to RBG
I'm trying to convert some HSL value to RBG with Data.Colour module. Hackage doc said that Hue is always in the range 0-360. But there are now any ranges of Saturation and Lightness values. Are they i
？ Swap logical operator arguments for faster evaluation?
Does any programming language implement swapping of arguments of logical operation (such as AND, OR) for faster evaluation?Example (I think such method could be implemented in a lazy evaluation langua
？ Haskell - Accessing a Specific Element in a Tuple
Haskell-newbie reporting in.Question is as follows:In Haskell, we have fst and snd that return the first and the second elements of a 2-tuple. Why don't we have an easy way of accessing the i-th eleme
？ Returning elements of a tuple in Haskell
Haskell newbie here. So here is a snippet of code that looks like this: function >>= \(x, y) -> return $ Int x y[EDIT]To provide more broader context, I am trying to implement a simple parser