Coder Social home page Coder Social logo

Comments (5)

serras avatar serras commented on June 20, 2024

The Fix using Nat is nothing else that the one from multirec, but using the more modern DataKinds extension.

from generics-mrsop.

arianvp avatar arianvp commented on June 20, 2024

Correct

from generics-mrsop.

VictorCMiraldo avatar VictorCMiraldo commented on June 20, 2024

from generics-mrsop.

VictorCMiraldo avatar VictorCMiraldo commented on June 20, 2024

@arianvp , I'm not sure I understand your proposal.

Currently, we have:

newtype Rep (ki :: kon -> *) (phi :: Nat -> *) (code :: [[Atom kon]])
  = Rep { unRep :: NS (PoA ki phi) code }

data AnnFix (ki :: kon -> *) (codes :: [[[Atom kon]]]) (phi :: Nat -> *) (n :: Nat) =
  AnnFix (phi n)
         (Rep ki (AnnFix ki codes phi) (Lkup n codes))

type Fix ki codes = AnnFix ki codes (Const ())

If I got it right, you are proposing we move to:

newtype Rep (ki :: kon -> *) (code :: [[Atom kon]]) (phi :: Nat -> *) 
  = Rep { unRep :: NS (PoA ki phi) code }

data AnnFix (ki :: kon -> *) (codes :: [[[Atom kon]]]) (ann :: Nat -> *) (n :: Nat) =
  AnnFix (ann n) (Rep ki (Lkup n codes) (AnnFix ki codes ann) )

type Fix ki codes = AnnFix ki codes (Const ())

Note I changed the parameter name to AnnFix from phi to ann. We should eventually do that.
Moreover, if we are messing with these datatypes, we will have to separate Fix and AnnFix.
I'm ok with that as long as Fix becomes a newtype after that. That is, It only makes sense
to decouple this dependency if we win something. I don't think pedagogical value counts here.
We have the papers that were written precisely for that.

from generics-mrsop.

VictorCMiraldo avatar VictorCMiraldo commented on June 20, 2024

Discussing with @arianvp we concluded:

  • Drop AnnFix and Fix dependency
  • The reordering of params won't happen. We can't do Lkup ix codes in Rep because we
    want to use Rep for opaque types aswell, ie, Rep :: Atom ki -> *.
  • We won't depend on sop-core. Our combinators are different than theirs and simpler than theirs.
    Bringing it in for two types is not worth it.

from generics-mrsop.

Related Issues (20)

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.