00:00:00 --- log: started haskell/06.07.10 00:06:01 --- join: amiddelk (n=amiddelk@korma.labs.cs.uu.nl) joined #haskell 00:06:11 --- join: gour (n=gour@lns02-1286.dsl.iskon.hr) joined #haskell 00:06:53 --- quit: blackdog (Read error: 110 (Connection timed out)) 00:15:04 --- join: iblechbot (n=iblechbo@62.216.196.107) joined #haskell 00:17:33 --- join: u221e (n=u221e@S010600119502636d.wp.shawcable.net) joined #haskell 00:17:55 What does newIORef do? 00:18:16 creates a new IORef 00:18:48 dons: the insight! 00:18:48 Heh. What is an IORef ;) 00:18:57 --- part: jgraves left #haskell 00:19:01 oh, it's a pointer to a mutable cell, u221e 00:19:16 that is, a mutable variable available in the IO monad 00:19:20 Um... is that allowed? 00:19:24 it has an equivalent, STRef, in the ST monad. 00:19:36 yes, since the monad preserves ordering of actions, making it safe to use 00:20:07 i.e. newIORef >>= writeIORef 'x' >>= readIORef has a defined order that makes sense 00:20:13 hooray for monads 00:20:17 --- join: drrho (n=rho@CPE-60-226-163-81.qld.bigpond.net.au) joined #haskell 00:21:05 sometimes mutable cells are a useful data type, after all 00:23:39 --- part: EdwardKmett left #haskell 00:23:57 --- join: EdwardKmett (n=ekmett@c-68-42-205-162.hsd1.mi.comcast.net) joined #haskell 00:25:15 i should call them 'mutable cells', not mutable variables. they're not 'transparent' mutable variables, you have to access them via an api, and stay in io 00:32:02 I still don't really get how to use monads. 00:33:58 do x <- newIORef "foo " ; r <- readIORef x ; print r :) 00:34:17 the easiest way is to just play with IO, forget about the word monad for a while, and use do notation 00:34:41 That's what I have been doing. 00:34:47 just imagine your programming in some sublime imperative language with this cool, high-assurance pure expression part 00:34:49 --- quit: Axio[Bnk] ("Leaving") 00:35:55 they'll sink in bit by bit. remember that, after all, you're learning a new abstraction -- monads -- that abstract over the sequencing of computations themselves 00:36:04 pretty highlevel funky stuff, unlike anything out there 00:36:52 esp. if you've been born and raised in strictly imperative programming, the idea that you can even abstract over the sequencing of operations is bizarre/too hard/brain explodes 00:37:37 however, with time, the brain swelling subsides, the migraines leave, and you just get about the job of high level programming in the 21st century 00:37:42 --- join: binary42_ (n=binary42@207-172-105-28.c3-0.avec-ubr9.nyr-avec.ny.cable.rcn.com) joined #haskell 00:37:55 Well, I've never really used an fp language before... not even lisp. 00:38:07 one of the few things that come close to monads are callcc/continuations 00:38:12 which already most languages don't have 00:38:24 yeah 00:39:05 the rules are all changed in haskell. everything is up for abstraction, and that means lots and lots of expressivity, but also lots of tricky concepts 00:39:07 monads are probably the most elegant language construct i've seen in a long time 00:39:22 maybe arrows 00:39:31 but its harder to find immediate programmatic uses for arrows 00:39:42 EdwardKmett: especially once you see things like the backtracking, non-deterministic monads used to implement, say, prolog in a few lines. 00:39:52 yeah 00:40:42 mmh can you explain me what the function readsPrec from class Read should produce , please? 00:40:46 the first bit of code i did in haskell when i got back to it was started banging out a prolog-wannabe and proved a bunch of random stuff with the non-determinism monad =) 00:40:48 arrows are great for functional reactive programming. Frag might be one of the most visible cases, http://www.haskell.org/haskellwiki/Frag. But I agree, arrows seem to be used in more specialised problems 00:40:50 Title: "Frag - HaskellWiki" 00:41:00 I think I'll read the "All about monads" tutorial. 00:41:12 All about monads is a great tutorial 00:41:13 ?type readsPrec 00:41:14 forall a. (Read a) => Int -> ReadS a 00:41:33 paolino: probably an example of the use of readsPrec might be better 00:42:01 I'm trying to undestand http://www.nomaware.com/monads/examples/example4.hs 00:44:34 *Main> :t readsEntry 00:44:35 readsEntry :: ReadS Entry 00:44:51 it produces nothing ? 00:45:33 --- join: Muad_Dibber (n=rjlwanro@jalfrezi.labs.cs.uu.nl) joined #haskell 00:45:35 Another thing I'm used to is printing strings to the stdout for debugging, but I don't think I can do that within the non monad parts of the program. 00:46:23 u221e: one thing that helps compensate for that is that if it passes type-check its probably doing the right thing =) 00:46:43 @index trace 00:46:43 Debug.Trace 00:47:12 *Main> readsEntry "paolo=studia\n2" 00:47:13 [("paolo" = "studia","\n2")] 00:47:13 lokks like it does 00:48:27 yeah, use 'trace' 00:48:32 --- nick: Lokadin_ -> lokadin 00:48:59 though with ghci, and the ability to test individual components of your code, this is less useful than in languages without interactive environments 00:50:44 dons, must I understand alone ? 00:50:54 --- join: Itkovian (n=Itkovian@dragnipur.elis.UGent.be) joined #haskell 00:51:34 paolino: oh, you want help with reads functions? 00:52:07 probably 00:52:28 I don't seem to catch that type 00:53:03 generally you never have to manipulate reads* functions directly, you just derive Read 00:53:17 so if you're interested, probably the best thing to do is read GHC/Read.lhs 00:53:19 --- join: jberg (n=loxs@84.208.253.89) joined #haskell 00:53:24 ?fptools GHC.Read 00:53:24 GHC.Read not available 00:53:28 ?fptools Data.List 00:53:29 http://darcs.haskell.org/packages/base/Data/List.hs 00:53:37 http://darcs.haskell.org/packages/base/GHC/List.lhs 00:53:39 I think 00:53:47 http://darcs.haskell.org/packages/base/GHC/Read.lhs, I mean 00:54:03 yes, ^^ 00:55:08 dons .. why they implemented readsPrec there ? 00:56:12 I think deriving from Read without a function implementation was not enough 00:58:49 catching a few hours sleep. 00:58:56 be back in a few hours 00:58:59 --- part: EdwardKmett left #haskell 01:00:02 --- quit: binary42 (Read error: 110 (Connection timed out)) 01:00:43 --- quit: boegel ("This computer has gone to sleep") 01:03:00 who * 01:03:02 gak 01:03:48 since i'm awake, is there a standard way of handling matrices in haskell? 01:04:14 --- join: Saulzar (n=Oliver@222-154-56-35.jetstream.xtra.co.nz) joined #haskell 01:04:24 well, if they're small, a list of lists would do it. otherwise consider the Array library 01:04:54 failing that, you can ask on haskell-cafe@haskell.org, where there's a few matrix-hackers looking to port high-perf physics/math matrix libraries to haskell 01:05:14 there may already be some matrix libs, check haskell.org under 'libraries and tools' 01:05:23 in particular, look in 'math' and 'data structures' 01:05:24 readsEntry :: ReadS Entry 01:05:25 Reads Entry is the output type ? 01:05:48 well, it's not a function, it takes no arguments, so its a constant of some sort. 01:06:39 dons: thanks 01:06:47 readsEntry s = [(Entry (trim key) (trim val), s'') | (key, s') <- [break (=='=') s], (x:val, s'') <- [break (=='\n') s'] 01:06:59 s is not its argument ? 01:07:12 ah, ReadS is hiding the function type 01:07:26 eh ? 01:07:38 the thing about ReadS is that for efficiency purposes it uses function composition, rather than string concatenation, to join strings 01:07:59 --- join: ikegami-- (n=ikegami@61.206.113.16.myip.interlink.or.jp) joined #haskell 01:08:00 so it builds up a hugh function that when applied generates the output, rather than doing bit by bit, using ++ to compose the output 01:08:09 uh? I thought read was for input 01:08:19 ah, other way around. 01:08:27 s/out/in/ 01:09:14 anyway, it's doing this marginally tricky thing with function composition, iirc. you'll have to read the Read documentation and src, paolino 01:09:19 ?docs Text.Read 01:09:19 http://haskell.org/ghc/docs/latest/html/libraries/base/Text-Read.html 01:09:22 ?docs Text.Read.Lex 01:09:22 http://haskell.org/ghc/docs/latest/html/libraries/base/Text-Read-Lex.html 01:10:20 --- join: mnislaih (i=dope@158.42.187.204) joined #haskell 01:11:17 k 01:11:33 ReadS is a thing of String -> something or other, iirc. 01:11:55 String -> [(a, String)] IIRC 01:12:23 yeah, that looks like it. 01:12:25 @hoogle readS 01:12:26 Prelude.reads :: Read a => ReadS a 01:12:26 Prelude.ReadS :: type ReadS a 01:12:26 Numeric.readSigned :: Real a => ReadS a -> ReadS a 01:12:30 @hoogle ReadS 01:12:30 Prelude.ReadS :: type ReadS a 01:12:30 Prelude.reads :: Read a => ReadS a 01:12:30 Numeric.readSigned :: Real a => ReadS a -> ReadS a 01:12:35 ah, doesn't tel us 01:13:28 > reads "123 456" :: ReadS Int 01:13:29 Expecting a function type, but found `[(a, String)]' 01:13:29 Expected type... 01:13:33 er, ok 01:14:24 > reads "123" [] 01:14:25 The function `reads' is applied to two arguments, 01:14:25 but its type `Read... 01:14:34 yeah, read fooey 01:14:47 how can it hide the function type ? 01:14:52 > (reads :: ReadS Int) "123 456" 01:14:53 [(123," 456")] 01:15:20 type ReadS a = String -> [(a, String)] 01:16:01 paolino: you'll need to read up on parser combinators to understand how read in implemented 01:16:09 ?docs Text.ParserCombinators.ReadP 01:16:09 http://haskell.org/ghc/docs/latest/html/libraries/base/Text-ParserCombinators-ReadP.html 01:16:26 -- | A parser for a type @a@, represented as a function that takes a 01:16:26 -- 'String' and returns a list of possible parses as @(a,'String')@ pairs. 01:16:26 -- 01:16:26 -- Note that this kind of backtracking parser is very inefficient; 01:16:26 -- reading a large structure may be quite slow (cf 'ReadP'). 01:16:28 type ReadS a = String -> [(a,String)] 01:17:22 so every ReadS is really a functoin from String to some 'a's, with any left over strings 01:17:40 interestingly, newtype ReadP a = R (forall b . (a -> P b) -> P b) 01:25:20 what is the category of ReadS? A parametric funtion type ? 01:26:17 how should I call it ? 01:27:55 nm , I don't do it 01:31:54 --- quit: johnnowak () 01:35:00 --- part: rob-d left #haskell 01:41:32 --- nick: mathrick|sleep -> mathrick 01:45:42 :) 01:46:14 --- join: binary42 (n=binary42@207-172-105-28.c3-0.avec-ubr9.nyr-avec.ny.cable.rcn.com) joined #haskell 01:49:44 --- join: arjanoosting (n=arjan@sd511615a.adsl.wanadoo.nl) joined #haskell 01:51:39 --- join: boegel (n=boegel@konijn.elis.UGent.be) joined #haskell 01:53:09 --- join: Prip (n=aaa@host91-81.pool8259.interbusiness.it) joined #haskell 01:54:37 --- join: alek_ (n=alek@ll-227.216.82.212.sovam.net.ua) joined #haskell 01:55:21 --- quit: alek (Read error: 104 (Connection reset by peer)) 01:55:24 JaffaCake ping 01:55:45 are you there? I just saw your response 01:56:19 mnislaih: yes, hi 01:56:39 I have a doubt, if you can spare a second 01:56:53 is the output of the desugarer annotated with srclocs ? 01:57:18 we want to be giving information about code locations and such 01:57:44 --- join: tennin (n=max@ppp-68-95-68-217.dialup.stlsmo.swbell.net) joined #haskell 01:57:47 mnislaih: no, but the input *to* the desugarer has srclocs in it 01:58:04 ah, I see. 01:58:05 I think it might be easier to add breakpoints during desugaring 01:58:15 that's perfect then 01:58:30 take a look at how -auto-all works 01:58:51 oki 01:58:55 thanks 01:59:02 np, good luck 01:59:25 JaffaCake: Did you see my messages? 01:59:56 Igloo: no.... 02:00:06 haven't read all my mailboxes yet today tho 02:00:25 IRC messages 02:00:30 --- join: kpreid (n=kpreid@24-52-49-37.bflony.adelphia.net) joined #haskell 02:00:45 oh, sorry 02:00:49 * JaffaCake looks 02:01:20 --- quit: xinming (Connection timed out) 02:03:50 --- quit: binary42_ (Read error: 110 (Connection timed out)) 02:07:12 --- join: shawn (n=shawn@adsl-70-132-20-198.dsl.snfc21.sbcglobal.net) joined #haskell 02:07:20 --- part: coward left #haskell 02:08:34 --- join: revision17_ (n=revision@RH-LaurelN-CS2-129-142.njit.edu) joined #haskell 02:10:57 mnislaih, JaffaCake: Note that the desugarer doesn't have access to the local scope. 02:11:36 that will be a showstopper then 02:11:58 the renamer is very convenient for that reason 02:12:17 btw Lemmih, did you manage to look at the issue with local bindings? 02:12:22 Yeah, I don't think you can bypass the renamer. 02:12:36 mnislaih: I can give it a look now. 02:13:06 I haven't fixed it, but I can give you some details 02:13:28 --- join: kowey (n=kowey@4aa54-4-82-234-151-151.fbx.proxad.net) joined #haskell 02:14:18 --- quit: ikegami-- ("Riece/1.0.2 Emacs/21.4 (gnu/linux)") 02:15:19 --- join: kfish (n=conrad@195.8.233.220.exetel.com.au) joined #haskell 02:15:27 --- join: b0gg1e (n=boman@217.188.102.127) joined #haskell 02:16:56 * tennin is reading the Haskore tutorial paper... "The possibility of expressing other scale types instead of the thus far unstated assumption of standard equal temperament scales is another area of investigation." 02:17:10 anyone know if this investigation has yet borne fruit? 02:17:13 --- quit: Revision17 (Read error: 110 (Connection timed out)) 02:18:38 @seen shapr 02:18:38 I saw shapr leaving #haskell 10 days, 22 hours, 29 minutes and 24 seconds ago, and . 02:18:58 --- join: coward (n=coward@coward.Stanford.EDU) joined #haskell 02:19:04 has he ever been offline this long? 02:20:43 yeah, once i think 02:20:56 but he's moved towns, so i suppose it 'tis to be expected 02:22:10 --- quit: drrho ("using sirc version 2.211+KSIRC/1.3.11") 02:24:09 --- quit: kisu (Read error: 54 (Connection reset by peer)) 02:25:49 mnislaih: How do you trigger it? 02:26:11 put a breakpoint inside a let or where 02:28:08 --- join: roconnor (n=roconnor@n032155.cs.kun.nl) joined #haskell 02:28:36 --- join: viblo (n=hejsan@h105n1fls31o831.telia.com) joined #haskell 02:32:22 --- join: Paltas (n=bo@85.24.63.159) joined #haskell 02:33:41 --- join: arjanb (i=borganis@borganism.student.utwente.nl) joined #haskell 02:35:12 --- join: xinming (n=xinming@222.172.216.215) joined #haskell 02:35:23 --- quit: coward (Remote closed the connection) 02:35:38 --- quit: paolino (Connection timed out) 02:38:19 mnislaih: Hm, pretty weird. 02:38:38 did you see my messages about this the other day ? 02:39:01 --- join: Trixsey (n=secret@c-0d9072d5.012-2011-73746f31.cust.bredbandsbolaget.se) joined #haskell 02:39:12 I think it is because the binder is included in the captured list of bindings 02:39:17 --- join: nealar (n=vircuser@62.231.11.86) joined #haskell 02:39:49 --- quit: JaffaCake (Read error: 104 (Connection reset by peer)) 02:41:30 --- join: jewel (n=jewel@dsl-145-56-159.telkomadsl.co.za) joined #haskell 02:41:49 mnislaih: Yeah, removing the binder "solves" it. 02:42:12 * Lemmih heads off to buy groceries. 02:44:22 --- join: farre (n=d00farre@bort.dtek.chalmers.se) joined #haskell 02:44:34 --- part: farre left #haskell 02:46:01 --- join: BCoppens (n=bartcopp@kde/developer/coppens) joined #haskell 02:46:16 --- quit: Lunar^ (Read error: 110 (Connection timed out)) 02:47:41 @tell shapr I have a short text "why use arrows for parsers", but it is in russian =) 02:47:41 Consider it noted. 02:48:03 --- join: kisu (n=kisu@cielkisu.tb.as8758.net) joined #haskell 02:52:33 --- quit: boegel (Read error: 110 (Connection timed out)) 02:57:38 --- quit: HatchBack176 () 03:04:54 --- quit: Itkovian (Read error: 110 (Connection timed out)) 03:14:43 hemm stupid question, what the character for comment in haskell ? 03:14:47 --- join: K4052 (n=h@dsl217-197-189-17.pool.tvnet.hu) joined #haskell 03:15:19 there is no signle character 03:15:27 -- 03:15:28 there is -- and {-...-} 03:15:35 ok thanks 03:15:48 -- like sql 03:16:42 --- quit: bringert () 03:16:47 If I have a function that builds a finite list, can I have the whole thing built in a strict manner? 03:24:37 yes, by forcing the list (i.e. by evaluating its length0 03:24:55 however, relying on the order of evaluation is a nasty and error prone business :) 03:25:57 one doesn't really _rely_ on the order of evaluation. One is just trying to optimise memory use. 03:29:46 The only why that I can thing of is to have another function strictList that would go and access every element of the list that it can. 03:33:57 --- quit: mathrick (Remote closed the connection) 03:36:10 Eeek. Function body of 31 lines and 11 lines of where. 03:40:36 --- join: mathrick (n=mathrick@195.116.35.56) joined #haskell 03:41:41 --- join: dsacode (n=dsacode@masq.botik.ru) joined #haskell 03:41:49 --- part: dsacode left #haskell 03:43:31 roconnor: oh, yeah. i was thinking of some programs that do indeed rely on the order. (s <- readFile "x" ; writeFile "x" (f s)) 03:43:50 you do need to force the list sometimes just to get `correct' behaviour 03:45:24 What does unsafeChr mean? 03:50:26 --- quit: nothingmuch (Read error: 104 (Connection reset by peer)) 03:52:04 --- join: nothingmuch (n=nothingm@bzq-84-108-53-74.cablep.bezeqint.net) joined #haskell 03:54:10 --- join: ski (n=slj@h179n2fls31o836.telia.com) joined #haskell 03:54:21 --- join: Si\Uni (n=simon@lambda.dcs.shef.ac.uk) joined #haskell 04:06:35 dons: I've never liked that. Isn't the semantics of readFile broken. 04:06:45 broken? 04:06:50 well, using files as mutable variables is broken :) 04:07:34 --- quit: kowey ("Get MacIrssi - http://www.g1m0.se/macirssi/") 04:07:53 --- join: BetaTEST (n=as_beta@85.21.96.24) joined #haskell 04:08:24 what do you mean by files as mutable variables? 04:08:54 reading and writing back to the same file 04:09:04 ie. like a mutable cell in memory 04:09:04 right 04:09:15 --- join: vininim (n=vininim@BHE200150026220.res-com.wayinternet.com.br) joined #haskell 04:09:34 unsurprisingly, there's issues with laziness/interleaving 04:09:36 the semantics ought to be to delay reading a file until the file is written, then read it into memory. 04:09:54 but monads solve all that interleavingness (more or less) 04:10:10 It is clear what you example code ought to do. 04:10:22 and it could do what it ought to do. 04:10:31 well, not with lazy io , it's lazy io allowing interleaving of reads and writes on the same file that's problematic 04:10:32 I don't really understand why it doesn't. 04:10:40 exactly 04:10:53 but that's using unsafeInterleaveIO underneath, so problems could be expected 04:10:54 it seems like it would be easy to change. 04:11:19 we need a new System.IO! 04:11:22 hehe 04:11:30 who's with me! 04:12:12 ... anyone? 04:19:12 --- join: madpickle (i=jizzy@touch.my.lovecudgel.com) joined #haskell 04:19:23 --- join: lde (i=tehira@nat-dz2.aster.pl) joined #haskell 04:23:16 What function grabs specific element of a list? I assume it's just a shortcut for using head and tail 04:23:46 @type (!!) 04:23:47 > "abcde" !! 2 04:23:48 forall a. [a] -> Int -> a 04:23:48 'c' 04:24:38 Heh, thanks. 04:27:07 roconnor : if you mean 'readFile' should conceptually capture the state of the file at the point of running the action (but implementation-wise probably wait until forced or file modified), then i agree 04:27:35 (btw, isn't this semantics remniscent of 'DiffArray' ?) 04:28:33 --- join: Lunar^ (i=83973f05@poivron.org) joined #haskell 04:29:28 what is Lenient evaluation? 04:32:23 How do I turn a String such as "42" into an Int 04:33:32 --- join: mauke_ (i=mauke@p54997A31.dip.t-dialin.net) joined #haskell 04:34:03 --- join: dozer (n=nmrp3@81-178-115-204.dsl.pipex.com) joined #haskell 04:34:05 > read 42 :: Int 04:34:06 add an instance declaration for (Num String) 04:34:12 > read "42" :: Int 04:34:12 > read "42" :: Int 04:34:12 42 04:34:13 42 04:36:16 From FPS docs: isSubstringOf p s is equivalent to not (null (findSubstrings p s)). 04:37:00 Why not 'isJust . findSubstring p'? 04:37:36 Hmm.. I perhaps the null terminates as early. Never mind. 04:37:38 :hoogle findSubstring 04:37:42 @hoogle findSubstring 04:37:43 No matches found 04:37:48 Don't think hoogle indexes FPS yet. 04:38:07 http://www.haskell.org/ghc/dist/current/docs/libraries/base/Data-ByteString.html 04:38:29 about two-thirds to the bottom of the page. 04:40:03 --- quit: iblechbot (Connection timed out) 04:40:26 --- join: iblechbot (n=iblechbo@62.216.197.177) joined #haskell 04:45:11 --- quit: kpreid () 04:45:58 --- join: kpreid (n=kpreid@24-52-49-37.bflony.adelphia.net) joined #haskell 04:46:12 --- quit: eride_to_sleep (Connection reset by peer) 04:47:27 I'm having trouble compiling SYB3 with ghc 6.5 04:47:45 the mailing list told me that I probably needed to add some forall statements 04:47:48 but forall confuses me 04:47:57 --- quit: mauke (Read error: 110 (Connection timed out)) 04:48:17 kzm, right, i need to add fps to the hoogle index 04:48:33 --- nick: mauke_ -> mauke 04:53:26 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 04:53:56 --- join: augustss (n=augustss@cpe-66-108-73-169.nyc.res.rr.com) joined #haskell 04:57:17 --- quit: nealar (Remote closed the connection) 04:57:31 --- join: moonfish (n=user@host226.lshift.net) joined #haskell 05:02:46 how can I get my ghc-compiled programs to display source locations when they exit with an error like, say, "Maybe.fromJust: Nothing"? 05:02:55 --- join: jberg_ (n=loxs@cm-84.208.253.089.chello.no) joined #haskell 05:03:09 you can use 'assert', instead 05:03:18 ?hoogle assert 05:03:19 Control.Exception.assert :: Bool -> a -> a 05:03:19 Test.HUnit.Base.assert :: Assertable t => t -> Assertion 05:03:19 Control.Exception.assertions :: Exception -> Maybe String 05:04:32 i also have a trace() that does a similar thing, http://www.cse.unsw.edu.au/~dons/tmp/Location.hs 05:04:56 so I suppose what you need is to find where you're doing a fromJust, and add an assert on those cases 05:05:00 Is it posible to have just an 'if-then' statement? 05:05:10 in the IO monad, yes 05:05:13 it's called 'when' 05:05:18 u221e: what would the type be? 05:05:25 when (x == 10) $ do print "yes" 05:05:42 yeah, the type is the issue :) 05:05:48 dons, err, that's exactly my problem though: I want to find out where I am calling fromJust! 05:05:55 --- join: Pupeno (n=pupeno@62.220.31.131) joined #haskell 05:05:58 you don't even need the "do" here, do you? 05:06:13 right 05:06:14 when, eh? So many things to learn.... 05:06:19 moonfish: you'll have to find the fromJust (use 'grep') and replace them with assert . fromJust 05:07:13 so there is no general way to have exceptions display their source location? 05:07:15 mux, yes, 'do' is optional, it's easier to read with 'do' though for didactic purposes 05:07:30 * mux nods 05:07:36 moonfish: there is. see http://www.cse.unsw.edu.au/~dons/tmp/Location.hs 05:07:41 but it's not been implemented yet :) 05:07:51 perhaps we should think about how to do that. 05:08:33 a locationable-exception could use either TH, or cpp, or a preprocessor, or 'assert' 05:08:37 all would work 05:09:43 What module is 'when' in? 05:10:16 @hoogle when 05:10:17 Monad.when :: Monad a => Bool -> a () -> a () 05:10:17 Control.Monad.when :: Monad m => Bool -> m () -> m () 05:10:40 dons: but that would still involve changing all the code locations that may raise an error, right? 05:10:58 yes 05:11:17 I got to learn how to use lambdabot 05:11:37 that's gross. 05:11:54 u221e, hoogle's also available at haskell.org/hoogle 05:11:57 well, how many occurences of 'fromJust' are there in your code? 05:12:06 10? 05:12:13 @vixen meet u221e 05:12:13 Tell me truthfully what the nastiest thing you have ever done. 05:12:19 --- quit: mnislaih (Read error: 110 (Connection timed out)) 05:13:45 dons: not many, but what about all the libraries I am using? 05:13:51 Hoogle sure looks useful. 05:14:41 moonfish: so, a quick fix is to manually replace all fromJust's with: (\x -> GHC.Base.assert (x /= Nothing) (Maybe.fromJust x)) 05:14:41 --- quit: ramkrsna (Remote closed the connection) 05:15:07 then if its a library, you need to look at the Maybe values you're using, i suppose it could be in a library (but less likely) 05:15:49 it's not just about Maybes though but any exceptions that might get thrown by my code or library code. 05:16:10 oh, if you want to use locations in all your exceptions, yeah 05:16:29 perhaps we should have an exceptoin that prints locations if compiled with --asserts or something 05:16:32 that'd be useful 05:18:48 dons: it would be very useful indeed. I am struggling to see how I could live without it since nearly every PL implementation I've used over the last 15 years does this. 05:19:33 yeah, i wonder why it hasn't been an issue. i suppose static typing rules out the large majority of bugs, so you don't spend time hunting unknown failures 05:19:45 --- quit: jberg (Read error: 110 (Connection timed out)) 05:20:03 additionally, you shouldn't be using, e.g. fromJust, but instead case / fromMaybe with an error condition 05:20:36 dons: yeah, I know. But unexpected things do happen. 05:20:50 anyway, its easy enough to add locations to failures to any exceptions in your code, just use the cpp line pragma 05:21:08 but its an interesting issue. i might look into it. 05:21:38 --- join: mnislaih (n=NNSCRIPT@84-123-34-52.onocable.ono.com) joined #haskell 05:26:31 --- quit: koffein (Read error: 110 (Connection timed out)) 05:29:48 --- join: ihope_ (n=foo@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 05:30:06 moonfish: here's a useful function for you: http://www.cse.unsw.edu.au/~dons/tmp/Exception.hs 05:30:19 *Exception> locatedError "my failure" assert 05:30:20 *** Exception: :1:26-31: my failure 05:30:49 it needs the magic 'assert' token as a second argument, as a trickys way to find the current line 05:32:54 dons: thanks, I will play with that later. I am still somewhat astonished that the GHC compiler/runtime doesn't do this kind of thing automatically, at least when -debug is turned on. 05:33:32 i think pattern match failures report line numbers 05:33:39 > case Nothing of Just _ -> False 05:33:40 Non-exhaustive patterns in case 05:33:48 oh, lambdabot dropped the line 05:33:58 case Nothing of Just _ -> False 05:33:59 *** Exception: :1:0-30: Non-exhaustive patterns in case 05:34:07 so some failures do 05:34:38 but fromJust throws error, which doesn't have line numbers 05:34:46 perhaps there should be some debugError, as I suggest. 05:34:51 So this FFI thing still isn't working. 05:36:02 so you have to be unlucky, i suppose, to use something that throws 'error' 05:36:03 --- join: Fritez (i=fritz@201.41.204.202) joined #haskell 05:37:33 moonfish: it would be worth writing an email to haskell-cafe@haskell.org querying this. I can think of a few solutions, such that error becomes locatedError, but maybe someone's already thought about this 05:42:56 --- join: marc_vw (n=chatzill@p54971655.dip0.t-ipconnect.de) joined #haskell 05:43:15 --- quit: augustss (Read error: 110 (Connection timed out)) 05:43:35 ping 05:44:17 pong? 05:45:09 ack! 05:45:45 drop 05:46:12 nak 05:49:41 fin 05:53:15 ghc is giving me an error and I can't figure out why... 05:53:30 The error message are very unhelpful. 05:53:47 What error? 05:53:47 what's the error? 05:53:49 ?paste 05:53:49 http://paste.lisp.org/new/haskell 05:55:20 u221e pasted "Error" at http://paste.lisp.org/display/22348 05:55:40 Lemmih: anything new with hide? 05:55:58 looks like there's a missing argument to your function, u221e 05:56:17 ghc thinks it should be [Pixel], but it actually has a function type, t -> t1 05:56:29 ie. it needs to be applied to another argument 05:56:41 beyond that, I couldn't say, without seeing the code 05:56:44 Yeah, can you post the code? 05:57:03 gour: Hope. 05:57:08 *Nope. 05:57:36 Lemmih: hmm...Hope is a lot 05:57:47 ... I just found my error... stupid too. 05:57:52 Nope not so much 05:58:17 gour: Yeah, I wish we had some new hope. 05:58:19 u221e: in hindsight, i hope that error msg isn't so bad. it's a fairly good one, as far as ghc goes. 05:58:22 @ghc 05:58:23 At least one of the forall'd type variables mentioned by the constraint must be reachable from the type after the '=>' 05:58:27 @ghc 05:58:27 The signature contexts in a mutually recursive group should all be identical 05:58:29 The type definition was wrong. 05:58:33 cool 05:58:39 @ghc 05:58:39 Non-type variables in constraint 05:58:44 see, could be worse :) 05:59:29 ?type undefined :: Foo => a 05:59:30 Not in scope: type constructor or class `Foo' 05:59:59 Lemmih: why 'no hope', i.e. what's the obstacle? visual haskell shows it's possible.. 06:00:28 --- join: ramkrsna (n=ramkrsna@202.149.56.110) joined #haskell 06:02:00 gour: Visual Haskell is a cripple. We could abandon our plugin system but that wouldn't be fun. 06:02:34 --- quit: MarcWeber ("leaving") 06:03:15 --- quit: xinming (Read error: 104 (Connection reset by peer)) 06:03:19 ihope pasted "Argh!" at http://paste.lisp.org/display/22350 06:03:20 Lemmih: what about 'blind uncle is better than no uncle' ? 06:04:19 ihope_: don't test ffi stuff in ghci on windows :) 06:04:32 :-) 06:04:41 seriously though, maybe you're missing an object file on the command line? 06:04:55 oh, no, its worse: Not x86 PEi386 06:05:10 gour: That only works when you're paid. 06:05:16 Did I booch the C compilation? 06:05:35 possibly? could it have been compiled in to some cygwin or something format? 06:05:37 Lemmih: so, All or Nothing? 06:05:47 Just the best :) 06:05:57 ihope_: try with --make and a static object, not ghci 06:06:02 does that work/? 06:06:08 then try fancy dynamic loading/ghci games 06:06:11 ghc --make, you mean? 06:06:15 right 06:06:17 dons: hey... 06:06:25 http://www.real.com/linux/ 06:06:26 Title: "RealPlayer 10 for Linux – the best audio and video player – Real.com" 06:06:33 vegai? 06:07:10 dons: I was wondering making some of the entities in that feature a bit more readable. Any snappy way to do that, you think? 06:07:18 C:/Documents and Settings/foobar/Desktop/Haskell FFI/ffitest-c.o: file not recognized: File format not recognized 06:07:23 e.g. "&ndash" => "--" 06:07:29 --- join: nealar (n=vircuser@62.231.11.86) joined #haskell 06:07:29 --- join: teo (n=sgolovan@jabber.ttn.ru) joined #haskell 06:07:34 oh, like un-html-encodifying it? 06:07:36 – that is 06:07:49 yeah 06:08:00 --- join: paolino (n=paolino@151.82.5.102) joined #haskell 06:08:05 is there a way to encode structure {int size; int array[size];} without dependent types? 06:08:16 --- part: teo left #haskell 06:08:19 gour: Yeah. I do ugly hacks for a living; my spare time is reserved for fun and/or beauty (: 06:08:27 nealar: yep. using type classes and phantom types 06:08:54 Lemmih: i see. no trace of pragmatism :-) 06:09:09 vegai: can you send me a patch implementing unhtml, in front of the fetchTitle function, here http://www.cse.unsw.edu.au/~dons/code/lambdabot/Plugin/Url.hs 06:09:11 ? 06:09:25 should be pretty easy to add the most common cases 06:09:45 you think a simple replace will do? 06:10:03 i think a string matcher could do it pretty easy, yep 06:10:06 what is the proper name for this: rpmvercmp :: String -> String -> CInt, I know it is not prototype iirc ? 06:10:07 look for encoded tokens 06:10:24 type declaration, Nanar 06:10:29 thanks 06:10:31 all right, I'll write that down on my miraculously short todo-list 06:11:02 dons: is there a guide for phantom types? 06:11:12 --- join: koffein (n=aik@p50920586.dip0.t-ipconnect.de) joined #haskell 06:11:18 nealar: http://haskell.org/haskellwiki/Peano_numbers, http://haskell.org/haskellwiki/Phantom_type, http://haskell.org/haskellwiki/Dimensionalized_numbers and particularly http://haskell.org/haskellwiki/Smart_constructors 06:11:19 Title: "Peano numbers - HaskellWiki" 06:11:27 --- join: jgrimes_ (n=sinfinit@64.53.10.187) joined #haskell 06:11:31 ah, interesting. bug! :) 06:11:41 --- nick: nealar -> alar 06:12:02 nealar: in the smart constructors article i develop a stripped down version of what you want, but it points to the article by Oleg that could just about get you there. 06:12:28 note that its not trivial. and perhaps a simple smart constructor would work, rather than an actual type-level natural 06:13:20 dons: so should I recompile ffitest-c.h? 06:13:26 Nanar : or 'type signature' 06:13:36 http://dont.scream http://www.google.com 06:13:42 heh. 06:13:49 ihope_: nope. ghc --make should do all the magic, shouldn't it? and gcc should produce the .o files 06:14:49 dons: do you mean Oleg's type-level arithmetic? 06:14:57 yeah. 06:15:11 --- join: ADEpt___ (n=adept@jabber.ttn.ru) joined #haskell 06:15:14 --- join: chris2 (n=chris@p549D26D2.dip0.t-ipconnect.de) joined #haskell 06:15:14 --- part: ADEpt___ left #haskell 06:15:21 * alar thinks that it's just dependent types from the backside 06:15:39 which , once you've got type level nats, you can link to constructors that set the type of the accompanying vector 06:15:43 oleg's articles do just this 06:15:57 well, you stay in h98, which ain't no dependent type system 06:16:11 When I give both the source files to GHC, I get "C:/Documents and Settings/foobar/Desktop/Haskell FFI/ffitest-hs.o(.text+0x44):fake: undefined reference to `_add'". 06:16:18 yes, I've followed Oleg and tried Ackermann at type level 06:16:25 and your terms can't really appear in types, they're mirrored. big difference 06:16:46 --- quit: Nomius () 06:17:01 ihope_: you need to pass a missing -lfoo flag or .o file on the command line? 06:17:52 --- join: ADEpt___ (n=ADEpt@jabber.hst.ru) joined #haskell 06:18:28 hello there 06:18:42 --- join: ermineq (n=ermine@av6800.comex.ru) joined #haskell 06:18:43 If I pass the C source file *and* its object file, I get "C:/Documents and Settings/foobar/Desktop/Haskell FFI/ffitest-c.o: file not recognized: File format not recognized". 06:18:58 let me code up an example 06:19:08 hey ADEpt___ , long time not chatification :) 06:19:29 ADEpt___: irc sucks 06:21:03 --- join: lollan (n=lollan@cpc3-tref1-0-0-cust598.cdif.cable.ntl.com) joined #haskell 06:21:07 --- join: xinming (n=xinming@222.172.216.185) joined #haskell 06:21:19 --- quit: b0gg1e () 06:21:33 could anybody have any idea (including wild ones) as to why i am unable to enter as "adept" (or "ADEpt") or chane nickname to any of those? 06:22:00 hmm. someone got it? or a ghosted version of you? 06:22:34 dons: could you please as NickServ about current status of nick "adept" ? 06:22:56 Is adept@ukr.net your address? 06:23:03 ihope_: yes 06:23:08 ihope_: one of them 06:24:07 Okay, then "/msg NickServ GHOST adept password". 06:24:32 ihope_: so does this workfor you: 06:24:33 import Foreign.C.Types 06:24:33 main = putchar 65 >> putchar 10 06:24:33 foreign import ccall unsafe "stdio.h" putchar :: CInt -> IO CInt 06:24:46 if so, then we can try with a local .c file 06:25:10 $ ghc --make -ffi A.hs 06:25:22 ADEpt: someone has taken your nick? I wasted some time overtaking alar as well :) 06:25:52 -- adept [i=adept@hektik.org] 06:25:58 says 'whois' 06:26:13 dons: seems like he did :( 06:26:21 but didn't you have a password? 06:27:07 dons: ghc --make didn't seem to produce an executable. 06:27:15 hmm? 06:27:21 well, that's very odd 06:27:25 say RECOVER adept 06:27:33 that RELEASE adept to NickServ 06:27:40 Why not just GHOST? 06:27:42 dons: i'm trying to figure out how to send message to nickserv currently (i'm behind jabber gateway) 06:27:50 ah, you can't /msg ? 06:28:06 ADEpt: /query NickServ doesn't work? 06:28:06 dons: yep 06:28:11 Well, can you /nickserv or /ns? 06:28:21 what's GHOST? 06:28:23 /nickserv help 06:28:39 huh-huh 06:28:52 ermineq: ;) 06:29:49 So you can't do anything except send messages to #haskell? 06:29:56 s/#haskell/channels/ 06:30:03 ihope_: yep :) 06:30:16 ihope_: and to bots who speak to me first 06:30:19 Before or after the substitution? :-P 06:30:39 ihope_: after :) 06:30:42 ADEpt___: is that described in rfc irc? 06:30:47 ADEpt___: maybe fire up an irc client? 06:31:05 Yep, an IRC client would help. 06:31:05 steal back the nick, then go back to jabber 06:31:31 better to forgot irc 06:32:10 --- part: ermineq left #haskell 06:33:08 * ADEpt___ talked to nickserv 06:33:16 * ADEpt___ willt ry to change nick 06:33:55 adept's still alive. 06:34:30 ihope_: oops. wrong NickServ - from irc.debian.org :) 06:34:30 --- quit: lollan ("The perfection is not perfect but we can still try") 06:35:53 =)) 06:36:13 ihope: how do you know adept's still alive? 06:36:15 --- join: EdwardKmett (n=ekmett@emu-9-223.emich.edu) joined #haskell 06:36:20 alar: /whois. 06:36:21 * EdwardKmett waves ello. 06:36:27 alar: from "nickserv info" ? 06:36:29 --- part: ADEpt___ left #haskell 06:36:38 --- join: ADEpt_ (n=ADEpt@jabber.hst.ru) joined #haskell 06:37:08 hello EdwardKmett 06:38:37 test 06:38:49 1, 2, 3? 06:39:12 yep :) 06:39:49 Huh. GHC simply fails to produce an executable. 06:40:18 ADEpt:nickserv info tells your status (the one who's registered adept) not the status of adept(the one who currently owns it) 06:43:39 ihope_: is gcc failing silently? 06:43:50 perhaps check with ghc -v4 that the correct gcc path is used 06:43:54 and try -fasm 06:44:12 if gcc's not working, surely the native gen will 06:44:37 * dons `id` sleep 06:45:03 "ghc -o test -fasm file.hs" still doesn't work... 06:45:05 hah 06:46:32 --- part: EdwardKmett left #haskell 06:46:47 * ADEpt_ thanks everyone present for their warm welcome :) 06:47:40 Hmm... I put C:\ghc\whatever\bin in the PATH environment and popped over to the "Haskell FFI" folder, and now it works. 06:47:42 Weird. 06:50:22 How do I turn an Int into a String? 06:50:36 > show 3 06:50:37 "3" 06:51:05 --- join: edwardk (n=ekmett@emu-9-223.emich.edu) joined #haskell 06:52:03 was skimming the haskell wiki the other day and it grumbled a bit about some issues with using arrows for computation, but was really vague on specifics, anyone know more? 06:52:04 I forgot about that... 06:53:10 edwardk - Check out Shae's article on TMR (can't remember the #). 06:55:03 tmr = the monad reader right? 06:55:12 yes 06:55:51 (edwardk : which wiki page ?) 06:56:42 well,, i got stalled skimming the first page of issue 1, reading andrew bromage's article which rants about the same thing more or less 06:56:46 =) 06:57:32 --- join: int-e (n=noone@t54fc426c.pool.terralink.de) joined #haskell 06:57:41 --- join: joelr1 (n=joelr@86.Red-83-43-170.dynamicIP.rima-tde.net) joined #haskell 06:57:54 howdy 06:58:06 dons: how do i use a different stage for testing? 06:58:09 edwardk : 'issue 1' ? 06:58:25 oh 06:58:26 sorry 06:58:33 you meant the wiki page that ranted about arrows 06:58:40 might not have been on the haskell wiki lemme find it 06:58:45 --- quit: paolino (Read error: 110 (Connection timed out)) 06:59:10 --- join: paolino (n=paolino@151.82.7.179) joined #haskell 07:01:39 --- quit: kaol (Read error: 110 (Connection timed out)) 07:01:54 hrmm 07:01:57 can't seem to find the page now =) 07:02:23 but it referenced that a number of people had run into problems using arrows as a computational tool. and referenced einar karttunen and a couple others 07:02:43 but i couldn't get anything more specific from the context. it sounded a lot like 'here be dragons' ;) 07:02:53 m 07:03:25 --- part: moonfish left #haskell 07:03:33 does anyone know how to use stage2 ghc when testing? 07:05:56 So what's ld? 07:05:57 * ski ponders if one could make some more applicative "internal language" for arrowful computations 07:07:15 --- quit: erider (Read error: 104 (Connection reset by peer)) 07:08:05 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 07:11:43 --- quit: alar (Read error: 110 (Connection timed out)) 07:11:50 http://fooling.lambdabot http://www.haskell.org/tmrwiki/ArrowsIntroduction <- edwardk 07:12:11 ski - What does "more applicative" mean? 07:12:39 --- quit: joelr1 () 07:12:39 Um, is http://fooling.lambdabot a valid URL? 07:12:47 there we go =) 07:12:58 reove the lambdabot fooling part and enter it =) 07:13:05 er remove 07:13:29 I don't think http:// is a valid URL either. 07:14:16 http:// http://www.google.com 07:14:20 xerox : well, something structured more like ordinary expressions with applications inside, as opposed to a 'do'-like sequence 07:15:02 I never got around _using_ |returnA ..| 07:15:18 hm ? 07:15:23 xerox: thanks, btw 07:16:05 --- join: dmhouse (n=david@L2c9b.l.pppool.de) joined #haskell 07:16:12 (but let me check the current bnf first ..) 07:18:04 --- quit: Muad_Dibber ("Leaving") 07:18:28 --- quit: lokadin (Read error: 113 (No route to host)) 07:18:46 ski: you know, i don;t really have much of a problem with the current arrow syntax. the <-x-< notation is quite slick 07:19:12 their category theoretic nature didnt quite click for me fully until i saw the sugar =) 07:19:50 mhm (i wasn't suggesting removing that syntax) 07:20:08 i just got some vague ideas for a possible alternate 07:20:11 *nods* 07:21:16 What are you discussing? It sounds interesting. 07:21:24 http://www.haskell.org/tmrwiki/ArrPipe <- why not just restrict the Process type to Readables and Showables? 07:21:25 Title: "ArrPipe - TmrWiki" 07:22:24 the arrpipe is an awkward example because those pipes don't really behave in a category theoretic way 07:22:29 dmhouse : just some re arrows 07:22:36 --- quit: u221e ("Ex-Chat") 07:22:57 so while the notation may be appropriate, and could be used as a monad sorta hackishly, they don't meet the arrow criteria 07:23:04 at least as far as i can see 07:23:10 then again 07:23:20 maybe i have too limited a view of what arrows should be used for 07:23:24 and need to be enlightened 07:23:50 what criteria don't they meet ? 07:24:18 heh now i have to go make that rigorous =) 07:24:22 gimme a sec 07:25:33 * ski smiles 07:26:18 my understanding is that you need to be able to construct an arrow over all types, but the definition required to make arrpipe is limited to readable & showable types 07:26:52 ah, ok 07:27:11 * ski has not looked at 'ArrPipe', he thinks 07:27:31 --- quit: Paltas (Remote closed the connection) 07:27:41 it seems to me to be related to the functor problem i was babbling on about the other day, the llimited subset available via the api is useful but not the full spectrum of possible types 07:27:55 so possibly it makes a category over a subtype of '*', then .. hm 07:28:12 s/subtype/subkind/ 07:28:21 yeah, a form of limited arrow might be more useful than the general construction 07:29:43 or having kind arguments to type classes ("kind-polymorphic type classes") (i have no idea if this could be made to work, no) 07:29:56 --- join: u221e (n=u221e@S010600119502636d.wp.shawcable.net) joined #haskell 07:29:57 hrmm 07:30:02 re u221e 07:30:26 dons, you still around? 07:30:37 class Arrow k (ar :: k -> k -> k) where ... 07:31:10 wonder if it can't just be hacked out by making a general rule match to undefined or whatever and a specific rule match Show a, Read b => (b -> c) -> a b c 07:31:23 * dons `id` sleep 07:31:23 (46 minutes ago) 07:31:26 not sure about haskell's type system though. kinda new here =) 07:31:28 Damn... 07:31:55 I wanted to tell him that I improved his mandelbrot program for the shootout ;) 07:31:59 coz the specification for arrpipe given in that is a little more general than it needs to be 07:32:12 since you only need to read for sinks and show for sources 07:32:21 (u221e : maybe there's a wiki page you could add a notice to ?) 07:32:23 not all pipe types have to be both a sink and a source. 07:32:50 right 07:32:52 hmm. so how do you do sinks and sources? 07:33:06 ok, playing here =) 07:33:15 going to test the idea real fast 07:33:18 might work 07:33:22 might show me i'm an idiot 07:33:28 either will be informative 07:33:32 u221e: you could @tell him :) 07:33:52 (hm, though on quick look i don't see they do that ..) 07:34:30 ... 4 seconds faster on my computer :o 07:34:32 --- join: alar (n=vircuser@80.252.132.118) joined #haskell 07:35:20 u221e: is that 4 seconds faster than the original run on your system, or 4 seconds faster than the submitted time? 07:35:37 On my system 07:35:38 @djinn ((a -> b) -> a -> c) -> b -> c 07:35:38 -- f cannot be realized. 07:35:49 u221e: nice :) 07:36:09 @djinn ((a -> b) -> a -> c) -> a -> b -> c 07:36:09 f a b c = a (\ _ -> c) b 07:36:24 u221e: That'd bring it down to... 3rd place? 07:36:28 The reverse of (a -> b -> c) -> (a -> b) -> a -> c :-) 07:36:31 u221e: how did you improve the time? 07:36:59 Removing some unnecessary function arguments 07:37:09 and of course my network connectivity to my linux box is shot. 1000+ms ping times. 07:37:15 going to load it up in visual haskell =/ 07:37:22 ihope_ : not iso 07:38:59 (ihope_ : 'S' uses contraction, so "normally" that shouldn't be an iso) 07:39:00 Didn't think it would make that much of a difference though. 07:39:04 --- quit: tennin (Read error: 110 (Connection timed out)) 07:39:35 Is there an inverse of S? 07:39:52 i think not 07:40:21 (well, if the morphisms are effectful, there could be, i think) 07:40:35 If what? 07:41:24 hm, maybe i could try that 07:41:51 if 'a -> b' function space is not pure function space, but has effects (vaguely speaking) 07:44:39 Okay... 07:51:30 (i think it can maybe be made to work, if we assume 'amb' and continuations ..) 07:51:48 --- join: david_ (n=david@pool-71-243-89-112.bos.east.verizon.net) joined #haskell 07:52:15 ski: lost you there 07:52:34 which part ? 07:52:59 ski: wasn't sre if you were talking to me or ihope 07:53:37 ihope_ lastly 07:53:41 ah k 07:53:57 then i'm not totally lacking context =) 07:54:11 --- quit: mnislaih (Read error: 110 (Connection timed out)) 07:54:16 --- quit: u221e ("Ex-Chat") 07:54:30 gah 07:56:00 Gah? 07:56:13 --- quit: amiddelk ("Leaving") 07:56:23 noise of frustration exhibited over the fact that the place hosting my server is flapping their routes all over the place =) 07:57:17 Ah. 07:57:53 I'd stab the network administrator to death with a spork, but then, i'd have no network administrator ;) 07:59:09 edwardk: sounds like that could be an improvement 07:59:17 at least there will be a vacancy you can hire for 07:59:36 edwardk: regardless, use a rusty spoon - it hurts more 07:59:46 dozer: good point. =) 08:01:15 > product [1..20] 08:01:16 2432902008176640000 08:01:30 ...No, I'm not going to do that. 08:02:12 --- join: kowey (n=kow@chartreuse.loria.fr) joined #haskell 08:02:25 --- join: boegel (n=boegel@konijn.elis.UGent.be) joined #haskell 08:02:34 http://www.rafb.net/paste/results/kNMkYO57.html 08:02:44 --- join: Itkovian (n=Itkovian@dragnipur.elis.UGent.be) joined #haskell 08:03:11 got a horrible feeling that I should be doing something to make a1 and a2 unify 08:03:13 Itkovian: train? :) 08:03:19 but I have no idea what 08:03:43 what train? 08:04:01 Itkovian: 17u32? 08:04:16 there is no train at 17:32 going my direcxtion 08:04:23 it's at at 17:33 08:04:33 you see, I can't even type decently 08:04:38 whateva 08:04:39 that Duvel wat too much 08:04:41 :-) 08:04:42 Itkovian: that drunk? :D 08:04:48 was :p 08:04:51 nah, that tired 08:04:53 omfg :) 08:04:57 let's go have a drink dude ;) 08:05:26 --- join: slipstream (n=slipstre@ppp83-237-210-174.pppoe.mtu-net.ru) joined #haskell 08:05:39 --- quit: dblhelix () 08:06:43 --- quit: SamB (Remote closed the connection) 08:07:15 if I have "(forall a. Foo a => a) -> a", is the "a" in the first part of the function the same "a" as in the 2nd? 08:07:31 No. 08:07:38 or can I rename either one e.g. "(forall a. Foo a => a) -> b" 08:08:12 The second a is free (or implicitly universally qualified, if you prefer). 08:08:24 So yes, those two signitures are the same. 08:08:31 --- quit: boegel ("Leaving") 08:08:37 ok, dumb question time =) 08:08:46 That's what makes the type of runST work :) 08:08:51 * ihope_ puts on his dunce cap 08:09:15 --- part: ADEpt_ left #haskell 08:09:24 if i have 'lost' the fact that a type is an instance of, say, Ord or Read or Show, can i get that back with a case guard or something? 08:09:26 * ski wrestles with the sequents 08:09:53 edwardk: Come again? 08:09:53 ok - and this lets me do some of the styles of polymorphism I am used to from OO - implementation hiding & things 08:10:11 edwardk: You probably need to add the class constraint in the type signiture somewhere. 08:10:21 say i have a function arr f :: (i -> o) -> a i o 08:10:30 (or use existentials or GADTs) 08:10:34 dozer: http://en.wikibooks.org/wiki/Haskell/Existentially_quantified_types#Example:_runST might be useful 08:10:40 can i make multiple versions dependant on whether or not i is an instance of Read 08:10:48 and have it select accordingly? 08:10:54 Hmm. 08:11:06 I think you'd need two seperate functions. 08:11:18 ok, so polymorphism can't resolve that issue? 08:11:27 edwardk : maybe with incoherent instances or something like that 08:11:34 because of the need to pass the dictionary around or something? 08:11:50 Because there's no "if it's not an instance of Read". 08:12:22 edwardk : how do you know if the user later makes a type and instance and passes a value whose type mentions that type to your polymorphic function ? 08:12:43 dmhouse: thanks - that's sort of what I thought was going on 08:13:07 So you couldn't have one for if it's not a Read, and one for if it is a Read. 08:13:37 ski: well, the issue at question is the overly-constructive Arrow interface, in the face of that limitation, there are a lot of arrows that can't be written. 08:13:45 er constrictive 08:13:59 --- quit: SamB_XP (Read error: 104 (Connection reset by peer)) 08:14:20 --- join: SamB (i=naesten@216-15-104-63.c3-0.upd-ubr7.trpr-upd.pa.cable.rcn.com) joined #haskell 08:14:25 my not Read interface was going to blow up to undefined anyways =) 08:14:53 as a hack to try to see if it was possible to construct arrows over a subkind 08:15:08 hum - my turn for a dumb question - does using existentials mean some functions have to be implemented by run-time dispatch? 08:15:11 the right solution is to have a different formulation of the 'Arrow' class (or an additional class or something) 08:15:12 so the possibility of that kind expanding doesn't trouble me 08:15:17 ski: yeah 08:15:56 dozer : what do you mean by 'run-time dispatch' ? 08:15:57 ski: do you know if the syntactic sugar for Arrow requires the target to be an instance of that class? or does it just devolve to >>>'s calls to arr and pure? 08:16:24 edwardk: 08:16:26 @type arr 08:16:27 forall (a :: * -> * -> *) c b. (Arrow a) => (b -> c) -> a b c 08:16:28 er >>>'s and calls 08:16:32 @type (>>>) 08:16:33 forall (a :: * -> * -> *) d b c. (Arrow a) => a b c -> a c d -> a b d 08:16:41 They already have the class constraint. 08:16:53 ski: what I meant to say was, that the actual function that is executed can't necisarily be known at compile-time e.g. if it is made available through a class, so must be resolved at run-time based upon the type of the actuall thing there 08:17:05 dmhouse well, what i mean is if i don't import those from prelude, can i abuse the existing syntactic sugar =) 08:17:11 dozer : does 'map even [0,1,2,3]' qualify as run-time dispatch ? 08:17:19 edwardk: I very much doubt it. 08:17:27 oh well 08:17:41 Althought GHC _does_ provide some funkiness in this regard. 08:17:44 then the 'something other than an arrow' approach is still doomed to substandard syntax. 08:17:50 Let me see if I can dig it out of the manual. 08:18:02 (dozer : note, 'even' could be constructed from user input) 08:18:23 edwardk: http://haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#rebindable-syntax 08:18:24 Title: "7.3. Syntactic extensions" 08:18:43 ahh 08:19:00 for example, the ShowH example in that wiki page ends up with "hetroList" where each item in the list is showable, but you don't know /which/ show to call untill you inspect an actual list 08:19:04 so if i -fno-implicit-prelude it might work for arrows 08:19:05 but 08:19:09 i also note 08:19:23 that it requires that the functions with the appropriate names must match the prelude signatures 08:19:32 so it doesn't seem to help 08:19:54 though it doesn't explicitly mention the arrow operators in that page 08:20:11 so maybe =) 08:20:24 They're not preluded anyway, you realise 08:20:31 yeah 08:20:36 @index (>>>) 08:20:36 Control.Arrow 08:20:47 k 08:20:50 so maybe it can work =) 08:20:57 edwardk: Err, "Similarly recursive do notation (see Section 7.3.3, “The recursive do-notation ”) uses whatever mfix function is in scope, and arrow notation (see Section 7.7, “Arrow notation ”) uses whatever arr, (>>>), first, app, (|||) and loop functions are in scope." 08:21:09 It does explicitly mention the arrow operators :) 08:21:12 nifty! 08:21:25 then i can make a more constrained arrow type 08:21:34 and resolve that subkind problem 08:21:37 heh 08:21:41 i might just bang that out 08:21:46 Well, "The functions with these names that GHC finds in scope must have types matching those of the originals, namely:" 08:21:57 It might reject your extra constraints 08:22:20 yeah well with these names is hopefully limmited to the set depected below that statement 08:22:29 er depicted 08:22:40 in that case i should be able to get by 08:22:47 I doubt it is. 08:22:59 well a boy can dream, can't he? =) 08:23:01 --- join: eyck (i=eyck@ghost.anime.pl) joined #haskell 08:23:11 as soon as my network connectivity returns in full, i'll give it a shot 08:23:17 and if it doesn't work, grumble about it =) 08:23:37 --- quit: slipstream-- (Read error: 110 (Connection timed out)) 08:25:03 --- quit: dgoldsmith () 08:25:34 worst case, there should probably be some old arrow preprocessor lying around that doesn't check its argument types =) 08:27:15 > testBit (167::Int) (4::Int) 08:27:16 False 08:28:44 > testBit (168::Int) (4::Int) 08:28:44 @hoogle testBit 08:28:45 Data.Bits.testBit :: Bits a => a -> Int -> Bool 08:28:45 False 08:28:59 > testBit (157::Int) (4::Int) 08:29:00 True 08:29:27 > 0b100 08:29:28 Not in scope: `b100' 08:29:31 wait, that's not hex 08:29:34 > b100 08:29:34 Not in scope: `b100' 08:29:36 > 0x0b100 08:29:37 45312 08:29:43 Ah, that's how you do it. 08:30:01 > testBit 0x0b100 0 08:30:02 Add a type signature 08:30:15 > testBit (0x0b100 :: Int) 0 08:30:17 False 08:30:21 > testBit (0x0b100 :: Int) 1 08:30:22 False 08:30:30 Hold on... 08:30:44 Ah, I see. 08:30:52 How do you do binary then? 08:30:57 You don't. 08:30:59 0x0b100 is hex. 08:31:09 Oh, I thought I remember there being sugar for that too. 08:31:13 oops 08:31:14 > 0100 08:31:15 100 08:31:21 No octal either? 08:31:24 I thought the b was hex 08:31:40 readOctet "100" 08:31:43 > readOctet "100" 08:31:44 Not in scope: `readOctet' 08:31:51 > readOctal "100" 08:31:52 Not in scope: `readOctal' 08:31:56 --- part: piggybox left #haskell 08:32:00 > readOct "100" 08:32:10 Grr, got there just before me. 08:32:17 [(64,"")] 08:32:39 > 0o100 08:32:52 64 08:33:04 Ah, okay. 08:33:15 Odd that's there's no sugar for binary, then. 08:33:27 --- quit: wchogg_ (Connection timed out) 08:33:30 agreed. 08:34:21 readInt 2 (`elem` ['0','1']) (\x -> fromEnum x - fromEnum '0') "0100" 08:34:24 > readInt 2 (`elem` ['0','1']) (\x -> fromEnum x - fromEnum '0') "0100" 08:34:29 [(4,"")] 08:34:42 --- join: sad0ur (n=sad0ur@rb1a240.chello.upc.cz) joined #haskell 08:35:49 --- quit: Adamant (Read error: 110 (Connection timed out)) 08:37:37 fromEnum x - fromEnum '0'; (-) (fromEnum x) (fromEnum '0'); (-) $ liftM2 fromEnum x '0'; (-) $ flip (liftM2 fromEnum) '0' x; (-) . flip (liftM2 fromEnum). I think. 08:37:57 Err, (-) . flip (liftM2 fromEnum) '0' 08:38:01 @pl \x -> fromEnum x - fromEnum '0' 08:38:01 subtract (fromEnum '0') . fromEnum 08:38:23 @type (-) . flip (liftM2 fromEnum) 08:38:25 Expecting a function type, but found `Int' 08:38:25 Expected type: a1 -> a2 -> r 08:38:30 @type (-) . flip (liftM2 fromEnum) '0' 08:38:31 Expecting a function type, but found `Int' 08:38:31 Expected type: a1 -> a2 -> r 08:38:45 dmhouse: Char.digitToInt 08:38:55 nice 08:39:06 readInt 2 (`elem` ['0','1']) digitToInt "0100" 08:39:09 > readInt 2 (`elem` ['0','1']) digitToInt "0100" 08:39:10 [(4,"")] 08:39:15 Oh, that's what the function does. :) 08:41:30 --- quit: jberg_ () 08:41:47 What's a nice, simple example of a function that takes one type and returns another? 08:42:00 Preferably it should be monomorphic. 08:42:12 (And the types need to be distinct, obviouslly.) 08:42:20 @type ord 08:42:21 Char -> Int 08:42:25 --- join: MarcWeber (n=marc@p549AD29B.dip.t-dialin.net) joined #haskell 08:42:36 Nice. 08:43:57 --- join: piggybox (n=sky_yin@London-HSE-ppp3539487.sympatico.ca) joined #haskell 08:47:34 heh 08:47:52 someone on high has decreed that this day i shall not write haskell code. now visual haskell is freezing too =) 08:49:16 (ihope_ : hm, it seems a bit more complicated that i first imagined .. :) 08:49:34 Hmm? 08:50:06 inverse 'S' 08:50:55 the problem with your (er, djinn's) version is of course that it discards one of the 'b's 08:51:00 --- join: CosmicRay (n=jgoerzen@2002:452c:8843:1:20e:a6ff:fe66:c5a3) joined #haskell 08:52:59 (and '\ab_ac a0 b -> ab_ac (\a1 -> b) (amb a0 a1)' is not well-scoped) 08:54:42 Does ord/chr only deal with ASCII, or can it go to, say, latin-1? 08:55:00 > ord 'ü' 08:55:01 Improperly terminated character constant 08:55:19 --- quit: paolino (Read error: 110 (Connection timed out)) 08:55:35 > ord '' 08:55:36 196 08:55:43 > chr 1000 08:55:44 '\1000' 08:56:14 it doesn't really char about encoding (pardon the pun) 08:56:19 --- join: eno-away (n=eno@adsl-70-137-153-156.dsl.snfc21.sbcglobal.net) joined #haskell 08:56:38 Hrm. 08:57:03 So chr sends out '\x', and that's caught at some higher-level and rendered as the glyph it represents? 08:57:21 E.g. chr 196 ==> \196, which is caught somewhere and displayed as 'Ä'? 08:58:13 it stores a value of 1000; the Show instance of Char shows that as \1000 08:58:39 * int-e notices that String/Char is probably the main reason for having showList in Show. 09:00:34 putStr on the other hand just emits the characters truncated to 8 bits 09:00:46 putStrLn "\320" prints an @ 09:00:55 --- join: borism (n=boris@tor/session/external/x-87c9044df83f9578) joined #haskell 09:01:09 no magic anywhere. 09:01:39 --- quit: eyck (Read error: 110 (Connection timed out)) 09:02:00 --- quit: Itkovian () 09:02:15 > chr (320 `mod` 128) 09:02:15 '@' 09:02:42 mod 256 really :) 09:02:58 Err, oops. 09:03:11 My knowledge of the powers of two failed me :) 09:03:39 shame on you 09:03:45 > let twos = iterate (*2) 1 in take 9 twos 09:03:46 [1,2,4,8,16,32,64,128,256] 09:04:18 > let twos = iterate (*2) 1 in map (chr . (320 `mod`)) (take 9 twos) 09:04:19 "\NUL\NUL\NUL\NUL\NUL\NUL\NUL@@" 09:04:30 > let twos = iterate (*2) 1 in map (chr . (320 `mod`)) (take 20 twos) 09:04:32 "\NUL\NUL\NUL\NUL\NUL\NUL\NUL@@\320\320\320\320\320\320\320\320\320\320\320" 09:04:49 Wow, so I was extremely lucky in my poor choice of power :) 09:05:06 not really, because @ is ASCII :) 09:05:17 --- quit: khaladan (Read error: 104 (Connection reset by peer)) 09:08:10 --- quit: vininim (Read error: 110 (Connection timed out)) 09:08:50 --- quit: lorne (Read error: 110 (Connection timed out)) 09:11:45 Is the primary source for wxhaskell still in sourceforge cvs? 09:12:28 @type gcast1 09:12:29 --- join: u221e (n=u221e@S010600119502636d.wp.shawcable.net) joined #haskell 09:12:29 forall a (t' :: * -> *) (c :: * -> *) (t :: * -> *). (Typeable1 t', Typeable1 t) => c (t a) -> Maybe (c (t' a)) 09:13:03 --- join: Frederick (n=imanewbi@unaffiliated/frederick) joined #haskell 09:13:50 @type dataCast1 09:13:51 Not in scope: `dataCast1' 09:14:39 How can I turn a Word8 into a Char? 09:15:35 @type toEnum 09:15:36 forall a. (Enum a) => Int -> a 09:15:51 @type toEnum . fromIntegral 09:15:52 forall a a1. (Enum a, Integral a1) => a1 -> a 09:16:17 --- join: Dreadshoot (i=none@81-229-125-50-no50.tbcn.telia.com) joined #haskell 09:24:53 --- quit: kpreid (Remote closed the connection) 09:27:04 --- join: waern (n=davve@h246n1fls308o1049.telia.com) joined #haskell 09:28:06 --- quit: u221e ("Ex-Chat") 09:28:51 hrmm 09:29:14 is there presently a way to specify that the type parameters of a class are instances of a given class? 09:29:26 --- join: kpreid (n=kpreid@24-52-49-37.bflony.adelphia.net) joined #haskell 09:29:30 or must that be threaded throughout all of the functions in the class? 09:29:53 i seem to recall a paper calling for the feature, don't know if ghc or anyone adopted it though 09:30:39 You mean like: 09:30:41 class (Foo a) => Bar a and instance (Baz a) => Blah a 09:30:47 That? 09:31:18 --- join: u221e (n=u221e@S010600119502636d.wp.shawcable.net) joined #haskell 09:31:44 more like, i have a class, say class GCategory a i o where ... and i want to set a requirement that i and o are instances of a particular class, like Num or Read or Show 09:31:48 for instance 09:32:14 so i could specify that constraint once at the class level rather than in every function in the where clause 09:32:34 The first example eivuokko gave. 09:32:34 or maybe you said what i just said 09:32:42 and i just didn't catch the syntax =) 09:32:43 I think so 09:32:44 I shaved off another 0.2 seconds... It's these damn type conversions... 09:32:48 heh 09:32:52 There is two syntax, the first for superclasses 09:33:08 class (Show o, Read i) => GCategory a i o where ... 09:33:09 The second is for instance class context. 09:33:40 dmhouse thats basically what i was looking for =) 09:34:39 there isn't a way to parameterize the constraint is there? i.e. to turn Show o into something absurd like x o where i can make x vary is there? 09:35:01 Err 09:35:10 It's unlikely. Could you give a more concrete example? 09:35:10 it seems like it would get fairly circular fast 09:35:29 no 09:35:38 ... how could you do that? 09:35:50 you can't call a method in a class you don't know... 09:35:56 there was a paper i recall using an example from Collection, alowing you to specify if the collection was built over an instance of Eq or an instance of Ord 09:36:03 without rewriting the member functions 09:36:12 Weird. Got a reference? 09:36:18 like i said, it was a proposal 09:36:26 hence my inquiry 09:36:38 not sure off hand, i have it printed out at home i think 09:37:38 @type chr 09:37:39 Int -> Char 09:38:15 Depending what you want, you might be able to use functional dependencies. 09:38:17 basically was trying to see if i could get away with some form of constraint on the definition of class rathere than chaining type constructors somewhat insanely to get something like 09:38:36 >>> :: a (i b) (o c) -> a (i c) (o d) -> a (i b) (o d) 09:38:41 or something like that 09:39:12 That would make i and o have kind * -> *, I'm not sure that's what you want. 09:39:29 yeah 09:39:47 It is or isn't what you want/ 09:39:53 s/\//?/ 09:40:18 i this current constrained case i really want something like >>> :: (Read b, Show c, Read c, Show d) => a b c -> a c d -> a b d 09:40:24 --- quit: Beelsebob (Read error: 104 (Connection reset by peer)) 09:40:34 but i wanted to abstract away the particulars that the type constraints were Read and Show somehow 09:40:46 Why? 09:40:46 --- join: Beelsebob (n=Beelsebo@62.245.52.60) joined #haskell 09:41:10 That doesn't sound like a very good thing to apply abstraction to. 09:41:21 Changing class constraints tends to change an awful lot 09:41:31 As it changes the methods you have at your disposal. 09:41:37 because i don't want to have to rewrite this 'categorical' defininition whenever i want to define a category over a different subkind 09:42:15 Is that same as having abstract pattern matching? 09:42:29 what i want is the category to serve as a guarantee that i can connect any source to a sink given an arrow chain between them 09:42:44 but to provide nothing more really =) 09:43:13 read and show at the moment serve to provide the source and sink interface but their nature isn't essential 09:43:22 the details aren't categoric 09:43:40 Woah, 'subkind'? Where did kinds come into things? 09:43:45 there is nothing magical about serializing to/from strings? 09:43:52 --- join: bringert (n=bjorn@71-37-40-141.tukw.qwest.net) joined #haskell 09:43:58 ok, rewind 09:44:07 you missed the earlier part of the discussion =) 09:44:20 Ah, I think I grasp the essence of your problem. 09:44:22 it started out with me inquiring as to what problems there were with Arrows =) 09:44:25 Well, how I'd do it is this: 09:44:32 this led into the ArrPipe example 09:44:52 which can't be resolved with the current Arrow interface, because you can only construct arrows over a constrained set of types. 09:44:58 for that particular set of arrows 09:45:02 class ProcessLink i o where forwards :: i -> o; backwards :: o -> i 09:45:09 so i started diving into how to make it rigorous 09:45:45 instance (Show o, Read i) => ProcessLink i o where forwards = read; backwards = show; 09:45:52 while trying to preserve the existing arrow sugar. 09:45:56 --- part: Dreadshoot left #haskell 09:46:06 hrmm 09:46:12 --- join: Muad|Samurai (n=dibber@sd511609f.adsl.wanadoo.nl) joined #haskell 09:46:17 class (ProcessLink i o) => GCategory a i o where ... 09:47:00 that i can understand =) 09:47:23 How's that look categoricall? 09:47:30 s/\?/y?/ 09:47:33 playing with it 09:47:55 there might be an issue or two with the type a, which should really probably be (ProcessLink i o) but that more or less nailed what i wanted 09:48:17 --- join: SyntaxNinja (n=ijones@gw-1.galois.com) joined #haskell 09:48:24 --- join: GeniXPro (n=bradley@S0106000d889027fb.vf.shawcable.net) joined #haskell 09:49:07 An instance of ProcessLink is a relationship between two types saying 'you can convert freely between these two'. 09:49:31 it seems to be working so far 09:49:38 i just need to flesh it out a bit 09:50:02 * lispy is excited today, droundy is coming to work at his uni and he may be able to act as a coadvisor for some darcs work 09:50:19 hm, is the type system rules for the arrow notation described in some paper ? 09:50:23 hrmm 09:50:41 hughes original one with some notational differences, an there was a patterson one i think 09:51:14 hrmm trying to figure out my >>> signature now =) 09:51:48 --- quit: u221e ("Ex-Chat") 09:52:06 ski, I would at least the operational semantics, or a translation to points-free using the arrowic functions, is in 'A new notation for arrows' 09:52:09 still unchanged? 09:52:50 hrmm problem 09:53:13 i see a translation in 'Arrows and Computation' 09:53:28 >>> carries an arrow from b -> c and c -> d into one from b -> d 09:53:58 but the type just specified only lets me carry one type in and out of my serialization format 09:54:09 unless i'm screwed up 09:54:31 --- join: dsacode (n=dsacode@masq.botik.ru) joined #haskell 09:54:53 it seems i need something more like 09:55:22 >>> :: (ProcessLink b c, ProcessLink c d) => a b c -> a c d -> a b d 09:55:53 (By the way, when specifying types for operators, you need to enclose them in parentheses.) 09:55:55 --- join: lightstep (n=amir@DSL217-132-191-155.bb.netvision.net.il) joined #haskell 09:56:03 yeah 09:56:13 Yes, so it would seem. 09:56:16 been kinda lax posting it to the channel 09:56:32 So you can't parameterise over a single pair of input/output types. 09:57:03 yeah, coz pipes could carry text, or xml, etc. 09:57:33 while its all Strings underneath the idea of the original writeup someone was to carry the info in phantom types for the contents of the channel 10:01:29 --- join: wchogg (n=wchogg@dhcp-01.hep.wisc.edu) joined #haskell 10:02:19 ok, abandoning the objects for a while and playing with a pure category arrow-theoretic version 10:02:28 and seeing if i can get anywhere 10:02:39 if nothing else i get some insight into the type system this way 10:02:42 'pure'/'arr' is a problem 10:02:46 yeah 10:02:58 thats why i'm trying to generalize the interface 10:03:14 its kinda like the 'forgetful functor' problem i had yesterday 10:03:40 data Foo a b where MkFoo :: (Read a,Show b) => ..a..b.. -> Foo a b 10:03:44 --- join: Manyfold (n=nobody@dslb-084-060-044-003.pools.arcor-ip.net) joined #haskell 10:04:07 is that legal, with GADTs ? 10:04:31 hrmm 10:04:33 --- quit: vegai (Read error: 110 (Connection timed out)) 10:04:43 --- join: Arnia (n=jgeldart@0-16-cb-cc-a8-16.cb.esol.dur.ac.uk) joined #haskell 10:05:04 --- quit: int-e ("Bye!") 10:05:11 --- join: paolino (n=paolino@151.82.2.41) joined #haskell 10:07:11 i get an illegal gadt declaration 10:07:44 I still can't figure out how to get Data/Generics2/Instance.hs through the compiler 10:07:57 dmhouse : hm, yes, a description of typing, in words is there 10:08:21 there's a missmatch between the type of dataCast1 and gcast1 that I can't see how to resolve 10:09:10 ski, sorry, a lot of threads of conversation going on. What was that regarding? 10:09:20 'A new notation for arrows' 10:09:38 Aha. Cool. 10:10:35 --- quit: Pupeno (Read error: 104 (Connection reset by peer)) 10:11:07 --- quit: iblechbot (Connection timed out) 10:13:00 --- join: aFlag (n=uno@201.78.25.50) joined #haskell 10:13:03 @spell signiture 10:13:05 signature signatures signatory signore signature's 10:13:06 --- join: gour_ (n=gour@lns01-1764.dsl.iskon.hr) joined #haskell 10:13:32 nice, lambdabot is full of features 10:13:39 That's one of my favourites. 10:13:59 from what i can decipher, it seems similar to my typing idea .. 10:15:55 (though i think they do things in a strange way) 10:16:00 --- quit: dsacode () 10:17:29 ski, your typing idea? 10:17:46 for typing arrowful computations 10:18:01 what do you mean? 10:18:10 what we were talking about above? or something more robust? 10:18:18 probably it is not so different from theirs, in practice, but i want to check 10:18:23 sorry, no 10:18:38 Hey. I'm having problems building wxHaskell on OS X 10:18:45 Gamma | p :: sigma |-_ar c :: tau 10:18:45 ------------------------------------ 10:18:45 Gamma |- proc p -> c :: ar sigma tau 10:18:49 Getting the weak reference errors but the solutions given don't seem to work 10:19:07 dmhouse : a system based on that rule 10:19:53 ski, what's the |-_ symbol? 10:19:58 --- quit: sad0ur ("leaving") 10:20:05 '_' is just "index" 10:20:38 i.e. a small 'ar' below to the right of the turn-stile symbol 10:20:41 Oh, right. 10:20:57 So, more latexily, |-_{ar} :) 10:21:09 yes 10:21:26 so can "(forall a. Foo a => a) -> (forall a. Foo a => a)" be used anywhere that "forall a. Foo a => a ->a" can? 10:21:43 or the other way round? 10:21:46 or neither? 10:21:49 dozer, I suspect the former is a direct generalisation of the latter. 10:22:09 I assume the former is equivalent to (Foo a, Foo b) => a -> b 10:22:15 Anyone know of any other solutions? 10:22:16 yeah, so do I 10:22:17 --- quit: Stinger_ (Remote closed the connection) 10:22:24 dmhouse : it is not 10:22:42 dmhouse, I think it isn't, in your a nd b can be the same, in dozer's they can't. 10:22:57 Type variable can't escape the forall-scope. 10:23:00 can be the same, or can be known to be the same? 10:23:05 (or, hm) 10:23:14 eivuokko: In dozer's first example, of course the two as can be the same. 10:23:47 Hmmm. 10:23:59 --- join: swiert (n=wss@sneezy.cs.nott.ac.uk) joined #haskell 10:25:05 @type 10:25:06 not an expression: `' 10:25:08 Erm. 10:25:53 @type asTypeOf (undefined :: (forall a. Show a => a) -> (forall a. Show a => a)) (undefined :: forall a. Foo a => a -> a) 10:25:54 Not in scope: type constructor or class `Foo' 10:26:01 @type asTypeOf (undefined :: (forall a. Show a => a) -> (forall a. Show a => a)) (undefined :: forall a. Show a => a -> a) 10:26:02 Inferred type is less polymorphic than expected 10:26:02 Quantified type variable `a' escapes 10:26:09 Ipe! 10:26:19 Odd. 10:26:29 Perhaps it's not very good at renaming bound terms. 10:26:53 @type (undefined :: forall a. Show a => a) `asTypeOf` (undefined :: forall a. Show b => b) 10:26:54 Not in scope: type variable `b' 10:26:54 10:26:54 :1:82: Not in scope: type variable `b' 10:26:58 @type (undefined :: forall a. Show a => a) `asTypeOf` (undefined :: forall b. Show b => b) 10:26:59 forall b. (Show b) => b 10:27:15 First of all, the class constraint means nothing for the type inference. 10:27:26 Well, that was to be expected. That's a simple inference from the type of asTypeOf. 10:27:30 --- join: shapr (n=user@81-235-177-71-no54.tbcn.telia.com) joined #haskell 10:27:34 * shapr boings 10:27:34 shapr: You have 2 new messages. '/msg lambdabot @messages' to read them. 10:27:36 shapr! Wb. 10:27:39 @type (undefined :: forall a. a) `asTypeOf` (undefined :: forall b. b) 10:27:40 forall b. b 10:27:59 * Arnia waves to shapr 10:28:00 dons: SoC review! argh! 10:28:05 hiya Arnia! 10:28:10 Gotta be social, bbl 10:28:13 @type (() :: forall a. a) `asTypeOf` (() :: forall b. b) -- now it's nice and short :) 10:28:14 Couldn't match the rigid variable `a' against `()' 10:28:14 `a' is bound by the polymorphic type `forall a. a' at :1:1-17 10:28:18 Ahem. 10:28:22 Ignore that then. 10:28:41 ihope_: what were you expecting? 10:28:48 Or why were you expecting funkiness? 10:29:07 And why can't the type inferer rename the bound type variables? 10:29:11 @type (undefined :: forall a. a) `asTypeOf` (undefined :: forall a. a) 10:29:12 forall a. a 10:29:22 --- join: dgoldsmith (n=dgoldsmi@A17-202-23-212.apple.com) joined #haskell 10:29:42 Oh, I see how they differ. 10:29:49 --- quit: gour (Read error: 110 (Connection timed out)) 10:30:16 @type (undefined :: (forall a. a) -> (forall a. a)) `asTypeOf` (undefined :: forall a. a -> a) 10:30:17 Inferred type is less polymorphic than expected 10:30:17 Quantified type variable `a' escapes 10:30:31 @type (undefined :: (forall a. a) -> (forall b. b)) `asTypeOf` (undefined :: forall c. c -> c) 10:30:33 Inferred type is less polymorphic than expected 10:30:33 Quantified type variable `a' escapes 10:30:42 --- join: greenrd (n=greenrd@greenrd.ucd.ie) joined #haskell 10:31:24 @type undefined :: forall b. (forall a. a) -> b 10:31:26 forall b. (forall a. a) -> b :: forall b. (forall a. a) -> b 10:31:55 It is easier with explicit data ctors. It is to do with binding the types and the binding scope. 10:32:28 Is it an implementation detail or is it genuinely untypable? 10:32:30 --- quit: roconnor (Read error: 110 (Connection timed out)) 10:33:22 Variables cannot escape the scope of forall... if you have data Foo = forall a. Bar a... and case .. of Bar v -> expr, the v's a cannot be inferred to be same outside that scope. 10:33:31 --- nick: Fritez -> Fritez|away 10:33:32 IF that makes sense. 10:34:28 dmhouse, as far as I understand, it is the primary logical abstraction forall provides. 10:34:54 So, I guess it is the genuine-type of problem. 10:35:15 --- join: Paltas (n=bo@cpe.atm4-0-7936.0x535f1d06.odnxx11.customer.tele.dk) joined #haskell 10:35:39 --- quit: Cale (Remote closed the connection) 10:36:17 --- join: Cale (i=foobar@London-HSE-ppp3543475.sympatico.ca) joined #haskell 10:36:24 So it's the combination of the scoping and asTypeOf. 10:37:44 asTypeOf just tells you that the types really cannot be inferred be the same. 10:38:02 --- quit: Frederick ("Leaving") 10:43:00 --- join: cptchaos (n=cptchaos@d131034.adsl.hansenet.de) joined #haskell 10:47:52 --- nick: gour_ -> gour 10:54:10 If we had "exists a. a" and such, would the intersection of those two types be defined? 10:55:05 which two? 10:55:50 Straw poll. How do you pronounce 'chr'? 10:56:15 I pronounce it like 'care' 10:56:31 ihope_ : intersection ? 10:57:30 ski: unification? 10:57:42 char? 10:57:55 Cale: (forall a. a) -> (forall b. b) and forall c. c -> c. 10:58:07 dmhouse: like "care", I guess. 10:58:43 Weird. I've always said 'char'. How could you pronounce it 'care'? It's got a 'ch'! 10:58:44 ihope_ : hm, from the latter, one can derive the former, if the quantification is impredicative 10:59:05 ihope_: the intersection of those types is (forall a. a) 10:59:26 Cale: that looks more like a union to me. 10:59:26 dmhouse: because the beginning of character is pronounced "care" 10:59:39 dmhouse: how do you pronounce 'character'? 10:59:44 ihope_: it's not 10:59:46 Not like 'care'. 11:00:01 But then, not with a soft sounding 'c' either. 11:00:08 It's a hard c 11:00:14 So you say it like the beginning of 'character'? 11:00:18 yes 11:00:46 Cale: how could the intersection of two types be more general than either? 11:00:51 which, in my accent, sounds exactly like 'care' 11:01:06 The first syllabyle in my pronounciation of 'character' sound like the beginning of 'cap'. 11:01:25 ihope_: Suppose that some term has type "forall a. a", then it is in all types. 11:01:42 For example, the intersection of Int and String is forall a. a 11:01:43 dmhouse: you know just how much about you I can derive from that? 11:02:03 Cale: I'd call that the union. 11:02:10 Because there are no other terms which are in both of those types. 11:02:19 Why would you call it union? 11:02:20 ihope_: Go ahead :) 11:02:32 (forall a. a) has only one element in it. 11:02:44 dmhouse: well, it's less than I can derive from your hostmask. 11:02:46 namely, undefined/bottom 11:03:01 Cale: hmm. 11:03:09 ihope_: ;) 11:03:13 I see, 11:03:40 I have a sudden urge to go read my type theory book. 11:03:51 forall a.a == undefined ? 11:04:03 forall a. a = {undefined} 11:04:04 what is the grid/table control called in gtk? 11:04:07 alar: undefined :: forall a. a. 11:04:14 --- join: Philippa_ (n=somewher@cpc1-clif6-0-0-cust591.nott.cable.ntl.com) joined #haskell 11:04:14 --- quit: Philippa (Read error: 104 (Connection reset by peer)) 11:04:20 * ski wants counions ! 11:04:25 @type let x = x in x 11:04:26 forall t. t 11:04:37 undefined::(foralll a.a) 11:04:44 hm, I would not object 11:04:49 sjanssen: Which is _|_. 11:05:03 Cale: I'd call forall a. a the union of Int and String because forall a. a contains both Int and String, in a way. 11:05:15 Essentially, the opposite of the reason that you call it the intersection. 11:05:37 what are counions? 11:05:40 that's backwards 11:05:53 alar, if you view types as sets of their values with a bottom, i.e. Bool = { _|_, False, True }, then forall. a = { _|_ }. 11:05:59 consider 'forall a. a -> String' 11:06:02 --- join: roconnor (n=roconnor@g33218.upc-g.chello.nl) joined #haskell 11:06:37 ihope_: you're misinterpreting 'forall a. a' 11:06:49 ihope_: 'exists a. a' is what contains both Int and String 11:06:53 Cale: it's a type that can act as any type, yes? 11:07:12 'forall a. a' is the type of values which are in every type. 11:07:29 That is, it's the intersection of all types. 11:07:43 'exists a. a' is the union of all types 11:08:04 Yes, I see. 11:08:07 because if t :: exists a. a, that just says that t has some type. 11:08:08 I just don't agree :-P 11:08:14 Because 'exists a. a' means 'there exists some type a such that this term has type a'. 11:08:25 that is, exists a. t :: a 11:08:29 alar : as 'union' but dual, i.e. for quotient objects, instead of subobjects 11:08:48 forall a. t :: a is a much stronger statement 11:08:56 And 'forall a. a' means 'for all types, this term has that type'. 11:09:02 Okay... so what's the union of (forall a. a) -> (forall b. b) and forall c. c -> c? 11:09:02 that means that if a is any type whatsoever, t can have that type. 11:09:27 > error "ouch!" :: forall a. a 11:09:27 Parse error 11:09:31 aww 11:09:44 Well, there's only one value in the first type, and it's undefined 11:10:01 in the second type, you have undefined and id. 11:10:05 The first type is all functions from bottom to bottom. 11:10:25 dmhouse: right, which is only bottom 11:10:31 hi ppl 11:10:35 --- nick: Fritez|away -> Fritez 11:10:39 Cale, why? 11:10:58 @type const undefined 11:10:59 forall a b. b -> a 11:10:59 @type (let foo :: (forall a. a) -> b; foo x = x in foo) 11:11:00 forall b. (forall a. a) -> b 11:11:01 --- join: Si\ (n=simon@host86-128-231-63.range86-128.btcentralplus.com) joined #haskell 11:11:01 anyone can help me solving a problem in haskell? 11:11:05 dmhouse: because there's only ever one function from a one element set to a one element set. 11:11:28 Ah, that's right. I couldn't recall how equivalence on functions was defined. 11:11:33 Fritez: probably, ask away :) 11:11:45 Cale: um, isn't id also (forall a. a) -> (forall b. b)? (forall a. a) seems the same as (forall b. b), after all. 11:11:48 12,00:01D 11:11:55 Uh oh. 11:11:56 ihope_: but with that type, id = undefined 11:11:57 Fritez: no colours or blinking, thought, please. 11:12:06 k 11:12:06 ski: quotient objects? 11:12:13 Fritez : what is the problem ? 11:12:14 ihope_: no. 11:12:18 that is, for all values x in forall a. a, id x = undefined x 11:12:23 * alar tries to imagine object division 11:12:34 ihope_: Int -> String satisfies your first type. id certainly doesn't have that type. 11:12:40 alar : think 'equivalence classes' 11:12:49 ah, this 11:13:03 --- quit: kowey ("Get MacIrssi - http://www.g1m0.se/macirssi/") 11:13:05 > (undefined :: (forall a. a) -> (forall b. b)) "foo" 11:13:06 Parse error 11:13:12 dmhouse: (forall a. a) is the same type as (forall b. b) 11:13:14 Um. 11:13:19 dons! 11:13:30 your parser is being a pain again 11:13:46 i need to read the number os students in a class, the after that read their codes and grades, after that i need to find the ones with the higher grade and then return their codes 11:13:47 Anyway, can Int really be passed into a something that takes forall a. a? 11:13:56 i'm getting a lot of problems with IO 11:13:56 ski: still I do not understand why eq classes are called counions. What are they dual to unions in? 11:13:57 @type (undefined :: (forall a. a) -> (forall b. b)) "foo" 11:13:58 Couldn't match the rigid variable `a' against `[Char]' 11:13:58 `a' is bound by the polymorphic type `forall a. a' at :1:0-50 11:14:01 ihope_: no 11:14:15 > (let u :: (forall a. a) -> (forall b. b); u = undefined in u) "foo" 11:14:15 Parse error 11:14:26 Ah, I was wrong. Now I know why. 11:14:27 > (let u :: (forall a. a) -> b; u = undefined in u) "foo" 11:14:27 Parse error 11:14:34 dmhouse: the only value which you can pass a function of type (forall a. a) -> (forall b. b) is undefined. 11:14:40 Yeah. 11:14:48 and the only value which can be returned is undefined 11:14:53 And that's totally different to (forall a. a -> (forall b. b))? 11:15:01 --- join: zarvok (n=ccasingh@MANCALA.WEH.andrew.cmu.edu) joined #haskell 11:15:04 yes 11:15:08 dmhouse: that takes anything and returns anything. 11:15:08 so, any idea on how i can solve this? 11:15:11 As that's all functions with a range of _|_, i.e. _|_. 11:15:15 alar : sorry, no, 'counion' would be an operation over quotient objects 11:15:15 That is, unsafeCoerce# :-) 11:15:28 --- quit: kisu (Read error: 54 (Connection reset by peer)) 11:15:31 forall a. a -> (forall b. b) will take any value and give undefined 11:15:45 Fritez: well, you could use the number of students as a loop counter, sort of. 11:15:52 Fritez: there are numerous IO tutorials that would probably help. 11:15:53 well, the only functions of that type 11:16:01 --- quit: paolino (Read error: 104 (Connection reset by peer)) 11:16:01 * ski tries to remember an example of counion and cointersection 11:16:16 Fritez: what exactly are you stuck on? 11:16:29 i'm having problems on using the numbers im reading... 11:16:52 Can you give us what you have so far? 11:17:09 Fritez: are they strings? 11:17:28 --- quit: swiert ("My damn controlling terminal disappeared!") 11:17:36 Fritez: 'read' will convert a string to an integer, or any other sort of number or value you want 11:17:47 > read "56" :: Integer 11:17:48 56 11:17:59 they appear to be IO Int 11:18:08 oh, then you haven't read them yet 11:18:19 Does f :: Int -> _|_ satisfy the type forall a. a -> (forall b. b)? 11:18:25 a value of type IO Int is a program which when run, will return an Int 11:18:31 can i paste the code here? 11:18:34 Fritez: sure 11:18:36 @where paste 11:18:37 http://paste.lisp.org/new/haskell 11:18:40 Fritez: paste it there 11:18:42 getMediaCod = do { 11:18:42 putStr "Entre com o cdigo: "; 11:18:42 a <- readNum; 11:18:42 putStr "Entre com a mdia: "; 11:18:42 b <- readNum; 11:18:43 return(criaLista (a,b)) 11:18:45 } 11:18:52 Ack. Never mind, it was short. 11:18:58 dmhouse: where _|_ = forall a. a 11:19:04 Cale, sure. 11:19:11 dmhouse: yes 11:19:21 criaLista is a function that im using to concatenate the numbers and create a list... 11:19:28 Fritez: okay 11:19:37 --- join: iblechbot (n=iblechbo@62.216.196.248) joined #haskell 11:19:41 Fritez: You could also write return [a,b] 11:19:46 So there are many functions satisfying the type forall a. a -> (forall b. b), as for every choice of a domain type, you get a different function. 11:19:53 dmhouse: right 11:20:02 (If you consider equivalence by matching input/output.) 11:20:17 --- quit: koffein (Remote closed the connection) 11:20:23 is forall a.a unit type or null type? 11:20:25 dmhouse: on the other hand, they're all equivalent to const undefined = undefined 11:20:31 alar, it's the 'bottom type'. 11:20:44 void type 11:20:55 alar: the unit type is (), 'null type' doesn't really mean anything, but bottom is analoguous to void or null in other languages, in certain contexts. 11:21:10 Fritez: okay, so what's the problem? 11:21:23 unit type is type containig one element, null type is empty type 11:21:28 criaLista (x,y) (a:c) = [(x,y)] ++ (a:c) 11:21:41 alar: the unit type in Haskell has two elements, and the null type has one 11:21:47 oh 11:21:49 alar: because every type has bottom in it 11:21:50 criaLista = (:) 11:21:55 Because of this 'universal subtype', _|_, or bottom. 11:22:00 *** Type : IO [Int] 11:22:00 *** Does not match : (a,b) 11:22:06 here 11:22:17 i cant use the returned values on this function 11:22:20 Fritez, what are you trying to do? 11:22:21 Fritez : do you intend to return a function from 'getMediaCod' ? 11:22:31 xerox: ciraLista = uncurry (:), at least. More likely, crisaList (a, b) = [a, b]. 11:22:34 Fritez: you're defining an action, you have to run it to get a list of integers 11:22:52 Oh, never mind. 11:22:58 but you're only passing one pair to creaLista 11:23:05 (Fritez : also, what is the type of 'readNum' ?) 11:23:19 readNum :: IO Int 11:23:29 Fritez, mixing portuguese and english in your function names is probably not a really nice style 11:23:45 dmhouse: if you consider equivalence of values paired with their types, there still will be the same many functions of that type 11:23:52 so creaLista (a,b) :: [(Int,Int)] -> [(Int,Int)] 11:23:57 @palomer 11:23:57 woof 11:24:07 @palomer 11:24:07 Blargh! 11:24:13 alar: of which type? 11:24:25 Fritez: so you're returning a function 11:24:36 ah 11:24:38 sorry 11:24:55 Cale, I don't understand your statement, "They're all equivalent to const undefined = undefined". 11:24:58 u said i could use return [a,b] 11:25:03 --- join: kowey (n=kow@chartreuse.loria.fr) joined #haskell 11:25:13 dmhouse: well, they're all constantly undefined functions 11:25:14 I have not think about equality wrt typr conversions/polymorphism 11:25:20 then i could call this function on another one... 11:25:23 Fritez, you should use return (a, b) 11:25:30 Fritez: well, not after I was what creaLista was 11:25:36 saw* 11:25:41 @type const 11:25:42 forall a b. a -> b -> a 11:25:45 and you can join all (a, b) together outside that function 11:25:58 Fritez: though yeah, probably it should just be returning (a,b) 11:26:12 let's see 11:26:13 Cale, if you mean the range of each function is {_|_}, then yes, I agree. 11:26:33 dmhouse: yeah 11:26:51 dmhouse: so a valid definition for every f in the type is f = undefined 11:26:58 but they have various types 11:27:06 And that makes them distinct. 11:27:07 I see. 11:27:24 what's {_|_} ? 11:27:27 --- join: lollan (n=lollan@cpc3-tref1-0-0-cust598.cdif.cable.ntl.com) joined #haskell 11:27:31 Excedrin: the set containing bottom. 11:27:39 --- quit: roconnor (Read error: 104 (Connection reset by peer)) 11:27:42 --- join: roconnor (n=roconnor@g33218.upc-g.chello.nl) joined #haskell 11:28:28 dmhouse: I suppose that whether that really makes them distinct is up for debate 11:28:33 well, actually 11:28:54 there's only one function of type *forall* a. a -> (forall b. b) 11:28:57 Cale: they are distinct wrt some equality 11:28:58 It depends how you form your equivalence relationship. 11:29:17 dmhouse: since it has to really be polymorphic 11:29:22 there's really only one 11:29:33 Hrm. Now I'm confused again :) 11:29:41 which one? 11:29:45 undefined 11:29:48 so 11:29:49 alar, f _|_ = _|_, or just _|_. 11:29:54 For example... 11:29:58 no 11:29:58 If I wrote 11:30:03 f True = undefined 11:30:14 f False = undefined 11:30:17 I mean what equality relations whould you use 11:30:30 for those functions 11:30:31 alar: equivalence of input/output; the normal one 11:30:42 I can't give f type forall a. a -> (forall b. b) 11:30:42 then they are distinct 11:31:00 but eq of IO is undecidable IMHO 11:31:04 because it's insufficiently polymorphic 11:31:16 alar, huh? How did IO enter things? 11:31:25 input/output 11:31:36 I don't mean that kind of IO. 11:31:39 --- join: kisu (n=kisu@cielkisu.tb.as8758.net) joined #haskell 11:31:48 I know what you mean 11:32:00 I mean if you did zip (map f allValues) allValues, and compared that list. 11:32:03 It's usually human-decidable :) 11:32:24 dmhouse: yes 11:32:25 alar, of course it's undecidable in practice, but that's not a problem. 11:32:27 in all these cases we're talking about, we can tell whether two functions are equal 11:33:05 dmhouse: yeah, I made a mistake earlier 11:33:09 there's only one function 11:33:13 Right. 11:33:18 It takes any value whatsoever 11:33:21 and gives undefined 11:33:40 that is, 11:33:41 it's equal to const undefined 11:33:44 So the types (forall a. a) -> (forall b. b) and forall a. a -> (forall b. b) are the same. 11:34:00 --- join: koffein (n=Aik@p50920586.dip0.t-ipconnect.de) joined #haskell 11:34:02 forall a. a -> (forall b. b) is the same type as (exists a. a) -> (forall b. b) 11:34:27 Which is in turn the same as (forall a. a) -> (forall b. b)? 11:34:30 no 11:34:43 But we decided in both cases the only inhabitant of the type was _|_. 11:34:46 (exists a. a) has every value in it 11:34:51 (forall a. a) has only one 11:35:15 yes, but that doesn't mean they're the same type :) 11:35:20 Ah. 11:35:34 I was defining equality on types by just equating the sets. 11:35:47 How else can you do it? 11:35:53 right, which isn't quite right, because, for example 11:36:02 If f :: forall a. a -> (forall b. b) 11:36:07 then f "hello" 11:36:10 will typecheck 11:36:23 but if g :: (forall a. a) -> (forall b. b) 11:36:31 then g "hello" won't typecheck 11:36:44 > let f=undefined :: (forall a. a -> (forall b. b)) in f "hello" 11:36:45 Parse error 11:36:51 True. 11:37:04 So equivalence on types is defined by...? 11:37:20 Cale: pvt 11:37:29 Fritez: pvt? 11:38:01 sent u some part of the code there... 11:38:11 * alar tries to understand 11:38:14 Fritez: I didn't get it, are you registered and identified? 11:38:23 nope 11:38:30 first time here today 11:38:46 ah, you can't send private messages unless you're signed in 11:38:47 f takes argument of any type and returns undefined::(forall b.b) 11:38:54 It helps prevent spam 11:39:20 g takes polymorphic argument and returns the same undefined 11:39:23 right? 11:39:30 yeah 11:39:42 then g "hello" will typecheck 11:39:47 so there're more possible contexts to 'f' than to 'g' 11:39:49 no 11:40:07 "hello" is not polymorphic 11:40:12 yes 11:40:22 oh 11:40:23 sorry 11:40:34 f hello is well-typed 11:40:51 g "hello" isn't 11:40:58 right 11:41:30 It helps a lot to think about types in terms of sets when seeing which values will typecheck. 11:41:54 E.g. "hello" is not a member of the set (forall a. a), so g "hello" doesn't typecheck. 11:42:02 Okay, so where were we. 11:42:14 It seems equivalence on types is complicated. How is it defined? 11:42:20 (Roughly speaking ;)) 11:42:54 jiihaa 11:43:07 So, what did I miss? 11:43:16 A nice type theory discussion/lecture. :) 11:43:32 shapr: Where've you been the last few days? 11:43:45 if you define eq of functions by their IO then IMHO you should define eq of types as sets 11:43:46 dmhouse: Moving to Stockholm. 11:43:47 Was that your move to Stockholhm? 11:43:51 do I miss something? 11:43:57 Yup, with a delay for Internet, etc 11:44:33 Also, I had an apartment lined up but it was brutally yanked out from under me before I moved... 11:44:37 alar, that's what I thought, but Cale discounted that earlier, when he said that (forall a. a) -> (forall b. b) and forall a. a -> (forall b. b) aren't the same time. 11:44:40 *type. 11:44:51 Because, for example, of the typechecking issues we just discussed. 11:45:40 then typechecker doesn't define eq of functions by their IO 11:46:05 The typechecker can't compare functions, that's uncomputable. 11:46:29 yep 11:46:33 and undecidable 11:46:43 --- join: adept_ (n=adept@c.20.175.a516.sta.adsl.cyfra.net) joined #haskell 11:47:04 Well, really, to the typechecker, types are equal when they are structurally equal 11:47:14 but we don't have exists 11:47:25 so that might be different in systems which do 11:47:54 but if you think about it, the domain of a function f :: forall a. a -> (forall b. b) 11:47:59 is forall a. a 11:48:01 er 11:48:02 no 11:48:04 So the typechecker compares types by taking them at face value? 11:48:09 it's exists a. a 11:48:15 Yes. 11:48:32 and functions aren't equal if they don't have the same domain and codomain 11:48:33 it's 'a' 11:48:38 Cale: I had crazy dreams about discussing type theory with you recently. 11:48:38 --- nick: adept_ -> adept 11:48:43 shapr: hehe 11:48:57 shapr: Hi! 11:49:11 * xerox waves to shapr 11:49:14 hiya Lemmih! 11:49:14 shapr: Have you submitted your mid-term evaluation? 11:49:16 greetingz xerox 11:49:20 For example, id :: String -> String, is not the same function as id :: Int -> Int 11:49:25 Lemmih: Not yet, I've just gotten online. 11:49:29 shapr: I've been trying to reach you for days. 11:49:44 I've been without internet while moving to Stockholm. 11:49:44 shapr: Well hurry up! Deadline is today. 11:49:48 awright! 11:50:03 * alar congratulates adept with overtaking the nick 11:50:20 There is no evaluations from students for mentors, right, Lemmih ? 11:51:03 alar: :) 11:51:20 xerox: Not yet. 11:51:30 * xerox heads to dinner (thanks) 11:51:31 adept: http://gl-notes.livejournal.com/812842.html is there a bit of truth? 11:51:33 Title: "gl_notes: Живу и работаю в Киеве. Нашу "контору" н" 11:52:50 I've lived on my Nokia 770 the last ten days, it's quite spiffy. 11:53:02 I presume it doesn't have IRC. 11:53:18 shapr: welcome back! 11:53:23 Someone needs to write a Java IRC client and stick it on a website somewhere. 11:53:28 I can never connect when I'm at school. 11:53:51 My 770 does have IRC, but open wifi points tend to be in public areas where it's suspicious to stand about and irc. 11:53:58 So I just grabbed my mail. 11:54:24 bringert: Hiya! 11:54:46 bringert: Have I missed huge changes in Hope? 11:55:14 shapr: you haven't missed them, they are still there 11:55:21 :p 11:55:37 shapr: see http://hope.bringert.net/entry 11:55:41 * shapr looks 11:56:04 alar: gonevo :) 11:56:08 shapr: there is some newer stuff too, but I haven't installed that on hope.bringert.net yet 11:56:26 shapr: like static pages 11:56:36 Oh wow, hscolour support! 11:56:44 shapr: there are per-user RSS feeds now too 11:56:56 oh and RSS formatting too! 11:56:58 you can see a static page on my newly public Hope installation at www.marginalerror.com 11:56:58 Wow, this is great. 11:56:59 --- nick: adept -> adept_xchat 11:57:06 right, that too 11:57:15 --- join: ADEpt (n=ADEpt@jabber.hst.ru) joined #haskell 11:57:19 shapr, did you move already? 11:57:32 jgrimes_: sweet 11:57:41 pejo: Yes, though I don't have an apartment yet. 11:57:55 Mooching off my gf at the moment... 11:58:02 jgrimes: can I link to it from hope.bringert.net? 11:58:10 bringert: sure :D 11:58:42 jgrimes_: Is "What is Hope?" the static page? 11:58:44 --- join: mathewm (i=mathewmi@popcorn.dreamhost.com) joined #haskell 11:58:47 shapr: yep 11:58:50 spiffy 11:58:51 --- quit: adept_xchat ("Client exiting") 11:59:17 I would ask how that works but I think I'll darcs pull, build, and read the docs first... 12:00:24 jgrimes_: when not logged in, there is a dead "Pages" entry in your menu 12:00:31 I'll fix that 12:05:01 so there is 12:05:59 --- join: paolino (n=paolino@151.82.2.236) joined #haskell 12:10:08 --- join: khaladan (n=khaladan@GroupMackenzie.s11-1-0-16-0.ar3.SEA1.gblx.net) joined #haskell 12:12:38 jgrimes: fix in darcs 12:13:09 jgrimes: I don't know how current your version is, but the latest darcs version requires the current HaskellDB darcs version 12:13:30 * shapr wishes for cabal-get 12:13:30 I should add a version module that just says which Hope version the site is running 12:13:43 bringert: all right 12:14:14 bringert: yeah, hope/server-status 12:14:17 Just like apache. 12:14:18 --- part: edwardk left #haskell 12:15:08 how would dynamic module loading in Hope via hs-plugins work? 12:15:27 jgrimes_: hopefully pretty well 12:15:41 though I haven't tried it 12:16:12 maybe I could write a "dynamic" module that would load other modules dynamically 12:16:26 would need to change some things for that though 12:16:38 --- join: Pupeno (n=pupeno@p54BF5723.dip.t-dialin.net) joined #haskell 12:16:50 bringert: yeah, it would be nice though :) 12:17:18 I worry a bit about performance and server compatibility 12:17:29 as long as it is optional it should be fine 12:17:33 yeah. 12:18:15 not that my site will ever have much load on it, but I don't thinking serving up a cgi app and compiling things would go over too well 12:18:24 think, rather. 12:19:30 but for some purposes I think it could be pretty useful 12:19:38 I think so too. 12:19:46 For example, dynamically generated pages. 12:21:22 it could have a directory where it caches the object files, and only recompile when the source has changed 12:23:59 --- join: anonfunc (n=pimaniac@plms-c-15-103.dhcp.CSUChico.EDU) joined #haskell 12:24:49 hs-plugins handles most of that, dunno about all. 12:26:35 kowey: pingeroo 12:26:45 dmhouse : heya 12:27:30 Hi! Good work on the lists stuff. 12:27:33 dmhouse : i hope i'm talking too much about types in the new list basics chapter... 12:27:43 I did see that, and I think it's okay. 12:27:43 * kowey just saved 12:28:03 People who know stuff about types will think 'ah, yeah', and people who don't will have it explained to them in my chapter. 12:28:09 --- join: glauber_sp (n=Glauber@200-168-101-11.dsl.telesp.net.br) joined #haskell 12:28:11 Anyway, I'm working on Type basics and I could do with some advice. 12:28:37 I'm basically at the stage where I want to explain the types of functions in more than one argument. This basically means I need to explain currying. 12:28:46 ooooh... 12:28:50 I looked at how YAHT does it and it's easy if you have lambda abstractions. 12:28:58 i think that's going a little fast 12:29:09 Yeah, I did think that. 12:29:22 * kowey recalls eyes glazing in his public whilst teaching 12:29:36 (of course, this might be the teacher's [kowey] fault more than anything else 12:29:42 So just say something like 'multiple arguments? Just chain 'em together like Foo -> Bar -> Baz.' 12:29:47 Then explain currying later on. 12:29:54 How's that sound? 12:29:57 right... what you could even say is something to the effect 12:30:03 or maybe sort of a side note 12:30:17 that something really really deep and mystical about functions 12:30:32 is that strictly speaking, functions only take ONE argument 12:30:46 but then remind the reader that they aren't expected to understand that 12:30:54 just dangle a little bait for the fast readers 12:31:47 Sure. 12:31:50 Sounds good 12:31:56 Right, I'm almost done with this section. 12:32:44 Then I need an explanation of type inference and we can call that chapter to a close. 12:35:08 --- join: malcolm_ (n=malcolm@abbess.demon.co.uk) joined #haskell 12:35:36 * kowey is thinking about list exercises... 12:35:46 (but simple ones that don't involve pattern matching or libraries) 12:35:59 bringert: I updated haskelldb/hope and now when linking hope I get undefined references in libHShaskelldb-hsql-0.9.a 12:36:59 jgrimes_: did you recompile and install all the haskelldb packages that you are using? e.g. haskelldb, haskelldb-hsql and haskelldb-hsql-mysql 12:37:09 bringert: that'll do it 12:37:10 ;p 12:39:02 --- quit: waern (Success) 12:41:27 --- join: vegai (i=llkzgxy@chat.ravissant.net) joined #haskell 12:41:45 bringert: did I remember to say thanks for the patches to HsColour? 12:43:03 malcolm_: you said that you pulled them into the main repo and wrote about it on the web page. I take that as a "thank you" :-) 12:43:36 bringert: that worked and the update worked too, thanks :D 12:44:01 bringert: good. It seems to be the way with many projects - they start as a tool, and eventually become a library 12:44:23 malcolm_: I was thinking that it would be nice to color variable bindings different from variable uses 12:44:51 --- quit: glauber_sp ("Fui embora") 12:44:58 bringert: you won't be able to do that with just lexical analysis... 12:45:01 haskell-mode does that for top-level declarations 12:45:24 a variable in the first column is always a top-level declaration, right? 12:45:34 I suppose it would need a much simpler parser than a full H'98+extensions job though 12:45:56 What about pattern bindings? let (x,y) = foo 2 in ... 12:46:14 --- part: ADEpt left #haskell 12:46:19 yeah, it get's a little messy 12:46:24 eh, gets 12:46:29 What's a nice example of a monomorphic function in more than one argument? 12:46:56 If the colour is to be meaningful, it needs to be consistently and accurately assigned. 12:47:02 right 12:47:05 --- quit: anonfunc () 12:47:20 dmhouse, regular expression matching 12:47:42 --- join: Daveman (n=dave@69.25.227.120) joined #haskell 12:47:47 I'd rather not bring in something that won't be accessible to a non-programmer. 12:47:58 open window? 12:48:08 malcolm_: http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/ could be used for parsing 12:48:09 Sorry? 12:48:11 Title: "Haskell-Source with eXtensions" 12:48:24 hiya malcolm_ 12:48:30 dmhouse: (&&)? 12:48:31 malcolm_: but I guess you want to stay away from using a full haskell parser? 12:48:47 * malcolm_ waves at shapr and anyone else in his vicinity 12:48:52 @type Graphics.HGL.openWindow 12:48:53 Graphics.HGL.Internals.Types.Title -> Graphics.HGL.Internals.Types.Size -> IO Graphics.HGL.X11.Window.Window 12:49:01 jgrimes_: Ooh, that'll make a nice exercise. But I'd rather the two argument were a different type. 12:49:04 I know, I'm being picky. 12:49:06 :) 12:49:24 bringert: if you bring in full parsing, you may as well just use programatica 12:49:53 right 12:50:31 is the first column rule enough to catch all top-level declarations? 12:50:58 malcolm_: if so, would you think that that would be ok to add to hscolour? 12:51:00 bringert: for toplevel, nearly. Not many people use pattern-binding at the top-level. 12:51:10 you can do that? 12:51:39 Sure. check the report 12:51:57 have you ever seen code that uses it? 12:52:01 I don't think I have 12:52:04 nope 12:52:35 I recall I tried to use it when defining some constants. 12:52:43 dmhouse: Network.Socket.bind ? 12:52:52 @hoogle bind 12:52:53 Network.Socket.bindSocket :: Socket -> SockAddr -> IO () 12:52:53 Language.Haskell.TH.bindS :: PatQ -> ExpQ -> StmtQ 12:52:53 System.Console.Readline.bindKey :: Char -> Callback -> IO () 12:54:39 malcolm_: another idea would be to do something special for type signatures 12:54:55 bringert: do you think it would be confusing if binding occurrences were a different colour at the top-level, but the same colour as usages when defined locally? 12:54:58 but I guess that would also need slightly more than lexing 12:55:23 malcolm_: I don't think that would be confusing, haskell-mode does it 12:55:34 * alar has to go 12:55:59 bringert: so let me ask the question the other way round - why is it useful to have the colours different? 12:56:08 please, notify me when you'll have interesting type theory talk next time 12:56:10 --- quit: alar ("I had one of them wooden computers once. Wooden keyboard, wooden monitor, wooden CPU... only one problem: it wooden work. :(") 12:56:32 --- join: waern (n=davve@h246n1fls308o1049.telia.com) joined #haskell 12:56:41 malcolm_: it makes it easier to find the definition of a given function 12:57:10 doesn't the anchor stuff already identify bindings btw? 12:57:31 bringert: oh, good point. yes the anchors are identified already 12:57:54 --- quit: paolino (Read error: 110 (Connection timed out)) 12:57:59 bringert: but again only by lexical position (column 1), so class methods don't work (for instance) 12:58:15 right 12:58:15 @hoogle ord 12:58:16 Char.ord :: Char -> Int 12:58:16 Prelude.Ord :: class Eq a => Ord a 12:58:16 Text.Html.ordList :: HTML a => [a] -> Html 12:58:45 kowey: Wow, I just realised I've got a lot more to explain here. 12:58:46 finding the definitions of class methods is a bit useless anyway, since you would only see the type signature 12:59:18 kowey: basic polymorphism (i.e. type variables), higher-order functions, type classes... 12:59:34 how much of that can be relegated to later chapters? 12:59:38 hmm... probably not in type basics, eh? 12:59:39 bringert: but it might be nice to discover all instance defns too, maybe chained together, so if you keep clicking, you cycle through them 13:00:03 I think at least the first should be in there, otherwise lists get complicated. 13:00:07 yes, that would be good 13:00:09 And it's not too hard to explain. 13:00:10 i sometimes wonder if we need an intermediate haskell section 13:00:38 (for type classes and ilk) 13:00:53 Might be good. 13:01:13 Move Libraries to the end of the second column, under 'Reference' or something. 13:01:32 Make the cut after 'Lists'. 13:01:40 --- quit: greenrd ("Leaving") 13:02:48 CosmicRay: have you seen this HDBC installation question: http://www.haskell.org//pipermail/haskell-cafe/2006-July/016567.html 13:02:49 Title: "[Haskell-cafe] Problems installing HDBC-postgresql" 13:03:57 bringert: I bet Programatica can do something like that - if it has type inference, it could find whether a usage of a class method simplifies to a particular type + dictionary, then take you only to the right instance. 13:04:19 --- join: Itkovian (n=Itkovian@d54C4B834.access.telenet.be) joined #haskell 13:05:23 kowey: Thoughts? 13:05:38 (sorry, in the middle of wrapping up the list basics chapter) 13:05:48 Sure 13:06:35 malcom_: yes, that should be possible, and very useful 13:07:37 malcom_: another idea: in html output, identifiers could be links to their definitions. though that doesn't work if a top-level identifier is overshadowed by a local definition 13:08:08 and things that aren't declared in the current program could be links to haddock docs :-) 13:08:45 but again that would be really confusing if it missed a local binding 13:09:25 what we might even do is pop the libraries stuff out of the columns altogether 13:09:57 one thing that has been bugging me, for example 13:10:08 is that we seem to give the impression that Practical Haskell comes after ALL that advanced stuff 13:10:12 which clearly isn't the case 13:10:24 Right. 13:10:29 so what would be nice is to somehow merge the practical haskell stuff with the libraries stuff 13:10:36 bringert: just like Programatica.... 13:10:36 i don't think we can fit three columns though 13:10:43 ah 13:10:54 yeah, maybe it's KISS time 13:11:00 maybe a big coloured block below 13:11:27 kowey: Tutorials? I think the Libraries should be more tutorials and large examples than documentation; we've already got Haddock for that. 13:11:31 --- quit: MarcWeber ("leaving") 13:12:00 well, that would also give a nice place for write yourself a scheme... 13:12:07 tutorials would be for very precise topics 13:12:19 that aren't strictly speaking related to learning Haskell 13:12:26 Hmm. 13:12:34 No, I think we should keep it Haskell-specific 13:12:41 But certainly more outward- than inward-looking. 13:12:41 i mean, yeah 13:12:52 Haskell specific, but not, erm... essential 13:12:57 Right. 13:13:05 But then, the Libraries don't fit in well. 13:13:52 --- quit: Si\ ("Download Gaim: http://gaim.sourceforge.net/") 13:14:06 one question is if we really need the libraries stuff 13:14:10 would haddock do? 13:14:23 i guess the point of the libraries 13:14:35 stuff is to let the newbie know what the most important libraries to get to know are 13:15:23 --- join: monochrom (n=trebla@lachesis.cs.toronto.edu) joined #haskell 13:15:29 bringert: one more question. Did you come up with your own colour scheme as a .css file for the hscolour'ed parts of Hope? 13:15:37 malcolm_: yes 13:15:44 --- join: dmhouse_ (n=david@C8b34.c.pppool.de) joined #haskell 13:15:53 bringert: can you send me a copy? 13:16:11 malcolm_: http://hope.bringert.net/modules/haskell/style/haskell.css 13:16:12 kowey: Sorry, dodgy wifi. 13:16:13 --- join: anonfunc (n=pimaniac@plms-c-15-103.dhcp.CSUChico.EDU) joined #haskell 13:16:22 I'd say keep the Libraries, but tune it toward examples. 13:16:37 Provide an overview of the useful functions if there's not too many. 13:16:42 bringert: thx 13:16:54 One of the harder parts of learning a languages it getting accustomed to its libraries. 13:16:58 so what i would say is this 13:17:04 --- join: _roconnor (n=roconnor@g33218.upc-g.chello.nl) joined #haskell 13:17:09 --- quit: roconnor (Read error: 104 (Connection reset by peer)) 13:17:19 we have a Haskell in Practice block below the book, but above the other links... we use a coloured block to keep it highlighted 13:17:22 --- quit: dmhouse (Nick collision from services.) 13:17:25 --- nick: dmhouse_ -> dmhouse 13:17:32 in it goes the libraries reference (full of examples) and tutorials 13:18:10 We could even make it two-columned. Basic Libraries on the left, More Expansive Libraries on the right. 13:18:24 And 'Other tutorials' on the right too. 13:18:37 I'm still not happy about the Scheme stuff just sitting around, disconnected, though. 13:18:41 mhm, what's the simpliest way to print an Word8 in hex on stdout? 13:19:02 @hoogle showHex 13:19:02 Numeric.showHex :: Integral a => a -> ShowS 13:19:03 --- part: dozer left #haskell 13:19:18 That will do. 13:19:34 dmhouse: well, we might even just unlink it and keep the link in our discussion page 13:19:40 just source material for us 13:19:44 Perhaps. 13:19:48 --- quit: Itkovian () 13:19:49 May as well leave it for now. 13:19:54 > (showString "0x" . Numeric.showHex (51::Word8)) "" 13:19:55 "0x33" 13:20:02 ok, i'm going to try playing with tables to implement this 13:20:08 * kowey puts on his hardhat 13:20:26 Err, more details. (showHex (your Word8 here) "") will give you the string. You use putStr or whatever you like to get it to stdout. 13:20:48 kowey: Copy the page to somewhere else and play there. 13:20:52 kowey: Perhaps your user area. 13:21:04 dmhouse: good call 13:21:58 --- join: sad0ur (n=sad0ur@rb1a240.chello.upc.cz) joined #haskell 13:22:07 malcolm_, monochrom: thx :) 13:24:49 --- quit: lightstep ("Ex-Chat") 13:31:32 --- quit: gour ("Quit (http://xchat-gnome.navi.cx/)") 13:37:46 --- join: MarcWeber (n=marc@p549AD29B.dip.t-dialin.net) joined #haskell 13:37:57 --- quit: _roconnor (Remote closed the connection) 13:38:30 --- join: boegel (n=boegel@86-39-72-193.customer.fulladsl.be) joined #haskell 13:40:47 --- quit: dmhouse (Read error: 110 (Connection timed out)) 13:40:51 --- quit: chris2 ("Leaving") 13:41:33 --- join: poro (n=poro@217-140-238-196.adsl-net.finnetcom.net) joined #haskell 13:41:52 --- join: tennin (n=max@ppp-68-95-68-171.dialup.stlsmo.swbell.net) joined #haskell 13:43:27 --- quit: jgrimes_ ("leaving") 13:52:23 --- join: ADEpt (n=ADEpt@jabber.hst.ru) joined #haskell 13:53:01 --- quit: anonfunc () 13:59:11 dmhouse: in the "it seemed like a good idea at the time dept" http://en.wikibooks.org/wiki/User:Kowey/HaskellRedesign 14:05:55 dcoutts: are you around? I'm having some compilation problems with gtk2hs on win32 and the prebuilt binaries won't cut it 14:08:47 --- join: johnnowak (n=johnnowa@user-0cev1ia.cable.mindspring.com) joined #haskell 14:11:07 --- quit: erider (Read error: 104 (Connection reset by peer)) 14:11:42 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 14:14:17 --- quit: malcolm_ () 14:14:30 --- quit: sad0ur ("leaving") 14:15:12 --- quit: erider (Read error: 104 (Connection reset by peer)) 14:15:32 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 14:15:39 bolrod: what wasn't too good? 14:16:08 kowey: eh? 14:16:38 dcoutts: nevermind it's a bug in the gladewin32 distro, looks to be building now 14:17:12 palomer: just moving bits of the Haskell wikibook around... not 100% happy with the result 14:17:44 palomer: I went cycling 14:18:53 I like the idea of a community book 14:19:05 please contribute! :-) 14:19:24 for example, we could use a nice chapter ond GADT 14:20:29 hi, do you know, how to handle utf8 or unicode with haskell? 14:20:53 poro: i have no experience here, but i thought haskell was unicode friendly 14:21:02 ok 14:21:12 poro: the good news is that Char is Unicode 14:21:34 I'm able to write some special marks with vim to my file but the compilation gives me an error... 14:21:40 poro: the bad news is that when we read/write stuff, we do (effectively) as iso-8859-1 (feel free to correct me if i'm wrong) 14:21:47 and those marks are in the string 14:22:45 --- join: edwardk (n=ekmett@emu-9-223.emich.edu) joined #haskell 14:22:46 The terminal shows them correctly 14:23:23 question, does anyone know when between the old wadler papers on monads and the current time that monads shifted from types to classes? 14:23:35 for ex when I cat the function 14:24:13 poro, this might be related: http://hackage.haskell.org/trac/haskell-prime/wiki/UnicodeInHaskellSource 14:24:15 Title: "UnicodeInHaskellSource - Haskell Prime - Trac" 14:25:43 --- quit: Muad|Samurai (Read error: 110 (Connection timed out)) 14:26:44 thanks, I'll take a look of it right away! 14:27:41 --- join: Nomius (n=Nomius@host12.201-253-51.telecom.net.ar) joined #haskell 14:29:42 --- quit: cptchaos ("Download Gaim: http://gaim.sourceforge.net/") 14:36:13 uhh, page says there should be a support but somehow things don't work (for the utf8-support). I have a character 0xf7 14:36:26 which is a divison symbol. 14:36:27 maybe you need the unstable GHC? 14:36:39 Terminal shows it correctly, vim shows it correctly 14:37:39 unstable GHC? Hmm, do you know if it is hard to obtain and take into use (I have an Ubuntu 6.06)? 14:38:27 About that character, I was able to copy it to the ghci window, where it is shown correcly, but 14:38:28 --- quit: zarvok ("BitchX-1.1-final -- just do it.") 14:38:41 :1:19: lexical error in string/character literal 14:41:30 --- join: setti (n=sock@68-79-112.adsl.terra.cl) joined #haskell 14:41:50 --- part: setti left #haskell 14:42:42 bringert: no, I hadn't. I'll take a look. 14:43:03 --- quit: kowey ("Get MacIrssi - http://www.g1m0.se/macirssi/") 14:43:14 proto: are you trying to use unicode operators? 14:43:29 poro: that a ghc 6.5 thing, download the head or hit the darcs repository for it 14:43:37 6.4.x don't support it yet 14:44:08 was fiddling with it myself a few hours ago =) 14:44:40 ok, :) 14:44:59 I'll try to obtain more recent version of ghc then. 14:45:14 Do you have any idea, when 6.6 is about to come out? 14:45:18 poro: though, be warned, stability issues, not for production use, etc. 14:45:20 no idea. 14:45:25 ok 14:45:51 yep, cannot use haskell for production code even though I 14:45:56 'd like to... 14:46:02 heh 14:46:15 i'm trying to use haskell for some production code right