#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11 12 
Top Prev 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 Next

#haskell

<dancor> Cale: open your mind [mind]
<Cheery> It requires to be a combination of function and transition rules.
<Cale> The compiler evaluates to that when applied to your program.
<Cheery> S1 = Rule (\i l -> i) [Transition C1 S2]
<benja_> that's the problem with compiled languages: 'Not in scope' isn't first-class
<benja_> you could imagine a language where you could pass it around and catch it in IO :)
<Cale> I can imagine not using such a language out of principle.
<nmessenger> you just have to move the metaprogram into your program, i.e. have a runtime compiler.
<Saizan> well, i want the compiler to catch my typo :)
<nmessenger> then you get a strange loop c/o GEB
<paolino> data Collectors = KPath | KRPath | RandomCollector, right ?
<Saizan> paolino: those are yet the contructors of the "real" types?
<paolino> eh
<nmessenger> data Collectors = KPath TypeWhichImplementsKPath | KRPath KRPathType etc.
<allbery_b> (I suspect you can't do much about it at comple time though; only a subset of perl may be functional at the time)
<paolino> nmessenger: TypeWhich.... is ?
<nmessenger> don't you know? It's the type in the Collector class you want to use for KPath.
<nmessenger> Is it just called KPath?
<Saizan> heh :D
<Saizan> paolino, if you have something like KPathtype = KPath ... then you write data Collectors = ColKPath KPathtype | ...
<Saizan> KPathtype could possibly be just KPath
<allbery_b> paolino: I think you're not describing what you're trying to do sufficiently. or possibly have not thought it through sufficiently
<Saizan> allbery_b: have you followed the previous discussion? like 30 minutes ago
<nmessenger> I notice in Collectors.hs you have "newtype KPath = KPath {unKPath :: (Int,Int)}", so Collectors should look like "data Collectors = KP KPath | KRP KRPath ..."
<allbery_b> I saw it, yes. but there does seem to be a lot of confusion currently :)
<paolino> ok so data Collectors = Collectors KPath | Collectors KRPath| Collectors ...
<paolino> ah
<Saizan> no
<Saizan> you need a different contructor for each type
<nmessenger> close, the constructor must have different names
<paolino> bien
<nmessenger> so (KPath (1,5)) has type KPath and (KP (KPath (1,5))) has type Collectors
<paolino> then what the user should write in the config file ?
<Saizan> that depends on the Read instance of Collectors
<paolino> deriving Read ?
<nmessenger> however you want to parse it, if you just derive Read, then the first would require (reads :: ReadS KPath) the second (reads :: ReadS Collectors)
<Saizan> KP (KPath (1,5)) i suspect
<paolino> ok, how my library intercepts the right collect method ?
<gaal> Hi! Recent snapshot builds of GHC-6.7 seem broken. E.g. wget claims this to be a 16mb d/l: http://www.haskell.org/ghc/dist/current/dist/ghc-6.7.20070216-i386-unknown-linux.tar.bz2
<lambdabot> http://tinyurl.com/2g6tlu
<gaal> and the one from the following day yields a broken bzip2 file
<Saizan> well you can make Collectors an instance of Collector that just route the method to the type inside it
<nmessenger> you might do: instance Collector Collectors where collect x (KP kp) = collect x kp; collect x (KRP krp) = collect x krp; ...
<allbery_b> gaal: ghc 6.7 -fvia-C is known to be broken currently
<xerox> Hiya gaal.
<allbery_b> see ticket #1151 on ghc trac
<gaal> allbery_b: thanks, I mean the files themselves are broken
<gaal> xerox: hi!
<allbery_b> oh
<allbery_b> and there's no snnaps for ppc anyway

Previous Page  Next Page

Search ircarchive.info