Comments (5)
The Fix
using Nat
is nothing else that the one from multirec
, but using the more modern DataKinds
extension.
from generics-mrsop.
Correct
from generics-mrsop.
from generics-mrsop.
@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.
Discussing with @arianvp we concluded:
- Drop
AnnFix
andFix
dependency - The reordering of params won't happen. We can't do
Lkup ix codes
inRep
because we
want to useRep
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)
- Create pattern synonyms for `Tag` automatically
- Implement Attribute Grammars HOT 8
- TH Generates dupicate pattern synonyms if type is in AST multiple times HOT 1
- GHC 8.4.3 triggers GHC Bug during Haddock generations :( HOT 3
- Use Generic Generic Programming to avoid Template Haskell? HOT 2
- Fix is AnnFix HOT 1
- Use efficient indexed Sum from Oleg's Freer Monads paper HOT 3
- Depend on sop-core HOT 14
- Change Eq1 and Show1 names HOT 1
- Drop Monad constraint on mapNPM and friends HOT 1
- Can only derive one datatype per module HOT 4
- Hide examples from documentation
- Make Attribute Grammar combinators monadic HOT 1
- Bring Treefixes into mrsop. HOT 1
- GHC 8.4.3 crashes with hs-elisp parser. HOT 2
- Better Naming Framework for TH code
- Use `th-abstraction`
- Bring back `ShowHO` and `EqHO` as we had before HOT 3
- Rename Holes constructors; make it standard HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generics-mrsop.