In John Hughes's The Design of Pretty printing library paper, he says:
The implementations which we are trying to derive consist of equations of
a restricted form. We will derive implementations by proving their
constituent equations from the specification. By itself this is no
guarantee
Daryoush Mehrtash dmehrtash at gmail.com writes:
What does restricted form mean?
non-restricted: e.g., f (f x y) z = f x (f y z))
restricted: the shape of function declarations in Haskell
(where lhs is a pattern)
definitions are terminating ...
non-termination: an equation like f x y = f
It is important to have execution traces in case of error. specially in
server applications that run 24/7 such are web applications
Thanks to the wonderful package monadloc by Pepe Iborra, now MFlow can
generate a complete execution trace in case of error.
The control-monad-exception uses
Francesco Mazzoli f...@mazzo.li writes:
import qualified Data.HashSet as S
nub :: Hashable a = [a] - [a]
nub = S.toList . S.fromList
Well, the above is not stable while Niklas’ is. But I guess that’s not
the point of your message :).
We could also implement Data.BloomFilter.nub, which
No idea why it has gone down, my guess is that the Apache rule that
says treat it as a CGI script got changed to serve it as a file. In
the meantime you can use a copy of Hoogle at:
https://www.fpcomplete.com/hoogle
Thanks, Neil
On Mon, Jul 15, 2013 at 5:19 PM, Niklas Hambüchen m...@nh2.me
Hi.
we are using template Haskell to splice in some code
that is produced by reading and transforming the contents of another file.
now, if this other file is touched (by editing),
but not the main file, then ghc (and cabal) do not realize
that the main file does need to be recompiled.
is
Yup, such a thing exists! I think it's a little bit obscure because for
some bizarre reason it isn't reexported by Language.Haskell.TH:
http://hackage.haskell.org/packages/archive/template-haskell/2.8.0.0/doc/html/Language-Haskell-TH-Syntax.html#v:addDependentFile
-Michael
On Tue, Jul 16,
There is a GHC ticket about implementing a DEPENDS pragma for doing
this [0]. There are patches attached, but it looks like it isn't
finished yet.
Erik
[0] http://ghc.haskell.org/trac/ghc/ticket/4900
On Tue, Jul 16, 2013 at 7:41 PM, Johannes Waldmann
waldm...@imn.htwk-leipzig.de wrote:
Hi.
Hello,
Please, find below the third call for papers for IFL 2013.
Please forward these to anyone you think may be interested.
Apologies for any duplicates you may receive.
best regards,
Jurriaan Hage
Publicity Chair of IFL
CALL FOR PAPERS
25th SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF
I think you want qAddDependentFile in Language.Haskell.TH.Syntax
http://hackage.haskell.org/packages/archive/template-haskell/2.7.0.0/doc/html/Language-Haskell-TH-Syntax.html
On Tue, Jul 16, 2013 at 05:41:19PM +, Johannes Waldmann wrote:
Hi.
we are using template Haskell to splice in
That's great. We should collaborate on this. I wrote the file-location
package and Michael Snoyman wrote monad-logger: both of these give file
location information. I also added command tracing to Shelly (which could
also benefit from this kind of thing) and recently released rollbar for
error
We are excited to share we are accepting submissions for our *FP Haskell
Competitionhttps://www.fpcomplete.com/business/competition/competition-overview
*. Your code and tutorials can earn you $1,000 in cash prizes each month.
We're looking for sample Haskell projects that solve specific
I have a common pattern in my command-line programs; I start out with a
configuration data type, which over-simplified looks like:
data Cfg = Cfg { verbose :: Bool }
Now, there's usually a default configuration,
default :: Cfg
default = Cfg False
The user can override the defaults one of
On Tue, Jul 16, 2013 at 04:57:59PM -0400, Michael Orlitzky wrote:
This all works great, except that when there's 20 or so options, I
duplicate a ton of code in the definition of OptionalCfg. Is there some
pre-existing solution that will let me take a Cfg and create a new type
with Cfg's fields
I am pleased to announce that, after a terrible struggle, version 0.13
of the module-management package is now available on hackage. The
performance has been upped from dismal to adequate (about a 30-fold
improvement) and many bugs have been fixed. The most important for
import cleaning is that
On 07/16/2013 09:57 PM, Michael Orlitzky wrote:
I have a common pattern in my command-line programs; I start out with a
configuration data type, which over-simplified looks like:
data Cfg = Cfg { verbose :: Bool }
Now, there's usually a default configuration,
default :: Cfg
On 14.07.2013 13:20, Niklas Hambüchen wrote:
I've taken the Ord-based O(n * log n) implementation from yi using a Set:
ordNub :: (Ord a) = [a] - [a]
ordNub l = go empty l
where
go _ [] = []
go s (x:xs) = if x `member` s then go s xs
Ah, now I have the solution:
{-# LANGUAGE CPP #-}
(|) = flip ($)
#define LET(p, e) (e) | \ (p) -
bla = LET(x, 5)
LET(Just x, Just (x+1))
x
#define MLET(p, e) (e) | \ (p) - do
main = do
MLET((x, y), (5, 3))
print (x + y)
Beautiful, ain't it? Sigh.
--Andreas
On 11.07.2013
On 07/16/2013 05:06 PM, Tom Ellis wrote:
On Tue, Jul 16, 2013 at 04:57:59PM -0400, Michael Orlitzky wrote:
This all works great, except that when there's 20 or so options, I
duplicate a ton of code in the definition of OptionalCfg. Is there some
pre-existing solution that will let me take a
On 07/11/2013 08:37 AM, AntC wrote:
oleg at okmij.org writes:
...
In Haskell I'll have to uniquely number the s's:
let (x,s1) = foo 1 [] in
let (y,s2) = bar x s1 in
let (z,s3) = baz x y s2 in ...
and re-number them if I insert a new statement.
I once wrote about
Brian Marick sent me a couple of his stickers.
The one I have on my door reads to be less wrong than yesterday.
The other one I keep free to bring out and wave around:
An example would be handy about now.
All of the arguing to and fro -- including mine! -- about
non-recursive let has
The suggestion of parameterizing on a functor would be good, however
there's another approach I've often seen (although it's not quite what
you've asked for). You can leave your config datatype alone, but instead
of making it a monoid have your configuration parsers return functions with
the type
Oh, very nice. It seems reasonable to extend this to Cfg - IO Cfg to
support things like dynamically loading config files, if needed.
On Jul 16, 2013 5:42 PM, John Lato jwl...@gmail.com wrote:
The suggestion of parameterizing on a functor would be good, however
there's another approach I've
On 07/16/2013 08:41 PM, John Lato wrote:
The suggestion of parameterizing on a functor would be good, however
there's another approach I've often seen (although it's not quite what
you've asked for). You can leave your config datatype alone, but
instead of making it a monoid have your
24 matches
Mail list logo