Giter VIP home page Giter VIP logo

type-operators's Introduction

type-operators

A collection of type-level operators

See Hackage for documentation.

type-operators's People

Contributors

shou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

type-operators's Issues

type-operators-0.2.0.0 does not build with GHC 9.4

$ cabal build
...
Build profile: -w ghc-9.4.4 -O1
...
Building library for type-operators-0.2.0.0..
[1 of 1] Compiling Control.Type.Operator ( Control/Type/Operator.hs, /Users/abel/tmp/type-operators-0.2.0.0/dist-newstyle/build/x86_64-osx/ghc-9.4.4/type-operators-0.2.0.0/build/Control/Type/Operator.o, /Users/abel/tmp/type-operators-0.2.0.0/dist-newstyle/build/x86_64-osx/ghc-9.4.4/type-operators-0.2.0.0/build/Control/Type/Operator.dyn_o )

Control/Type/Operator.hs:97:15: error:
    Conflicting family instance declarations:
      [] <+> _ = () :: Constraint
        -- Defined at Control/Type/Operator.hs:97:15
      forall {k} {c :: k -> Constraint} {a :: k} {as :: [k]}.
        c <+> (a : as) = (c a, c <+> as)
          -- Defined at Control/Type/Operator.hs:99:15
   |
97 | type instance (<+>) [] _ = (() :: Constraint)
   |               ^^^^^

Lifted from:

In my role as Hackage Trustee, I restricted base to <4.17 on hackage: https://hackage.haskell.org/package/type-operators-0.2.0.0/revisions/

`Could not deduce: Show <+> '[]`

Hi,

<+> type operator need a fix. In GHC 8.10 and GHC 9.2.4:

Definition is compiled, but function invocation gives a type error:

sp :: Show <+> [a, b] => a -> b -> String ; sp a b = show a <> show b
> sp () ()

<interactive>:35:1: error:
    • Could not deduce: Show <+> '[] arising from a use of ‘sp’
    • In the expression: sp () ()
      In an equation for ‘it’: it = sp () ()

Extending type family with follow member solve the problem:

type instance (<+>) _ '[] = (() :: Constraint)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.