So all this talk of locating head [] and fromJust failures got me
thinking:
Couldn't we just use rewrite rules to rewrite *transparently*
all uses of fromJust to safeFromJust, tagging the call site
with a location?
To work this requires a few things to go right:
* a rewrite rule
ndmitchell:
> Hi
>
> >My last impression is that instead of using -xc it is better to write
> >programs in a debug-friendly style. For example, let g x must
> >return (Just _), but the programmer is not 100% sure that g x is free
> >of bugs. Then, instead of
> > f x
Hello,
On Tuesday 14 November 2006 11:34, Simon Marlow wrote:
> Thorkil Naur wrote:
> > ... I have
> > produced an experimental darcs patch that solves some problems, while
> > possibly introducing others:
> >
http://thorkilnaur.dk/~tn/GHC/testsuite/patch/barton_mangler_bug_patch_1.patch
.
>
Both of these messages (from Neil and Serge) suggest use debugging ideas.
Would anyone like to add them to
http://haskell.org/haskellwiki/Debugging
Simon
| Use a safe module:
| http://neilmitchell.blogspot.com/2006/11/library-idea-safe-library.html
| - always works, a little bit of effo
On Tue, Nov 14, 2006 at 12:08:07PM +, Jon Fairbairn wrote:
> >[..]
> > My last impression is that instead of using -xc it is better to write
> > programs in a debug-friendly style. For example, let g x must
> > return (Just _), but the programmer is not 100% sure that g x is free
> > of
More about finding the source of fromJust Nothing.
For g n = fromJust $ f n,
ghc-6.6 often looses the reference to f in its run-time error
report -- when f returns Nothing.
And this is difficult to locate the source.
But one could write
g n = let
Hi
My last impression is that instead of using -xc it is better to write
programs in a debug-friendly style. For example, let g x must
return (Just _), but the programmer is not 100% sure that g x is free
of bugs. Then, instead of
f x = h $ fromJust $ g x
one need
The Paths_foo.hs file is generated in a separate directory, something like
dist/autogen/ (I can't remember exactly, you should be able to find it). To get
GHCi to find it, you'll need to pass an appropriate -i flag.
a general question about cabal and ghci:
if I have successfully loaded my pr
Thanks to people who discussed the question of
"who said `fromJust Nothing'" and -xc option.
My last impression is that instead of using -xc it is better to write
programs in a debug-friendly style. For example, let g x must
return (Just _), but the programmer is not 100% sure that g x
Bulat Ziganshin wrote:
Hello glasgow-haskell-users,
i still forget to ask: if my program is idle during long time, is GC
will occur each 0.3 seconds or GHC is smart enough to check that no
much memory was allocated after last GC?
You'll only get one GC. Or at least that's the theory: I rememb
On 2006-11-14 at 13:57+0300 "Serge D. Mechveliani" wrote:
> Thanks to people who discussed the question of
> "who said `fromJust Nothing'" and -xc option.
>
> My last impression is that instead of using -xc it is better to write
> programs in a debug-friendly style. For example, let g x m
Dear GHC folks,
We (well, mostly SimonPJ) have written down a set of guidelines for contributing
to GHC on the wiki:
http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions
If you're interested in contributing, please take a look. The requirements are
mostly common sense and not too o
Claus Reinke wrote:
>> The Paths_foo.hs file is generated in a separate directory,
>> something like dist/autogen/ (I can't remember exactly, you should
>> be able to find it). To get GHCi to find it, you'll need to pass an
>> appropriate -i flag.
>
> a general question about cabal and ghci:
>
>
Serge D. Mechveliani wrote:
Simon P. Jones wrote today about the -xc option to help with
finding who called fromJust Noting.
Now, I see in the GHC Guide:
--
-xs
(Only available when the program is compiled for profiling.) Wh
Vyacheslav Akhmechet wrote:
Hi,
I took advantage of Cabal's data-files feature to allow me to portably
store and access data files. Cabal generated a Paths_pkg module that I
imported. From Cabal's point of view everything works: I can
configure, build, install, and run. However, I can no longer
15 matches
Mail list logo