droundy:
> On Fri, Aug 26, 2005 at 03:57:39PM +1000, Donald Bruce Stewart wrote:
> > Good idea. I've now removed substrPS, and added your initPS/tailPS
> > implementations.
> 
> Could you send another patch?

Attached.

> > Ok, maybe we should keep the darcs-style unlinesPS/linesPS, but with
> > alternate names, so as not to confuse people expecting line/unlines
> > behaviour. Any suggestions?
> 
> Another possibility would be to query the libraries list to see if they'd
> consider modifying the prelude (which is perhaps unlikely).  On the other
> hand, the comment in the haskell report is false, so one could decide to
> revise the code in favor of the comment rather than the other way around:
> 
> >From the Prelude:
> 
> -- lines breaks a string up into a list of strings at newline characters.
> -- The resulting strings do not contain newlines.  Similary, words
> -- breaks a string up into a list of words, which were delimited by
> -- white space.  unlines and unwords are the inverse operations.
> -- unlines joins lines with terminating newlines, and unwords joins
> -- words with separating spaces.
> 
> It claims that ulines is the inverse of lines... of course it also says the
> same thing about unwords, which is even more untrue...  I guess they
> probably wouldn't be keen on modifying the Prelude, but it might not hurt
> to ask.

I seem to remember a discussion about this behaviour on one of the
haskell lists a couple of  years ago, I'll try to find the reference.

> > Also, I see: 
> >     Prelude Data.FastPackedString> words "a          b"
> >     ["a","b"]
> >     Prelude Data.FastPackedString> wordsPS (packString "a          b")
> >     ["a","","","","","","","","","","b"]
> 
> This one was probably accidental.  wordsPS is never used in darcs, and I
> wouldn't mind making it equivalent to the Prelude words.  Making wordsPS
> invertible seems less useful than making linesPS invertible.

Ok.

-- Don
New patches:

[Use substrPS-less versions of initPS and tailPS
[EMAIL PROTECTED] {
hunk ./FastPackedString.hs 395
+-- | Extract the elements after the head of a packed string, which must be 
non-empty.
hunk ./FastPackedString.hs 398
-tailPS ps
-  | len <= 0 = error "FastPackedString.tailPS: tail []"
-  | len == 1 = nilPS
-  | otherwise  = substrPS ps 1 (len - 1)
-  where
-    len = lengthPS ps
+tailPS (PS p s l) 
+    | l <= 0    = error ("FastPackedString.tailPS: empty list")
+    | l == 1    = nilPS                                                        
            
+    | otherwise = PS p (s+1) (l-1)
hunk ./FastPackedString.hs 403
+-- | Return all the elements of a packed string except the last one.
+-- The string must be finite and non-empty.
hunk ./FastPackedString.hs 407
-initPS ps
-  | len <= 0 = error "FastPackedString.initPS: init []"
-  | len == 1 = nilPS
-  | otherwise  = substrPS ps 0 (len - 1)
-  where
-    len = lengthPS ps
+initPS (PS p s l) 
+    | l <= 0    = error ("FastPackedString.initPS: empty list")
+    | l == 1    = nilPS                                                        
            
+    | otherwise = PS p s (l-1)                                                 
         
hunk ./FastPackedString.hs 680
+{-
hunk ./FastPackedString.hs 689
+-}
}

Context:

[remove hideous malloc hack.
David Roundy <[EMAIL PROTECTED]>**20050818161411] 
[change my AUTHORS email to [EMAIL PROTECTED]
David Roundy <[EMAIL PROTECTED]>**20050808124703] 
[fix mkstemp implementation for win32
Peter Strand <[EMAIL PROTECTED]>**20050810211303] 
[Implement parts of System.Posix.(IO|Files) for win32
[EMAIL PROTECTED] 
[implement RawMode with library functions instead of ffi
[EMAIL PROTECTED] 
[call hsc2hs without output filename argument
[EMAIL PROTECTED] 
[Rename compat.c to c_compat.c to avoid object filename conflict with Compat.hs
[EMAIL PROTECTED] 
[Move atomic_create/sloppy_atomic_create to Compat
Ian Lynagh <[EMAIL PROTECTED]>**20050730141703] 
[Split the raw mode stuff out into its own .hsc file. Windows needs some TLC
Ian Lynagh <[EMAIL PROTECTED]>**20050730134030] 
[Move maybe_relink out of compat.c
Ian Lynagh <[EMAIL PROTECTED]>**20050730131205] 
[Remove is_symlink
Ian Lynagh <[EMAIL PROTECTED]>**20050730122255] 
[Move mkstemp to Compat.hs
Ian Lynagh <[EMAIL PROTECTED]>**20050730020918] 
[Remove unused function
Ian Lynagh <[EMAIL PROTECTED]>**20050730010118] 
[Start Compat.hs, and move stdout_is_a_pipe from compat.c
Ian Lynagh <[EMAIL PROTECTED]>**20050730004829] 
[fix for bug Ian found in apply.
David Roundy <[EMAIL PROTECTED]>**20050811162558
 This is the bug manifested in the cabal repository.
] 
[fix compilation errors with ghc-6.2.2 on win32
Peter Strand <[EMAIL PROTECTED]>**20050809192759] 
[Retain both Git's author and committer.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20050810000820] 
[Move slurping into syncPristine.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20050809232101
 Avoids creating a useless pristine tree when there is none.  Thanks to
 Ian for pointing this out.
] 
[Split --relink into --relink and --relink-pristine.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20050809230951
 Relinking the pristine tree breaks handling of timestamps, which causes
 Darcs to compare file contents.  It should not be used unless you know
 what you are doing.
] 
[make repair work on partial repositories.
David Roundy <[EMAIL PROTECTED]>**20050805113001] 
[Cleanup --verbose handling in repair command
Matt Lavin <[EMAIL PROTECTED]>**20050805020630] 
[clean up Printer.wrap_text.
David Roundy <[EMAIL PROTECTED]>**20050808114844] 
[add several changelog entries.
David Roundy <[EMAIL PROTECTED]>**20050808114800] 
[improve EOD message a tad.
David Roundy <[EMAIL PROTECTED]>**20050807112644
 This change also introduces a "wrapped_text" function in Printer, so we
 won't have to worry so often about manually wrapping lines.
] 
[changed ***DARCS*** to ***END OF DESCRIPTION***
Jason Dagit <[EMAIL PROTECTED]>**20050729032543] 
[remove unused opts argument from apply_patches and apply_patches_with_feedback
Matt Lavin <[EMAIL PROTECTED]>**20050807031038] 
[Use apply_patch_with_feedback from check and repair commands
Matt Lavin <[EMAIL PROTECTED]>**20050805020830] 
[add code to read patch bundles with added CRs.
David Roundy <[EMAIL PROTECTED]>**20050806222631
 I think this'll address bug #291.
] 
[accept command-line flags in any order.
David Roundy <[EMAIL PROTECTED]>**20050806211828
 In particular, we no longer require that --flags precede filename and
 repository arguments.
] 
[show patch numbers instead of dots on get
Matt Lavin <[EMAIL PROTECTED]>**20050804013649] 
[add obliterate command as alias for unpull.
David Roundy <[EMAIL PROTECTED]>**20050804104929] 
[Do not ask confirmation for revert -a
[EMAIL PROTECTED]
 Giving -a as a parameter means the user expects all changes to be reverted.
 Just like for unrevert and record go ahead with it do not ask for confirmation.
] 
[clarify help text for 'd' in SelectPatches.
David Roundy <[EMAIL PROTECTED]>**20050806231117] 
[Add --with-static-libs configure flag for linking static versions of libraries.
[EMAIL PROTECTED] 
[add changelog entry for bug #477.
David Roundy <[EMAIL PROTECTED]>**20050806212148] 
[changelog entry for bug #189.
David Roundy <[EMAIL PROTECTED]>**20050731132624] 
[add description of how to add changelog entries to ChangeLog.README.
David Roundy <[EMAIL PROTECTED]>**20050806225901] 
[Explain the missing ChangeLog
Mark Stosberg <[EMAIL PROTECTED]>**20050526135421
 
 It should be easy for casual users and contributors to view and update the
 ChangeLog.
 
 Providing a README file in the place where people are most likely to look
 provides a very useful clue.
 
 However, it's still not clear to me exactly how the system works, so I have
 left a stub to complete that documentation.
 
     Mark
 
] 
[fix obsolete error explanation in get_extra bug.
David Roundy <[EMAIL PROTECTED]>**20050804130610] 
[simplify fix for bug 463; reuse /// from FilePathUtils
Matt Lavin <[EMAIL PROTECTED]>**20050804021130] 
[Make curl exit with error on failed downloads
[EMAIL PROTECTED] 
[Bump up AC_PREREQ version to 2.59.
[EMAIL PROTECTED] 
[fix for bug 463 (with new test)
Matt Lavin <[EMAIL PROTECTED]>**20050802002116] 
[bump version number, since I just made a release.
David Roundy <[EMAIL PROTECTED]>**20050731190756] 
[Use simpler curl_version() function to get version string.
Kannan Goundan <[EMAIL PROTECTED]>**20050322221027] 
[fix documentation on --reorder-patches.
David Roundy <[EMAIL PROTECTED]>**20050731185406] 
[add changelog entry for bug #224.
David Roundy <[EMAIL PROTECTED]>**20050731133942] 
[fix bug when editing long comment leaves empty file.
David Roundy <[EMAIL PROTECTED]>**20050731133612] 
[TAG 1.0.4pre2
David Roundy <[EMAIL PROTECTED]>**20050731121029] 
Patch bundle hash:
f85063cb6e9fe74254dae895243ac030bc68029e
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to