Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-11-23 Thread Claus Reinke
It's sad to see the OpenGL binding being dropped from GHC binary installers starting from 6.10. Though this issue has been brought up and discussed before, I'm sure a lot of people who based their work on OpenGL would share the same sympathy. $ cabal install OpenGL Nice except that:

Re: [Haskell-cafe] Do I need an account to report build of Hacakgepackages?

2008-11-22 Thread Claus Reinke
You only need an account for uploading packages. If you do not want to have to enter your user name or password interactively when you run cabal upload then you can put them in the config file: username: password: That sounds like a very bad idea, and should not be encouraged! Any compromised

Re: [Haskell-cafe] Do I need an account to report build ofHacakgepackages?

2008-11-22 Thread Claus Reinke
Any compromised uploader machine with stored passwords can be used to upload compromising code, which will propagate to all downloaders. It doesn't really matter whether a compromised machine stores a password or not. If you upload anything using a compromised machine, the attacker has the

strict collections via types (was: [Haskell-cafe] implementing python-style dictionary in Haskell)

2008-11-19 Thread Claus Reinke
One problem is that Haskell collections are lazy by default. I'm aware of a few use cases where laziness lets you formulate a very elegant recursive population of a collection, but I think that in general, strictness is what you want, While I strongly agree with the gist of your post, I

Re: [Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-18 Thread Claus Reinke
main :: IO () main = do { content - readFile in.txt ; let -- change this following type annotation -- to change different type of the dictionary -- dict :: DM.Map S.ByteString Int -- dict :: IM.IntMap Int dict :: Trie Int dict = fromList

Go Haskell! (was: [Haskell-cafe] What *not* to use Haskell for)

2008-11-11 Thread Claus Reinke
Do you have an example of a mutable state/ IO bound application, like, hmm, a window manager or a revision control system or a file system...? If you're looking for a challenge, how about this one (there used to be lots of Haskellers into this game, any of you still around?-):

Re: [Haskell-cafe] Re: Problems with strictness analysis?

2008-11-05 Thread Claus Reinke
Haskell's great strength is its equational semantics. I would like Haskell programmers to think equationally, mathematically, rather than operationally, when writing Haskell programs. If I were to teach a course in Haskell, I would like to launch off of denotational semantics, hopefully without

Re: [Haskell-cafe] Re: Problems with strictness analysis?

2008-11-05 Thread Claus Reinke
equational /= denotational Nonetheless, Haskell has equational semantics which are derived from its denotational ones. But when I said equational semantics I really meant something more like equations :-). Unlike Standard ML, for instance, Haskell does not have standard semantics - a

Re: [Haskell-cafe] strange ghc output

2008-10-28 Thread Claus Reinke
by the way, a nice feature of ghc would be a --clean option to remove .hi, .o files. and maybe a --veryclean to recompile all dependencies. i have more than once rm'd my .hs files by typo... add yourself to http://hackage.haskell.org/trac/ghc/ticket/2258 ?-) btw, ghc head has this new option:

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Claus Reinke
I have a standard Data.Map.Map as the base structure for one of my macid data tables (jobs), but I noticed something that is probably causing problems for me. Even a simple 20 million record with int/int key values causes an out of memory error for me in ghci, Int keys, Int values eh? Does

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelementInt/Int map?

2008-10-19 Thread Claus Reinke
(hint to ghc hackers: 'Data.Map.Map Int !Int' and '[!a]' would really be useful!-), I can't figure out what that means though. Strictness is not a property of types or of values, it is a property of functions. [!] is not a subtype of [] ; IOW, there is no a such that [a] = [!Int] (where

Re: [Haskell-cafe] Linking and unsafePerformIO

2008-10-14 Thread Claus Reinke
Where do the semantics of haskell say this? How does it interact with fixing bugs (which means changing mathematical and universal constant functions--since all functions are constants)? What semantics of haskell?-) But if there was one, it might not talk about separate compilation (it should,

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Claus Reinke
I'm not advocating existential types in this case. I rarely use them myself. I was just pointing out that the mechanism for doing the OO thing exists in Haskell too, albeit looking a little different. I don't think there's anything weird about existential types, except an unfamiliar name.

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Claus Reinke
If you want to make Haskell more widely used, do pick a name for Haskell Prime that starts with an A. I first heard of Haskell when exploring the list of computer languages that Gedit could highlight. Just imagine going through all those A,B,C,D,E,F,G before I came to Haskell. That is a simple

Re: [Haskell-cafe] synchronous channels in STM

2008-10-08 Thread Claus Reinke
I was wondering if it was possible to implement synchronous channels within STM. In particular, I'd like to have CSP-like send and recv primitives on a channel that each block until the other side arrives to complete the transaction. Assuming that retry blocks until something changes, you could

Re: [Haskell-cafe] Type family oddity

2008-10-04 Thread Claus Reinke
-- erase_range :: (Sequence s) = RangeTrait s - IO (RangeTrait s) This can't work, as you can see after desugaring: -- erase_range :: (Sequence s,RangeTrait s~rs) = rs - IO rs There is nowhere to get 's' from, unless you start applying type families backwards, from results to parameters.

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Claus Reinke
(writeFile output.csv) = (liftM printCSV $ liftM (map updateLine) $ parseCSVFromFile input.csv) Um... Does anybody else find it interesting that we are showing the beauty of Haskell by attempting to construct the most terse, cryptic, unmaintainable tangle of point-free code I don't agree at

Re: [Haskell-cafe] Haskell versus F#, OCaml, et. al. ...

2008-09-30 Thread Claus Reinke
for the libraries? * http://haskell.org/haskellwiki/Haskell_Platform You might have mentioned that there is finally a tracker (*) and an approximate .cabal meta-package (for dependencies only). - is the programs are not registered by Cabal issue going to be fixed before platform

Re: [Haskell-cafe] Haskell versus F#, OCaml, et. al. ...

2008-09-30 Thread Claus Reinke
- is the programs are not registered by Cabal issue going to be fixed before platform release? No. Not the right thing for cabal the package system to do. Huh? Having tool availability out in the open, as updateable packages, would be more flexible than the current built-in stuff in

Re: [Haskell-cafe] Line noise

2008-09-21 Thread Claus Reinke
I posted a snippet of code which included the phrase mapM_ (\(n,v) - putStrLn $ [ ++ show n ++ ] = ++ show v) (zip [0..] vs) Don't do that, then?-) mapM_ putStrLn $ map (\(n,v) - [ ++ show n ++ ] = ++ show v) (zip [0..] vs) - mapM_ putStrLn $ map (\(n,v) - [ ++ show n ++ ]

the real world of Haskell books (Re: [Haskell-cafe] Online Real World Haskell, problem with Sqlite3 chapters)

2008-09-05 Thread Claus Reinke
Now that is real world - problems even before release!-) Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target? There used to be a time when one could guess the poster's Haskell book from their question topics: - 'HGL'

Re: the real world of Haskell books (Re: [Haskell-cafe] Online RealWorld Haskell, problem with Sqlite3 chapters)

2008-09-05 Thread Claus Reinke
Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target? Other tech books face the same problem, which, if they sell successfully and the authors haven't moved into caves afterwards to recover, they address with subsequent

Re: [Haskell-cafe] language proposal: ad-hoc overloading

2008-08-31 Thread Claus Reinke
Well, I was thinking that way when I was starting learning Haskell. But then I realized that this feature would make code much harder to read. Suppose you have different thing all named insertWith. You've got one somewhere in your program; how do YOU know when looking at the code after a

Re: [Haskell-cafe] Re: problem with cabal for syb-with-class

2008-08-27 Thread Claus Reinke
Cabal doesn't have to pass on ghc's messages uninterpreted. That's a lot like implementing a map as a list and complaining about empty list instead of element not found. I see what you're saying, but in practise it's just not possible. GHC can return a non-zero exit code for a multitude of

Re: [Haskell-cafe] Re: problem with cabal for syb-with-class

2008-08-26 Thread Claus Reinke
So when ghc finds that one of your modules needs to import something that is not in one of the given packages it says that it's in another package that is 'hidden'. Of course it's only hidden because Cabal told ghc to hide them. Yes, it is one of those unfortunate error messages that says I

Re: [Haskell-cafe] poll: how can we help you contribute to darcs?

2008-08-04 Thread Claus Reinke
It would be useful if some darcs 2 hackers, contributors could help the ghc people evaluate if darcs 2 is still in the running. That would mean identifying the key bugs (eg windows case-insensitive file bugs, slow pulls) and seeing how hard they are to fix. Also doing a test conversion to darcs 2

Re: [Haskell-cafe] poll: how can we help you contribute to darcs?

2008-08-04 Thread Claus Reinke
Could darcs 2 performance be improved by making use of the order of patches in the reference repo, to identify reference versions and reign in exponential permutation issues? In other words, all repos are equal, all patches are equal, but once a patch has made the roundtrip through the reference

Re: [Haskell-cafe] Fw: patch applied (ghc): Remove the OpenGLfamilyof libraries fromextralibs

2008-07-29 Thread Claus Reinke
Scott, I couldn't have said it better. My impression has always been that HOpenGL looks like OpenGL would have looked like if they'd had a flexible language to work with when they desgned it. My only quibble would be with the documentation. Is there any way out there for haddock to produce a

[Haskell-cafe] Fw: patch applied (ghc): Remove the OpenGL family of libraries fromextralibs

2008-07-25 Thread Claus Reinke
FYI: Haskell's OpenGL binding has just been dropped from GHC's extralibs, which means that it will no longer be kept in sync with GHC development, at least not by GHC HQ. GHC HQ has its hands full and -generally speaking - extralibs are to be replaced by H(L)P, the Haskell (Library) Platform:

Re: [Haskell-cafe] Fw: patch applied (ghc): Remove the OpenGL familyof libraries fromextralibs

2008-07-25 Thread Claus Reinke
So, if one of you wanted to step forward and offer to keep these Haskell bindings for OpenGLco maintained, perhaps steward them into the H(L)P, now would probably be a good time. Just thought I'd forward this, for those not following cvs-ghc, Claus Note the OpenGL are still just as maintained

Re: [Haskell-cafe] Point-free style in guards

2008-07-22 Thread Claus Reinke
outStanza | (isMessage) = outMessage | (isPresence) = outPresence | (isIQ) = outIQ Why such a style doesn't work, so I must write ugly code like that: outStanza a | (isMessage a) = outMessage a | (isPresence a) = outPresence a | (isIQ a) = outIQ a

Re: [Haskell-cafe] syntactic anti-unification of TH terms --- bestpractise?

2008-07-18 Thread Claus Reinke
Since a term can occur both as a pattern on the left-hand side of the equation and also as expression on the right-hand side, I need to keep track of this, too. So in fact, I have to anti-unify the patterns, 'translate' the resulting state (Data.Map [Pat] Pat) to (Data.Map [Body] Body) and

Re: [Haskell-cafe] A question about algebra and dependent typing

2008-07-14 Thread Claus Reinke
I'm working on an abstract algebra library, using the types are sets strategy. For the algebraists out there, I'm trying to implement as much as I can of Abstract Algebra by Dummit Foote in Haskell. I've got a Ring class definition that looks approximately like You might find this interesting:

Re: [Haskell-cafe] Human-friendly compiler errors for GHC

2008-07-13 Thread Claus Reinke
I agree this feature would be cool, I'm just not sure the possible memory/performance problems associated with loading all interfaces of all exposed modules in all packages (it would be most helpful but even more of a performance problem to even scan non-exposed packages) would be worth it.

Re: [Haskell-cafe] Compiling GHC 6.8.3 on OS X with readline support

2008-07-07 Thread Claus Reinke
rlwrap adds readline support to everything. Well, yes, see the GHCi wiki for how to augment 'rlwrap ghci' with some basic completion support (filenames, flags, module names):

Re: [Haskell-cafe] Re: Definition of hidden instance members (bug inGHC or Hugs+Yhc)

2008-07-05 Thread Claus Reinke
M. is not allowed as a prefix of a function, which makes resolving ambiguities hard unless the compiler solves the issue for you (as Hugs and Yhc do) See also: http://www.haskell.org/pipermail/haskell-prime/2008-April/002569.html http://hackage.haskell.org/trac/ghc/ticket/2237 Claus

Re: [Haskell-cafe] Question about abstraction

2008-07-04 Thread Claus Reinke
combineWith :: b - (b - a - b) - a - a - a - a - b n `combineWith` f = \tl tr bl br - n `f` tl `f` tr `f` bl `f` br instance Foldable T where foldMap f = foldT mempty $ \_ x - f x `combineWith` mappend -- But 'traverse' won't typecheck: instance Traversable T where traverse f = foldT

Re: [Haskell-cafe] Type families versus functional dependencies question

2008-07-03 Thread Claus Reinke
GHC gives the error: Couldn't match expected type `T f1 f1 a' against inferred type `T f f a' In the expression: blah x In the definition of `wrapper': wrapper x = blah x actually, GHC gives me could not deduce Blah f a from Blah f1 a first. It seems that desugaring type

Re: [Haskell-cafe] Type families versus functional dependenciesquestion

2008-07-03 Thread Claus Reinke
actually, GHC gives me could not deduce Blah f a from Blah f1 a first. It seems that desugaring type function notation into an additional constraint helps, so there's something odd going on: Silly me, I didn't paste the whole type error. Yes, GHC gives both. I should add that I tested this

Re: [Haskell-cafe] Re: Call Graph Tool?

2008-06-27 Thread Claus Reinke
Assuming I get it included, is there any features in particular you'd want to see in there? Note that if I do have it produce visualisations, they'll be static images as part of an analysis report rather than being interactive. I'd like the ability to show individual module dependencies, and

Re: [Haskell-cafe] Re: Call Graph Tool?

2008-06-27 Thread Claus Reinke
If you wanted to go down that route, try using 'ghc --make -v2' and translate that dependency graph to dot. Also, if you want to get a quick 'n dirty list of which of your own files depend on which others, ghc -M $main.hs works quite well. I've had some success in the past shoving this stuff

Re: [Haskell-cafe] Call Graph Tool?

2008-06-26 Thread Claus Reinke
I have approx. 100+ source files and I was wondering if anyone has a tool that would let me see a visual call graph for the source files; i.e. a visual hierarchy of which module is imported by what, and so forth. Hi Chris, Programatica used to have such a thing for the module graph

GSoC project blogs? (Re: [Haskell-cafe] Planet haskell)

2008-06-23 Thread Claus Reinke
It would be nice to have blogs for all Haskell GSoC projects on Planet Haskell. Infrequent updates (such as Neil's weekly summaries) would be quite okay - details can always be followed up in email, provided that interested parties are aware of them in the first place;-) Otherwise, we end up

Re: [Haskell-cafe] cabal-install failure

2008-06-19 Thread Claus Reinke
In the specific case of parsing --version strings, I'm not sure regexes are any easier. Using words and then selecting the Nth word seems to do pretty well. for comparison, see the examples below:-) There's no reason this can't be massaged further, but it already allows for IO if necessary (I

Re: [Haskell-cafe] cabal-install failure

2008-06-16 Thread Claus Reinke
The main point of the Program abstraction is about configuring and running programs. As it happens some programs are provided by some haskell packages (but not all, eg ld, ar, etc). option to get version info and code to extract it (with one apparently very special case being hsc2hs). And

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-16 Thread Claus Reinke
Duncan Coutts wrote: If we get a proper way to export a non-flat namespace then Gtk2Hs will certainly switch to using it. Using 'buttonBlah' is horrible but there is currently nothing better. Whilst I'm sure anyone who's used deep module structures has wondered about this feature, I've seen

Re: [Haskell-cafe] cabal-install failure

2008-06-14 Thread Claus Reinke
http://hackage.haskell.org/trac/hackage/ticket/227 One problem is that not all build-tools correspond to haskell packages. Some do some don't. We have a hard coded list of them at the moment (which can be extended in Setup.hs files) so we could extend that with what

Re: [Haskell-cafe] Re: [Haskell] ANN: random-access-list-0.1

2008-06-13 Thread Claus Reinke
To summarize: Monad isn't the proper abstraction for failable/Maybe. Maybe is an algebraic data type that *exactly* represents the spirit of what you're trying to do: e.g. Conor McBride said: Maybe is the most general abstraction. Requiring (=), or even (*) seems excessive. What we need is any

Re: Maybe-summary was: Re: [Haskell-cafe] Re: [Haskell] ANN:random-access-list-0.1

2008-06-13 Thread Claus Reinke
http://thread.gmane.org/gmane.comp.lang.haskell.libraries/9082 .. that Maybe is not the most general abstraction - it loses information wrt to (Either String), for instance: Prelude let {f [] = fail empty; f [_] = fail singleton; f l = return l } okay, I see, it's just that most partial

Re: [Haskell-cafe] Question about kinds

2008-06-07 Thread Claus Reinke
short answer: use newtype instead of type (and check the language spec for the difference between the two). Why does the code below not pass the type checker? because of the type error?-) seriously, though, it is useful to accompany such questions with some indication of what you're trying to

Re: [Haskell-cafe] Re: Ubuntu and ghc

2008-06-05 Thread Claus Reinke
Well, that's true. I guess what I'm really objecting to in Claus's message is the implication that we should always use a Haskell Installation Manager, even on systems with good built-in package management. what was implied was that haskell installation manager (HIM) and native package

cabal and platform-independent haskell installation management (again) (Re: [Haskell-cafe] Re: Ubuntu and ghc)

2008-06-04 Thread Claus Reinke
I think that's fundamentally the wrong approach. We shouldn't have to build a Haskell installation manager. Would you also want installation managers for Perl, Python, Ruby, C, C++, etc. each with their own different user interfaces and feature sets? I think not - you want a single package

Re: [Haskell-cafe] Ubuntu and ghc

2008-05-22 Thread Claus Reinke
https://bugs.launchpad.net/ubuntu/+source/gtk2hs/+bug/229489 this is almost identical to my problem. I am just trying to help others on this list who are using Ubuntu Linux to avoid my predicament! I had that problem upgrading too. I posted a workaround:

Re: [Haskell-cafe] Re: Endianess

2008-05-14 Thread Claus Reinke
It's not that simple with bits. They lack consistency just like the usual US date format and the way Germans read numbers. So you claim that you pronounce 14 tenty-four? In German pronunciation is completely uniform from 13 to 99. http://www.verein-zwanzigeins.de/ So I've always wondered,

[Haskell-cafe] GHC API GSoc project (was: ANN: Haddock version 2.1.0)

2008-05-14 Thread Claus Reinke
could collect all of them On Fri, May 9, 2008 at 8:30 PM, Claus Reinke [EMAIL PROTECTED] wrote: Ah, I didn't think about the GHC options that change the lexical syntax. You're right, using the GHC lexer should be easier. and, if you do that, you could also make the GHC lexer squirrel away

Re: [Haskell-cafe] Re: [Haskell] Re: ANN: Haddock version 2.1.0

2008-05-09 Thread Claus Reinke
Ah, I didn't think about the GHC options that change the lexical syntax. You're right, using the GHC lexer should be easier. and, if you do that, you could also make the GHC lexer squirrel away the comments (including pragmas, if they aren't already in the AST) someplace safe, indexed by, or

Re: [Haskell] Re: [Haskell-cafe] ANN: Haddock version 2.1.0

2008-05-02 Thread Claus Reinke
2008/5/2 Simon Marlow [EMAIL PROTECTED]: David Waern wrote: No it doesn't, but it's on the TODO list. It needs a fix in GHC. By the way, I'm going to experiment with doing the parsing of comments on the Haddock side instead of in GHC. If that works out, we won't have to fix these things in

[Haskell-cafe] some questions about type improvement, FDs vs TFs, and Hugs vs GHCi

2008-04-27 Thread Claus Reinke
consider class FD a b | a - b instance CFD a b = FD a b class CFD a b instance CFD Bool Char and the constraint 'CFD Bool c'. logically, we know that if we have 'CFD Bool c', we also have 'FD Bool c', which implies that 'c' is uniquely determined, which implies that 'c~Char'.

Re: [Haskell-cafe] looking for examples of non-fullFunctional Dependencies

2008-04-17 Thread Claus Reinke
class C a b c | a - b, a - c instance C a b b = C [a] [b] [b] Suppose we encounter the constraint C [x] y z interesting example. splitting improvement into two rules seems to lose the (b1=b2) constraint that spans both: [O] C [x] y z = y=[b1]. C [x] y z = z=[b2]. my first thought was

Re: [Haskell-cafe] looking for examples ofnon-fullFunctional Dependencies

2008-04-17 Thread Claus Reinke
how to account for [5], even with a refined ruleset that accounts for [4]. suggestions?-) claus - Original Message - From: Claus Reinke [EMAIL PROTECTED] To: Martin Sulzmann [EMAIL PROTECTED]; Mark P Jones [EMAIL PROTECTED] Cc: Tom Schrijvers [EMAIL PROTECTED]; Haskell-cafe Café haskell

Re: [Haskell-cafe] looking for examples of non-full FunctionalDependencies

2008-04-17 Thread Claus Reinke
Sorry to be picky but there is no violation of the FD here. Note that the class D has only a single ground instance and to violate an FD you need at least two. perhaps you are thinking of functional dependencies as being defined extensionally, over the extent of the type relations specified

Re: [Haskell-cafe] Haskell IDE: Someone else interested in enhancingShim ? / How to contact author Benedikt Schmidt ?

2008-04-11 Thread Claus Reinke
Hi Marc, when i first encountered Shim, i thought it was a nice idea, but with a lot less emphasis on the vim side than on the emacs side. also, iirc, Shim uses python's interprocess communication and i didn't want to ask vim users to install python to get haskell functionality. so i found

Re: [Haskell-cafe] type families and type signatures

2008-04-10 Thread Claus Reinke
To make it legal: If foo' with a type signature doesn't type check, try to infer a type without a signature. If this succeeds then check that the type that was inferred is alpha-convertible to the original signature. If it is, accept foo'; the signature doesn't add any information.

Re: [Haskell-cafe] type families and type signatures

2008-04-09 Thread Claus Reinke
The point is that the GHC type checker relies on automatic inference. Hence, there'll always be cases where certain reasonable type signatures are rejected. .. To conclude, any system with automatic inference will necessary reject certain type signatures/instances in order to guarantee

Re: [Haskell-cafe] type families and type signatures

2008-04-09 Thread Claus Reinke
type family Id a type instance Id Int = Int foo :: Id a - Id a foo = id n foo' :: Id a - Id a foo' = foo type function notation is slightly misleading, as it presents qualified polymorphic types in a form usually reserved for unqualified polymorphic types. rewriting foo's type helped me

Re: [Haskell-cafe] [GSoC] Porting HaRe to use the GHC API

2008-04-03 Thread Claus Reinke
|Another notion I was interested in was to be able to reproduce a |sequence of multi-module refactorings even in the absence of the |initial module. It would allow to present a kind of interface diff |for a distribution which would allow the developer of a module which |depends on the

Re: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Claus Reinke
Well, we still need normal subject reduction (i.e., types don't change under value term reduction), and we have established that for System FC (in the TLDI paper). In addition, type term normalisation (much like value term normalisation) needs to be confluent; otherwise, you won't get a

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Claus Reinke
again, i gave a concrete example of how ghc behaves as i would expect, not as that decomposition rule would suggest. Maybe you can explain why you think so. I didn't understand why you think the example is not following the decomposition rule. Actually, see

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Claus Reinke
type family F a :: * - * F x y ~ F u v = F x ~ F u /\ y ~ v why would F x and F u have to be the same functions? shouldn't it be sufficient for them to have the same result, when applied to y and v, respectively? Oh, yes, that is sufficient and exactly what is meant by F x ~ F u. It means,

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Claus Reinke
was hoping for. in fact, the decomposition rule seems to be saying that type function results cannot matter, only the structure of type family applications does: F x y ~ F u v = F x ~ F u /\ y ~ v or do you have a specific type rule application order in mind where all type-level reductions

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Claus Reinke
type family F a :: * - * F x y ~ F u v = F x ~ F u /\ y ~ v words, in a type term like (F Int Bool), the two parameters Int and Bool are treated differently. Int is treated like a parameter to a function (which is what you where expecting), whereas Bool is treated like a parameter to a

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Claus Reinke
type family F a :: * - * F x y ~ F u v = F x ~ F u /\ y ~ v why would F x and F u have to be the same functions? shouldn't it be sufficient for them to have the same result, when applied to y and v, respectively? Oh, yes, that is sufficient and exactly what is meant by F x ~ F u. It

Re: [Haskell-cafe] Equality constraints in type families

2008-03-19 Thread Claus Reinke
type family F a :: * - * .. We made the design choice that type functions with a higher-kinded result type must be injective with respect to the additional paramters. I.e. in your case: F x y ~ F u v = F x ~ F u /\ y ~ v i'm still trying to understand this remark: - if we are talking

Re: [Haskell-cafe] Equality constraints in type families

2008-03-19 Thread Claus Reinke
type family F a :: * - * .. We made the design choice that type functions with a higher-kinded result type must be injective with respect to the additional paramters. I.e. in your case: F x y ~ F u v = F x ~ F u /\ y ~ v actually, i don't even understand the first part of that:-( why

Re: [Haskell-cafe] Equality constraints in type families

2008-03-19 Thread Claus Reinke
Let me summarize :-) The current design for type functions with result kinds other than * (e.g. * - *) has not gotten very far yet. We are currently stabilizing the ordinary * type functions, and writing the story up. When that's done we can properly focus on this issue and consider different

Re: [Haskell-cafe] Re: Graphical graph reduction

2008-02-23 Thread Claus Reinke
About 7 years ago such a tool existed: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/ GHood was never intended to visualize graph reduction directly (*). instead, it visualized observations - ie, you could see if and when which parts of an observed data structure was

Re: [Haskell-cafe] Rendering TTF fonts in Haskell and OpenGL

2008-02-22 Thread Claus Reinke
[cc-ed to hopengl list; are there many haskell opengl users not on that list, btw?] a standard package for easy-to-use, high-quality, portable font support would make a great addition to haskell's otherwise nice opengl bindings! is there a reason for going directly to freetype? from the old

Re: [Haskell-cafe] IO is a bad example for Monads

2007-12-10 Thread Claus Reinke
Maybe hardened Haskell programmers don't notice these things, but there's a wall that goes up when Haskell is presented to non-functional programmers. There are significant barriers for them to cross (some of them imaginary): there's the infamous type system, there's the mystique around monads,

Re: [Haskell-cafe] Clean Dynamics and serializing code to disk

2007-12-06 Thread Claus Reinke
if you want to make something like this for haskell (and i'd very much like to use it!-), there are several issues, including: 1 handling code: - going for a portable intermediate representation, such as bytecode, is most promising, especially if the code representation is

Re: [Haskell-cafe] trouble building unix-2.2.0.0 on cygwin

2007-12-01 Thread Claus Reinke
hi, with the large number of just chatting messages on haskell-cafe, it is all too easy to miss problem reports here. you might have a better chance asking on more specific lists, eg. for ghc use, or library issues http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Claus Reinke
Is there any plugin system for haskell? For example, in Java, I can load all compiled classes from given directory, check their interfaces and run some methods through reflection etc. Is it possible in haskell, to load modules from given directory, and if in module there is instance of class

Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-13 Thread Claus Reinke
Granted, I'm lazy. I read release notes only and only few first pages to see what's new. Couldn't GHCI be improved to at least give some hints? it does!-) watch the prompt, which says '*M', if all of M's top-level is in scope, or 'M', if only M's exports are in scope. check here:

Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-12 Thread Claus Reinke
For technical reasons, GHCi can only support the *-form for modules which are interpreted, so compiled modules and package modules can only contribute their exports to the current scope. But it does mean the interpreter isn't referentially transparent, which is weird for a language that puts so

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-25 Thread Claus Reinke
From my point of view, the difference between 0b10111011 and (bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters. how about using ghc's new overloaded strings for this? 10111011::Binary there used to be a way to link to ghc head's docs, but i can't find it right now. the test is

Re: [Haskell-cafe] will the real quicksort please stand up? (or: sorting a million element list)

2007-10-23 Thread Claus Reinke
It has been noted in a few places that the 2 line quicksort demo in the Introduction section of the haskell wiki http://www.haskell.org/haskellwiki/Introduction isn't a real quicksort, and wouldn't scale well with longer lists. Interested, and wanting to put my recently learned test data

Re: [Haskell-cafe] Re: [Haskell] [Fwd: undecidable overlappinginstances: a bug?]

2007-10-23 Thread Claus Reinke
Hi Mark, Declaration Formula --- --- class Eq a = Ord a forall a. Ord a = Eq a instance Eq a = Eq [a] forall a. Eq a = Eq [a] class C a b | a - b forall a, b. C a b /\ C a c = b = c This correspondence between declarations and

Re: [Haskell-cafe] Re: Proposal: register a package as providingseveral API versions

2007-10-18 Thread Claus Reinke
Which reminds me that it would be nice to be able to ask for a list of what imports I need to specify (i.e. what names from the module are actually used). A case in point would be the example of non- monadic I/O I sent to the list the other day: I wanted to specify minimal imports, but

Re: [Haskell-cafe] Re: Proposal: register a packageasprovidingseveralAPI versions

2007-10-18 Thread Claus Reinke
These two cases could be solved by re-exports, no extra mechanism is required. yes, good support for re-export would be nice to have. the reason it has so many applications is that it is a way to explain connections between providers, apis, and clients to the package manager. - consider

Re: [Haskell-cafe] Re: Proposal: register a packageasprovidingseveralAPI versions

2007-10-18 Thread Claus Reinke
Incedentally, this reminds me that GHC should have a warning for not using explicit import lists (perhaps only for external package imports). for package-level imports/exports, that sounds useful. claus ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: Proposal: register a package asprovidingseveralAPI versions

2007-10-17 Thread Claus Reinke
the idea was for the cabal file to specify a single provided api, but to register that as sufficient for a list of dependency numbers. so the package would implement the latest api, but could be used by clients expecting either the old or the new api. I don't see how that could work. If the

Re: [Haskell-cafe] Re: Proposal: register a packageasprovidingseveralAPI versions

2007-10-17 Thread Claus Reinke
if that is your definition of compatible, you can never throw any packages away Is this a problem? apparently, yes. no two versions of base with ghc, only the newest set of core packages with each ghc release. and how much time do you want to spend on finding, re-building, and re-installing

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
Be happy: we're about 15 years ahead of the lisp guys. 'cabal install xmonad' works, for example. - not on windows (and since it is popular, it will seduce more good haskellers not to bother with windows compatibility.. :-( - from xmonad.cabal (version 0.3, from hackage): build-depends:

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
- if you provide a 'base' configuration that pulls in the stuff that used to be in base, the package will work I don't know of a way to do that. The name of the package is baked into the object files at compile time, so you can't use the same compiled module in more than one package.

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
1. Document the version numbering policy. agreed. just making everybody's interpretation explicit has already exposed subtle differences, so documenting common ground will help. We should have done this earlier, but we didn't. The proposed policy, for the sake of completeness is: x.y where:

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
If the convention for modifying package versions of form x.y.z is: - increment z for bugfixes/changes that don't alter the interface - increment y for changes that consist solely of additions to the interface, parts of the interface may be marked as deprecated - increment x for changes that

Re: [Haskell-cafe] Re: Proposal: register a package as providingseveral API versions

2007-10-16 Thread Claus Reinke
I have another concrete proposal to avoid things breaking so often. Let us steal from something that works: shared library versioning on unixy systems. indeed!-) there are established workarounds that are needed to make that system work as it does, so it is a good idea to check whether cabal

Re: [Haskell-cafe] Re: Proposal: register a package asprovidingseveral API versions

2007-10-16 Thread Claus Reinke
are those tricks necessary in this specific case? couldn't we have a list/range of versions in the version: field, and let cabal handle the details? I don't understand what you're proposing here. Surely just writing version: 1.0, 2.0 isn't enough - you need to say what the 1.0 and 2.0 APIs

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-15 Thread Claus Reinke
but calling split-base base goes directly against all basic assumptions of all packages depending on base. The new base will have a new version number. There is no expectation of compatibility when the major version is bumped; but we do have an informal convention that minor version bumps

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-15 Thread Claus Reinke
You need a way to specify foo 1.2 foo 2, which is a suggestion that was tossed around here recently. but what does such a version range say? that i haven't tested any versions outside the range (because they didn't exist when i wrote my package)? or that i have, and know that later

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-15 Thread Claus Reinke
but the name that is everywhere does not stand for what the new version provides! any place that is currently referring to 'base' will have to be inspected to check whether it will or will not work with the reduced base package. and any place that is known to work with the new base package

<    1   2   3   4   5   6   >