Hello,
Isaac, this works for me.
Thx a lot,
Steffen
2007/12/5, Isaac Dupree [EMAIL PROTECTED]:
Steffen Mazanek wrote:
Hi,
Stefan and Isaac, thx for providing quick advice.
@Stefan: Unfortunately I have to use a list.
@Isaac: I do not get it. Could you please provide a short
::Program
main = mapM_ (\(s,a) - putStrLn s a) [(flowchart construct and parse,
test prop_ConstructParse)]
2007/12/4, Stefan O'Rear [EMAIL PROTECTED]:
On Tue, Dec 04, 2007 at 03:36:20PM +0100, Steffen Mazanek wrote:
Hello,
I want to quickcheck a property on a datatype representing
programs
Hello,
I want to quickcheck a property on a datatype representing
programs (=[Stmt]) and need to define a specific instance
instance Arbitrary [Stmt]
(mainly to restrict the size of the list).
In quickcheck an instance Arbitrary of lists is already defined.
Which parameters do I have to give
Hello,
is there a function f::[a-b]-a-[b] in the libraries? Couldn't find one
using
hoogle although this seems to be quite a common thing...
Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Cool! Haskell surprised me once again :)
@Paul: Thank you for pointing me to the old thread.
@Neil: Is there a way to let hoogle find this kind of stuff? It
would be a quite complex inference though.
2007/6/6, apfelmus [EMAIL PROTECTED]:
Steffen Mazanek wrote:
is there a function f::[a-b
Note that there are very systematic and natural ways to derive dynamic
programming algorithms in functional languages. In a sense, much of the
work of R. Bird centers this topic. The book Algebra of Programming
http://web.comlab.ox.ac.uk/oucl/research/pdt/ap/pubs.html#Bird-deMoor96:Algebra
Hello,
I have two questions regarding a Cocke, Younger, Kasami parser.
Consider this program:
type NT = Char -- Nonterminal
type T = Char -- Terminal
-- a Chomsky production has either two nonterminals or one terminal on its
right-hand side
type ChomskyProd = (NT, Either T (NT, NT))
-- a
Once again thank you apfelmus :-)
The key point of the dynamic programming algorithm is indeed to memoize
the results gs i j for all pairs of i and j. In other words, the insight
that yields a fast algorithm is that for solving the subproblems gs i j
(of which there are n^2), solution to
.-Inform. Steffen Mazanek
Institut für Softwaretechnologie
Fakultät Informatik
Universität der Bundeswehr München
85577 Neubiberg
Tel: +49 (0)89 6004-2505
Fax: +49 (0)89 6004-4447
E-Mail: [EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hello,
is there an efficient algorithm that takes two positive numbers n and m and
that computes all lists l of numbers 0x=n such that sum l = m?
For instance
alg 5 1 = [[1]]
alg 5 2 = [[1,1],[2]]
alg 5 3 = [[1,1,1],[1,2],[2,1],[3]]
...
I know that filter (\l-sum l == m) (powerSet [1..n])
Thats it! Thanks a lot. I do not even need forceOutput, because I
perform a bottom-up analysis. And the timeline I got looks sooo
great (perfect polynomial behavior :-))
Best regards,
Steffen
2007/5/20, Matthew Brecknell [EMAIL PROTECTED]:
Steffen Mazanek:
I have written a function f
,
Steffen
--
Dipl.-Inform. Steffen Mazanek
Institut für Softwaretechnologie
Fakultät Informatik
Universität der Bundeswehr München
85577 Neubiberg
Tel: +49 (0)89 6004-2505
Fax: +49 (0)89 6004-4447
E-Mail: [EMAIL PROTECTED]
___
Haskell-Cafe mailing list
love Haskell with a passion - I'm curious whether I love or hate the
combination)
Thanks
Neil
On 5/9/07, Steffen Mazanek [EMAIL PROTECTED] wrote:
I have done some experiments relating to our discussion. The approach to
generate Haskell code from UML class diagrams is not very promising
-mazanek.de/blog/2007/05/visual-language-howto.html
Best regards,
Steffen
2007/4/14, Brian Smith [EMAIL PROTECTED]:
On 4/14/07, Steffen Mazanek [EMAIL PROTECTED] wrote:
Brian, but don't you think that you have to write a lot
of boilerplate code in Haskell?
I have never felt I was writing
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
--
Dipl.-Inform. Steffen Mazanek
Institut für Softwaretechnologie
Fakultät Informatik
Universität der Bundeswehr München
85577 Neubiberg
Tel: +49 (0)89 6004-2505
Fax: +49 (0)89 6004
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Dipl.-Inform. Steffen Mazanek
Institut für Softwaretechnologie
Fakultät Informatik
Universität der Bundeswehr München
85577 Neubiberg
Tel: +49 (0)89 6004-2505
Fax: +49 (0)89 6004-4447
E
are well known. Best practices
in programming are propagated, for Haskell e.g. use different modules
for different things, use the tedious import/export lists, Haddock your
code...
What are your ideas?
Best regards,
Steffen
--
Dipl.-Inform. Steffen Mazanek
Institut für Softwaretechnologie
have no choice and
are not allowed to discuss the sense of this approach :-)
How should the code look like?
Best regards,
Steffen
2007/4/13, Brian Smith [EMAIL PROTECTED]:
On 4/13/07, Steffen Mazanek [EMAIL PROTECTED] wrote:
Hello everybody,
I would like to start a discussion on how
structures that
operate on this data. How would you procede? This is similar to HaXML
that helped you to generate Haskell types for an xml schema.
Best regards,
Steffen
--
Dipl.-Inform. Steffen Mazanek
Institut für Softwaretechnologie
Fakultät Informatik
Universität der Bundeswehr München
85577
Hello,
say, we want to find the k'th element in a sorted list.
In imperative languages it is much more efficient
to not use quicksort first and get the k'th element later,
but to use a quicksearch algorithm that sorts only
the relevant parts of the array.
In Haskell one could implement this
Hello again,
first of all, thank you Don for your help in making hsChess accessible.
I have
to have a look at darcs and cabal first :-)
I have added some more content and a discussion page to the wiki, please
contribute your thoughts.
Furthermore I added a link to the german project and task
I originally used a more general approach (probably similar to the one
you refer to), but
kicked generality out in favor of simplicity. In teaching one should
probably just discuss
this aspect, but stay with the simple approach (I'll add a note to the
wiki page :-)). In
contrast, for the real
for the exercises so I started the wiki
page
http://haskell.org/haskellwiki/Learning_Haskell_With_Chess
on this topic. I will add more content when I am back to office.
Every contribution and discussion is welcome.
Best regards,
Steffen
Steffen Mazanek schrieb:
Hello,
I recently implemented
of the gametree and the application of the minimax algorithm
can be easily generalized.
If somebody is interested I gladly provide the used project
definition and the particular work orders (in German only).
Best regards,
Steffen Mazanek
--
Dipl.-Inform. Steffen Mazanek
Institut für
Hello,
thank you for all the valuable comments. A main
function with arguments would correspond better
to the principle of the least surprise, however,
you are perfectly right with your arguments, too.
getArgs is not so hard to remember I guess :-)
Bye,
Steffen
Hello again.
Since type signature declarations for functions are generally considered good
practice, those who use - getArgs would actually need to type two extra
characters. And those who do not use getArgs typically (which may or may not
be the case in general), would type an extra 14
Hello everybody,
each time I write an application that makes use of command line arguments
I have to copypaste the code for dealing with these args to my program
from a reference implementation, because it is so hard to remember.
What do you think about changing the default type of main or
Hello,
thank you for the references. Looks promising. I will read
it carefully.
A nice solution I really like was found by Alastair Reid. He
proposed to me (hope it is ok to cite this) the declaration:
data Salutation = [Either Char Name]
We think it will not scale well, too, however, it is
.
I may well split the two types in the future.
This would be great.
Thank you for the informations,
Steffen Mazanek
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
.
I may well split the two types in the future.
This would be great.
Thank you for the informations,
Steffen Mazanek
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
with Typing Haskell in Haskell
and I really expected a declaration like
data Kind = Star | Kfun Kind Kind
Any help is greatly appreciated.
Regards,
Steffen Mazanek
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman
Hello,
the following error is slightly confusing:
ghc --show-iface
ghc-6.0.1: unrecognised flag: --show-iface
Usage: For basic information, try the `--help' option.
ghc --show-iface Unify.hi
__interface Main Unify 1 where
__export Unify Unifiable{mgu} match mguType varBind;
...
A hint
this? Do you see even more
advantages of this approach or would it be senseless
work?
Regards,
Steffen Mazanek
[1] http://www.openmath.org/
[2] http://www.ross.net/funnelweb/
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman
is
changing so fast...
Regards,
Steffen Mazanek
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Hello,
to add a new keyword, say struct to
the GHC, I have added ITstruct to data
type Token in module Lex.lhs. Further
on I have adapted ghcExtensionKeywordsFM.
Is this already sufficient for lexing?
In LexCore there is a function lexKeyword
without a comment. It is called by lexer
if the
Hello,
in the Haskell report the latex code environment is
mentioned:
http://www.haskell.org/onlinereport/literate.html
Would it make sense, to add a xml like code environment
as well, e.g., code.../code?
Ciao,
Steffen
___
Haskell mailing list
[EMAIL
Hello.
Also, when declaring named fields of a type, such as
data Data1 = Data1{ok1::Bool}
data Data2 = Data2{ok2::Bool}
the field names for different type also have to be unique.
All function declarations in a module have to be unique. And, e.g., the
data constructor Data1 is a function with
Hello,
I am looking for a real world example of a type constructor, that expects
another type constructor as an argument in the context of subtyping,
e.g., one could define
--not Haskell98
data T a b c = F (a b c)
a::T (-) Pt Pt
a = F id
b::T (-) CPt CPt
b = F id
l = [a,b]
Thereby CPt is assumed
Hello,
thank you for the idea of using variables directly to see what happens.
This is really a simplification for the proof.
At first I thought that there should be a simpler solution and I tried to
modify your approach, so that it applies to = as well, but now I am
convinced :-) I have
Hello,
all_fib :: [Float]
You define all_fib to return a list of Float, but even does only work
for numbers whose type is an instance of the class Integral, e.g. Int.
HTH and ciao,
Steffen
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
miss
convenient and standardized libraries for gui-programming! I think, this
is a serious problem.
Bye,
Steffen Mazanek
P.S.
I do my best to motivate other people to give Haskell a try, e.g. during
a lecture about
document-description-languages I had provided a funny example, how
useful HaXml
Thank you. The '10' should be explained in the report as well.
Ciao,
Steffen
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Hello,
consider the following monad (which is a slight adaptation of the
one used in Typing Haskell in Haskell) as given:
data Error a = Error String | Ok a
data TI a = TI (Subst - Int - Error (Subst, Int, a))
instance Monad TI where
return x = TI (\s n - Ok (s,n,x))
TI f = g = TI (\s n -
Thank you all for your help. I will try this ghc-flag.
It is interesting as well, that in contrast to Haskell Standard ML ensures,
that pattern-matches are exhaustive and irredundant.
Ciao,
Steffen
___
Haskell mailing list
[EMAIL PROTECTED]
Hello,
I do not completely understand the first part of chapter 3 of the
Haskell-report.
Concretely I am stumbling about the notation of nonterminals indexed by
their precedence
level. This should be a number ranging from 0 to 9. But what about this
exp^{10}
production rule?
I would be very
Hello,
I have a question about pattern-matching. In the Haskell-report it is
not postulated, that
pattern matching has to be exhaustive. Would it be possible at all to
implement an
algorithm, which checks Haskell-style patterns for exhaustiveness? What
kinds of
complication can be expected?
code environments?
If not I would prefer a command line option.
What do you think about this?
Ciao,
Steffen
--
Steffen Mazanek - www.steffen-mazanek.de - GPG: 791F DCB3
Haskell, that's where I just curry until fail, unwords
any error, drop all undefined, maybe break, otherwise
in sequence
.
Ciao,
Steffen
--
Steffen Mazanek - www.steffen-mazanek.de - GPG: 791F DCB3
Haskell, that's where I just curry until fail, unwords
any error, drop all undefined, maybe break, otherwise
in sequence span isControl and take max $, id: (d:[])
___
Haskell
Ok, I had missed something:
I can write instead:
data Type = TCon String (Maybe String) ...
and declare a function lmtc
lmtc (TCon _ x) = x
...
But why not allow syntactic sugar?
Sorry,
Steffen
--
Steffen Mazanek - www.steffen-mazanek.de - GPG: 791F DCB3
Haskell, that's where I just
Interestingly, when I want hugs to show me the type
of
fun::(forall a.[a]-Int)-[b]-[c]-Int
it tells me: ERROR - Use of fun requires at least 1 argument
Why that? At least I have explicitely specified the type.
Hmm, ghci behaves properly.
But using hugs I get the same error :-(.
No idea!
Hello,
a first draft of my little Haskell-history collection is online now:
http://pseiko.gmxhome.de/pseiko/Haskell-History.html
Please note, that one part is still just copied from
http://www.idt.mdh.se/kurser/cd5100/ht02/history.html
but I hope it will evolve quickly. Moreover some parts
of Johan Nordlanders
ohugs (http://www.cs.chalmers.se/~nordland/ohugs/).
Thanks in advance,
Steffen Mazanek
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
quit a lot of dead links in the
internet, wasting time and staying without results.
Help me to close this existing gap.
All suggestions are welcome.
Steffen Mazanek
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Hello again,
See Conception, evolution, and application of functional programming
languages by Paul Hudak. That's a great starting point for a History of
Haskell page:
http://portal.acm.org/citation.cfm?doid=72551.72554
thank you, I will read it.
You're welcome to steal the simple layout
Hello,
frombin :: [Bit] - Int
frombin [] = 0
frombin (n:ns) = sum (n:( frombin (map (*2) ns)))
frombin takes a list of Bits and returns an
Int, but (:) needs a list as its second argument.
Try something like
frombin (n:ns) = n + 2*(frombin ns)
or
frombin = foldr (\x y-x+2*y) 0
Ciao,
this will help.
Ciao,
Steffen
--
Steffen Mazanek
Werner Heisenberg Weg 102 App. 232
85579 Neubiberg
GPG key fingerprint: A165 227D B288 5E10 701D BF5F E91C 6B88 24C8 397D
http://blackhole.pca.dfn.de:11371/pks/lookup?op=getsearch=0x24C8397D
Have a look here:
http://haskell.cs.yale.edu/haskellDB/
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Hello.
I do Literate Programming this way:
At first I define a Latex environment code as verbatim
e.g. so: \newenvironment{code}{\footnotesize\verbatim}{\endverbatim\normalsize}
This environment is understood by the Haskell compilers.
All my modules are own documents concluded in the main
someone can give a hint, how to tackle these kinds of problems.
Or maybe there are some libraries doing this job.
Thanks in advance and best greetings.
Steffen Mazanek
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo
Hello,
I am wondering if it would be worth while (and possible) to allow the
definition of types by regular expressions, e.g.
data Date = Date #RegExp([0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9])
or easier with some auxiliary constructs.
Clearly there would be some drawbacks with the use of
Hello.
I am toying with the idea of implementing the OHaskell-concepts
of Johan Nordlander in the GHC (as a diploma thesis).
Simon Marlow adviced me to do some market research in this
group and here we go.
I am interested in all kinds of comments, advices, scrupulosites...
Thanks and
Oh, sorry.
I was asked for the link:
http://www.math.chalmers.se/~nordland/ohaskell/
Nice greetings,
Steffen
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
62 matches
Mail list logo