tags 536959 + patch
thanks

A patch is attached which ports 03_add-readline-support.dpatch to use
System.Console.Editline.Readline from libghc6-editline-dev.

We would prefer to just package haskell-readline but the copyright status of
that package is in question.

Enjoy.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org
       `-
diff -urNd helium-1.6.orig/debian/control helium-1.6/debian/control
--- helium-1.6.orig/debian/control      2009-08-08 17:09:53.000000000 +0100
+++ helium-1.6/debian/control   2009-08-08 17:10:31.000000000 +0100
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Arjan Oosting <ar...@debian.org>
 Build-Depends: autotools-dev, debhelper (>= 5), dpatch, 
- ghc6 (>= 6.8.2), haddock, libghc6-mtl-dev, libghc6-parsec-dev, uuagc
+ ghc6 (>= 6.8.2), haddock, libghc6-mtl-dev, libghc6-parsec-dev, uuagc, 
libghc6-editline-dev
 Standards-Version: 3.7.3
 Vcs-Svn: svn://svn.debian.org/svn/pkg-haskell/packages/helium
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-haskell/packages/helium
diff -urNd helium-1.6.orig/debian/patches/03_add-readline-support.dpatch 
helium-1.6/debian/patches/03_add-readline-support.dpatch
--- helium-1.6.orig/debian/patches/03_add-readline-support.dpatch       
2009-08-08 17:09:53.000000000 +0100
+++ helium-1.6/debian/patches/03_add-readline-support.dpatch    2009-08-08 
17:10:09.000000000 +0100
@@ -13,7 +13,7 @@
  endif
  HC_OPTS = -static -fglasgow-exts -fallow-undecidable-instances 
-fallow-overlapping-instances \
 -              $(PACKAGENET) -package lang -package text -i$(IFACES) 
$(EXTRA_HC_OPTS)
-+              $(PACKAGENET) -package lang -package text -package readline 
-i$(IFACES) $(EXTRA_HC_OPTS)
++              $(PACKAGENET) -package lang -package text -package editline 
-i$(IFACES) $(EXTRA_HC_OPTS)
  
  AG      = @WithAG@
  AG_OPTS = -mscfr
@@ -24,27 +24,24 @@
  import Monad(when)
  import IO(stdout, hFlush)
  import System(system, getEnv, getArgs, exitWith, ExitCode(..))  
-+import System.Console.SimpleLineEditor(initialise,restore,getLineEdited)
++import qualified System.Console.Editline.Readline as RL
  import OSSpecific(slash)
  import Directory
- 
-@@ -75,8 +76,14 @@
+
+@@ -75,8 +76,11 @@
          else
              return initialState
              
 -    -- Enter read-eval-print loop            
-+    -- Initialize readline
-+    initialise
++    -- Initialize editline
++    RL.initialize
 +
 +    -- Enter read-eval-print loop 
      loop stateAfterLoad
-+
-+    -- Restore normal terminal behaviour
-+    restore
      
      return ()
- 
-@@ -89,21 +96,21 @@
+
+@@ -89,21 +89,24 @@
  
  loop :: State -> IO State
  loop state = do
@@ -52,11 +49,12 @@
 -    hFlush stdout
 -    command' <- getLine
 -    let command = trim command'
-+    command' <- getLineEdited (prompt state)
++    command' <- RL.readline (prompt state)
 +    let command = fmap trim command'
      newState <- case command of
 -        (':':cmd:rest) -> 
-+        (Just (':':cmd:rest)) -> 
++        (Just (':':cmd:rest)) -> do
++            RL.addHistory (':':cmd:rest)
              processCommand (toLower cmd) (trim rest) state
 -        (':':_) -> do
 +        (Just (':':_)) -> do
@@ -66,10 +64,14 @@
 +        (Just expression) -> do
              if null expression 
                  then return ()
-                 else processExpression expression state
+-                else processExpression expression state
++                else do
++                    RL.addHistory expression
++                    processExpression expression state
              return state
 +        (Nothing) -> do
-+            return state
++            do return state
      loop newState
    where
      prompt :: State -> String
+
diff -urNd helium-1.6.orig/debian/patches/04_fixes-for-ghc6.dpatch 
helium-1.6/debian/patches/04_fixes-for-ghc6.dpatch
--- helium-1.6.orig/debian/patches/04_fixes-for-ghc6.dpatch     2009-08-08 
17:09:53.000000000 +0100
+++ helium-1.6/debian/patches/04_fixes-for-ghc6.dpatch  2009-08-08 
17:10:09.000000000 +0100
@@ -49,8 +49,8 @@
  PACKAGENET = 
  endif
  HC_OPTS = -static -fglasgow-exts -fallow-undecidable-instances 
-fallow-overlapping-instances \
--              $(PACKAGENET) -package lang -package text -package readline 
-i$(IFACES) $(EXTRA_HC_OPTS)
-+              $(PACKAGENET) -package containers -package mtl -package parsec 
-package readline -i$(IFACES) $(EXTRA_HC_OPTS)
+-              $(PACKAGENET) -package lang -package text -package editline 
-i$(IFACES) $(EXTRA_HC_OPTS)
++              $(PACKAGENET) -package containers -package mtl -package parsec 
-package editline -i$(IFACES) $(EXTRA_HC_OPTS)
  
  AG      = @WithAG@
  AG_OPTS = -mscfr

Attachment: signature.asc
Description: PGP signature

Reply via email to