Skip to content

Word does not have instances for the Data.Num.Linear typeclasses  #466

@Qqwy

Description

@Qqwy

Describe the bug
It is currently impossible to use Word in a module using Prelude.Linear as prelude, because instances for Additive, Multiplicative, AddIdentity, MultIdentity, AdditiveGroup, Semiring, Ring, FromInteger and Num are missing for Word:

To Reproduce

{-# LANGUAGE NoImplicitPrelude #-}
module Example where
import Prelude.Linear

add1 :: Word %1 -> Word
add1 = (+ 1)

Expected behavior
This should compile.

Actual behavior
Compile error: No instance for (Additive Word) arising from the use of '+'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions