urbit-hob

Haskell utilities for phonetic base wrangling.
Log | Files | Refs | README | LICENSE

commit 92e7998df3a8a12d49e976ebc804babdf7608296
parent 939a2c77120f164044dcd66a0db796ca6be86a8e
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri, 13 Sep 2019 15:50:40 -0230

FIXME WIP

Diffstat:
Mlib/Urbit/Ob/Ob.hs | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/Urbit/Ob/Ob.hs b/lib/Urbit/Ob/Ob.hs @@ -13,7 +13,7 @@ module Urbit.Ob.Ob ( ) where import Data.Bits -import Data.Word (Word32) +import Data.Word (Word32, Word64) import Urbit.Ob.Muk (muk) import Prelude hiding (tail) @@ -108,10 +108,12 @@ fe r a b f m = loop 1 capL capR where then a * arr + ell else a * ell + arr | otherwise = - let eff = f (pred j) arr - tmp = if odd j - then (ell + eff) `mod` a - else (ell + eff) `mod` b + let eff = f (pred j) arr + lfs = (fromIntegral ell :: Word64) + (fromIntegral eff :: Word64) + tmp64 = if odd j + then lfs `mod` (fromIntegral a :: Word64) + else lfs `mod` (fromIntegral b :: Word64) + tmp = fromIntegral tmp64 in loop (succ j) arr tmp -- | 'Fen' in B&R (2002).