AW: container for different types, avoiding boiler plate

2003-08-22 Thread oleg
> > There is no need for Maybe. In fact, if you attempt to fetch > > a type that you didn't put into the attrs, you get a _compile-time_ > > error. > But I'm not sure if it's suitable for what I'm doing, as the attributes > get inserted at run time, and not all of them appear everywhere. So > Ma

Re: Alex 2.0

2003-08-22 Thread Immanuel Litzroth
> "Per" == Per Larsson <[EMAIL PROTECTED]> writes: Per> Here comes a silly example which in any case works as Per> expected on my linux system with alex and ghc. Per> file "foo.x" contains: { Per> module Main (main) where } Per> %wrappe

Re: Alex 2.0

2003-08-22 Thread Per Larsson
On Friday 22 August 2003 13.04, Immanuel Litzroth wrote: > Has anyone an example of {n,k} regular expression in Alex 2.0? > I can not get them to work, alex won't parse them (not the way I write > them anyway) > Immanuel > Hi, Here comes a silly example which in any case works as expected on my

Alex 2.0

2003-08-22 Thread Immanuel Litzroth
Has anyone an example of {n,k} regular expression in Alex 2.0? I can not get them to work, alex won't parse them (not the way I write them anyway) Immanuel -- *** It makes me uncomfortable to see An English spinster of the

AW: container for different types, avoiding boiler plate

2003-08-22 Thread Markus . Schnell
> As you can see, functions ggender and gnumber are so trivial that > hardly need to be declared at all. You can just use fetch > directly. There is no need for Maybe. In fact, if you attempt to fetch > a type that you didn't put into the attrs, you get a _compile-time_ > error. Before I use your

RE: Type class problem

2003-08-22 Thread Simon Peyton-Jones
Brandon writes | An application of Mu should be showable if the functor maps showable types | to showable types, so the most natural way to define the instance seemed | to be | | instance (Show a => Show (f a)) => Show (Mu f) where | show (In x) = show x | | Of course that constraint didn't w