Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

RFCT Update to newer Haskell standard

  • Loading branch information...
commit 070d185e2b671730f94429693a17ecac93496567 1 parent 986b51b
@luispedro authored
Showing with 12 additions and 7 deletions.
  1. +4 −0 ChangeLog
  2. +5 −6 hex/DVIDecode.lhs
  3. +3 −1 hex/Hex.lhs
View
4 ChangeLog
@@ -1,3 +1,7 @@
+Version 0.0.5+
+ * Refactor Macros/Tokens to emphacise Monadic interfact
+ * Update to newer Haskell
+
Version 0.0.5 2012-04-08 by luispedro
* Implement ^^@ notation
* Add subscript and superscript typesetting in simplified math mode
View
11 hex/DVIDecode.lhs
@@ -4,8 +4,7 @@ module Main where
import System.Environment
import qualified Data.ByteString.Lazy as B
-import qualified IO
-import System.IO
+import qualified System.IO as SysIO
import Data.Char
import Data.Binary (Word32)
import Data.Bits (testBit)
@@ -212,12 +211,12 @@ A little helper function for unix like file specification, where either
\code{-} or \emph{no file name} can both stand for \code{stdin}:
\begin{code}
-inputfile :: [String] -> IO Handle
+inputfile :: [String] -> IO SysIO.Handle
inputfile [] = do
- hSetBinaryMode IO.stdin True
- return IO.stdin
+ SysIO.hSetBinaryMode SysIO.stdin True
+ return SysIO.stdin
inputfile ["-"] = inputfile []
-inputfile [fname] = openBinaryFile fname IO.ReadMode
+inputfile [fname] = SysIO.openBinaryFile fname SysIO.ReadMode
inputfile _ = error "hex.DVIDecode.inputfile: Too many files."
\end{code}
View
4 hex/Hex.lhs
@@ -7,10 +7,12 @@ module Hex
( processinputs
, readFont
) where
-import System.IO.Error
+import System.IO.Error hiding (catch)
+import Prelude hiding (catch)
import System.IO.Unsafe
import System.FilePath.Posix
import Control.Monad
+import Control.Exception
import System.Process (readProcess)
import qualified Data.ByteString.Lazy as B
import Data.IORef
Please sign in to comment.
Something went wrong with that request. Please try again.