summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@digitalgrammars.com>2021-07-08 12:10:41 +0200
committerJohn J. Camilleri <john@digitalgrammars.com>2021-07-08 12:10:41 +0200
commitcdbe73eb475cf44e1a45b2abacb12756e394016a (patch)
tree1d36862a32215e978e1c2d3a99daa7c9d26439a8
parent6077d5dd5b55bd5d70d782dd00af6ba868f2090d (diff)
Remove two missing-methods warnings
-rw-r--r--src/compiler/GF/Compile/Compute/Predef.hs4
-rw-r--r--src/runtime/haskell/PGF/Binary.hs3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/Compute/Predef.hs b/src/compiler/GF/Compile/Compute/Predef.hs
index 609a17798..b9e23d424 100644
--- a/src/compiler/GF/Compile/Compute/Predef.hs
+++ b/src/compiler/GF/Compile/Compute/Predef.hs
@@ -27,6 +27,10 @@ instance Predef Int where
instance Predef Bool where
toValue = boolV
+ fromValue v = case v of
+ VCApp (cPredef,cPTrue) [] -> return True
+ VCApp (cPredef,cPFalse) [] -> return False
+ _ -> verror "Bool" v
instance Predef String where
toValue = string
diff --git a/src/runtime/haskell/PGF/Binary.hs b/src/runtime/haskell/PGF/Binary.hs
index e0e50f4be..a78472ea9 100644
--- a/src/runtime/haskell/PGF/Binary.hs
+++ b/src/runtime/haskell/PGF/Binary.hs
@@ -28,7 +28,7 @@ instance Binary PGF where
let v = (major,minor)
if major==pgfMajorVersion && minor<=pgfMinorVersion
then getPGF'
- else if v==Old.version
+ else if v==Old.version
then Old.getPGF'
else fail $ "Unsupported PGF version "++show (major,minor)
@@ -185,6 +185,7 @@ instance Binary Instr where
put (PUSH_ACCUM (LFlt d)) = putWord8 78 >> put d
put (POP_ACCUM ) = putWord8 80
put (ADD ) = putWord8 84
+ get = fail "Missing implementation for ‘get’ in the instance declaration for ‘Binary Instr’"
instance Binary Type where
put (DTyp hypos cat exps) = put (hypos,cat,exps)