Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support split signatures #25

Open
fizruk opened this issue Aug 22, 2024 · 0 comments
Open

Support split signatures #25

fizruk opened this issue Aug 22, 2024 · 0 comments

Comments

@fizruk
Copy link
Owner

fizruk commented Aug 22, 2024

Currently, mkSignature generates a single signature, but it might be useful to that into multiple smaller signatures at user's request. For instance,

-- generate signature for the entire lambda-pi language
mkSignature ''Raw.Term' ''Raw.VarIdent ''Raw.ScopedTerm' ''Raw.Pattern'

-- partial signature covering only functions and the universe type
mkPartialSignature "Functions"
  ''Raw.Term' ''Raw.VarIdent ''Raw.ScopedTerm' ''Raw.Pattern'
  ['Raw.Universe, 'Raw.Pi, 'Raw.Lam, 'Raw.App]
  
-- partial signature covering only pairs
mkPartialSignature "Pairs"
  ''Raw.Term' ''Raw.VarIdent ''Raw.ScopedTerm' ''Raw.Pattern'
  ['Raw.Product, 'Raw.Pair, 'Raw.First, 'Raw.Second]

Partial signatures are naturally embedded into full signatures, so it is possible to easily go between the AST representations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant