Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

using strict byte strings

  • Loading branch information...
commit b8366b8b3ff510294c0367df00ba36cdf54ae76f 1 parent ec410d8
authored November 02, 2011
2  src/Language/Bitcoin/Interpreter.hs
@@ -8,7 +8,7 @@ import Control.Arrow ((***), Arrow)
8 8
 import Language.Bitcoin.Types
9 9
 import Language.Bitcoin.Utils (b2i, i2b, bsIsTrue)
10 10
 import Language.Bitcoin.Text (print_result)
11  
-import qualified Data.ByteString.Lazy as B
  11
+import qualified Data.ByteString as B
12 12
 
13 13
 run_interpreter :: Program -> Keyring -> Either String Result
14 14
 run_interpreter program keyring =
2  src/Language/Bitcoin/Parser.hs
@@ -10,7 +10,7 @@ import Language.Bitcoin.Utils (b2i, bsLength)
10 10
 import Text.ParserCombinators.Parsec (Parser, parse, spaces, endBy, eof, many, (<|>), (<?>), alphaNum, char, hexDigit, newline, unexpected)
11 11
 import Text.Parsec.Prim (parserFail)
12 12
 import Control.Monad (liftM, when)
13  
-import qualified Data.ByteString.Lazy as B
  13
+import qualified Data.ByteString as B
14 14
 import qualified Data.Char as C
15 15
 import Data.Word (Word8)
16 16
 import Data.Int (Int32)
2  src/Language/Bitcoin/Preprocessor.hs
@@ -8,7 +8,7 @@ module Language.Bitcoin.Preprocessor
8 8
 import Data.Int (Int32)
9 9
 import Language.Bitcoin.Types
10 10
 import Language.Bitcoin.Utils (bs, pad)
11  
-import qualified Data.ByteString.Lazy as B
  11
+import qualified Data.ByteString as B
12 12
 import qualified Data.List as List
13 13
 
14 14
 -- run_preprocessor :: Script -> (Program, Keyring) {{{1
2  src/Language/Bitcoin/Text.hs
@@ -9,7 +9,7 @@ import Language.Bitcoin.Types
9 9
 import Data.Char (intToDigit)
10 10
 import Data.List (intersperse)
11 11
 import Data.Word (Word8)
12  
-import qualified Data.ByteString.Lazy as B
  12
+import qualified Data.ByteString as B
13 13
 
14 14
 print_result :: Result -> String -- {{{1
15 15
 print_result (Result code machine) = print_result_code code ++ "\n" ++ print_machine machine
2  src/Language/Bitcoin/Types.hs
... ...
@@ -1,6 +1,6 @@
1 1
 module Language.Bitcoin.Types where
2 2
 -- import {{{1
3  
-import qualified Data.ByteString.Lazy as B
  3
+import qualified Data.ByteString as B
4 4
 import Data.Int (Int32)
5 5
 import qualified Data.List as List
6 6
 
2  src/Language/Bitcoin/Utils.hs
@@ -3,7 +3,7 @@ module Language.Bitcoin.Utils
3 3
   b2i, b2i', i2b, bsLength, pad, unpad, bs, bsIsTrue
4 4
 ) where
5 5
 
6  
-import qualified Data.ByteString.Lazy as B
  6
+import qualified Data.ByteString as B
7 7
 import Control.Exception.Base (assert)
8 8
 import Data.Int (Int32)
9 9
 import Data.Ix (inRange)
2  test/Language/Bitcoin/Test/Parser.hs
@@ -8,7 +8,7 @@ import Language.Bitcoin.Parser (run_parser)
8 8
 import Language.Bitcoin.Types
9 9
 import Language.Bitcoin.Utils (bs)
10 10
 import Test.HUnit
11  
-import qualified Data.ByteString.Lazy as B
  11
+import qualified Data.ByteString as B
12 12
 import qualified Data.List as List
13 13
 
14 14
 tests = TestLabel "Parser" $ TestList $ good ++ bad
2  test/Language/Bitcoin/Test/Utils.hs
@@ -4,7 +4,7 @@ module Language.Bitcoin.Test.Utils
4 4
 ) where
5 5
 
6 6
 import Language.Bitcoin.Utils (b2i', i2b, unpad)
7  
-import qualified Data.ByteString.Lazy as B
  7
+import qualified Data.ByteString as B
8 8
 import Test.HUnit
9 9
 
10 10
 b2iTestCases = [

0 notes on commit b8366b8

Please sign in to comment.
Something went wrong with that request. Please try again.