This repository was archived by the owner on Jan 28, 2022. It is now read-only.
Open
Conversation
alex-ozdemir
suggested changes
Nov 3, 2020
Collaborator
alex-ozdemir
left a comment
There was a problem hiding this comment.
Great! Thanks for doing this.
I think that adding the output format to Cfg is a great idea. My one requested change is for you to continue to develop that idea by:
- moving R1CS writing into the
Cfgmonad, and fetching the configuration from that monad. - adding an entry to the
optionslist (and an appropriate new field to some record in theCfgfile). - ripping out the command-line argument based approach.
I left a few inline comments articulating these steps.
| then ByteString.writeFile path $ encode r1cs | ||
| else writeFile path $ unlines $ map (unwords . map show) $ r1csAsLines r1cs | ||
| writeToR1csFile | ||
| :: (Show s, KnownNat n) => R1CSOutput -> R1CS s n -> FilePath -> IO () |
Collaborator
There was a problem hiding this comment.
I would lift this to the Cfg monad and get the output format from it.
| , _benesThresh :: Int | ||
| } deriving (Show) | ||
|
|
||
| data R1CSOutput = Json | Legacy | FlatBuffer deriving (Show, Eq) |
Collaborator
There was a problem hiding this comment.
I would add this to the configuration system
Comment on lines
+432
to
+436
| where | ||
| parseR1CSOutputFromArgs m | m `isPresent` longOption "json" = Cfg.Json | ||
| | m `isPresent` longOption "flatbuffer" = Cfg.FlatBuffer | ||
| | otherwise = Cfg.Legacy | ||
|
|
Collaborator
There was a problem hiding this comment.
I would drop this (and other asJson handling), in favor of a Cfg-based approach.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#11