Re: [Haskell-cafe] partially indeterminate?

2013-07-15 Thread Karl Voelker
I will suggest an analogy to a similar (but simpler) situation. Suppose you are adding up some numbers. foo = let { x = 3; y = 4; z = 5 } in x + y + z That pattern only works if you know in advance how many numbers you are going to add. Otherwise, you need a function that works on a whole list

Re: [Haskell-cafe] putting the result of a function in `infix` declaration

2013-06-23 Thread Karl Voelker
On Sun, Jun 23, 2013 at 6:36 AM, TP wrote: > In a more general way, let us suppose I have a Haskell library able to > perform some calculations: how to use it in a pre-processing step, before > compilation of the executable? You are looking for Template Haskell. http://www.haskell.org/haskellw

Re: [Haskell-cafe] Fixing undeduceable instance ==> overlapping instance

2013-02-23 Thread Karl Voelker
On Sat, Feb 23, 2013 at 10:28 PM, Michael Orlitzky wrote: > -- Recursive case, (n+2) x (n+2) matrices. > instance (Eq a, Ring.C a, Arity n) > => Determined (Mat (S (S n)) (S (S n))) a where > determinant m = > ... > -- Recursive algorithm, the i,jth minor has dimension >

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-13 Thread Karl Voelker
On Thu, Sep 13, 2012 at 10:29 PM, Magicloud Magiclouds < magicloud.magiclo...@gmail.com> wrote: > Hi, > Simple usage, I could make an instance of Enum to UTCTime, so > [utcTime..] could work. But that is so stiff. How if sometimes I want > to step by 1 min, sometimes I want to step by 1 sec? >