Re: Modules and interfaces

1995-09-26 Thread Peter Thiemann
Hi all, as I am also a former sufferer from Modula-2's module system I'd like to support Manuel's opinion. But we do not need to reinvent the wheel, Wirth already corrected some problems with modules in M-2 in the design of Oberon! The idea is that each module is just *one* piece of human writt

Compression in Haskell need not need lots of space

1995-02-17 Thread Peter Thiemann
It should be possible to implement Huffman encoding in such a manner that only the Huffman tree is permanently in memory. But you need to read the input file twice: you cannot encode the first character of your input until the entire tree has been constructed. And to construct the tree you need

arithmetic on polynomials in Haskell

1996-12-17 Thread Peter Thiemann
y 1 Null) :: Poly Int and 2*Y byPoly (Poly 0 (Poly 2 Null)) Null :: Poly (Poly Int) then they cannot be added. I'd appreciate any references. Regards Peter Thiemann Peter Thiemann, Wilhelm-Schickard-Institut, | Phone: x49 7071 2975467 Sand 13, D-72076 Tuebingen, Germany

Re: Making argv a constant

1997-01-28 Thread Peter Thiemann
alastair> There's a second problem with "pseudoconstant" that no-one's mentioned alastair> yet - it breaks the Haskell type system (when used in conjunction with alastair> mutable variables). You tacitly imply that pseudoconstants are let-bound. The problem disappears if you simply

Re: Damas-Milner, Hindley-Milner, ...

1997-10-15 Thread Peter Thiemann
Frank> Briefly, what is the difference between Damas-Milner and Hindley-Milner Frank> typing? Are they different inferencing algorithms, or is it something like Frank> the notion of principal types is due to Damas and Milner whereas the Frank> inferencing algorithm itself is due t

Re: How to do Exceptions in Haskell (I think)

1998-06-04 Thread Peter Thiemann
Alex, would it be a solution if you defined > data RetVal b a = Result a | Exception b in this case you could say > instance Monad (RetVal b) where > return = Result > Result x >>= f = f x > Exception x >>= f = Exception x Hope that helps -Peter

Re: Structure of monads in an abstract form?

1998-07-06 Thread Peter Thiemann
> "Hans" == Hans Aberg <[EMAIL PROTECTED]> writes: Hans> Koen Claessen wrote: >> I think you can "encode", or "mimick" every monad by the following type, >> which is the monad of continuations: >> >> type M a = (a -> Action) -> Action >> >> unit :: a -> M a

Re: Haskell 98

1998-10-26 Thread Peter Thiemann
>> >> f f = f >> Hans> Haskell translates f f = f into f := f |-> f; on the right hand side Hans> "f" is a bound variable, on the left hand side "f" is a name. Suppose I Hans> inidicate variables with a slash, then the formula would read Hans> f := \f |-> \f

Re: type error, why?

1998-10-26 Thread Peter Thiemann
> "Alex" == S Alexander Jacobson <[EMAIL PROTECTED]> writes: Alex> I wrote the following function that attempts to generalize show by Alex> allowing the user to choose the function to stringify constructor Alex> arguments. >> stringArgs' sep stringer1 (MyFoo x i s) = >>

Re: type error, why?

1998-10-26 Thread Peter Thiemann
Alex> In other words, you are saying that I want a feature, first class Alex> polymorphism, that is now available in Hugs1.3c and from the docs, Alex> GHC4.0?. Yes. Alex> Since I am doing development in Hugs 1.4, I guess the question is when Alex> will Hugs1.4 have this fea

Re: Haskell 98

1998-10-26 Thread Peter Thiemann
> "Hans" == Hans Aberg <[EMAIL PROTECTED]> writes: >> It's not different logical entities, all occurrences of f are variables. Hans> Different occurrences of f have different semantic meaning (that is, the Hans> "f" in one place is not the same as the "f" in another place). Al

Re: Haskell 98 progress...

1998-11-23 Thread Peter Thiemann
> "Simon" == Simon Peyton-Jones <[EMAIL PROTECTED]> writes: >> I don't understand this remark. Are you telling me that after >> a '{-' token the usual lexical process is used to find the >> matching '-}' token? Simon> That's what I intended. Provided that scanning can't gi

Re: Haskell 98 progress...

1998-11-23 Thread Peter Thiemann
> "Alex" == S Alexander Jacobson <[EMAIL PROTECTED]> writes: Alex> Just to confirm, What is the official handling of: >> main = putStr " -- Hello World " Alex> and >> main = putStr " {- this is not a comment -} " in both cases the scanner is insi

non-linear patterns

1999-05-04 Thread Peter Thiemann
A friend and I recently discussed why patterns in Haskell are restricted to be linear. He found it unintuitive due to his background in term rewriting and logic. And he noted that it is easy to compile away as in: f (x, x) = e ==>> f (x, x') | x == x' = e It is also easy to transform away in

PEPM'02, Preliminary Call for Papers

2001-03-09 Thread Peter Thiemann
n Hughes (Chalmers Technical University, Sweden) Mark Jones (OGI, USA) Siau-Cheng Khoo (NUS, Singapore) Jakob Rehof (Microsoft Research, USA) Joao Saraiva(University of Minho, Portugal) Ulrik Schultz (University of Aarhus, Denmark) Peter Thiemann (Un

modules and re-export

2001-03-20 Thread Peter Thiemann
I have a little question about the following two modules. Suppose you want to write your own variant of the prelude that redefines a couple of names but leaves all the rest unchanged. The Haskell report says that the following should work: ~~

CFP: PEPM'02

2001-07-03 Thread Peter Thiemann
n Hughes (Chalmers Technical University, Sweden) Mark Jones (OGI, USA) Siau-Cheng Khoo (NUS, Singapore) Jakob Rehof (Microsoft Research, USA) João Saraiva(University of Minho, Portugal) Ulrik Schultz (University of Aarhus, Denmark) Peter Thiemann (Un

PEPM'02: Final Call for Papers

2001-09-17 Thread Peter Thiemann
n Hughes (Chalmers Technical University, Sweden) Mark Jones (OGI, USA) Siau-Cheng Khoo (NUS, Singapore) Jakob Rehof (Microsoft Research, USA) João Saraiva(University of Minho, Portugal) Ulrik Schultz (University of Aarhus, Denmark) Peter Thiemann (Universit

Robustness of instance Read Char

2001-10-16 Thread Peter Thiemann
Folks, my code has unwillingly been forced to read a large string generated by show. This turned out to be a robustness test because the effect is a stack overflow (with Hugs as well as with GHC) and, of course, this error happened in a CGI script. If you want to try the effect yourself, just t

PEPM'02 -- call for participation

2001-12-03 Thread Peter Thiemann
CALL FOR PARTICIPATION 2002 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'02) Portland, Oregon, USA, January 14-15, 2002 (colocated with POPL'02) http://www.inform

Announcement: WASH/CGI 1.0

2002-04-25 Thread Peter Thiemann
WASH/CGI Web Authoring System for Haskell WASH/CGI is an embedded DSL for server-side Web scripting based on the purely functional programming language Haskell. Its implementation is based on the portable common gateway interface (CGI) supported

TIP'02: Call for Participation

2002-06-12 Thread Peter Thiemann
France [co-chair] Jacques Garrigue, Kyoto University, Japan Eugenio Moggi, University of Genova, Italy Zhong Shao, Yale University, USA Peter Thiemann, Universität Freiburg, Germany [co-chair] Joe Wells, Heriot-Watt University, Edinburgh, Scotland _

MD5 in Haskell

2002-11-10 Thread Peter Thiemann
Folks, there used to be a Haskell implementation of MD5 and other cryptographic hashes available on http://c93.keble.ox.ac.uk/~ian/haskell/ Unfortunately, this URL seems to be obsolete (I cannot access it and it does not come up in Google anymore). If anybody out there still holds on to a copy o

Time library underspecified

2002-11-14 Thread Peter Thiemann
Did anyone try to use the standard Time library that comes with Haskell for a serious purpose? I wanted to, but came across the problem that the TimeDiff data type is underspecified. For example, what is the official way to convert a TimeDiff value into seconds? The problematic parts are: * how

Re: time since the epoch

2003-02-06 Thread Peter Thiemann
I've been running into similar problems, and I've also been pointed to the TimeExt library that George Russell was talking about. However, in the end, I had to implement something by myself. Much unfortunately though, my program relies on an undocumented feature of GHC's implementation of TimeDiff

Re: time since the epoch

2003-02-07 Thread Peter Thiemann
> "SM" == Simon Marlow <[EMAIL PROTECTED]> writes: >> Ha! After playing with this, I discovered that only the seconds were >> set and all other fields remained untouched. At least in ghc's >> implementation. Interestingly, TimeDiff derives Eq and Ord, but I'd >> better not ask

Re: time since the epoch

2003-02-10 Thread Peter Thiemann
SM> TimeDiff isn't a "duration", it's a way of specifying time offsets whose SM> duration depends on the base to which the offset is being added. If we SM> only had constant-duration offsets, then there would be no way to say SM> "give me a ClockTime for this time next Wednesday".

Re: FiniteMap performance WITHOUT any copying?

2003-02-10 Thread Peter Thiemann
Perhaps you should look at the Clean languages, which is similar to Haskell, but has a feature called "uniqueness typing". Using the type system, you can figure out the information that you are asking for and as far as I know, their implementation is optimzed in the manner you want. In fact, their

Re: time since the epoch

2003-02-11 Thread Peter Thiemann
>>>>> "Stefan" == Stefan Karrmann <[EMAIL PROTECTED]> writes: Stefan> Peter Thiemann (Thu, Feb 06, 2003 at 12:40:14PM -0800): >> John's code illustrates TimeDiff's deficiencies perfectly: >> >> There is also a more

Re: time since the epoch

2003-02-11 Thread Peter Thiemann
SM> I wrote a reply, but I don't really have anything new to say over what's SM> been said already, so I'll keep it brief instead. The copy of ISO8601 SM> that I looked at is here: SM> http://www.astroclark.freeserve.co.uk/iso8601/index.htm, but from what SM> you said I'm gues

Re: Time since the epoch

2003-02-11 Thread Peter Thiemann
George> OK, what TimeExts does, I hope, is add the appropriate amount of the appropriate George> time unit (whatever it is) directly, then rely on the CalendarTime conversions to George> resolve any overflows. This probably isn't very clear, George> so I'll give some examples of

Re: Time since the epoch

2003-02-12 Thread Peter Thiemann
George> So while I started typing this thinking it was a straight George> choice between Peter's monotonicity/invertibility and the George> fact that my system corresponds better to natural usage, George> Peter doesn't even have monotonicity or invertibility. Yes, I also realized

Re: Yet another weakly defined bug report

2003-02-13 Thread Peter Thiemann
Hi Ketil, I know your problem all too well. If you are sure that you need all of the file's content, then you should read it all from the start. I've found this little function handy and I'm using it all over the place: readFileStrictly :: FilePath -> IO String readFileStrictly filePath = do h

Use of H98 FFI

2003-08-01 Thread Peter Thiemann
I recently had my first exposure to Haskell's FFI when I was trying to compute MD5 and SHA1 hashes using the existing C implementations. In each case, the idea is to make the hash function available as function > md5 :: String -> String However, the naive implementation > md5_init md5_state

Re: Use of H98 FFI

2003-08-01 Thread Peter Thiemann
> "Derek" == Derek Elkins <[EMAIL PROTECTED]> writes: Derek> Derek> Except that I would probably mapM_ over a list of chunks, I don't Derek> see what the problem is with your second version of the code is. The second version allocates memory like crazy, so much that the poke

echoing of getChar, getLine, getContents

2003-09-22 Thread Peter Thiemann
The report states about getChar, getLine, and getContents: "By default, these input functions echo to standard output." In version 1.3 of the report, it used to continue "Functions in the I/O library provide full control over echoing." Apparently, this has been removed and the I/O library cont

Re: [Haskell] insufficiently [EMAIL PROTECTED] -- more counterintuitive stuff

2004-03-30 Thread Peter Thiemann
> "aj" == S Alexander Jacobson <[EMAIL PROTECTED]> writes: aj> I would assume that this function: aj> foo list@(h:t) = list aj> is equivalent to aj> foo list = list aj> where (h:t)=list aj> But passing [] to the first generates an error aj> even though h

[Haskell] CALL FOR PARTICIPATION: FLOPS 2012

2012-03-28 Thread Peter Thiemann
-CHAIRS = - Tom Schrijvers (Ghent University, Belgium) - Peter Thiemann (University of Freiburg, Germany) CONFERENCE SPONSORS === - Japan Society for Software Science and Technology (JSSST) SIGPPL - Information Science and Technology Center, Kobe University

[Haskell] PLAN-X 2008 Deadline approaching

2007-10-14 Thread Peter Thiemann
SchwartzbachUniversity of Aarhus, Denmark Jérôme Vouillon CNRS, France Ioana Manolescu (general chair) Gemo group, INRIA Futurs, France Peter Thiemann (program chair) University of Freiburg, Germany ___ Haskell mailing list Haskell@haskell.org

[Haskell] Call for Contributions - Workshop on Programming Languages and Computing Concepts (in German)

2018-03-29 Thread Peter Thiemann
Workshop on Programming Languages and Computing Concepts May 2-4, 2018, Physikzentrum Bad Honnef Deadline for abtracts: April 13, 2018 I'd like to draw your attention to a German workshop with Haskell-related topics. It's an informal workshop with an emphasis on presenting ongoing and timely work

[Haskell] Phd/PostDoc position on linear types and session types

2018-04-10 Thread Peter Thiemann
until the position is filled. The starting date is negotiable. Check our research webpage http://proglang.informatik.uni-freiburg.de/research/ or the DBLP publication profile http://dblp.dagstuhl.de/pers/hd/t/Thiemann:Peter for more information. Best regards -Peter Thiemann