on master help sign in
Merge pull request #3860 from edmundsmith/issue3796
011de20Niklas Larsson
idris.cabal+1−1
@@ -273,7 +273,7 @@ Library
273 , ansi-wl-pprint < 0.7
273 , ansi-wl-pprint < 0.7
274 , array >= 0.4.0.1 && < 0.6
274 , array >= 0.4.0.1 && < 0.6
275 , base64-bytestring < 1.1
275 , base64-bytestring < 1.1
276− , binary >= 0.7 && < 0.9
276+ , binary >= 0.8.4.1 && < 0.9
277 , blaze-html >= 0.6.1.3 && < 0.10
277 , blaze-html >= 0.6.1.3 && < 0.10
278 , blaze-markup >= 0.5.2.1 && < 0.9
278 , blaze-markup >= 0.5.2.1 && < 0.9
279 , bytestring < 0.11
279 , bytestring < 0.11
src/IRTS/CodegenC.hs+1−1
@@ -208,7 +208,7 @@ bcc ((ASSIGNCONST l c):xs) = do
208 mkConst (I i) = "MKINT(" ++ show i ++ ")"
208 mkConst (I i) = "MKINT(" ++ show i ++ ")"
209 mkConst (BI i) | i < (2^30) = "MKINT(" ++ show i ++ ")"
209 mkConst (BI i) | i < (2^30) = "MKINT(" ++ show i ++ ")"
210 | otherwise = "MKBIGC(vm,\"" ++ show i ++ "\")"
210 | otherwise = "MKBIGC(vm,\"" ++ show i ++ "\")"
211− mkConst (Fl f) = "MKFLOAT(vm, " ++ show f ++ ")"
211+ mkConst (Fl f) = "MKFLOAT(vm, " ++ (map toUpper $ show f) ++ ")"
212 mkConst (Ch c) = "MKINT(" ++ show (fromEnum c) ++ ")"
212 mkConst (Ch c) = "MKINT(" ++ show (fromEnum c) ++ ")"
213 mkConst (Str s) = "MKSTR(vm, " ++ showCStr s ++ ")"
213 mkConst (Str s) = "MKSTR(vm, " ++ showCStr s ++ ")"
214 mkConst (B8 x) = "idris_b8const(vm, " ++ show x ++ "U)"
214 mkConst (B8 x) = "idris_b8const(vm, " ++ show x ++ "U)"
src/Idris/Core/Binary.hs+4−2
@@ -16,6 +16,8 @@ import Control.Applicative ((<$>), (<*>))
16import Control.DeepSeq (($!!))
16import Control.DeepSeq (($!!))
17import Control.Monad (liftM2)
17import Control.Monad (liftM2)
18import Data.Binary
18import Data.Binary
19+import Data.Binary.Get
20+import Data.Binary.Put
19import qualified Data.Text as T
21import qualified Data.Text as T
20import qualified Data.Text.Encoding as E
22import qualified Data.Text.Encoding as E
21import Data.Vector.Binary
23import Data.Vector.Binary
@@ -400,7 +402,7 @@ instance Binary Const where
400 BI x1 -> do putWord8 1
402 BI x1 -> do putWord8 1
401 put x1
403 put x1
402 Fl x1 -> do putWord8 2
404 Fl x1 -> do putWord8 2
403− put x1
405+ putDoublele x1
404 Ch x1 -> do putWord8 3
406 Ch x1 -> do putWord8 3
405 put x1
407 put x1
406 Str x1 -> do putWord8 4
408 Str x1 -> do putWord8 4
@@ -427,7 +429,7 @@ instance Binary Const where
427 return (I x1)
429 return (I x1)
428 1 -> do x1 <- get
430 1 -> do x1 <- get
429 return (BI x1)
431 return (BI x1)
430− 2 -> do x1 <- get
432+ 2 -> do x1 <- getDoublele
431 return (Fl x1)
433 return (Fl x1)
432 3 -> do x1 <- get
434 3 -> do x1 <- get
433 return (Ch x1)
435 return (Ch x1)
src/Idris/IBC.hs+1−1
@@ -48,7 +48,7 @@ import System.Directory
48import System.FilePath
48import System.FilePath
49
49
50ibcVersion :: Word16
50ibcVersion :: Word16
51−ibcVersion = 161
51+ibcVersion = 162
52
52
53-- | When IBC is being loaded - we'll load different things (and omit
53-- | When IBC is being loaded - we'll load different things (and omit
54-- different structures/definitions) depending on which phase we're in.
54-- different structures/definitions) depending on which phase we're in.