Skip to content

Reason behind Math.NumberTheory.Powers.Modular deprecation? #219

Open
@Javran

Description

@Javran

I see the module is deprecated in 77e70a1 but I'm not really sure about the rationale, nor do I find any migration guide on this.

Tell me if I'm not using Data.Mod.Word right, but it becomes painfully verbose when m is only available at runtime, for example powModWod becomes this:

powModWord :: Word -> Word -> Word -> Word
powModWord b e m = case someNatVal (fromIntegral m) of
  Just (SomeNat (_ :: Proxy md)) ->
    unMod (fromIntegral @_ @(Mod md) b ^% e)
  Nothing -> error "unreachable"

Not to mention language pragmas one has to enable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions