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
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
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
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
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
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
> "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
>>
>> 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
> "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) =
>>
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
> "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
> "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
> "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
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
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
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:
~~
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
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
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
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
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
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
_
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
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
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
> "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
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".
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
>>>>> "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
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
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
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
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
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
> "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
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
> "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
-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
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
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
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
41 matches
Mail list logo