Dear all,
I am pleased to announce that a new issue of The Monad.Reader is now
available:
http://themonadreader.wordpress.com/
Issue 14 consists of the following three articles:
* Fun with Morse Code
by Heinrich Apfelmus
* Hieroglyph 2: Purely Functional Information Graphics Revisi
CK Kashyap writes:
> line' (x1, y1) (x2, y2) deltax deltay ystep isSteep error
> | x1 == x2 = if isSteep then [(y1, x1)] else [(x1, y1)]
> | isSteep =
> (y1, x1) :
> line' (newX, newY) (x2, y2) deltax deltay ystep isSteep newError
> | otherwise =
> (x1, y1) :
> line' (ne
Henry Laxen writes:
> It seems to me this should be easy, but I can't quite figure out
> how to do it without a lot of typing. Here is the question:
>
> Suppose you have a data type like:
> Data Foo = Foo { a :: Int, b :: Int,
>... many other fields ...
> y :: Int } deriving (Eq, Read, Sh
Hello Henry,
The paper "A Lightweight Approach To Datatype-Generic Rewriting" [1]
describes a way to generically add a constructor to any regular datatype
using type-indexed datatypes [2]. A similar technique could be used to add a
new field to each constructor. Then you get something like:
data
It worked like a charm!!! I'd need more time to get my head around "unfoldr"
I'd appreciate it very much if you could explain this line "map maySwitch .
unfoldr go $ (x1,y1,0)"
I did not fully understand the "$" in that line - I tried putting parenthesis
in various places to get rid of "$" but d
With the RecordWildCard extension you should be able to write
newFoo Old.Foo{..} = New.Foo { .., z=1 }
On Tue, Jul 28, 2009 at 3:47 PM, Henry Laxen wrote:
> Malcolm Wallace cs.york.ac.uk> writes:
>
>>
>> > and perhaps use emacs to
>> > query-replace all the Foo1's back to Foo's
>>
>> At least
On 28/07/2009, at 6:41 AM, John Dorsey wrote:
I'm assuming that name resolution is currently independent of type
inference, and will happen before type inference. With the proposal
this is
no longer true, and in general some partial type inference will have
to
happen before conflicting unq
On Wed, Jul 29, 2009 at 12:04 PM, CK Kashyap wrote:
> It worked like a charm!!! I'd need more time to get my head around
> "unfoldr"
> I'd appreciate it very much if you could explain this line "map maySwitch
> . unfoldr go $ (x1,y1,0)"
> I did not fully understand the "$" in that line - I tried
On Wed, Jul 29, 2009 at 12:04 PM, CK Kashyap wrote:
> map maySwitch . unfoldr go $ (x1,y1,0)
I'm not an expert and I might say things the wrong way or without the
required rigor, so with this disclaimer here's my explanation :
go calculates a step of the line, given the current coordinates and
th
Hello,
I have modified the Alex lexer generator to support unicode.
The general idea is that the state-machine works on the UTF8
representation of the text. I submit my work here for review
in order to off-load the maintainer (Simon Marlow) as far
as possible.
The prototype is available on gith
While the discussion centers around overload resolution
let me re-iterate a point that (e.g.,) Java does nicely:
for their "x.f", if x :: T, then you write .f (unqualified)
instead of .T.f (qualified), even if you needed qualification
to declare the type of x, as in "foo.bar.T x;"
This requir
Hi haskellers,
I have a datatype of this sort:
data Type = Status
| Message
| Warning
| Error
| StepIn
| StepOut deriving (Eq, Show)
and (at this moment) two fabric-like functions:
makeType :: String -> Type
makeType c = case c of
On Wed, Jul 29, 2009 at 06:26:30PM +0200, Sven Panne wrote:
> Apart from that, a bug in vertexAttribPointer has been fixed.
...and the new ObjectName, StateVar and Tensor packages are being
used, and this is great! Thanks for the release.
--
Felipe.
__
On Wed, Jul 29, 2009 at 6:27 AM, Paul Sujkov wrote:
> Hi haskellers,
>
> I have a datatype of this sort:
>
> data Type = Status
> | Message
> | Warning
> | Error
> | StepIn
> | StepOut deriving (Eq, Show)
>
> and (at this moment) two fabric-like fun
On Wed, Jul 29, 2009 at 10:15 AM, Paul Sujkov wrote:
> Hi Luke,
>
> I'm not pretty sure. The thing I don't like is the need to copy-and-paste
> all the code with enumeration constructors. So, now I have two types to make
> Type data from, but they could be many, so I'll have many almost identical
>
lol, yep you're right. I'd assumed the haskell platform shipped with the
latest parsec, when in fact it does not :) my bad...
However, I fixed the cabal issue by installing ghc 6.10.3 and rebuilding the
haskell platform. Apparently there is either a compiler issue or
incompatibility with 6.10.4 th
Just a heads up:
I did a cabal install Tensor on my Ubuntu box, and got the following
message:
src/Data/Tensor.hs:333:18: Not in scope: `mapAccumL'
I will investigate a little more and let you know.
On Wed, Jul 29, 2009 at 13:55, Felipe Lessa wrote:
> On Wed, Jul 29, 2009 at 06:26:30PM +020
That was quick!
mapAccumL was added to Data.Traversable in package base-4. GHC 6.8.2 uses
base-3...
I think I will be forced to upgrade my GHC by hand... I just can't stand
6.8.2 anymore...
On Wed, Jul 29, 2009 at 22:17, Rafael Gustavo da Cunha Pereira Pinto <
rafaelgcpp.li...@gmail.com> wrote
On Wed, Jul 29, 2009 at 10:24:23PM -0300, Rafael Gustavo da Cunha Pereira Pinto
wrote:
> mapAccumL was added to Data.Traversable in package base-4. GHC 6.8.2 uses
> base-3...
But this means that Tensor's dependencies should be on base >= 4, not 3.
--
Felipe.
_
19 matches
Mail list logo