diff options
Diffstat (limited to 'src/Helper.hs')
-rw-r--r-- | src/Helper.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Helper.hs b/src/Helper.hs index 3c1f2f2..b4b48e1 100644 --- a/src/Helper.hs +++ b/src/Helper.hs @@ -365,7 +365,7 @@ humanifyString :: Expression -> Maybe String humanifyString e = do es <- unlistify e str <- mapM binaryToChar' es - pure $ show str + pure str humanifyPair :: Expression -> Maybe String humanifyPair e = do @@ -438,7 +438,7 @@ binaryToChar e = show <$> binaryToChar' e binaryToChar' :: Expression -> Maybe Char binaryToChar' e = do n <- binaryToDecimal' e - if n < 255 then Just $ chr $ fromIntegral n else Nothing + if n > 31 && n < 127 || n == 10 then Just $ chr $ fromIntegral n else Nothing binaryToDecimal' :: Expression -> Maybe Integer binaryToDecimal' e = do |