Code Monkey home page Code Monkey logo

partial-isomorphisms's People

Contributors

hvr avatar schernichkin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rtreutlein hvr

partial-isomorphisms's Issues

Do you plan ghc-9.8 support?

Currently it doesn't compile - see commercialhaskell/stackage#7248
(just wanted to move this out of stackage - and maybe to your attention)

       Preprocessing library for partial-isomorphisms-0.2.3.0..
       Building library for partial-isomorphisms-0.2.3.0..
       [2 of 7] Compiling Control.Isomorphism.Partial.TH

       /home/curators/work/unpack-dir/unpacked/partial-isomorphisms-0.2.3.0-97fcf1b1d5b32a38bd62ab43694fb8213ead11d5ef32f51661c1306655ea911a/src/Control/Isomorphism/Partial/TH.hs:41:73: error: [GHC-83865]
           • Couldn't match type ‘BndrVis’ with ‘()’
             Expected: [TyVarBndr ()]
               Actual: [TyVarBndr BndrVis]
           • In the second argument of ‘DecInfo’, namely ‘tyVars’
             In the second argument of ‘($)’, namely
               ‘DecInfo (ConT name) tyVars cs’
             In the expression: return $ DecInfo (ConT name) tyVars cs
          |
       41 | decInfo (DataD    _ name tyVars _ cs _) =  return $ DecInfo (ConT name) tyVars cs
          |                                                                         ^^^^^^

       /home/curators/work/unpack-dir/unpacked/partial-isomorphisms-0.2.3.0-97fcf1b1d5b32a38bd62ab43694fb8213ead11d5ef32f51661c1306655ea911a/src/Control/Isomorphism/Partial/TH.hs:42:72: error: [GHC-83865]
           • Couldn't match type ‘BndrVis’ with ‘()’
             Expected: [TyVarBndr ()]
               Actual: [TyVarBndr BndrVis]
           • In the second argument of ‘DecInfo’, namely ‘tyVars’
             In the second argument of ‘($)’, namely
               ‘DecInfo (ConT name) tyVars [c]’
             In the expression: return $ DecInfo (ConT name) tyVars [c]
          |
       42 | decInfo (NewtypeD _ name tyVars _ c _) =  return $ DecInfo (ConT name) tyVars [c]
          |                                                                        ^^^^^^

defineIsomorphisms should accept parameter with iso prefix/suffix

In most cases partial isomorphisms not need outside syntax definition module and never get exported. Sometimes this names may clash with desirable syntax names. It should be possible to assing names to isomorphisms generated by defineIsomorphisms manually.

It could be achieved by providing defineIsomorphismsFor :: [(String, String)] -> Name -> Q [Dec] (similar to makeLensesFor form lens package).

Issues building with GHC 9.0.1

Hello!

I was building this library with GHC 9.0.1 (it is a dependency of a XML library we are trying out) and I got the following error:

Building library for partial-isomorphisms-0.2.2.1..
[1 of 6] Compiling Control.Isomorphism.Partial.Unsafe ( src/Control/Isomorphism/Partial/Unsafe.hs, dist/build/Control/Isomorphism/Partial/Unsafe.o, dist/build/Control/Isomorphism/Partial/Unsafe.dyn_o )
[2 of 6] Compiling Control.Isomorphism.Partial.TH ( src/Control/Isomorphism/Partial/TH.hs, dist/build/Control/Isomorphism/Partial/TH.o, dist/build/Control/Isomorphism/Partial/TH.dyn_o )

src/Control/Isomorphism/Partial/TH.hs:37:30: error:
    • Expecting one more argument to ‘TyVarBndr’
      Expected a type, but ‘TyVarBndr’ has kind ‘* -> *’
    • In the type ‘[TyVarBndr]’
      In the definition of data constructor ‘DecInfo’
      In the data declaration for ‘DecInfo’
   |
37 | data DecInfo = DecInfo Type [TyVarBndr] [Con]
   |                              ^^^^^^^^^
cabal: Failed to build partial-isomorphisms-0.2.2.1 (which is required by
exe:licence-check from licence-check-0.1.0.0). See the build log above for
details.

All the best

James

Provide convient way for permuting arguments

It is desirable to use applicative-like syntax in parsers, but since we use pregenerated partial isomorphisms arguments cannot be permuted so easily. It would be nice to have TH funcion for generating arguments permutation such that mkPermutation :: String -> [Int] -> Q [Dec]

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.