Code Monkey home page Code Monkey logo

Comments (6)

mlite avatar mlite commented on July 24, 2024

from hoopl.

simonpj avatar simonpj commented on July 24, 2024

If it's just a question of boilerplate newtype wrappers, I'd be inclined to copy the necessary ones into hoopl, rather than take a dependency on another library. hoopl probably only uses half a dozen such functions.

Let's see what the hoopl maintainers say.

As to performance, I think that only newtype wrappers are involved, so perf impact should be zero. But worth checking anyway.

from hoopl.

hth313 avatar hth313 commented on July 24, 2024

I added some missing functions in the past, but restricyKeys requires connecting the IsSet with the IsMap somehow, and I have yet to figure out how to do it. I tried with fundeps, but I am not a type wizard by any means, so I am kind of stuck going in that direction.

from hoopl.

mlite avatar mlite commented on July 24, 2024

from hoopl.

hth313 avatar hth313 commented on July 24, 2024

I support reimplementing the newtype wrappers in hoopl.

So, how do you make it work?

src/Compiler/Hoopl/Label.hs:106:27: error:
    • Couldn't match expected type ‘set’ with actual type ‘LabelSet’
      ‘set’ is a rigid type variable bound by
        the type signature for:
          mapRestrictKeys :: forall set a.
                             IsSet set =>
                             LabelMap a -> set -> LabelMap a
        at src/Compiler/Hoopl/Label.hs:106:3-17
    • In the pattern: LS s
      In an equation for ‘mapRestrictKeys’:
          mapRestrictKeys (LM m) (LS s) = LM (restrictKeys m s)
      In the instance declaration for ‘IsMap LabelMap’
    • Relevant bindings include
        mapRestrictKeys :: LabelMap a -> set -> LabelMap a
          (bound at src/Compiler/Hoopl/Label.hs:106:3)

from hoopl.

mlite avatar mlite commented on July 24, 2024

from hoopl.

Related Issues (19)

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.