From jsilva at dsic.upv.es Thu Feb 1 11:27:04 2007 From: jsilva at dsic.upv.es (Josep Francesc Silva Galiana) Date: Thu Feb 1 11:22:00 2007 Subject: [Haskell] ANNOUNCE: Buggy nofib References: <015501c74564$ae643f40$84b82a9e@dsic.upv.es> Message-ID: <000f01c7461d$cec71d20$84b82a9e@dsic.upv.es> Hi, It was not possible to access the URLs from outside our department (due to problems with the network configuration). I think that it is now fixed. If you find problems to get access, please, let me know. Best regards, -. Josep Silva .- ----- Original Message ----- From: "Josep Francesc Silva Galiana" To: Sent: Wednesday, January 31, 2007 7:21 PM Subject: [Haskell] ANNOUNCE: Buggy nofib > Hi, > > we have developed a 'buggy' version of the nofib collection of Haskell > programs. All programs contain one of these bugs: > - a bug that produces an incorrect result > - a bug that produces non-termination > - a bug that produces an exception (e.g., div by zero) > > Our buggy nofib suite can be used to test debugging tools. It is publicly > available as a DARCS repo at > http://einstein.dsic.upv.es/darcs/nofib > > There is also a web interface with basic search facilities at > http://einstein.dsic.upv.es/nofib > > Any suggestion or comment is welcome! > > Best regards, > -. Josep Silva .- > DSIC - Technical University of Valencia > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell From alistair at abayley.org Fri Feb 2 06:28:34 2007 From: alistair at abayley.org (Alistair Bayley) Date: Fri Feb 2 06:23:25 2007 Subject: [Haskell] ANN: Takusen 0.6 Message-ID: <79d7c4980702020328l1c415dfeo8cb98dcfc9167231@mail.gmail.com> We are pleased to announce a new release of Takusen. There are a large number of changes and bug-fixes: - Oracle support for processing cursors returned from procedure calls - withContinuedSession supports connection reuse (e.g. for persistent connections and connection pooling) - new README file with useful information about getting started with Takusen - new UTF8 en/de-coder (the old one was buggy) - PostgreSQL support for CalendarTime - improved Cabal Setup.hs script, which does a better job of modifying the installation to reflect installed DBMS's. This gives good ghci support (PostgreSQL users on Windows have a small extra step) - prepared statement API requires that users distinguish between queries and DML Our long-term plans are the same as ever: - large objects - ODBC and MS Sql Server backends Release: http://darcs.haskell.org/takusen/takusen-0.6.tar.gz Source: darcs get --partial http://darcs.haskell.org/takusen Oleg and Alistair From jsilva at dsic.upv.es Fri Feb 2 06:34:39 2007 From: jsilva at dsic.upv.es (Josep Francesc Silva Galiana) Date: Fri Feb 2 06:29:34 2007 Subject: [Haskell] ANNOUNCE: Buggy nofib References: <015501c74564$ae643f40$84b82a9e@dsic.upv.es> <000f01c7461d$cec71d20$84b82a9e@dsic.upv.es> Message-ID: <009201c746be$1fbb7d20$84b82a9e@dsic.upv.es> Hi! Some people asked to change the name of the repository in order to avoid name clashes. The new repository is named "nofib-buggy", and its URL is: http://einstein.dsic.upv.es/darcs/nofib-buggy/ Best regards, -. Josep Silva .- ----- Original Message ----- From: "Josep Francesc Silva Galiana" To: Sent: Thursday, February 01, 2007 5:27 PM Subject: Re: [Haskell] ANNOUNCE: Buggy nofib > Hi, > It was not possible to access the URLs from outside our department > (due to problems with the network configuration). > I think that it is now fixed. If you find problems to get access, please, > let me know. > > Best regards, > -. Josep Silva .- > > > ----- Original Message ----- > From: "Josep Francesc Silva Galiana" > To: > Sent: Wednesday, January 31, 2007 7:21 PM > Subject: [Haskell] ANNOUNCE: Buggy nofib > > >> Hi, >> >> we have developed a 'buggy' version of the nofib collection of Haskell >> programs. All programs contain one of these bugs: >> - a bug that produces an incorrect result >> - a bug that produces non-termination >> - a bug that produces an exception (e.g., div by zero) >> >> Our buggy nofib suite can be used to test debugging tools. It is publicly >> available as a DARCS repo at >> http://einstein.dsic.upv.es/darcs/nofib >> >> There is also a web interface with basic search facilities at >> http://einstein.dsic.upv.es/nofib >> >> Any suggestion or comment is welcome! >> >> Best regards, >> -. Josep Silva .- >> DSIC - Technical University of Valencia >> _______________________________________________ >> Haskell mailing list >> Haskell@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell > > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell From si at fh-wedel.de Fri Feb 2 10:18:23 2007 From: si at fh-wedel.de (Uwe Schmidt) Date: Fri Feb 2 10:13:42 2007 Subject: [Haskell] ANNOUNCE: Haskell XML Toolbox Version 7.1 Message-ID: <200702021618.25434.si@fh-wedel.de> Haskell XML Toolbox 7.1 I would like to announce a new version of the Haskell XML Toolbox. To be honest, there is not very much new. The main change is the step from cvs to darcs. The documentation has source links into the darcs repository. the darcs repo is at http://darcs.fh-wedel.de/hxt HXT 7.1 works with ghc-6.4 and ghc-6.6 A tutorial is availiable in the Haskell wiki: http://www.haskell.org/haskellwiki/HXT More information and download: http://www.fh-wedel.de/~si/HXmlToolbox/index.html Please email comments, bugs, etc. to hxmltoolbox@fh-wedel.de Uwe -- University of Applied Sciences, Wedel, Germany http://www.fh-wedel.de/~si/index.html From hoelz at wisc.edu Sun Feb 4 17:00:44 2007 From: hoelz at wisc.edu (Rob Hoelz) Date: Sun Feb 4 16:55:43 2007 Subject: [Haskell] Haskell Xlib bindings Message-ID: <20070204160044.7c87f8d8@localhost.localdomain> Hello everyone, This question probably belongs in GUI, but I tried posting there a week ago and have yet to get a response. My question is this: Why do the Haskell Xlib bindings have no way to extract the property event from an event pointer? For example, the following functions are available: get_KeyEvent, get_ButtonEvent, get_MotionEvent, etc. but there's no get_PropertyEvent. Why was this left out? It seems pretty critical to the functionality of an Xlib program to someone who's been programming in C with Xlib for quite some time. Thanks, Robert Hoelz From duncan.coutts at worc.ox.ac.uk Sun Feb 4 18:15:57 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Feb 4 18:10:30 2007 Subject: [Haskell] Haskell Xlib bindings In-Reply-To: <20070204160044.7c87f8d8@localhost.localdomain> References: <20070204160044.7c87f8d8@localhost.localdomain> Message-ID: <1170630957.10634.13.camel@localhost> On Sun, 2007-02-04 at 16:00 -0600, Rob Hoelz wrote: > Hello everyone, > > This question probably belongs in GUI, but I tried posting there a week > ago and have yet to get a response. > > My question is this: Why do the Haskell Xlib bindings have no way to > extract the property event from an event pointer? > > For example, the following functions are available: > > get_KeyEvent, get_ButtonEvent, get_MotionEvent, etc. > > but there's no get_PropertyEvent. > > Why was this left out? It seems pretty critical to the functionality > of an Xlib program to someone who's been programming in C with Xlib for > quite some time. I think the sad fact is that nobody seriously uses the Xlib bindings. If you want to help improve them, I'm sure that'd be most welcome. Perhaps these days binding xcb might be the way to go for low level X11 stuff. Duncan From twanvl at gmail.com Sun Feb 4 18:46:35 2007 From: twanvl at gmail.com (Twan van Laarhoven) Date: Sun Feb 4 18:41:10 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString Message-ID: <45C6705B.1010301@gmail.com> Hello all, I would like to announce my attempt at making a Unicode version of Data.ByteString. The library is named Data.CompactString to avoid conflict with other (Fast)PackedString libraries. The library uses a variable length encoding (1 to 3 bytes) of Chars into Word8s, which are then stored in a ByteString. The structure is very much based on Data.ByteString, most of the implementation is copied from there. Hopefully this means that fusion rules could be copied as well. This is kind of a pre-release, many functions are still missing, and I have not benchmarked yet. I am releasing this in the hopes of getting some feedback on the general idea. Homepage: http://twan.home.fmf.nl/compact-string/ Haddock: http://twan.home.fmf.nl/compact-string/doc/html/ Source: darcs get http://twan.home.fmf.nl/repos/compact-string Twan van Laarhoven From oleg at pobox.com Sun Feb 4 23:31:55 2007 From: oleg at pobox.com (oleg@pobox.com) Date: Sun Feb 4 23:28:07 2007 Subject: [Haskell] HSXML version 1.13. Overloading polyvariadic functions Message-ID: <20070205043155.BA6F7AB40@Adric.metnet.fnmoc.navy.mil> This message announces the version 1.13 of HSXML. HSXML is a library for writing and transforming typed semi-structured data in Haskell -- in S-expression syntax, with the extensible set of `tags', and statically enforced content model restrictions. A particular application is writing web pages in Haskell. We obtain HTML, XHTML or other output formats by running the Haskell web page in an appropriate rendering monad. The benefit of representing XML-like documents as a typed data structure/Haskell code is static rejection of bad documents -- not only those with undeclared tags but also those where elements appear in wrong contexts. The web page http://pobox.com/~oleg/ftp/Scheme/xml.html#typed-SXML gives further motivation and description. It points to an example of authoring web pages in HSXML and a complex example of context-sensitive HSXLT transformations: producing structurally distinct HTML and XML/RSS from the same master file. The complete source code with several examples is available at http://pobox.com/~oleg/ftp/Haskell/HSXML.tar.gz The new version of HSXML contains more examples, many of which have been very kindly suggested by shelarcy. One example in particular, quote.hs, demonstrates overloading of a polyvariadic function. That may seem impossible: a polyvariadic function typically has the type forall t. C t => t. How overload on t? How to overload on arguments or the result of the function if we don't know even the number of arguments let alone their types. It's all in the future, when the function is applied. As it turns out, if we make preparations in the present, we can overload the future. From haskell at list.mightyreason.com Mon Feb 5 05:49:31 2007 From: haskell at list.mightyreason.com (Chris Kuklewicz) Date: Mon Feb 5 05:44:11 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <45C6705B.1010301@gmail.com> References: <45C6705B.1010301@gmail.com> Message-ID: <45C70BBB.5060003@list.mightyreason.com> Twan van Laarhoven wrote: > Hello all, > > I would like to announce my attempt at making a Unicode version of > Data.ByteString. The library is named Data.CompactString to avoid > conflict with other (Fast)PackedString libraries. > > The library uses a variable length encoding (1 to 3 bytes) of Chars into > Word8s, which are then stored in a ByteString. Can I be among the first to ask that any Unicode variant of ByteString use a recognized encoding? You have invented a new encoding: > -- Reading/writing chars > -- > > -- Uses a custom encoding which looks like UTF8, but is slightly more efficient. > > -- It requires at most 3 byes, as opposed to 4 for UTF8. > > -- > > -- Encoding looks like > > -- 0zzzzzzz -> 0zzzzzzz > > -- 00yyyyyy yzzzzzzz -> 1xxxxxxx 1yyyyyyy > > -- 000xxxxx xxyyyyyy yzzzzzzz -> 1xxxxxxx 0yyyyyyy 1zzzzzzz > -- > -- The reasoning behind the tag bits is that this allows the char to be read both forwards > -- and backwards. > > -- | Write a character and return the size needed > pokeCharFun :: Char -> (Int, Ptr Word8 -> IO ()) > pokeCharFun c = case ord c of > x | x < 0x80 -> (1, \p -> poke p $ fromIntegral x ) > | x < 0x4000 -> (2, \p -> do poke p $ fromIntegral (x `shiftR` 7) .|. 0x80 > pokeByteOff p 1 $ fromIntegral x .|. 0x80 ) > | otherwise -> (3, \p -> do poke p $ fromIntegral (x `shiftR` 14) .|. 0x80 > pokeByteOff p 1 $ fromIntegral (x `shiftR` 7) .&. 0x7f > pokeByteOff p 2 $ fromIntegral x .|. 0x80 ) > {-# INLINE pokeCharFun #-} > > -- | Write a character and return the size used > pokeChar :: Ptr Word8 -> Char -> IO Int > pokeChar p c = case pokeCharFun c of (l,f) -> f p >> return l > {-# INLINE pokeChar #-} > > -- | Write a character and return the size used > pokeCharRev :: Ptr Word8 -> Char -> IO Int > pokeCharRev p c = case pokeCharFun c of (l,f) -> f (p `plusPtr` (1-l)) >> return l > {-# INLINE pokeCharRev #-} In reading all the poke/peek function I did not see anything that your tag bits accomplish that the tag bits in utf-8 do not, except that you want to write only a single routine for the poke/peek forwards and backwards operations instead of two routines. It is definitely more compact in the worst case, and more "Once And Only Once", but at a very high cost of incompatibility. One of the biggest wins with with a Unicode ByteString will be the ability to transfer the buffer directly to and from the disk and network. Your code will always need the data to be rewritten both incoming and outgoing. The most ideal case would be the ability to load different encodings via import statements while using the same API. From twanvl at gmail.com Mon Feb 5 07:14:26 2007 From: twanvl at gmail.com (Twan van Laarhoven) Date: Mon Feb 5 07:08:58 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <45C70BBB.5060003@list.mightyreason.com> References: <45C6705B.1010301@gmail.com> <45C70BBB.5060003@list.mightyreason.com> Message-ID: <45C71FA2.5090107@gmail.com> Chris Kuklewicz wrote: > > Can I be among the first to ask that any Unicode variant of ByteString use a > recognized encoding? > > > > In reading all the poke/peek function I did not see anything that your tag bits > accomplish that the tag bits in utf-8 do not, except that you want to write only > a single routine for the poke/peek forwards and backwards operations instead of > two routines. It is definitely more compact in the worst case, and more "Once > And Only Once", but at a very high cost of incompatibility. The reason for inventing my own encoding is that it is easier to use and takes less space than UTF-8. The only advantage UTF-8 has is that it can be read and written directly. I guess this is a trade off, faster manipulation and smaller storage compared to simpler and faster io. I have not benchmarked it either way, so it is just guesswork for now. Fortunately the entire library can be easily converted to use a different encoding by just changing the peekChar/pokeChar functions. > One of the biggest wins with with a Unicode ByteString will be the ability to > transfer the buffer directly to and from the disk and network. Your code will > always need the data to be rewritten both incoming and outgoing. > > The most ideal case would be the ability to load different encodings via import > statements while using the same API. I was hoping that there would be only a single string type, with different encodings handled by functions: > encode :: CompactString -> ByteString > decode :: ByteString -> CompactString This is important if it is not know beforehand how a file is encoded. For example on windows Unicode files are either UTF-8 or UTF-16, identified by a byte order mark. Twan From shelarcy at gmail.com Mon Feb 5 09:38:50 2007 From: shelarcy at gmail.com (shelarcy) Date: Mon Feb 5 09:33:58 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <45C6705B.1010301@gmail.com> References: <45C6705B.1010301@gmail.com> Message-ID: Hello Twan, On Mon, 05 Feb 2007 08:46:35 +0900, Twan van Laarhoven wrote: > I would like to announce my attempt at making a Unicode version of > Data.ByteString. The library is named Data.CompactString to avoid > conflict with other (Fast)PackedString libraries. How about add abstract layer? Spencer Janssen tried to provied abstract layer for Unicode ByteString, last year's summer of code project. It has no Unicode support. But it supplied a good layer, Stringable class. http://code.google.com/soc/haskell/appinfo.html?csaid=B934AEBE95120AB2 http://darcs.haskell.org/SoC/fps-soc/ http://darcs.haskell.org/SoC/fps-soc-aug21/ > The library uses a variable length encoding (1 to 3 bytes) of Chars into > Word8s, which are then stored in a ByteString. The structure is very > much based on Data.ByteString, most of the implementation is copied from > there. Hopefully this means that fusion rules could be copied as well. UTF-8 also uses 4 to 6 byte encodings now. CJK Unified Ideographs Extension B, Tai Xuan Jing Symbol and Music Symbol, etc ... use 4 byte encoding. Many Hasekll UTF-8 libraries doesn't support over 3 byte encodings. But Takusen's implementation support it correctly. http://darcs.haskell.org/takusen/Foreign/C/UTF8.hs http://www.haskell.org/pipermail/libraries/2007-February/006841.html How about support 4 to 6 byte encodings? Best Regards, -- shelarcy http://page.freett.com/shelarcy/ From haskell at list.mightyreason.com Mon Feb 5 10:25:45 2007 From: haskell at list.mightyreason.com (Chris Kuklewicz) Date: Mon Feb 5 10:20:30 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: References: <45C6705B.1010301@gmail.com> Message-ID: <45C74C79.1090806@list.mightyreason.com> shelarcy wrote: > Hello Twan, > > On Mon, 05 Feb 2007 08:46:35 +0900, Twan van Laarhoven wrote: >> I would like to announce my attempt at making a Unicode version of >> Data.ByteString. The library is named Data.CompactString to avoid >> conflict with other (Fast)PackedString libraries. > > How about add abstract layer? > > Spencer Janssen tried to provied abstract layer for Unicode ByteString, > last year's summer of code project. > It has no Unicode support. But it supplied a good layer, Stringable class. > > http://code.google.com/soc/haskell/appinfo.html?csaid=B934AEBE95120AB2 > http://darcs.haskell.org/SoC/fps-soc/ > http://darcs.haskell.org/SoC/fps-soc-aug21/ > > >> The library uses a variable length encoding (1 to 3 bytes) of Chars into >> Word8s, which are then stored in a ByteString. The structure is very >> much based on Data.ByteString, most of the implementation is copied from >> there. Hopefully this means that fusion rules could be copied as well. > > UTF-8 also uses 4 to 6 byte encodings now. > CJK Unified Ideographs Extension B, Tai Xuan Jing Symbol and Music Symbol, > etc ... use 4 byte encoding. Looking at several sources, it seems you are incorrect. Haskell Char go up to Unicode 1114111 (decimal) or 0x10ffff Hexidecimal). These are encoded by UTF-8 in 1,2,3,or 4 bytes. CJK Unified Ideographs Extension B starts at 131072 or 0x20000 Tai Xuan Jing Symbols start at 119552 or 0x1d300 These are all within the official utf-8 encoding scheme. > > Many Hasekll UTF-8 libraries doesn't support over 3 byte encodings. UTF-8 uses 1,2,3, or 4 bytes. Anything that does not support 4 bytes does not support UTF-8 > But Takusen's implementation support it correctly. The Takusen does have unreachable dead code to serialize Char as (ord c :: Int) up to 31 bits into as many as 6 bytes. But it does decode up to 6 bytes to 31 bits and try to "chr" this from Int to Char. Decoding that many bits is not consistent with the UTF-8 standard. > > http://darcs.haskell.org/takusen/Foreign/C/UTF8.hs > http://www.haskell.org/pipermail/libraries/2007-February/006841.html > > How about support 4 to 6 byte encodings? UTF-8 is a 4 byte encoding. There is no valid UTF-8 5 or 6 byte encoding. > > > Best Regards, > From alistair at abayley.org Mon Feb 5 10:56:25 2007 From: alistair at abayley.org (Alistair Bayley) Date: Mon Feb 5 10:51:05 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <45C74C79.1090806@list.mightyreason.com> References: <45C6705B.1010301@gmail.com> <45C74C79.1090806@list.mightyreason.com> Message-ID: <79d7c4980702050756l71471220ucf25347cbe4c0191@mail.gmail.com> On 05/02/07, Chris Kuklewicz wrote: > shelarcy wrote: > > Many Hasekll UTF-8 libraries doesn't support over 3 byte encodings. > > UTF-8 uses 1,2,3, or 4 bytes. Anything that does not support 4 bytes does not > support UTF-8 Well, some of them are probably a bit dated; they likely supported an older version of the standard. > > But Takusen's implementation support it correctly. > > The Takusen does have unreachable dead code to serialize Char as (ord c :: Int) > up to 31 bits into as many as 6 bytes. But it does decode up to 6 bytes to 31 > bits and try to "chr" this from Int to Char. Decoding that many bits is not > consistent with the UTF-8 standard. > UTF-8 is a 4 byte encoding. There is no valid UTF-8 5 or 6 byte encoding. Chris is right here, in that Takusen's decoder is incorrect w.r.t. the standard, in allowing up to 6 bytes to encode a single char. If it was correct, it would reject 5 and 6 byte sequences. I copied the extended conversion from HXT's code, which was the most correct UTF8 library I had seen so far (it just didn't marshal directly from a CString, which was what I was after). Turns out darcs has the most accurate UTF8 en + de-coders: http://abridgegame.org/cgi-bin/darcs.cgi/darcs/UTF8.lhs?c=annotate There's nothing stopping the Unicode consortium from expanding the range of codepoints, is there? Or have they said that'll never happen? Alistair From golubovsky at gmail.com Mon Feb 5 12:00:31 2007 From: golubovsky at gmail.com (Dimitry Golubovsky) Date: Mon Feb 5 11:55:12 2007 Subject: [Haskell] Haskell Xlib bindings Message-ID: Hi, This message does not answer the original question, but may be useful if anyone really wants to work on the X protocol interface to Haskell. Just adding from my past experience. I had a (experimental, unfinished, and most likely it never will be finished) project to bind directly to the X11 protocol rather than to Xlib, and thus to have full access to all information exchanged between the client and server sides (the original question was about Xlib hiding some info). The protocol transport layer binding was done using FFIPKG, and the working directory is here: http://www.golubovsky.org/repos/hsxwm/ All those modules with cryptic names are results of hsffig parsing C data structures' definitions from X.h and Xproto.h Some example usage is in the HSX11 subdirectory. Hskell files in the main directory were my attempts to model the evilwm window manager as an example, but because of lack of time I never got any far on that project. In HSX11 there is a definition of the Transceivable class which does binary serialization/deserialization of protocol packets, and also a module XAuthority which implements the magic cookie protocol. Also some generic code for few X11 requests and responses. Finally, I was able to display a window with some cyrillic characters in it (to show that Unicode works). The largest problem was to obtain automatic serialization code for all those packet structures which might be most likely done with Template Haskell, but some functionality was missing in it back then. -- Dimitry Golubovsky Anywhere on the Web From Rene_de_Visser at hotmail.com Mon Feb 5 14:34:01 2007 From: Rene_de_Visser at hotmail.com (Rene de Visser) Date: Mon Feb 5 14:29:07 2007 Subject: [Haskell] Dynamic database updated by list using existential types Message-ID: The following code took me several hours to work out. I post it here, so perhaps other can avoid the difficulties of working out how to use existential types. Improvements welcome. If anyone thinks it is worth it I could add it to the wiki under existential types (I didn't find the examples there very helpful). Hopefully my newreader won't destroy the layout. Rene. {-# OPTIONS -fglasgow-exts #-} module Record where -- Demo of an extensible updatable database using Data.Dynamic and Data.Map -- which can be updated by a list of updates which are implemented -- using existential types. import Control.Concurrent.MVar import qualified Data.Map as M import Data.Dynamic type Tables = M.Map Int Dynamic -- the dynamic database -- look up a table in the database based on it's type class Typeable a => GetType a where getValue :: Tables -> MVar a getValue tables = case M.lookup index tables of Just d -> case fromDynamic d of Just e -> e _ -> error $ "Table with index " ++ show index ++ " not in database." where index = tabIndex (undefined::a) tabIndex :: a -> Int -- Manually create indexes for each table. This could be probably done automatically -- using Oleg's type to integer code. instance GetType IntColl where tabIndex _ = 1 instance GetType CatString where tabIndex _ = 2 -- Define the update function for the table class (GetType m) => Table m where apply :: (m ->m) -> Tables -> IO () apply f tables = modifyMVar_ table (\v -> return $! f v) where table :: MVar m table = getValue tables -- Existential type to allow updates to various tables data SRec = forall m. Table m => SRec (m -> m) update_db tables (SRec f) = apply f tables -- helper function -- Define how the update is done to each table class Mod_def r m | r -> m where apply_record :: r -> m -> m -- Define a type for each table data IntColl = IntColl Int deriving (Typeable, Show) data CatString = CatString String deriving (Typeable, Show) instance Mod_def Int IntColl where apply_record i (IntColl j) = IntColl (i + j) instance Mod_def String CatString where apply_record i (CatString j) = CatString (i ++ j) -- Register the tables instance Table IntColl instance Table CatString -- Create an update record updater :: forall r m. (Table m, Mod_def r m) => r -> SRec updater rec = SRec ((\db -> apply_record rec db) :: (m -> m)) -- Some simple tests to get the typing right newDB :: (GetType a) => a -> IO Tables newDB x = do var <- newMVar x return $! M.singleton (tabIndex x) $ toDyn var test2 :: SRec -> IO () test2 f = newDB (IntColl 3) >>= (\ db -> update_db db f) test3 = test2 (updater (1::Int)) newTable :: (Typeable (MVar a), GetType a) => a -> IO (Int, Dynamic) newTable x = do mv <- newMVar x return (tabIndex x, toDyn mv) test4 = do initial_db <- sequence [newTable $ IntColl 5, newTable $ CatString " again"] let db = M.fromList initial_db mapM (update_db db) [updater (1::Int), updater "hello"] content <- readMVar (getValue db :: MVar IntColl) print content From zednenem at psualum.com Mon Feb 5 23:05:39 2007 From: zednenem at psualum.com (David Menendez) Date: Mon Feb 5 23:00:14 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <79d7c4980702050756l71471220ucf25347cbe4c0191@mail.gmail.com> Message-ID: Alistair Bayley writes: > On 05/02/07, Chris Kuklewicz wrote: > > UTF-8 is a 4 byte encoding. There is no valid UTF-8 5 or 6 byte > > encoding. > > Chris is right here, in that Takusen's decoder is incorrect w.r.t. the > standard, in allowing up to 6 bytes to encode a single char. > There's nothing stopping the Unicode consortium from expanding the > range of codepoints, is there? Or have they said that'll never happen? I believe they have. In particular, UTF-16 only supports code points up to 10FFFF. From : > the UCS stops at 10FFFF and ISO/IEC 10646 has stated that all future > assignments of characters will also take place in that range [...] > ISO 10646 was limited to contain as many characters as could be > encoded by UTF-16 and no more, that is, a little over a million > characters instead of over 2,000 million -- David Menendez | "In this house, we obey the laws | of thermodynamics!" From shelarcy at gmail.com Tue Feb 6 01:16:17 2007 From: shelarcy at gmail.com (shelarcy) Date: Tue Feb 6 01:11:23 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <45C74C79.1090806@list.mightyreason.com> References: <45C6705B.1010301@gmail.com> <45C74C79.1090806@list.mightyreason.com> Message-ID: On Tue, 06 Feb 2007 00:25:45 +0900, Chris Kuklewicz wrote: >> UTF-8 also uses 4 to 6 byte encodings now. >> CJK Unified Ideographs Extension B, Tai Xuan Jing Symbol and Music Symbol, >> etc ... use 4 byte encoding. > > Looking at several sources, it seems you are incorrect. > > Haskell Char go up to Unicode 1114111 (decimal) or 0x10ffff Hexidecimal). > These are encoded by UTF-8 in 1,2,3,or 4 bytes. I see. I'm confused Unicode support with Charset support. I'm sorry about it. UCS-4 can support greater than 1114111 code pages. So if we want to support full UCS-4 range, we must support 5, 6 byte encoding as RFC2279 decribed before. http://www.rfc-editor.org/rfc/rfc2279.txt But ... unfortunately UTF-16 can support only 1114111 code points, and The Unicode Consortium adhere to UTF-16. So 5, 6 byte and over 1114111 code pages' 4 byte encodings are invalid now. http://www.rfc-editor.org/rfc/rfc3629.txt (RFC3629 says "This memo obsoletes and replaces RFC 2279.") And Haskell implementation uses only valid rage. I forgot about that. I'm afraid that its fantasy is broken again, as no surrogate pair UCS-2 cover all language that is trusted before Europe and America people. -- shelarcy http://page.freett.com/shelarcy/ From schneegloeckchen at gmx.li Tue Feb 6 14:30:38 2007 From: schneegloeckchen at gmx.li (mm) Date: Tue Feb 6 14:18:12 2007 Subject: [Haskell] HSXML version 1.13. Overloading polyvariadic functions In-Reply-To: <20070205043155.BA6F7AB40@Adric.metnet.fnmoc.navy.mil> References: <20070205043155.BA6F7AB40@Adric.metnet.fnmoc.navy.mil> Message-ID: <20070206193038.GA6422@manthe.gotdns.org> On Sun, Feb 04, 2007 at 08:31:55PM -0800, oleg@pobox.com wrote: > > The benefit of representing XML-like documents as a typed data > structure/Haskell code is static rejection of bad documents -- not > only those with undeclared tags but also those where elements appear > in wrong contexts. > Seems like http://www.informatik.uni-freiburg.de/~thiemann/haskell/WASH/ has has the same purpose, has it? Cheers, schneegloeckchen From oleg at pobox.com Tue Feb 6 19:18:01 2007 From: oleg at pobox.com (oleg@pobox.com) Date: Tue Feb 6 19:14:03 2007 Subject: [Haskell] HSXML version 1.13. Overloading polyvariadic functions In-Reply-To: <20070206193038.GA6422@manthe.gotdns.org> Message-ID: <20070207001801.0E137AB40@Adric.metnet.fnmoc.navy.mil> schneegloeckchen wrote: > Seems like > http://www.informatik.uni-freiburg.de/~thiemann/haskell/WASH/ > has has the same purpose [as HSXML], has it? _Some_ of the same purpose, yes. But HSXML does follow the S-expression syntax -- something that has not been attained in Haskell. Here's a sample HSXML: [p "Haskell is a general purpose," [[em [[strong "purely"]] "functional"]] "programming language"] one may observe the absence of any commas and other list delimiters. The things in square brackets can't be lists anyway because their `elements' patently have different types. The strings are represented as strings rather than (text "string") etc. The `p' element obviously can have arbitrary number of subelements and strings. On a Scheme system that takes square brackets (which is the R6RS behavior) the above expression can be read with one `read' call -- proving that HSXML is an S-expression. From evilantleredthing at yahoo.ca Wed Feb 7 04:12:38 2007 From: evilantleredthing at yahoo.ca (Chris Moline) Date: Wed Feb 7 04:07:19 2007 Subject: [Haskell] [Proposal] Data type declarations are implicitly moduled Message-ID: <743470.50173.qm@web57214.mail.re3.yahoo.com> Hi, I'm not sure if something like this has been proposed already but I thought I'd bring it up. The idea is to allow multiple data declarations to share constructors by having them be implicitly declared inside a module. So, for example, data Dir = Left | Right deriving Show data Arrived = Arrived | Left deriving Show main = do print Dir.Left print Arrived.Left will work just fine. Nothing is required by this proposal that isn't already done (with the exception of adding syntactic support to the compiler of course). The above can be accomplished today by simply putting Dir and Arrived into their own modules and then importing them. There is a question of do we provide some means of abbreviating these implicit module names. If this is considered desirable, one way of accomplishing this is to add an as-clause to the data declaration syntax, which will function similary to where-clauses and deriving syntax. Ex, data Dir = Left | Right as D deriving Show This will effectively be the same as declaring Dir in its own module and then importing it using as syntax. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From luke.evans at businessobjects.com Wed Feb 7 10:19:19 2007 From: luke.evans at businessobjects.com (Luke Evans) Date: Wed Feb 7 10:13:55 2007 Subject: [Haskell] ANN: Open Quark Framework for Java released as Open Source Message-ID: Further to the seeding of the binary framework and SDK as announced on this list last year, Business Objects is pleased to announce that the Open Quark Framework for Java has now been released as open source under a BSD-style license. The Open Quark Framework for Java includes a language, CAL, similar in many respects to Haskell, which is compiled to efficient byte code on the Java platform. The purpose of Open Quark began, and remains, the ability to conveniently mix logic expressed in a natural functional style with 'regular' Java code. Business Objects' interest in the functional paradigm is that much of the logic to model complex data semantics and to express data transformation is elegantly and reusably represented as pure functions. This contrasts with the corpus of application logic that represents workflow, UI, communications and storage, which is predominantly coded directly in OO languages such as Java but with which the data logic must interoperate. Despite the original motivations for the Quark Framework, CAL is a completely general purpose non-strict functional language and suitable for a broad range of applications. We have made available a suite of documentation, included in the software packages and separately downloadable. These documents should inform those with both a casual interest in the project (and its similarities/differences to Haskell) as well as those who wish to explore the language, SDK and tools in more detail. Open Quark can be downloaded, with or without sources from: http://labs.businessobjects.com/cal Unlike the previous 'seeding' regime, no registration is required to obtain Open Quark. Business Objects remains very active on the project and intends to set up the necessary mechanisms to allow the community to contribute easily to the project. While these arrangements will take a little longer, we are already very happy to receive any/all comments, suggestions and contributions. A discussion forum is already available for such activity (see the main web page). A major priority for the immediate future is to deepen the Eclipse integration in order to improve the convenience for developers using CAL. Luke Evans Chief Scientist, VP Research, Business Objects From gmh at Cs.Nott.AC.UK Thu Feb 8 12:49:33 2007 From: gmh at Cs.Nott.AC.UK (Graham Hutton) Date: Thu Feb 8 12:52:16 2007 Subject: [Haskell] ANNOUNCE: New Book - Programming in Haskell Message-ID: <2747.1170956973@cs.nott.ac.uk> +--------------------------------------------------------------------+ *** NEW BOOK ANNOUNCEMENT *** Programming in Haskell Graham Hutton, University of Nottingham Cambridge University Press, January 2007 Paperback: ISBN-13: 9780521692694 | ISBN-10: 0521692695 Hardback: ISBN-13: 9780521871723 | ISBN-10: 0521871727 DESCRIPTION Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduction is ideal for beginners: it requires no previous programming experience and all concepts are explained from first principles via carefully chosen examples. Each chapter includes exercises that range from the straightforward to extended projects, plus suggestions for further reading on more advanced topics. The presentation is clear and simple, and benefits from having been refined and class-tested over several years. Features include: freely accessible powerpoint slides for each chapter; solutions to exercises, and examination questions (with solutions) available to instructors; downloadable code that's fully compliant with the latest Haskell release. CONTENTS Preface 1. Introduction 2. First steps 3. Types and classes 4. Defining functions 5. List comprehensions 6. Recursive functions 7. Higher-order functions 8. Functional parsers 9. Interactive programs 10. Declaring types and classes 11. The countdown problem 12. Lazy evaluation 13. Reasoning about programs Appendix A. Standard prelude Appendix B. Symbol table Bibliography Index FURTHER DETAILS: http://www.cs.nott.ac.uk/~gmh/book.html +---------------------------------------------------------------------+ | Dr Graham Hutton Email : gmh@cs.nott.ac.uk | | School of Computer Science and IT | | University of Nottingham Web : www.cs.nott.ac.uk/~gmh | | Jubilee Campus, Wollaton Road | | Nottingham NG8 1BB, UK Phone : +44 (0)115 951 4220 | +---------------------------------------------------------------------+ This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From john at repetae.net Thu Feb 8 20:01:30 2007 From: john at repetae.net (John Meacham) Date: Thu Feb 8 19:56:01 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: References: <45C6705B.1010301@gmail.com> <45C74C79.1090806@list.mightyreason.com> Message-ID: <20070209010130.GG24298@momenergy.repetae.net> On Tue, Feb 06, 2007 at 03:16:17PM +0900, shelarcy wrote: > I'm afraid that its fantasy is broken again, as no surrogate > pair UCS-2 cover all language that is trusted before Europe > and America people. UCS-2 is a disaster in every way. someone had to say it. :) everything should be ascii, utf8 or ucs-4 or migrating to it. John -- John Meacham - ?repetae.net?john? From john at repetae.net Thu Feb 8 20:11:45 2007 From: john at repetae.net (John Meacham) Date: Thu Feb 8 20:06:13 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <45C71FA2.5090107@gmail.com> References: <45C6705B.1010301@gmail.com> <45C70BBB.5060003@list.mightyreason.com> <45C71FA2.5090107@gmail.com> Message-ID: <20070209011145.GH24298@momenergy.repetae.net> On Mon, Feb 05, 2007 at 01:14:26PM +0100, Twan van Laarhoven wrote: > The reason for inventing my own encoding is that it is easier to use and > takes less space than UTF-8. The only advantage UTF-8 has is that it can > be read and written directly. I guess this is a trade off, faster > manipulation and smaller storage compared to simpler and faster io. I > have not benchmarked it either way, so it is just guesswork for now. I would highly highly recommend using utf8. inventing new formats without very clear and pervasive benefits is just not good practice and I wouldn't want to see it in standard libraries. the ability for conversion between utf8 and ascii bytestrings and compactstrings being a nop should not be underestimated. not to mention that utf8 was designed so things like sorting a raw bytestring with utf8 in it produces the exact same result as decoding it, then sorting it. a _very_ large win for the 'Ord' instance for CompactString. and it is not just files, foreign functions in utf8 locales often take or return strings as arguments, being able to just call those directly with the bytestring contents is also a big win. John -- John Meacham - ?repetae.net?john? From twanvl at gmail.com Thu Feb 8 21:56:20 2007 From: twanvl at gmail.com (Twan van Laarhoven) Date: Thu Feb 8 21:50:44 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.2 - now with 100% more UTF-8 In-Reply-To: <20070209011145.GH24298@momenergy.repetae.net> References: <45C6705B.1010301@gmail.com> <45C70BBB.5060003@list.mightyreason.com> <45C71FA2.5090107@gmail.com> <20070209011145.GH24298@momenergy.repetae.net> Message-ID: <45CBE2D4.2040808@gmail.com> John Meacham wrote: > I would highly highly recommend using utf8. inventing new formats > without very clear and pervasive benefits is just not good practice and > I wouldn't want to see it in standard libraries. I still think it should not matter what the library uses *internally*. The only way the user can see the encoding is through unsafeTo/FromByteString functions. However, I have decided to make a UTF-8 version of the library. Fortunately the only things that change are the encoding functions, which means that the library could potentially be used for all sorts of variable length encodings. This new version is available from: http://twan.home.fmf.nl/compact-string/ By the way, many more functions are implemented now, and there are also QuickCheck tests for everything. > not to mention that utf8 was designed so things like sorting a raw > bytestring with utf8 in it produces the exact same result as decoding > it, then sorting it. a _very_ large win for the 'Ord' instance for > CompactString. You are right, using UTF-8 here makes some things a lot easier. It is quite possible that UTF-8 is a net win over my custom encoding in most common use cases. Twan From grobertson at cambridge.org Fri Feb 9 08:34:37 2007 From: grobertson at cambridge.org (Graham Robertson) Date: Fri Feb 9 08:29:09 2007 Subject: [Haskell] ANNOUNCE: New Book - Programming in Haskell In-Reply-To: <2747.1170956973@cs.nott.ac.uk> Message-ID: Just a quick addendum to the earlier announcement, to say that course instructors can request inspection copies for this textbook via: http://www.cambridge.org/uk/9780521692694 for UK and European institutions or http://www.cambridge.org/us/9780521692694 for US institutions If you need more information feel free to contact me using the details below. Best wishes Graham Graham Robertson Senior Marketing Controller, Academic & Professional Books Cambridge University Press Cambridge CB2 8RU T: +44 (0)1223 325 916 F: +44 (0)1223 325 632 e: grobertson"@"cambridge.org To receive email alerts of new Cambridge titles in your field please go to http://www.cambridge.org/alerts Graham Hutton Sent by: haskell-bounces@haskell.org 08/02/2007 17:49 To haskell@haskell.org cc gmh@Cs.Nott.AC.UK Subject [Haskell] ANNOUNCE: New Book - Programming in Haskell +--------------------------------------------------------------------+ *** NEW BOOK ANNOUNCEMENT *** Programming in Haskell Graham Hutton, University of Nottingham Cambridge University Press, January 2007 Paperback: ISBN-13: 9780521692694 | ISBN-10: 0521692695 Hardback: ISBN-13: 9780521871723 | ISBN-10: 0521871727 DESCRIPTION Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduction is ideal for beginners: it requires no previous programming experience and all concepts are explained from first principles via carefully chosen examples. Each chapter includes exercises that range from the straightforward to extended projects, plus suggestions for further reading on more advanced topics. The presentation is clear and simple, and benefits from having been refined and class-tested over several years. Features include: freely accessible powerpoint slides for each chapter; solutions to exercises, and examination questions (with solutions) available to instructors; downloadable code that's fully compliant with the latest Haskell release. CONTENTS Preface 1. Introduction 2. First steps 3. Types and classes 4. Defining functions 5. List comprehensions 6. Recursive functions 7. Higher-order functions 8. Functional parsers 9. Interactive programs 10. Declaring types and classes 11. The countdown problem 12. Lazy evaluation 13. Reasoning about programs Appendix A. Standard prelude Appendix B. Symbol table Bibliography Index FURTHER DETAILS: http://www.cs.nott.ac.uk/~gmh/book.html +---------------------------------------------------------------------+ | Dr Graham Hutton Email : gmh@cs.nott.ac.uk | | School of Computer Science and IT | | University of Nottingham Web : www.cs.nott.ac.uk/~gmh | | Jubilee Campus, Wollaton Road | | Nottingham NG8 1BB, UK Phone : +44 (0)115 951 4220 | +---------------------------------------------------------------------+ This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070209/1ea65094/attachment.htm From duncan.coutts at worc.ox.ac.uk Fri Feb 9 09:02:16 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Feb 9 08:53:33 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <20070209010130.GG24298@momenergy.repetae.net> References: <45C6705B.1010301@gmail.com> <45C74C79.1090806@list.mightyreason.com> <20070209010130.GG24298@momenergy.repetae.net> Message-ID: <1171029736.23819.25.camel@localhost> On Thu, 2007-02-08 at 17:01 -0800, John Meacham wrote: > On Tue, Feb 06, 2007 at 03:16:17PM +0900, shelarcy wrote: > > I'm afraid that its fantasy is broken again, as no surrogate > > pair UCS-2 cover all language that is trusted before Europe > > and America people. > > UCS-2 is a disaster in every way. someone had to say it. :) > > everything should be ascii, utf8 or ucs-4 or migrating to it. Apparently UTF-16 (which is like UCS-2 but covers all code points) is a good internal format. It is more compact than UTF-32 in almost all cases and a less complex encoding than UTF-8. So it's faster than either UTF-32 (because of data-density) or UTF-8 (because of the encoding complexity). The downside compared to UTF-32 is that it is a more complex encoding so the code is harder to write (but apparently it doesn't affect performance much because characters outside the BMP are very rare). The ICU lib uses UTF-16 internally I believe, though I can't at the moment find on their website the bit where they explain why the use UTF-16 rather than -8 or -32. http://icu.sourceforge.net/ Btw, when it comes to all these encoding names, I find it helpful to maintain the fiction that there's no such thing (any more) as UCS-N, there's only UTF-8, 16 and 32. This is also what the Unicode consortium tries to encourage. My view is that we should just provide all three: Data.PackedString.UTF8 Data.PackedString.UTF16 Data.PackedString.UTF32 that all provide the same interface. This wouldn't actually be too much code to write since most of it can re-use the streams code, so the only difference is the single implementation per-encoding of: stream :: PackedString -> Stream Char unstream :: Stream Char -> PackedString and then get fusion for free of course. I have proposed this task as an MSc project in my department. Hopefully we'll get a student to pick this up. Duncan From dgoldsmith at mac.com Fri Feb 9 19:21:07 2007 From: dgoldsmith at mac.com (Deborah Goldsmith) Date: Fri Feb 9 19:15:45 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString In-Reply-To: <1171029736.23819.25.camel@localhost> References: <45C6705B.1010301@gmail.com> <45C74C79.1090806@list.mightyreason.com> <20070209010130.GG24298@momenergy.repetae.net> <1171029736.23819.25.camel@localhost> Message-ID: <6D500F35-ECA5-4129-8B7A-1986A67FF51A@mac.com> On Thu, 2007-02-08 at 17:01 -0800, John Meacham wrote: > UCS-2 is a disaster in every way. someone had to say it. :) UCS-2 has been deprecated for many years. > > everything should be ascii, utf8 or ucs-4 or migrating to it. UCS-4 has also been deprecated for many years. The main forms of Unicode in use are UTF-16, UTF-8, and (less frequently) UTF-32. On Feb 9, 2007, at 6:02 AM, Duncan Coutts wrote: > Apparently UTF-16 (which is like UCS-2 but covers all code points) > is a > good internal format. It is more compact than UTF-32 in almost all > cases > and a less complex encoding than UTF-8. So it's faster than either > UTF-32 (because of data-density) or UTF-8 (because of the encoding > complexity). The downside compared to UTF-32 is that it is a more > complex encoding so the code is harder to write (but apparently it > doesn't affect performance much because characters outside the BMP are > very rare). UTF-16 is never less compact than UTF-32. The worst case of UTF-16 is that it is the same size as UTF-32. This only happens when a string consists entirely of characters from the supplementary planes. > > The ICU lib uses UTF-16 internally I believe, though I can't at the > moment find on their website the bit where they explain why the use > UTF-16 rather than -8 or -32. http://icu.sourceforge.net/userguide/unicodeBasics.html UTF-16 is the native Unicode encoding for ICU, Microsoft Windows, and Mac OS X. > Btw, when it comes to all these encoding names, I find it helpful to > maintain the fiction that there's no such thing (any more) as UCS-N, > there's only UTF-8, 16 and 32. This is also what the Unicode > consortium > tries to encourage. It's not a fiction. :-) UCS-2 and UCS-4 are *deprecated*, by the merger between Unicode and ISO 10646 that limited the code point space to [0..0x10FFFF]. In addition to UTF-8, UTF-16, and UTF-32, there's SCSU, a compressed form used in some applications. See: http://www.unicode.org/reports/tr17/ > My view is that we should just provide all three: > Data.PackedString.UTF8 > Data.PackedString.UTF16 > Data.PackedString.UTF32 > > that all provide the same interface. This wouldn't actually be too > much > code to write since most of it can re-use the streams code, so the > only > difference is the single implementation per-encoding of: > stream :: PackedString -> Stream Char > unstream :: Stream Char -> PackedString > > and then get fusion for free of course. I agree that all three should be supported. UTF-16 is used in Windows and Mac OS X, and UTF-8 is widely used on Unix platforms (and at the BSD level of Mac OS X). UTF-32 matches the Char type in Haskell, and is used for wchar_t on some platforms. SCSU can be handled the same as a non-Unicode encoding (e.g., like GB2312 or Shift JIS). Note that some Unicode algorithms require the ability to back up in a stream of code points, so that may be a consideration in the design (maybe they could be implemented in Haskell in a way that doesn't require that; I'm still learning, so I'm not sure yet). And regular expression processing requires essentially random access (same Haskell-fu considerations apply). > > I have proposed this task as an MSc project in my department. > Hopefully > we'll get a student to pick this up. I hope so! ICU has a BSD/MIT-style license, so feel free to steal whatever is appropriate from there. I would love to see Haskell support Unicode operations like locale-sensitive collation, text boundary analysis, and more on both [Char] and packed strings. Deborah From steve at fenestra.com Fri Feb 9 21:41:19 2007 From: steve at fenestra.com (Steve Schafer) Date: Fri Feb 9 21:35:46 2007 Subject: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at aUni code ByteString In-Reply-To: <6D500F35-ECA5-4129-8B7A-1986A67FF51A@mac.com> References: <45C6705B.1010301@gmail.com><45C74C79.1090806@list.mightyreason.com><20070209010130.GG24298@momenergy.repetae.net><117102973 6.23819.25.camel@localhost> <1171029736.23819.25.camel@localhost> <6D500F35-ECA5-4129-8B7A-1986A67FF51A@mac.com> Message-ID: On Fri, 9 Feb 2007 16:21:07 -0800, you wrote: >Note that some Unicode algorithms require the ability to back up in a >stream of code points, so that may be a consideration in the design >(maybe they could be implemented in Haskell in a way that doesn't >require that; I'm still learning, so I'm not sure yet). And regular >expression processing requires essentially random access (same >Haskell-fu considerations apply). These are important points that need to be emphasized. Those who would devise various "improvements" to UTF-8, etc. often fail to realize how much careful thought went into their design. You can jump into the middle of a UTF-8 string, and you'll need to move fewer than a code point's worth of bytes to resynchronize with the reference frame, for example. UTF-8 is also very robust with respect to data corruption. Steve Schafer Fenestra Technologies Corp. http://www.fenestra.com/ From monnier at iro.umontreal.ca Sat Feb 10 02:27:57 2007 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Sat Feb 10 02:22:44 2007 Subject: [Haskell] Haskell-mode 2.2 Message-ID: I've just released version 2.2 of the Haskell-mode package for Emacs. It has very few visible changes, mostly some commands to query an underlying interactive hugs/ghci in order to get type/info about specific identifiers, courtesy of Matthew Danish. It does have some non-trivial changes in the indentation code and various other minor details. These have seen very little testing until now, so don't be surprised to find regressions: just complain back to me. As always, the place to find this package is: http://www.iro.umontreal.ca/~monnier/elisp/ -- Stefan From robdockins at fastmail.fm Mon Feb 12 23:37:02 2007 From: robdockins at fastmail.fm (Robert Dockins) Date: Sun Feb 11 23:29:20 2007 Subject: [Haskell] Announce: Bytecode Verification for Haskell Message-ID: <200702122337.02412.robdockins@fastmail.fm> Fellow Haskellers, I am very pleased to announce that I recently completed the degree requirements for my master's. As a part of those requirements, I undertook research that may be of interest to those of you subscribed to this list. My research involved designing and implementing a type verification algorithm for Yhc Haskell bytecode. The final report detailing this research may found at the Tufts CS Department technical reports page [1]. The abstract for the report follows this message. In addition to the report, I have made available the source code for my proof-of-concept implementation, which consists of a simple bytecode compiler and verifier. The source code may be found at the project page for this research [2]. If you have questions or comments please either email me directly or take discussion to the haskell-cafe or yhc mailing lists. Thanks, Rob Dockins [1] http://www.cs.tufts.edu/tr/techreps/TR-2007-2 [2] http://www.eecs.tufts.edu/~rdocki01/masters.html Abstract: In this paper we present a method for verifying Yhc bytecode, an intermediate form of Haskell suitable for mobile code applications. We examine the issues involved with verifying Yhc bytecode programs and we present a proof-of-concept bytecode compiler and verifier. Verification is a static analysis which ensures that a bytecode program is type-safe. The ability to check type-safety is important for mobile code situations where untrusted code may be executed. Type-safety subsumes the critical memory-safety property and excludes important classes of exploitable bugs, such as buffer overflows. Haskell's rich type system also allows programmers to build effective, static security policies and enforce them using the type checker. Verification allows us to be confident the constraints of our security policy are enforced. From Oege.de.Moor at comlab.ox.ac.uk Mon Feb 12 11:22:06 2007 From: Oege.de.Moor at comlab.ox.ac.uk (Oege.de.Moor@comlab.ox.ac.uk) Date: Mon Feb 12 11:16:27 2007 Subject: [Haskell] Positions at Oxford: refactoring tools Message-ID: <200702121622.l1CGM6Vv028657@mercury.comlab.ox.ac.uk> A non-text attachment was scrubbed... Name: not available Type: text Size: 4091 bytes Desc: not available Url : http://www.haskell.org/pipermail/haskell/attachments/20070212/356ea77e/attachment.bat From conal at conal.net Mon Feb 12 18:54:36 2007 From: conal at conal.net (Conal Elliott) Date: Mon Feb 12 18:48:54 2007 Subject: [Haskell] class instance lost during re-export & packaging Message-ID: I have a package P that contains a class instance specified in one module P.M and re-exported in packaging module P (one that gathers & re-exports for the whole P package). When I import the package module P in a test module, Under ghc-6.6, my instance is not found. If the test module also says "import P.M()", the instance is found. Oddly, I only have this problem with classes defined in a package other than P. In ghci, after loading the module successfully, if I comment out the "import P.M()" and re-load, the instance is found. Is this behavior known, and perhaps even intended? Is there anything I can do to make sure my instance gets packaged up with module P? Thanks, - Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070212/75752df2/attachment.htm From conal at conal.net Mon Feb 12 21:31:38 2007 From: conal at conal.net (Conal Elliott) Date: Mon Feb 12 21:26:03 2007 Subject: [Haskell] ANNOUNCE: TV-0.2 and GuiTV-0.2 Message-ID: *TV* is a library for composing *tangible values* ("TVs"), i.e., values that carry along external interfaces. In particular, TVs can be composed to create new TVs, *and* they can be directly executed with various kinds of interfaces. Values and interfaces are *combined* for direct use, and *separable* for composition. GuiTV adds graphical user interfaces to the TV (tangible value) framework, using Phooey . The functionality was part of TV up to version 0.1.1. I moved it out to a new package to eliminate the dependency of core TV on Phooey and hence on wxHaskell, as the latter can be difficult to install. See this blog postabout for an example of using TV to neatly separate logic from IO. - Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070212/da85e1d3/attachment.htm From dons at cse.unsw.edu.au Mon Feb 12 21:48:09 2007 From: dons at cse.unsw.edu.au (Donald Bruce Stewart) Date: Mon Feb 12 21:42:32 2007 Subject: [Haskell] ANNOUNCE: urlcheck 0.1, (smp) parallel link checker Message-ID: <20070213024809.GA12320@cse.unsw.EDU.AU> This little tool has been kicking around on my harddrive for a month or two now, so time to release! I'm pleased to announce the first release of urlcheck, an parallel link checker, written in Haskell. Frustrated with the resources and time consumed by 'linkchecker', when preparing the weekly news, I coded up a lightweight, smp-capable replacement in Haskell. urlcheck pings urls found in the input file, checking they aren't 404s. It uses Haskell threads to run queries concurrently, and can transparently utilise multiple cores if you have them. Usage: $ urlcheck urlcheck.html Found 0 broken links. Checked 10 links (10 unique) in 1 file. Search time: 5 secs Get it from Hackage! http://hackage.haskell.org/cgi-bin/hackage-scripts/package/urlcheck-0.1 -- Don From hoelz at wisc.edu Tue Feb 13 01:40:00 2007 From: hoelz at wisc.edu (Rob Hoelz) Date: Tue Feb 13 01:34:29 2007 Subject: [Haskell] The meaning of #{} Message-ID: <20070213004000.1b64c9fb@TheRing> I've been pouring over the Xlib bindings for Haskell, and I've come across the following code: peekXButtonEvent p = do root <- #{peek XButtonEvent,root} p subwindow <- #{peek XButtonEvent,subwindow} p time <- #{peek XButtonEvent,time} p x <- #{peek XButtonEvent,x} p y <- #{peek XButtonEvent,y} p x_root <- #{peek XButtonEvent,x_root} p y_root <- #{peek XButtonEvent,y_root} p state <- #{peek XButtonEvent,state} p button <- #{peek XButtonEvent,button} p same_screen <- #{peek XButtonEvent,same_screen} p return (root, subwindow, time, x, y, x_root, y_root, state, button, same_screen) I can't seem to find a definition or an explanation for #{}. Is this some kind of operator for dealing with monads or something? Thanks, Rob Hoelz From dons at cse.unsw.edu.au Tue Feb 13 01:43:44 2007 From: dons at cse.unsw.edu.au (Donald Bruce Stewart) Date: Tue Feb 13 01:38:06 2007 Subject: [Haskell] The meaning of #{} In-Reply-To: <20070213004000.1b64c9fb@TheRing> References: <20070213004000.1b64c9fb@TheRing> Message-ID: <20070213064344.GC13291@cse.unsw.EDU.AU> hoelz: > I've been pouring over the Xlib bindings for Haskell, and I've come > across the following code: > > peekXButtonEvent p = do > root <- #{peek XButtonEvent,root} p > subwindow <- #{peek XButtonEvent,subwindow} p > time <- #{peek XButtonEvent,time} p > x <- #{peek XButtonEvent,x} p > y <- #{peek XButtonEvent,y} p > x_root <- #{peek XButtonEvent,x_root} p > y_root <- #{peek XButtonEvent,y_root} p > state <- #{peek XButtonEvent,state} p > button <- #{peek XButtonEvent,button} p > same_screen <- #{peek XButtonEvent,same_screen} p > return (root, subwindow, time, x, y, x_root, y_root, > state, button, same_screen) > > I can't seem to find a definition or an explanation for #{}. Is this > some kind of operator for dealing with monads or something? Nope! But nice guess - if in doubt, its probably to do with monads :-) Its actually hsc2hs preprocessor code, http://www.haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html#id3184862 #peek struct_type, field A function that peeks a field of a C struct will be output. It will have the type Storable b => Ptr a -> IO b. The intention is that #peek and #poke can be used for implementing the operations of class Storable for a given C struct (see the Foreign.Storable module in the library documentation). -- Done From gaal at forum2.org Tue Feb 13 01:49:19 2007 From: gaal at forum2.org (Gaal Yahas) Date: Tue Feb 13 01:45:56 2007 Subject: [Haskell] The meaning of #{} In-Reply-To: <20070213004000.1b64c9fb@TheRing> References: <20070213004000.1b64c9fb@TheRing> Message-ID: <20070213064919.GT5800@sike.forum2.org> On Tue, Feb 13, 2007 at 12:40:00AM -0600, Rob Hoelz wrote: > I've been pouring over the Xlib bindings for Haskell, and I've come > across the following code: > > peekXButtonEvent p = do > root <- #{peek XButtonEvent,root} p [...] > I can't seem to find a definition or an explanation for #{}. Is this > some kind of operator for dealing with monads or something? It's a directive for hsc2hs, a preprocessor that helps glue haskell and C: http://www.haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html -- Gaal Yahas http://gaal.livejournal.com/ From hoelz at wisc.edu Tue Feb 13 02:02:14 2007 From: hoelz at wisc.edu (Rob Hoelz) Date: Tue Feb 13 01:56:35 2007 Subject: [Haskell] Checking out the whole source tree Message-ID: <20070213010214.699e5be8@TheRing> I recently checked out the X11 package from darcs.haskell.org, and I'd like to check out more of the source from the darcs repository. I'm still unfamiliar with darcs; how do I check out the whole source tree? Thanks, Rob Hoelz From dons at cse.unsw.edu.au Tue Feb 13 02:09:47 2007 From: dons at cse.unsw.edu.au (Donald Bruce Stewart) Date: Tue Feb 13 02:04:08 2007 Subject: [Haskell] Checking out the whole source tree In-Reply-To: <20070213010214.699e5be8@TheRing> References: <20070213010214.699e5be8@TheRing> Message-ID: <20070213070947.GD13291@cse.unsw.EDU.AU> hoelz: > I recently checked out the X11 package from darcs.haskell.org, and I'd > like to check out more of the source from the darcs repository. I'm > still unfamiliar with darcs; how do I check out the whole source tree? > > Thanks, > Rob Hoelz We're moving from a cathedral to a more distributed distribution model for packages -- there's not really a 'whole source tree' for Haskell anymore. However, for GHC and a base set of libraries, you can get that source directly by following these instructions: http://hackage.haskell.org/trac/ghc/wiki/Building/GettingTheSources Other libraries and tools can be picked up as needed. You'll find links to these things on hackage, http://hackage.haskell.org/packages/archive/pkg-list.html and on haskell.org's libraries page. -- Don From naur at post11.tele.dk Tue Feb 13 02:38:46 2007 From: naur at post11.tele.dk (Thorkil Naur) Date: Tue Feb 13 02:33:44 2007 Subject: [Haskell] Checking out the whole source tree In-Reply-To: <20070213070947.GD13291@cse.unsw.EDU.AU> References: <20070213010214.699e5be8@TheRing> <20070213070947.GD13291@cse.unsw.EDU.AU> Message-ID: <200702130838.48940.naur@post11.tele.dk> Hello, On Tuesday 13 February 2007 08:09, Donald Bruce Stewart wrote: > hoelz: > > I recently checked out the X11 package from darcs.haskell.org, and I'd > > like to check out more of the source from the darcs repository. I'm > > still unfamiliar with darcs; how do I check out the whole source tree? > > > > Thanks, > > Rob Hoelz > ... for GHC and a base set of libraries, you can get > that source directly by following these instructions: > > http://hackage.haskell.org/trac/ghc/wiki/Building/GettingTheSources > > Other libraries and tools can be picked up as needed. You'll find > links to these things on hackage, http://hackage.haskell.org/packages/archive/pkg-list.html > and on haskell.org's libraries page. > > -- Don > ... For Hugs, follow the instructions here: http://hackage.haskell.org/trac/hugs/wiki/GettingTheSource You will need cvs instead of darcs, however. For Yhc, follow: http://haskell.org/haskellwiki/Yhc/Building In each case, various tool are needed in case you wish to build the respective tool, but they are mentioned in the instructions and at least I have managed to fumble my way through. There are additional Haskell implementations mentioned on http://haskell.org/haskellwiki/Implementations Best regards Thorkil From wss at Cs.Nott.AC.UK Tue Feb 13 04:40:52 2007 From: wss at Cs.Nott.AC.UK (Wouter Swierstra) Date: Tue Feb 13 04:36:02 2007 Subject: [Haskell] The Monad.Reader - Call for copy Message-ID: <093D551C-CC0D-4CF9-B91A-0968DF5108C4@cs.nott.ac.uk> Call for Copy The Monad.Reader - Issue 7 I would like to welcome articles for the next issue of The Monad.Reader. * The Monad.Reader * There are a large number of conferences and journals that accept research papers related to Haskell; unfortunately, the platform for non-academic publications is far less developed. This is where The Monad.Reader fits in. I would like to explicitly encourage people to also submit shorter articles. There is no restriction on the the number of pages. I am always happy to accept good articles: it doesn't matter if they're two pages or twenty. * Submission Details * Get in touch with me if you intend to submit something -- the sooner you let me know what you're up to, the better. Please submit articles for the next issue by e-mail (wss at cs.nott.ac.uk) to me before **April 13th, 2007** . Articles should be written according to the guidelines available from http://www.haskell.org/haskellwiki/TheMonadReader Please submit your article in PDF, together with any source files you used. The sources will be released together with the magazine under a BSD license. If you would like to submit an article, but have trouble with LaTeX please let me know and we'll sort something out. Looking forward to your submission, Wouter This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From simonmarhaskell at gmail.com Tue Feb 13 08:05:35 2007 From: simonmarhaskell at gmail.com (Simon Marlow) Date: Tue Feb 13 07:59:51 2007 Subject: [Haskell] class instance lost during re-export & packaging In-Reply-To: References: Message-ID: <45D1B79F.1060105@gmail.com> Conal Elliott wrote: > I have a package P that contains a class instance specified in one > module P.M and re-exported in packaging module P (one that gathers & > re-exports for the whole P package). When I import the package module P > in a test module, Under ghc-6.6, my instance is not found. If the test > module also says "import P.M()", the instance is found. Oddly, I only > have this problem with classes defined in a package other than P. That sounds like a bug. It might be an instance of the last bullet point here: http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs.html#bugs-ghc but I suggest you open a ticket for it and we'll check. > In ghci, after loading the module successfully, if I comment out the > "import P.M()" and re-load, the instance is found. This one is definitely an instance of the known bug above. GHCi just keeps collecting instances from packages and never throws any away. Cheers, Simon From hoelz at wisc.edu Tue Feb 13 15:10:54 2007 From: hoelz at wisc.edu (Rob Hoelz) Date: Tue Feb 13 15:05:44 2007 Subject: [Haskell] Problem compiling happy 1.15 Message-ID: <20070213141054.49e340ca@TheRing> I downloaded the source for happy 1.15, and when I run make, this pops up: /usr/bin/ghc -H16m -O -cpp -fglasgow-exts -O -c LALR.lhs -o LALR.o -ohi LALR.hi LALR.lhs:626:34: Not in scope: `bounds' make[3]: *** [LALR.o] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/rob/downloads/happy-1.15/happy' make: *** [/home/rob/downloads/happy-1.15/happy/src/happy-inplace] Error 2 After erasing hiding (bounds) in these lines: import Data.Array hiding (bounds) import Array hiding (bounds) it does some more work, then this error pops up: /usr/bin/ghc -H16m -O -cpp -fglasgow-exts -O -c ProduceCode.lhs -o ProduceCode.o -ohi ProduceCode.hi ProduceCode.lhs:31:20: Not in scope: `Data.Array.MArray.indices' make[3]: *** [ProduceCode.o] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/rob/downloads/happy-1.15/happy' make: *** [/home/rob/downloads/happy-1.15/happy/src/happy-inplace] Error 2 Is my configuration messed up or something? Thanks, Rob Hoelz From bos at serpentine.com Tue Feb 13 15:16:02 2007 From: bos at serpentine.com (Bryan O'Sullivan) Date: Tue Feb 13 15:10:15 2007 Subject: [Haskell] Problem compiling happy 1.15 In-Reply-To: <20070213141054.49e340ca@TheRing> References: <20070213141054.49e340ca@TheRing> Message-ID: <45D21C82.4030400@serpentine.com> Rob Hoelz wrote: > Is my configuration messed up or something? Looks like you're using ghc 6.6 with an old version of happy. Use happy 1.16 instead. References: Message-ID: If you tried the TiddlyWiki doc(linked in the blog post) in Opera and got an error, please try again. Problem fixed. (Slight difference in regexp handling in Opera vs FF & IE.) - Conal On 2/12/07, Conal Elliott wrote: > > *TV* is a library for composing *tangible > values* ("TVs"), i.e., values that carry along external interfaces. In > particular, TVs can be composed to create new TVs, *and* they can be > directly executed with various kinds of interfaces. Values and interfaces > are *combined* for direct use, and *separable* for composition. > > GuiTV adds graphical user > interfaces to the TV (tangible value) > framework, using Phooey . The > functionality was part of TV up to > version 0.1.1. I moved it out to a new package to eliminate the dependency > of core TV on Phooey and hence on wxHaskell, as the latter can be difficult > to install. > > See this blog postabout for an example of using TV to neatly separate logic from IO. > > - Conal > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070213/854690cd/attachment.htm From humasect at shaw.ca Tue Feb 13 22:14:44 2007 From: humasect at shaw.ca (Lyndon Tremblay) Date: Tue Feb 13 22:08:58 2007 Subject: [Haskell] ANNOUNCE: Haskell Xcode Plugin (version feb0707) Message-ID: <05A324EB-13CD-4483-ADA2-B75745A4FBA2@shaw.ca> Announcement of the first release of a plugin for Xcode enabling syntax highlighting, Xcode projects compiling and linking, and a couple missing features, for Haskell (GHC). http://www.hoovy.org/HaskellXcodePlugin/ Instructions, features, and screenshots are available on this page. Enjoy, until next release! -lyndon From stefanor at cox.net Tue Feb 13 23:12:47 2007 From: stefanor at cox.net (Stefan O'Rear) Date: Tue Feb 13 23:07:02 2007 Subject: [Haskell] ANN: Vty 3.0.0 Message-ID: <20070214041247.GA18727@localhost.localdomain> Yet another new major of vty has been produced. While I had hoped this compatibility break would never be needed, it seems vty 2's lazy lists and unpacked records were preventing good performance, so the level of abstraction has been increased by creating opaque types Image and Attr. Internally, the new Image uses side effectful array update (unsafePerformIO is not needed because it can only be read by the IO-using update procedure), and the new Attr uses bit flags packed into a single Word#. Yi, using the new release, has doubled in speed with no additional tuning. There are no other notable API changes. (although internally a Cursor-level control module has been factored out, perhaps in preparation for being exposed) As always, feedback is appreciated. Stefan Tar: http://members.cox.net/stefanor/vty/dist/vty-3.0.0.tar.gz Haddock: http://members.cox.net/stefanor/vty/dist/doc/html/index.html Darcs: darcs get --tag=rel-3.0.0 http://members.cox.net/stefanor/vty/ From josebenjaminp at gmail.com Wed Feb 14 09:04:08 2007 From: josebenjaminp at gmail.com (Jose Benjamin Perez Soto) Date: Wed Feb 14 08:58:23 2007 Subject: [Haskell] ANNOUNCE: Haskell Xcode Plugin (version feb0707) In-Reply-To: <05A324EB-13CD-4483-ADA2-B75745A4FBA2@shaw.ca> References: <05A324EB-13CD-4483-ADA2-B75745A4FBA2@shaw.ca> Message-ID: wow..., thank you very much, this is the very good news Cheers, Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070214/bd01b6b1/attachment.htm From gmh at Cs.Nott.AC.UK Wed Feb 14 09:34:25 2007 From: gmh at Cs.Nott.AC.UK (Graham Hutton) Date: Wed Feb 14 09:28:56 2007 Subject: [Haskell] ANNOUNCE: Fun in the Afternoon II Message-ID: <3737.1171463665@cs.nott.ac.uk> Dear all, *** FUN IN THE AFTERNOON, WED 21 FEB, NOTTINGHAM *** The second Fun in the Afternoon will take place in Nottingham next week, on the afternoon of Wednesday 21st February. This time around, James McKinna will be giving an invited talk to start the event off, and we'll then have three half-hour talks by Jeremy Gibbons, Nils Anders Danielsson, and Lennart Augustsson. We hope it will be as much fun as the first event in Oxford, but for this to be the case we need as many people as possible to come along and join in. Please spread the word! Background ---------- Fun in the Afternoon is a termly seminar on functional programming and related topics. The inaugural meeting was held in Oxford in November last year, and was a great success, with four excellent talks and a large number of participants from across the UK and further afield. For more info, and to join the mailing list: http://sneezy.cs.nott.ac.uk/fun Location -------- The second Fun in the Afternoon will be held on the Jubilee Campus of the University of Nottingham on Wednesday 21st February 2007. Nottingham is centrally located in the UK, and is easily reachable by all forms of transport. Travel info and maps are available from: http://www.nottingham.ac.uk/cs/general/school_directions.php Before the talks start at 2pm, you are welcome to bring your own sandwiches and have lunch with us in the Atrium of the Computer Science building (labelled 4 on the campus map available above). There are two places to buy sandwiches on the campus, either from the cafe on the top floor of the New Business School (labelled 7 on the campus map), or from The Exchange (labelled 2.) The talks will take place in seminar room A32 of the Education (not Computer Science) building on the Jubilee Campus, which is the building labelled 6 on the map. We will put up some signs on the day to help make sure no-one gets lost. We'll retire afterwards to a local pub for further discussion and heated debate, and then to dinner for those interested. Schedule -------- 12.00 - 14.00 : Lunch (bring your own) 14.00 - 15.00 : Matching Regular Expressions, Revisited, Revisited James McKinna, University of St Andrews 15.00 - 15.30 : Coffee 15.30 - 16.00 : Generic and Indexed Programming Jeremy Gibbons, University of Oxford 16.00 - 16.30 : A Well-Typed Interpreter for a Dependently Typed Language Nils Anders Danielsson, Chalmers University of Technology 16.30 - 17.00 : Lennart Augustsson, Credit Suisse Title to be announced 17.00 - 19.00 : Pub 19.00 - : Dinner Titles and abstracts -------------------- Matching Regular Expressions, Revisited, Revisited James McKinna, University of St Andrews We revisit regular expression matching, following Harper's 1999 JFP treatment, recently revisited by Yi, in the context of dependently-typed functional programming. The correctness of matching is delegated to the (self-evident) correctness of the rendering function, to which the recogniser provides an inverse. The use of dependent types to organise the development permits us to develop, in a uniform setting, the intricate mix of operations on regular languages on the one hand, and on the other, their algebraic theory, together with the constructions which relate the two. Generic and Indexed Programming Jeremy Gibbons, University of Oxford The Generic and Indexed Programming project at Oxford started in November 2006, and is funded by EPSRC for three and a half years. The "generic" bit is about programs parametrized by datatypes, and builds on our work on the Datatype-Generic Programming project. This talk is about the "indexed" bit, which concerns lightweight techniques for dependently-typed programming, for example using generalized algebraic datatypes. Specifically, values are reflected at the type level, and can then be used as "phantom type" indices to other types, expressing certain kinds of constraints; the relationship between type representations and values, important in datatype-generic programming, is one application. We will explain our motivation, show some cool examples, and say a little about where we see the project going. A Well-Typed Interpreter for a Dependently Typed Language Nils Anders Danielsson, Chalmers University of Technology GADTs are often introduced with the "well-typed interpreter" example. A simple programming language is encoded as a GADT in such a way that only well-typed terms can be defined, and then an interpreter which cannot get stuck is implemented. I'll show how to do this for a dependently typed lambda calculus, in the dependently typed meta-language AgdaLight. To accomplish this I'll use inductive-recursive families, a generalisation of GADTs. Lennart Augustsson, Credit Suisse Title/abstract to be announced We look forward to seeing you in Nottingham next week! If you are planning to come, it would be useful if you can drop us a line and also say if you are likely to come for dinner, in order that we can estimate numbers for coffee and dinner. Best wishes, Graham and Conor +---------------------------------------------------------------------+ | Dr Graham Hutton Email : gmh@cs.nott.ac.uk | | School of Computer Science and IT | | University of Nottingham Web : www.cs.nott.ac.uk/~gmh | | Jubilee Campus, Wollaton Road | | Nottingham NG8 1BB, UK Phone : +44 (0)115 951 4220 | +---------------------------------------------------------------------+ This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From monnier at iro.umontreal.ca Wed Feb 14 14:53:03 2007 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Wed Feb 14 14:47:41 2007 Subject: [Haskell] Haskell-mode 2.3 Message-ID: A few minor typos/thinkos plagued Haskell-mode 2.2, so here's 2.3. http://www.iro.umontreal.ca/~monnier/elisp/ No significant change, apart from the inclusion of a haskell-cabal-mode for Cabal description files (doesn't do anything useful, tho, other than highlight comments). Stefan From hoelz at wisc.edu Thu Feb 15 16:15:27 2007 From: hoelz at wisc.edu (Rob Hoelz) Date: Thu Feb 15 16:09:43 2007 Subject: [Haskell] How does "do" know when to stop? Message-ID: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> When I define a function and I use do to string functions together, how does it know when my list of functions has come to an end? For example: foo = do bar baz other_func bar = ... How does it know to stop at other_func? Thanks, Rob Hoelz From sebastian.sylvan at gmail.com Thu Feb 15 16:18:17 2007 From: sebastian.sylvan at gmail.com (Sebastian Sylvan) Date: Thu Feb 15 16:12:24 2007 Subject: [Haskell] How does "do" know when to stop? In-Reply-To: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> References: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> Message-ID: <3d96ac180702151318v62f62680xf4d7d07d78e5cc37@mail.gmail.com> On 2/15/07, Rob Hoelz wrote: > When I define a function and I use do to string functions together, how > does it know when my list of functions has come to an end? For example: > > foo = do > bar > baz > other_func > bar = ... > > How does it know to stop at other_func? The "offside rule". Bar starts on the same column as foo so it's a new definition rather than belonging to foo. -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 From ndmitchell at gmail.com Thu Feb 15 16:21:19 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Feb 15 16:15:26 2007 Subject: [Haskell] How does "do" know when to stop? In-Reply-To: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> References: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> Message-ID: <404396ef0702151321r2ac83e2l7b5de26cc1b4fa7d@mail.gmail.com> Hi Rob, > When I define a function and I use do to string functions together, how > does it know when my list of functions has come to an end? Simple answer: the identation. Long answer: read the Haskell 98 report specifically the bits on the layout rule. Usually just remembering that indentation is significant is enough for everything to "just work" Thanks Neil From robdockins at fastmail.fm Thu Feb 15 16:31:40 2007 From: robdockins at fastmail.fm (Robert Dockins) Date: Thu Feb 15 16:18:50 2007 Subject: [Haskell] How does "do" know when to stop? In-Reply-To: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> References: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> Message-ID: On Feb 15, 2007, at 4:15 PM, Rob Hoelz wrote: > When I define a function and I use do to string functions together, > how > does it know when my list of functions has come to an end? For > example: > > foo = do > bar > baz > other_func > bar = ... > > How does it know to stop at other_func? > > Thanks, > Rob Hoelz 'do' blocks are subject to the layout rule. See: http://en.wikibooks.org/wiki/Haskell/Indentation The short version is that it notices when a line is less indented, and that ends the do block. Rob Dockins Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG From aaron at aaronmcdaid.com Thu Feb 15 19:07:01 2007 From: aaron at aaronmcdaid.com (Aaron McDaid) Date: Thu Feb 15 19:01:08 2007 Subject: [Haskell] How does "do" know when to stop? In-Reply-To: <3d96ac180702151318v62f62680xf4d7d07d78e5cc37@mail.gmail.com> References: <20070215151527.4cc6737e@TheRing.javasnob.homelinux.net> <3d96ac180702151318v62f62680xf4d7d07d78e5cc37@mail.gmail.com> Message-ID: <740c55100702151607l4300b2cbue059b5791a5cd4e5@mail.gmail.com> On 2/15/07, Sebastian Sylvan wrote: > On 2/15/07, Rob Hoelz wrote: > > foo = do > > bar > > baz > > other_func > > bar = ... > > > > How does it know to stop at other_func? > > The "offside rule". Bar starts on the same column as foo so it's a new > definition rather than belonging to foo. If you don't quite trust the indentation you can use '{' and '}' instead. When do is followed by '{' it uses ';' to separate lines instead of newlines. This is equivalent to the above: foo = do { bar ; baz ; other_func ; } bar = ... Although I would rarely use this. ';' can also be used in other places, such as separating the alternatives in a case statement. I really like the fact that Haskell can mix and match the indentation and brace styles - something other languages should try to pick up. Aaron From hoelz at wisc.edu Fri Feb 16 00:56:58 2007 From: hoelz at wisc.edu (Rob Hoelz) Date: Fri Feb 16 00:51:21 2007 Subject: [Haskell] Finding pointer size Message-ID: <20070215235658.64784202@TheRing.javasnob.homelinux.net> I'm working with the Foreign module, and I need to allocate a pointer to a pointer (in C, a char **). The problem is, I don't know how to find out the size of a char * in Haskell. Here's the basic layout of the code: allocaBytes len $ \ array -> ... -- len is the size of the char ** to be allocated times sizeof(char *). Thanks, Rob Hoelz From stefanor at cox.net Fri Feb 16 01:04:40 2007 From: stefanor at cox.net (Stefan O'Rear) Date: Fri Feb 16 00:58:53 2007 Subject: [Haskell] Finding pointer size In-Reply-To: <20070215235658.64784202@TheRing.javasnob.homelinux.net> References: <20070215235658.64784202@TheRing.javasnob.homelinux.net> Message-ID: <20070216060440.GA5526@localhost.localdomain> On Thu, Feb 15, 2007 at 11:56:58PM -0600, Rob Hoelz wrote: > I'm working with the Foreign module, and I need to allocate a pointer > to a pointer (in C, a char **). The problem is, I don't know how to > find out the size of a char * in Haskell. Here's the basic layout of > the code: > > allocaBytes len $ \ array -> ... -- len is the size of the char ** to > be allocated times sizeof(char *). import Foreign.Marshal.Array allocaArray nr_of_pointers $ \arrar -> ... automatically figures the sizeof(char *) if you really want to know ... sizeOf (undefined ;: Ptr CChar) Stefan From andy at hflworkshop.org Fri Feb 16 08:40:07 2007 From: andy at hflworkshop.org (Andy Martin) Date: Fri Feb 16 08:34:25 2007 Subject: [Haskell] ANNOUNCE: Hardware Design and Functional Languages 2007 - Call for Participation Message-ID: Dear Member of the Haskell Community, Carl Seger, Mary Sheeran and I are very pleased to announce the upcoming workshop on Hardware Design and Functional Languages, to be held on March 24-25 in Braga Portugal, as a satellite event of ETAPS 2007. We have a very exciting two-day programme consisting of fourteen talks from industry and academia. For more information, and the full, printable call for participation, please visit the workshop website at http://www.hflworkshop.org. To register, please visit the ETAPS 2007 website at http:// www.di.uminho.pt/etaps07 We would be very grateful if you would circulate this call amongst your colleagues and post it where appropriate. Since there is a long history of the use of Haskell for hardware design, we felt this workshop would be of interest to the Haskell community, and benefit from your participation. Please accept my apologies if your receive this email more than once, or if this email is unwanted. Regards, Andy Martin From hoelz at wisc.edu Sat Feb 17 18:58:49 2007 From: hoelz at wisc.edu (ROBERT DOUGLAS HOELZ) Date: Sat Feb 17 18:52:48 2007 Subject: [Haskell] Converting to Foreign types Message-ID: Hello, I want to convert a Haskell Integer (Data.Int.Int32) to a C long (Foreign.C.Types.CLong), but it seems this code here doesn't work: intToLong :: Int32 -> Clong intToLong num = let maybelong = cast num in if isNothing maybelong then 0 else fromJust maybeLong (It always returns 0) Could anyone give me a hint as to what the problem is? Thanks! From stefanor at cox.net Sat Feb 17 19:06:56 2007 From: stefanor at cox.net (Stefan O'Rear) Date: Sat Feb 17 19:01:00 2007 Subject: [Haskell] Converting to Foreign types In-Reply-To: References: Message-ID: <20070218000656.GA5500@localhost.localdomain> On Sat, Feb 17, 2007 at 05:58:49PM -0600, ROBERT DOUGLAS HOELZ wrote: > Hello, > > I want to convert a Haskell Integer (Data.Int.Int32) to a C long (Foreign.C.Types.CLong), but it seems this code here doesn't work: > > intToLong :: Int32 -> Clong > intToLong num = > let maybelong = cast num > in if isNothing maybelong > then > 0 > else > fromJust maybeLong > > (It always returns 0) > > Could anyone give me a hint as to what the problem is? cast has very limited abilities - it only converts if the types are exactly the same, otherwise it returns Nothing. In Haskell, Int32 and CLong are not the same type even if they happen to be the same size; this helps with portability, unlike C where code that assumes int32_t == long will work flawlessly until it is run on a 64-bit computer. You probably want to use Prelude.fromIntegral: fromIntegral :: (Integral a, Num b) => a -> b which converts between numeric types, with all the usual perils. (e.g (fromIntegral :: Int -> Word8) 256 == 0) Stefan From gmh at Cs.Nott.AC.UK Mon Feb 19 05:39:38 2007 From: gmh at Cs.Nott.AC.UK (Graham Hutton) Date: Mon Feb 19 05:34:34 2007 Subject: [Haskell] FUN IN THE AFTERNOON: this Wednesday, Nottingham Message-ID: <19989.1171881578@cs.nott.ac.uk> Dear all *** FUN IN THE AFTERNOON, WED 21 FEB, NOTTINGHAM, UK *** Fun in the Afternoon is a termly seminar on functional programming and related topics. The next meeting will take place in Nottingham this week, on the afternoon of Wednesday 21st February, and include talks by James McKinna, Jeremy Gibbons, Nils Anders Danielsson, and Lennart Augustsson. Further details are available from: http://sneezy.cs.nott.ac.uk/fun We hope you and your students will be able to attend! Please feel free to pass this message on to your colleagues and students. Best wishes, Graham and Conor +---------------------------------------------------------------------+ | Dr Graham Hutton Email : gmh@cs.nott.ac.uk | | School of Computer Science and IT | | University of Nottingham Web : www.cs.nott.ac.uk/~gmh | | Jubilee Campus, Wollaton Road | | Nottingham NG8 1BB, UK Phone : +44 (0)115 951 4220 | +---------------------------------------------------------------------+ This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From conal at conal.net Mon Feb 19 12:26:02 2007 From: conal at conal.net (Conal Elliott) Date: Mon Feb 19 12:19:58 2007 Subject: [Haskell] ANNOUNCE: cabal-make version 0.1 Message-ID: Cabal-make is a GNU make include file to be used with Cabal in creating and sharing Haskell packages. A few highlights: * Web-based, cross-package links in Haddock docs * Syntax coloring via hscolour, with per-project CSS * Links from the Haddock docs to hscolour'd code and to wiki-based user comment pages. See http://haskell.org/haskellwiki/Cabal-make for description, tips, and download. Comments, suggestions, welcome (especially on the cabal-make wiki talk page). Cheers, - Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070219/9eaa2d1e/attachment.htm From goenzoy at web.de Mon Feb 19 16:17:16 2007 From: goenzoy at web.de (Gottfried F. Zojer) Date: Mon Feb 19 16:12:11 2007 Subject: [Haskell] GHC/ Fortress -Parallel Computing Message-ID: <147391156@web.de> Hallo to all, Just curious after reading a posting on the internet. Is somebody using Fortress in combination with Haskell ( GHC) in a parallel setup. http://en.wikipedia.org/wiki/Fortress_programming_language >From Sun Microsystems : http://research.sun.com/projects/plrg/faq/index.html http://fortress.sunsource.net/ Thanks for any feedback Regards Gottfried www.wirtschaftswunder.co.uk www.5152.eu From paul at cogito.org.uk Mon Feb 19 17:39:03 2007 From: paul at cogito.org.uk (Paul Johnson) Date: Mon Feb 19 17:33:00 2007 Subject: [Haskell] cabal-upload build problem Message-ID: <45DA2707.9010503@cogito.org.uk> I want to upload a package to Hackage. I tried installing cabal-upload, but got the following error: ! Preprocessing executables for cabal-upload-0.2... ! Building cabal-upload-0.2... ! ! src/CabalUpload.hs:7:7: ! Could not find module `Distribution.Compat.FilePath': ! it is hidden (in package Cabal-1.1.6) I tried "ghc-pkg expose Cabal-1.1.6" without success. I have ghc-6.6 installed on Linux (Fedora Core 6), including Cabal-1.1.6. (BTW I know I will also need a user id and password. That was going to be my next step). Paul. From duncan.coutts at worc.ox.ac.uk Mon Feb 19 17:57:33 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Mon Feb 19 17:51:23 2007 Subject: [Haskell] cabal-upload build problem In-Reply-To: <45DA2707.9010503@cogito.org.uk> References: <45DA2707.9010503@cogito.org.uk> Message-ID: <1171925853.1018.197.camel@localhost> On Mon, 2007-02-19 at 22:39 +0000, Paul Johnson wrote: > I want to upload a package to Hackage. I tried installing cabal-upload, > but got the following error: > > ! Preprocessing executables for cabal-upload-0.2... > ! Building cabal-upload-0.2... > ! > ! src/CabalUpload.hs:7:7: > ! Could not find module `Distribution.Compat.FilePath': > ! it is hidden (in package Cabal-1.1.6) > > > I tried "ghc-pkg expose Cabal-1.1.6" without success. > > I have ghc-6.6 installed on Linux (Fedora Core 6), including Cabal-1.1.6. It was a mistake that that module was hidden in the version of Cabal that shipped with ghc-6.6. If you install Cabal-1.1.6.1 or the current darcs version 1.1.7 that should fix it. BTW, make sure you don't unregister the Cabal 1.1.6 version you've already got though because you have packages installed that depend on that version. It's perfectly ok to have multiple versions installed at once though. Duncan From Janwillem.Maessen at sun.com Tue Feb 20 09:58:05 2007 From: Janwillem.Maessen at sun.com (Jan-Willem Maessen) Date: Tue Feb 20 09:52:01 2007 Subject: [Haskell] GHC/ Fortress -Parallel Computing In-Reply-To: <147391156@web.de> References: <147391156@web.de> Message-ID: <93F4DDDE-BA88-47AD-AED5-86F4DDF06674@sun.com> On Feb 19, 2007, at 4:17 PM, Gottfried F. Zojer wrote: > Hallo to all, > > > Just curious after reading a posting on the internet. > Is somebody using Fortress in combination with Haskell ( GHC) in a > parallel setup. > http://en.wikipedia.org/wiki/Fortress_programming_language Not to my knowledge. The Fortress implementation is still at the prototype stage; the prototype runs on the JVM, and JVM/Haskell interoperability is known to be a bit tricky. In general there are substantial challenges to integrating two languages with independent garbage-collected run time systems. Add in independent notions of transactional memory, rather different thread scheduling models, and so forth and the problem becomes trickier still. That said, there is certainly at least one Haskell programmer writing Fortress code (I wrote much of the library and some of the code examples in the language implementation). We've certainly looked to the FP community for inspiration in many aspects of the language. My favorite example: Fortress generators are essentially build forms for algebras in the Boom hierarchy, and we're effectively doing library- driven foldr/build elimination (except in this algebra it's map- reduce/build instead). -Jan-Willem Maessen Project Fortress Sun Microsystems > http://research.sun.com/projects/plrg/faq/index.html > http://fortress.sunsource.net/ > > > Thanks for any feedback > > > Regards > > Gottfried > > www.wirtschaftswunder.co.uk > > www.5152.eu > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell From hoelz at wisc.edu Tue Feb 20 11:27:58 2007 From: hoelz at wisc.edu (ROBERT DOUGLAS HOELZ) Date: Tue Feb 20 11:22:17 2007 Subject: [Haskell] Data.Hashtable operations in IO? Message-ID: I was reading the docs for Data.Hashtable, and quickly noticed that operations on a hashtable are of the IO monad. Why is this? I should think that the operations would look like this: insert :: Hashtable -> key -> val -> Hashtable lookup :: Hashtable -> key -> a etc. Thanks, Rob Hoelz From haskell at list.mightyreason.com Tue Feb 20 11:45:41 2007 From: haskell at list.mightyreason.com (Chris Kuklewicz) Date: Tue Feb 20 11:39:38 2007 Subject: [Haskell] Data.Hashtable operations in IO? In-Reply-To: References: Message-ID: <45DB25B5.8060003@list.mightyreason.com> ROBERT DOUGLAS HOELZ wrote: > I was reading the docs for Data.Hashtable, and quickly noticed that operations on a hashtable are of the IO monad. Why is this? I should think that the operations would look like this: > > insert :: Hashtable -> key -> val -> Hashtable > lookup :: Hashtable -> key -> a > > etc. > > Thanks, > Rob Hoelz That would be the signature for immutable hashtables. The old and new ones would be distinct and could co-exist. Building an immutable hashtable on top of Data.Array or Data.Map would be fairly easy. Data.Hashtable is a mutable hashtable. After an insert the old Hashtable no longer exists -- there is only the new one. Thus operations needs to be ordered. Rightfully, there should be a Data.Hashtable.ST as well. The standard Haskell libraries have yet to include one of the type class approaches to immutable collections and have very little in the way of mutable data structures. The former is probable due to lack of standardization of MPTC / fundeps / associated types. The latter is due to both lack of sufficient interest and the same lack of a standard for fancier type classes. From conal at conal.net Wed Feb 21 19:23:50 2007 From: conal at conal.net (Conal Elliott) Date: Wed Feb 21 19:17:37 2007 Subject: [Haskell] Composing applicative functors? Message-ID: Is the composition instance of Control.Applicative defined somewhere? I see it in the McBride & Paterson paper [1], but not in the library docs [2]. I'd rather pull it in from a library than (re)define it myself. [1] http://www.soi.city.ac.uk/~ross/papers/Applicative.pdf [2] http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Applicative.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070221/972e1c07/attachment.htm From tfp2007 at shu.edu Wed Feb 21 23:28:24 2007 From: tfp2007 at shu.edu (TFP 2007) Date: Wed Feb 21 23:22:17 2007 Subject: [Haskell] TFP 2007: Registration and Progam Message-ID: Dear Colleagues, You may now resgister for TFP 2007! TFP 2007 will be held April 2-4, 2007 in New York City, USA. Our invited speaker is John McCarthy, Stanford University. Further details can be found at our homepage: http://cs.shu.edu/tfp2007/ . You may register at: http://cs.shu.edu/tfp2007/registration.html . The registration deadline is March 2, 2007 (11:59 p.m. EST). Accomodations information may be found at: http://cs.shu.edu/tfp2007/accomodations.html . We kindly remind you that the deadline to make a hotel reservation at the guaranteed rates offered to TFP 2007 participants is also quickly approaching. We are proud to announce our program of accepted talks: Unifying Hybrid Types and Contracts Jessica Gronski and Cormac Flanagan A Dual Semantics for the Data Description Calculus Yitzhak Mandelbaum, Kathleen Fisher, and David Walker A Metalanguage for Structural Operational Semantics Matthew Lakin and Andrew Pitts An Arrow Based Semantics for Interactive Applications Peter Achten, Marko van Eekelen, Maarten de Mol, and Rinus Plasmeijer Dependent Types: Easy as Pie Dimitrios Vytiniotis and Stephanie Weirich Constructing Correct Circuits -- Hardware Modelling with Dependent Types Edwin Brady, James McKinna, and Kevin Hammond Why Would Extensible Dependent Types Matter Pablo Nogueira and Bruno Oliveira Bytecode Verification for Haskell Robert Dockins and Samuel Z. Guyer UnreadTVar: Extending Haskell Software Transactional Memory for Performance Nehir Sonmez, Cristian Perfumo, Srdjan Stipic, Adrian Cristal, Osman S. Unsal, and Mateo Valero A New Functional Implementation of Grover's Fast Search Algorithm Justin Stallard and Murray Gross An Inference Algorithm for Guaranteeing Safe Destruction Manuel Montenegro, Ricardo Pe?a, and Clara Segura Hierarchical Master/Worker Skeletons Jost Berthold, Mischa Dieterle, Rita Loogen, and Steffen Priebe Property Directed Generation of First-Order Test Data Fredrik Lindblad Refactoring for Comprehension Gustavo Villavicencio Towards a Box Calculus for Hume Gudmund Grov and Greg Michaelson Scaled Regression: A Refinement of Primitive Recursion Daniel Leivant Equality-Based Uniqueness Typing Edsko de Vries, Rinus Plasmeijer, and David Abrahamson Lightweight Static Resources: Sexy Types for Embedded and Systems Programming Oleg Kiselyov and Chung-chieh Shan Space-Efficient Gradual Typing David Herman, Aaron Tomb, and Cormac Flanagan Use-Based Reference of Polymorphism Dave King and John Hannan Designing a Generic Graph Library Using ML Functors Sylvain Conchon, Jean-Christophe Filliatre, and Julien Signoles The SCIence Joint Research Activity Kevin Hammond, Dana Petcu, Phil Trinder, Abdallah Al Zain, Steve Linton, and Greg Michaelson Generic and Index Programming Jeremy Gibbons, Meng Wang, and Bruno C d. S. Oliveira The AHA Project Marko van Eekelen, Olha Shkaravska, Ron van Kesteren, Bart Jacobs, Sjaak Smetsers, and Erik Poll Studying Helium Program Bahaviour with the Neon Library Jurriaan Hage and Peter van Keeken Design and Implementation of JFP Hao Xu Hop Client-Side Compilation Florian Loitsch Adaptive High-Level Scheduling in a Generic Parallel Runtime Environment Jost Berthold, Abyd Al-Zain, and Hans-Wolfgang Loidl Bundles Pack Tighter than Lists Francisco Lopez-Fraguas, Juan Rodriguez-Hortala, and Jaime Sanchez-Hernandez Model-Based Testing of Thin-Client Web Applications and Navigation Input Pieter Koopman, Peter Achten, and Rinus Plasmeijer We look forward to seeing you at TFP 2007! Cheers, Marco ************************************************************************************ Dr. Marco T. Morazan TFP 2007 Program Committee Chair http://cs.shu.edu/tfp2007/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070221/0d1628ae/attachment.htm From koen at chalmers.se Thu Feb 22 09:05:11 2007 From: koen at chalmers.se (Koen Claessen) Date: Thu Feb 22 08:58:59 2007 Subject: [Haskell] New PhD Positions Computing Science, Chalmers University In-Reply-To: <1b30d3c80702220602g66123916u9dc6975e0893395c@mail.gmail.com> References: <1b30d3c80702220602g66123916u9dc6975e0893395c@mail.gmail.com> Message-ID: <1b30d3c80702220605w4185b032w6bd7ba8a5e69f7ff@mail.gmail.com> (apologies for multiple copies -- please forward to all interested parties) New PhD Positions 2007 Division of Computing Science, Chalmers University of Technology http://chalmersnyheter.chalmers.se/chalmers03/english/eng_vacanciesarticle.jsp?article=8730 The Division has about 80 researchers, half being faculty members and half PhD students. Our focus is on algorithms, bioinformatics, distributed systems and computing, functional programming, formal methods, interaction design, language technology, language based security, parallel and high performance computing, programming logic and type theory, but research is not restricted to these topics. For more information, see http://www.chalmers.se/cse/EN/research/research-groups Knowledge of Swedish is not a prerequisite for application. English is our working language for research. Both Swedish and English are used in undergraduate courses. Half of our researchers and PhD students are native Swedes; the rest come from more than 20 different countries. Applicants must have a very good undergraduate degree in Computing Science or in a related subject with a strong Computing Science component. They must also have a strong, documented interest in doing research. You may even apply if you have not yet completed your degree, but expect to do so by 1 September 2007. We particularly encourage applicants with interests in: - applying techniques from functional programming to develop novel methods of hardware design and verification. For more information on this point contact Mary Sheeran (ms(at)cs.chalmers.se); - automated theorem proving, SAT-solving, and functional programming. For more information on this point see http://www.cs.chalmers.se/~koen/folkung/, or contact Koen Claessen (koen(at)chalmers.se); - distributed algorithms for providing coordination services to networked or multiprocessor applications. For more information on this point see the webapages of the group Distributed Computing and Systems http://www.cs.chalmers.se/~dcs/ or contact Marina Papatriantafilou (ptrianta(at)cs.chalmers.se); - program analysis for software engineering. For more information on this point see the webpage of the group Software Methodologies and Systems (http://sms.cs.chalmers.se, "Open Positions") or contact Sibylle Schupp (@cs.chalmers.se). The department especially welcomes female applicants. How to apply ------------ The full application should contain 1. A letter of application, listing specific research interests 2. A curriculum vitae 3. Attested copies of degrees and other certificates 4. Copies of relevant work, for example dissertations or articles, that you have authored or co-authored 5. Letters of recommendation from your teachers or employers *** You MUST include or e-mail Letters of Recommendation: we typically get over 100 apps, and it is simply not feasible for us to request individual letters *** The job reference number is: 2007/30. The last date for your full application to arrive is March 9, 2007 Send your application electronically in PDF files or by paper-mail to Registrator, Chalmers University of Technology, Se-412 96 G?teborg, Sweden. Phone: +4631 772 1000, Fax: +4631 772 4922, E-mail: registrator(at)adm.chalmers.se If you need more information regarding PhD studies at the division please contact Philippas Tsigas (tsigas(at)cs.chalmers.se). You will know the result of your application by 30 May 2007. Union representatives: SACO Jan Lind?r, TCO Monica Orrbacke, SEKO Ralf Berndtsson From jamey.hicks at nokia.com Thu Feb 22 13:33:49 2007 From: jamey.hicks at nokia.com (jamey.hicks@nokia.com) Date: Thu Feb 22 13:27:38 2007 Subject: [Haskell] research position at Nokia Research Center Cambridge US Message-ID: Position available: Senior Research Engineer We seek an exceptional, highly motivated individual who is interested in a unique opportunity to collaborate with a world-class academic research community. This position is for the Armo project at NRC Cambridge (http://research.nokia.com/locations/cambridge/), using Bluespec hardware description language (http://www.bluespec.com/) to radically improve Nokia's ability to develop advanced SOCs and corresponding software for future mobile phones and mobile computers. We are investigating co-development of hardware and software components for such devices. Success in the project will lead to both academic publication as well as a significant positive impact on Nokia products and engineering. The ideal candidate will have an advanced degree and several years of industrial research experience. In addition to being expert in one or more technical areas, a successful candidate must be able to quickly master new fields of study and new technology. Candidates should be strong individual contributors with broad Computer Science engineering background and skills. They must be self-directed and require a minimum amount of supervision. As an individual contributor the candidate must be able and willing to work independently as well as participate as a member of other projects. In addition, candidates must have strong communication skills. They must be able to lead technology transfer activities, write research papers and proposals, participate in industrial standards activities (this may include international travel), and manage internal and external business relationships. Needed Competencies and Skills Expertise in computer architecture, parallel programming is required. Expertise in hardware definition languages such as Verilog, VHDL, and Bluespec is desired. Expertise in several programming languages and environments such as Haskell, Lisp, Java, C, C++, Symbian, Unix or Linux is needed. In depth understanding of operating systems, distributed systems and network protocols is desired. Department/Team Description Nokia Research Center Cambridge is a one year old group of 16 researchers located in Cambridge, Massachusetts. NRCC's charter is to renew Nokia via open innovation, in particular via joint research projects with MIT Computer Science and Artificial Intelligence Laboratory. We are a systems research center, investigating all aspects of future mobile phones and services. Our goal is to develop new technologies, applications, and services, and to work with the rest of Nokia to make these a reality. Contact: Jamey Hicks, Director, Nokia Research Center Cambridge jamey.hicks@nokia.com http://research.nokia.com/locations/cambridge/ 3 Cambridge Center Cambridge MA 02142 US -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070222/ab36200e/attachment-0001.htm From goenzoy at web.de Thu Feb 22 15:06:00 2007 From: goenzoy at web.de (goenzoy@web.de) Date: Thu Feb 22 15:02:01 2007 Subject: [Haskell] GHC/ Fortress -Parallel Computing Message-ID: <149863543@web.de> Hallo Jan-Willem, Hallo all, Thanks for the clarification first. And coming to your statement > We've certainly looked to the FP community for inspiration in many aspects of the language > is there anything planned to advice programmers what use Haskell, to code in Fortress. The document what I have in mind in this direction is a Introduction in Lisp for Python programmer. http://norvig.com/python-lisp.html Any feedback welcome Regards Gottfried www.wirtschaftswunder.co.uk www.5152.eu > -----Urspr?ngliche Nachricht----- > Von: Jan-Willem Maessen > Gesendet: 20.02.07 15:58:14 > An: "Gottfried F. Zojer" > CC: haskell@haskell.org > Betreff: Re: [Haskell] GHC/ Fortress -Parallel Computing > > On Feb 19, 2007, at 4:17 PM, Gottfried F. Zojer wrote: > > > Hallo to all, > > > > > > Just curious after reading a posting on the internet. > > Is somebody using Fortress in combination with Haskell ( GHC) in a > > parallel setup. > > http://en.wikipedia.org/wiki/Fortress_programming_language > > Not to my knowledge. The Fortress implementation is still at the > prototype stage; the prototype runs on the JVM, and JVM/Haskell > interoperability is known to be a bit tricky. In general there are > substantial challenges to integrating two languages with independent > garbage-collected run time systems. Add in independent notions of > transactional memory, rather different thread scheduling models, and > so forth and the problem becomes trickier still. > > That said, there is certainly at least one Haskell programmer writing > Fortress code (I wrote much of the library and some of the code > examples in the language implementation). We've certainly looked to > the FP community for inspiration in many aspects of the language. My > favorite example: Fortress generators are essentially build forms for > algebras in the Boom hierarchy, and we're effectively doing library- > driven foldr/build elimination (except in this algebra it's map- > reduce/build instead). > > -Jan-Willem Maessen > Project Fortress > Sun Microsystems > > > http://research.sun.com/projects/plrg/faq/index.html > > http://fortress.sunsource.net/ > > > > > > Thanks for any feedback > > > > > > Regards > > > > Gottfried > > > > www.wirtschaftswunder.co.uk > > > > www.5152.eu > > _______________________________________________ > > Haskell mailing list > > Haskell@haskell.org > > http://www.haskell.org/mailman/listinfo/haskell > > From Janwillem.Maessen at sun.com Thu Feb 22 20:32:02 2007 From: Janwillem.Maessen at sun.com (Jan-Willem Maessen) Date: Thu Feb 22 20:25:51 2007 Subject: [Haskell] GHC/ Fortress -Parallel Computing In-Reply-To: <149863543@web.de> References: <149863543@web.de> Message-ID: <65A0FA57-C5AE-4544-BB7C-BD9988A7B451@sun.com> On Feb 22, 2007, at 3:06 PM, goenzoy@web.de wrote: > Hallo Jan-Willem, > Hallo all, > > Thanks for the clarification first. > And coming to your statement >> We've certainly looked to > the FP community for inspiration in many aspects of the language > > is there anything planned to advice programmers what use Haskell, > to code in Fortress. You'd be better off asking on one of the Fortress mailing lists (see http://fortress.sunsource.net/; I suggest joining the discuss mailing list and asking there). Sadly, I'm in a little to deep to really do the topic justice myself. I know there are community members there who are working on tutorial documents. -Jan From haskell at aeschbacher.ch Fri Feb 23 06:08:25 2007 From: haskell at aeschbacher.ch (Stefan Aeschbacher) Date: Fri Feb 23 06:02:07 2007 Subject: [Haskell] GHC/ Fortress -Parallel Computing In-Reply-To: <65A0FA57-C5AE-4544-BB7C-BD9988A7B451@sun.com> References: <149863543@web.de> <65A0FA57-C5AE-4544-BB7C-BD9988A7B451@sun.com> Message-ID: <207060770702230308t6417cdfcq844a104fc3598d0a@mail.gmail.com> Hi 2007/2/23, Jan-Willem Maessen : > ... > > You'd be better off asking on one of the Fortress mailing lists (see > http://fortress.sunsource.net/; I suggest joining the discuss mailing > list and asking there). Sadly, I'm in a little to deep to really do > the topic justice myself. I know there are community members there > who are working on tutorial documents. Are these mailinglists active? Judging from the archives there is not much happening there. I already thought that joining one of these lists would be good to see what is happening with fortress but when I saw the content of the archives I did not subscribe and forgot about it (until this thread came up). regards Stefan From jas at di.uminho.pt Fri Feb 23 06:12:26 2007 From: jas at di.uminho.pt (=?ISO-8859-1?Q?Jo=E3o?= Saraiva) Date: Fri Feb 23 06:06:13 2007 Subject: [Haskell] ETAPS 2007: Call for Participation Message-ID: <1172229147.2927.65.camel@localhost.localdomain> ***************************************************************** *** *** *** ETAPS 2007 *** *** March 24 - April 1, 2007 *** *** Braga, Portugal *** *** *** *** http://www.di.uminho.pt/etaps07/ *** *** *** *** CALL FOR PARTICIPATION *** *** *** *** Normal Registration Deadline: 26th February, 2007 *** *** Students Grant Deadline : 26th February, 2007 *** *** *** ***************************************************************** The European Joint Conferences on Theory and Practice of Software (ETAPS) is the primary European forum for academic and industrial researchers working on topics related to Software Science. It is a confederation of five main conferences, several satellite workshops and other events. ETAPS 2007 is taking place in Braga, Portugal. Braga, capital of the Minho province, is an ancient city in the heart of the green and fertile region known as the Costa Verde. The region is known for its attractiveness in terms of climate, gastronomy, prices, and culture. Braga is known for its barroque churches and splendid 18th century houses. The old city is solemn and antique, but animated with commercial activity and academic life. ============================================================================ 5 Conferences- 18 Satellite Workshops- 3 Tutorials- Tool Demonstrations ============================================================================ ------------------------------------------------------------------------- Main Conferences ------------------------------------------------------------------------- CC 2007: International Conference on Compiler Construction http://cc2007.cs.brown.edu/ ESOP 2007: European Symposium on Programming http://rap.dsi.unifi.it/esop07/ FASE 2007: Fundamental Approaches to Software Engineering http://fase07.di.fc.ul.pt FOSSACS 2007: Foundations of Software Science and Computation Structures http://www2.in.tum.de/~seidl/fossacs07/ TACAS 2007: Tools and Algorithms for the Construction and Analysis of Systems http://www.doc.ic.ac.uk/tacas07/ ----------------------------------------------------------------------- Invited Speakers ----------------------------------------------------------------------- ETAPS 2007: Rance Cleaveland - University of Maryland, USA ETAPS 2007: Bertrand Meyer - ETH Z?rich, Switzerland CC 2007: Don Batory - University of Texas at Austin, USA ESOP 2007: Andrew Pitts - Cambridge University, UK FASE 2007: Jan Bosch - Nokia, Finland FOSSACS 2007: Radha Jagadeesan - DePaul University, USA TACAS 2007: K. Rustan M. Leino - Microsoft Research, USA Further invited speakers are giving talks in the satellite workshops. ----------------------------------------------------------------------- Satellite Workshops ----------------------------------------------------------------------- ACCAT: Applied and Computational Category Theory http://tfs.cs.tu-berlin.de/workshops/accat2007/ AVIS: Int. Workshop on Automated Verification of Infinite-State Systems http://chacs.nrl.navy.mil/AVIS07 Bytecode: Bytecode Semantics, Verification, Analysis and Transformation http://www.sci.univr.it/~spoto/Bytecode07/ COCV: Sixth Workshop on Compiler Optimization Meets Compiler Verification http://pes.cs.tu-berlin.de/cocv2007/ FESCA: Formal Foundations of Embedded Software and Component-Based Software Architectures http://palab.dcs.kcl.ac.uk/fesca/ FinCo: Foundations of Interactive Computation http://www.cs.brown.edu/sites/finco07/ GT-VMT: Int. Workshop on Graph Transformation and Visual Modeling Techniques http://www.cs.le.ac.uk/events/GTVMT07/ HAV: Heap Analysis and Verification http://www.cs.tau.ac.il/~msagiv/hav.html HFL: Hardware design using Functional Languages http://hfl07.hflworkshop.org/ LDTA: Seventh Workshop on Language Descriptions, Tools and Applications http://www.di.uminho.pt/ldta07 MBT: Third Workshop on Model Based Testing http://react.cs.uni-sb.de/mbt2007/ MOMPES: Model-based Methodologies for Pervasive and Embedded Software http://www.di.uminho.pt/mompes OpenCert: Foundations and Techniques for Open Source Software Certification http://opencert.iist.unu.edu/ QAPL: Fifth Workshop on Quantitative Aspects of Programming Languages http://www.cse.yorku.ca/qapl07 SC: Software Composition http://ssel.vub.ac.be/sc2007 SLA++P: Model-driven High-level Programming of Embedded Systems http://web.uni-bamberg.de/wiai/gdi/SLAP07/ TERMGRAPH: Fourth International Workshop on Computing with Terms and Graphs http://www.termgraph.org.uk WITS: Seventh Workshop on Issues in the Theory of Security http://www.dsi.unive.it/IFIPWG1_7/wits2007.html ----------------------------------------------------------------------- Tutorials ----------------------------------------------------------------------- Program Transformation with Stratego/XT Martin Bravenboer (Utrecht University) and Eelco Visser (Delft University of Technology) Beyond the Generators: Practical Techniques for Real-World Software Generation Anthony M. Sloane (Macquarie University) Mobility, Ubiquity, and Security Gilles Barthe (INRIA), David Pichardie (IRISA), David Aspinall (Univ. of Edinburgh), Peter M?ller (ETH Zurich), Lennart Beringer (LMU Munich) and Joe Kiniry (UC Dublin) ----------------------------------------------------------------------- Tool Demonstrations ----------------------------------------------------------------------- Demonstrations of tools presenting advances on the state of the art have been selected and are integrated in the programmes of the main conferences. ----------------------------------------------------------------------- Registration and Contact Details ----------------------------------------------------------------------- For online registration, please visit http://www.di.uminho.pt/etaps07/ and go to menu item "Registration". Contact details are available at the menu item "Contact us". In case of any questions not addressed on the web pages, please email etaps07@di.uminho.pt. From Janwillem.Maessen at sun.com Fri Feb 23 09:09:40 2007 From: Janwillem.Maessen at sun.com (Jan-Willem Maessen) Date: Fri Feb 23 09:03:20 2007 Subject: [Haskell] GHC/ Fortress -Parallel Computing In-Reply-To: <207060770702230233o60119d9dqcc56ae63e67ed4a1@mail.gmail.com> References: <149863543@web.de> <65A0FA57-C5AE-4544-BB7C-BD9988A7B451@sun.com> <207060770702230233o60119d9dqcc56ae63e67ed4a1@mail.gmail.com> Message-ID: