External Core

2004-11-15 Thread Josef Svenningsson
Dear fellow GHC users, For a number of years GHC has been equipped with the external core language. For those of you who are unfamiliar with this, it is a way to get GHC to emit or read in programs in a format which is very close to its internal intermediate language. This is for instance useful

Problems with CABAL in GHC head.

2004-11-15 Thread Keean Schupke
Trying to recompile GHC (for the template-haskell existential support), but keeps failing on CABAL (the import for Foreign.Marshal.Alloc is missing from ghc/lib/compat/Distribution/Version.hs as well as import paths for Data/Version.hi which is not compiled yet as it depends on ghc-inplace.

RE: Problems with CABAL in GHC head.

2004-11-15 Thread Simon Peyton-Jones
There have been quite a few changes here including new directories. Make sure you cvs update with the -d flag, in both ghc/ and libraries/. And make sure all makefiles and autoconf stuff is up to date. then autoreconf and ./configure. Before doing make, go to ghc/driver and 'make clean'.

[Haskell] Re: Parameterized Show

2004-11-15 Thread George Russell
Graham Klyne wrote (snipped): I like the principle of parameterizing Show to allow for different encoding environments (indeed, I had wondered as I was writing my earlier message if the two cases were really sufficient). Indeed, in the application area that interests me (Semantic Web) it

Re: [Haskell] Re: Parameterized Show

2004-11-15 Thread Keean Schupke
Do you need a language extension at all? You can certainly do it with the existing extensions! data ShowDict a instance Show (ShowDict a) where showsPrec _ (ShowDict a) = ... Keean George Russell wrote: Graham Klyne wrote (snipped): I like the principle of parameterizing Show to allow for

Re: [Haskell] Re: Parameterized Show

2004-11-15 Thread George Russell
Keean Schupke wrote: Do you need a language extension at all? You can certainly do it with the existing extensions! data ShowDict a instance Show (ShowDict a) where showsPrec _ (ShowDict a) = ... I don't understand. How does that help you to, for example, use a function which requires Show

Re: [Haskell] Re: Parameterized Show

2004-11-15 Thread Keith Wansbrough
George Russell wrote: I like the idea too, not just for Show but for any instances. It seems to me that in general you should be able to combine the convenience of the Haskell type system with the power of Standard ML's structures and functors. Something along these lines was done by Kahl

Re: [Haskell] Re: Parameterized Show

2004-11-15 Thread Keean Schupke
Easy: data ShowHex a instance Show (ShowHex a) where showsPrec _ (ShowHex a) = showHex a main = putStrLn $ (show (ShowHex 27)) Here, with labelled instances you would write: show ShowHex 27 instead you write: show (ShowHex 27) Keean. George Russell wrote: Keean Schupke

Re: [Haskell] Re: Parameterized Show

2004-11-15 Thread Keean Schupke
Of course if you want to do it to code independantly of type you need to redifine show: data ShowHex = ShowHex class ShowDict t a where showDict :: a - ShowS instance ShowDict ShowHex Int where showDict a = showHex a test :: ShowDict t a = t - a - ShowS test _ a =

Re: [Haskell] Re: Parameterized Show

2004-11-15 Thread Tomasz Zielonka
On Mon, Nov 15, 2004 at 12:31:33PM +, Keean Schupke wrote: Easy: Here, with labelled instances you would write: show ShowHex 27 instead you write: show (ShowHex 27) What about Ints buried deep in more complicated data structures: show ShowHex [[1, 2, 3], [4]] vs.

Re: [Haskell] Re: Parameterized Show

2004-11-15 Thread Ben Rudiak-Gould
George Russell wrote: I like the idea too, not just for Show but for any instances. It seems to me that in general you should be able to combine the convenience of the Haskell type system with the power of Standard ML's structures and functors. It looks like it would be easy, but it's very

[Haskell] CfP reminder: LDTA 2005

2004-11-15 Thread Thomas Noll
[Reminder: deadline Dec. 1st is approaching] ** *** CALL FOR PAPERS *** ****** *** Fifth Workshop on

[Haskell] package with ghc and ghci

2004-11-15 Thread Fred Nicolier
Hello, I have some packages for doing signal and image processing stuff. Here is a little test program : \begin{code} module Main where import Hips a = listSignal (1,10) [1..10] b = liftSignals (:+) a a c = fft b main = do putStrLn $ show a putStrLn $ show b putStrLn $

[Haskell-cafe] Pure Haskell Printf

2004-11-15 Thread John Goerzen
(Sorry for the crosspost; I'm not sure which list this should go to.) I've just completed a pure-Haskell printf. Docs at [1], download at [2]. Here are some examples: vsprintf Hello Hello vsprintf Hello, %s\n John Hello, John\n vsprintf %s, your age is %d\n John (10::Integer) John, your age