refactor(workflows): remove old number resolution utils
This commit is contained in:
parent
d5f401be4a
commit
4f58f652cd
23
src/Utils.hs
23
src/Utils.hs
@ -10,7 +10,6 @@ import qualified Data.Foldable as Fold
|
||||
import Data.Foldable as Utils (foldlM, foldrM)
|
||||
import Data.Monoid (First, Sum(..))
|
||||
import Data.Proxy
|
||||
import Data.Scientific (base10Exponent)
|
||||
|
||||
import Data.CaseInsensitive (CI)
|
||||
import qualified Data.CaseInsensitive as CI
|
||||
@ -348,28 +347,6 @@ rationalToFixed3 = rationalToFixed
|
||||
rationalToFixed2 :: Rational -> Fixed E2
|
||||
rationalToFixed2 = rationalToFixed
|
||||
|
||||
--data SomeResolution = forall prec. HasResolution prec => SomeResolution (Proxy prec)
|
||||
--
|
||||
--instance Eq SomeResolution where
|
||||
-- SomeResolution (_ :: Proxy p) == SomeResolution (_ :: Proxy p') = True
|
||||
--instance Ord SomeResolution where
|
||||
-- compare _ _ = EQ
|
||||
--
|
||||
--instance ToJSON SomeResolution where
|
||||
-- toJSON (SomeResolution (_ :: Proxy prec)) = undefined
|
||||
--instance FromJSON SomeResolution where
|
||||
-- parseJSON = Aeson.withScientific "SomeResolution" $ \s -> case base10Exponent s of
|
||||
-- 0 -> return $ SomeResolution (Proxy @E0)
|
||||
-- 1 -> return $ SomeResolution (Proxy @E1)
|
||||
-- 2 -> return $ SomeResolution (Proxy @E2)
|
||||
-- 3 -> return $ SomeResolution (Proxy @E3)
|
||||
-- e -> terror $ "SomeResolution parseJSON error: expected exponent E(0|1|2|3), but got " <> tshow e
|
||||
--
|
||||
--someResolutions :: [SomeResolution]
|
||||
--someResolutions = [ SomeResolution (Proxy @E0), SomeResolution (Proxy @E1), SomeResolution (Proxy @E2), SomeResolution (Proxy @E3) ]
|
||||
--
|
||||
--singleRes :: SomeResolution
|
||||
--singleRes = SomeResolution (Proxy @E2)
|
||||
|
||||
|
||||
----------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user