and single-branch case are
interchangeable, but apparently, not...
Cheers,
Andreas
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http:/
loops =
let Just x =
case () of
() | x > 0 -> Just 1
in x
Here it's obvious that 'x' is used in the rhs of its own definition.
Roman
* Andreas Abel [2013-07-09 16:42:00+0200]
Hi, is this a known bug or feature of GHC (7.4.1, 7.6.3)?:
I got a loopi
e guard. But, since you could use something from the
where clause on the guard, and we certainly won't be restricting
recursing on the where clause, it also seems compelling to allow
recursion on the guard.
My 2 centavos, =)
On Tue, Jul 9, 2013 at 2:12 PM, Andreas Abel wrote:
Thank
ave the same way now. Which ones should change?
Only the first one? Hard to tell.
If Haskell had a non-recursive let, that'd probably be a different
story. But it doesn't.
Definitely agree.
On Tue, Jul 9, 2013 at 1:12 PM, Andreas Abel mailto:andreas.a...@ifi.lmu.de>> wrote:
u might want to write it now.
In the meanwhile, there is a very ugly workaround:
test = runIdentity $ do
(x,s) <- return $ foo 1 []
(y,s) <- return $ bar x s
(z,s) <- return $ baz x y s
return (z,s)
After all, bind is non-recursive let.
--
Andreas
giggle):
http://hackage.haskell.org/packages/archive/mtl/2.1/doc/html/src/Control-Monad-State-Class.html#state
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://w
e some optional totality checking in Haskell. If Oleg decides not
to use a state monad, he will still have to be careful not to confuse
the numbers, but if he does, then the compiler will reject his code
instead of producing <>ing code.
Greets,
Ertugrul
--
Andreas Abel <>< Du
and (not to be or to be and
(not to be or to be and ... that is the list monad.
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abe
ld doubt that nhc98 would interpret let xs = 0 : xs differently
than ghc if it implemented anything close to the Haskell 98 standard.
But I am not in a position to prove you wrong.
Cheers,
Andreas
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science,
of your identifiers...
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
___
Haskell-Cafe mailing
In my own code, this idiom
is more likely than the one that sparked the discussion.
Doug
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der gel
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMA
ler than that. So I do not see your point.
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
terM.
In fact, your implementation is already in the (Set a ->) reader monad,
in normalized form. It looks already optimal to me.
Cheers,
Andreas
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Mu
baz x y s of
(z, s) -> ...
-Edward
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
__
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538
the
time and that was only because it was in the only package I was not
using -Wall on.
-Edward
On Wed, Jul 17, 2013 at 12:23 PM, Andreas Abel mailto:andreas.a...@ifi.lmu.de>> wrote:
Here, again, is your ACTUAL CODE, commented, deployed, looping, and
maybe linked into your projec
s an example OF,
however. I found the code a little difficult to
follow, but when that's fixed up, there's no longer
any reason to want non-recursive let, OR a monad.
I've run out of time tonight, but hope to say more tomorrow.
___
Haskell-Cafe mailing li
o do scope-checking before type-checking, which
also makes sense, you cannot make recursiveness type-dependent.
Distinguishing 'let' into 'fun', 'val' and 'val rec' could help here:
Non-recursive:
val x = e
in e'
Recursive:
fun f x = e
ons do not matter.
Cheers,
Andreas
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
___
Haskel
On 22.07.2013 10:50, MigMit wrote:
On Jul 22, 2013, at 12:27 PM, Andreas Abel
wrote:
On 20.07.13 9:36 PM, Evan Laforge wrote:
However, I'm also not agitating for a non-recursive let, I think
that ship has sailed. Besides, if it were added people would
start wondering about non-recu
ently lifts them out. Thus, for -O1..
memoized_fib is also memoizing. (I ran it, this time ;-) !)
Cheers,
Andreas
On 22.07.13 11:43 PM, Tom Ellis wrote:
On Mon, Jul 22, 2013 at 04:16:19PM +0200, Andreas Abel wrote:
In general, I would not trust such compiler magic, but just let-bind
anything
On 23.07.13 4:34 AM, Richard A. O'Keefe wrote:
On 22/07/2013, at 8:14 PM, Andreas Abel wrote:
Just today, my student asked me why the following program does nothing:
Did you ask your student why their code should not be torn into pieces,
burned to ashes, and incorporated into a po
sufficiently lazy, e.g. in the one point
compactification of the naturals:
data Conat = S Conat | Z
There it represents infinity with proper sharing.
-Edward
On Jul 22, 2013, at 10:24 AM, Andreas Abel wrote:
On 22.07.2013 10:50, MigMit wrote:
On Jul 22, 2013, at 12:27 PM, Andreas Abel
re
ps = (:) <$> p <*> ps
<|> pure []
is another perfectly cromulent example of "value" recursion, and one
that is far nearer and dearer to my heart and is similarly opaque to any
such analysis.
-Edward
On Wed, Jul 24, 2013 at 4:14 AM, Andreas Abel mailto:andreas
th (\_ x -> x) headers $ ast
let title = M.member "Title" ast
let headers1 = if title then headers else
M.delete "_limit_to " . M.delete "_limit_recd" $ headers
write_fields h ast1 fields
return (rv,headers1,mv)
___
Hask
On 26.07.13 6:44 PM, Andreas Abel wrote:
headers0 <- M.fromList <$> do
forM fields_header $ \ (n, fld) -> do
(n,) <$> reflect $ fld ast
Ah, I forgot one more 'do' to override the stronger binding of <$>:
(n,) <$> do reflect $
On 09.08.2013 17:44, Jerzy Karczmarczuk wrote:
"Indiscrete Thoughts" by Gian-Carlo Rota, published by Birkhäuser in
1997. Available on the Web.
For download or to buy? [This looks very interesting...]
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretic
reading from a, thus, application
f x
is ambiguous or too sensitive, especially with type inference.
I realise that this may be too open a research area for your project...
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Muni
e
> want or that are in need
of improvement. Help on any of these would be
> greatly appreciated.
>
> There is some developer and user documentation on the github wiki,
>
including a quick guide to getting your own server instance up and
>
running.
>
> You can ask que
" as a task name
>
> I was much more sceptical
when I had only seen the example in Niklas's
> message.
>
___
> Haskell-Cafe mailing
list
> Haskell-Cafe@haskell.org
>
http://www.haskell.org/mailman/listinfo/haskell-cafe [1]
Agda cannot generalize). The user has to go back an insert more
type annotations. But this is safe, whereas silent late instantiation
breaks compositionality.
On 16.07.2012 17:25, Andreas Abel wrote:
Today a student came to me with a piece of code that worked it executed
by itself, b
overloading. All
these features are essential (type-classes are significant,
defaulting is part of the standard and is being used more and more).
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr.
What made you think that? Your questions weren't well answered? What
other venue would you propose?
Yes, they were. But for discussion about metavariables maybe something
like a haskell implementor's forum would be more appropriate. Yet I am
only an Agda implementor.
Cheers,
Andreas
x monolithic parts, where a lot of Haskell programmers
will have
a tendency to work with simpler types and break things down into
smaller pieces. But... who knows... I haven't seen the many cases
where this has happened to you.
--
Chris
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Mu
]{inputenc}
If I remove this, my unicode characters are garbled in the
lhs2tex-generated code. Does anoyone know a smart workaround besides
replacing all the unicode characters manually by some math symbols in
the .tex file?
Cheers,
Andreas
--
Andreas Abel <>< Du bist der gelieb
Hi,
I found the problem, it solved itself with an update of the TeXLive suite...
https://github.com/kosmikus/lhs2tex/issues/24
Thanks for your help!
Andreas
On 01.11.12 11:15 PM, Dominique Devriese wrote:
Andreas,
2012/11/1 Andreas Abel :
Hello,
maybe someone has experience in
rictness penalty.
Cheers,
Andreas
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
__
ever be selected by
cabal install (except maybe by explicit user safety overriding).
I think such a mechanism is not only necessary for security purposes,
but also to safe the valuable resources of our community.
Cheers,
Andreas
--
Andreas Abel <>< Du bist der geliebte Mens
ckages that rely on the specific interface of mylib-2.1
(e.g. having a constraint mylib == 2.1) and do not work with mylib-2.2
would still work, since they would be built with mylib-2.1.1
On Tue, Nov 13, 2012 at 9:27 AM, Andreas Abel mailto:andreas.a...@ifi.lmu.de>> wrote:
After 2 da
t docs, means that I cannot currently search for anything gtk2hs
related :(
Can someone please look into prodding this cron job so it doesn't take
days to run, or look into resolving any errors that might be causing
this unfortunate behaviour?
Thank you for your time,
and happy hacking,
Ti
are easily overlooked. In a typical cabal install session I
see tons of irrelevant warnings floating by.
On Nov 13, 2012 6:12 PM, "Andreas Abel" mailto:andreas.a...@ifi.lmu.de>> wrote:
On 13.11.2012 17:39, Dan Burton wrote:
Mixed feelings here. I personally
kell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.
Nabble.com.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andr
roduce any new syntactic elements
and has fewer tokens at the point of use.
I don’t see any need for a \ in the syntax: this is a functional
language we are talking about after all. Once we know that “of”
introduces a function, that should be enough.
--
Andreas Abel <>< Du bist
import System.Environment
case' :: b -> (b -> c) -> c
case' = flip ($)
main = do
s <- getArgs
case' s $ \case -- image '\case' was actually '\of' or 'of'
[x] -> putStrLn ("Hello " ++ x)
_
not to declare it a Monoid. Likewise, imposing a (technical) superclass
constraint on MonadWriter has nothing to do with whether the Monad will
be well-behaved.
This is true in both directions: even if the type is an instance of
Monoid, nothing forces the Monad instance to use the
;) x
where
scope = (currentScope defaultEnv) { scopePrecedence = ctx }
I am surprised this is a legal form of shadowing. To understand which
definition of 'scope' shadows the other, I have to consult the formal
definition of Haskell.
But I studied computer science to *not* bec
Luckily, {-# OPTIONS -fwarn-unused-binds #-} saves me from searching for
the formal spec...
On 26.02.13 10:25 AM, Andreas Abel wrote:
To your amusement, I found the following in the Agda source:
abstractToConcreteCtx :: ToConcrete a c => Precedence -> a -> TCM c
abstractToConcrete
he block
structure is implicit and handled by indentation).
Cheers,
Andreas
On 26.02.2013 10:57, Tillmann Rendel wrote:
Hi,
Andreas Abel wrote:
To your amusement, I found the following in the Agda source:
abstractToConcreteCtx :: ToConcrete a c => Precedence -> a -> TCM c
abstractT
list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY
andreas.a...@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~a
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
Oettingenstr.
53 matches
Mail list logo