Skip to content

Instantly share code, notes, and snippets.

@hanshoglund
Last active September 16, 2017 19:59
Show Gist options
  • Save hanshoglund/c1a392940984ff497f99cf178b53fa5d to your computer and use it in GitHub Desktop.
Save hanshoglund/c1a392940984ff497f99cf178b53fa5d to your computer and use it in GitHub Desktop.
Generate arbitrary modifier (using Arb/CoArb), e.g. a
(Set HaskellFilePath -> Vec (NModsPerRound :: Nat) (HaskellFilePathToModify,Modification))
newtype Modification = (UniqueNameForStats, DescrText, Qualifier, HaskellText -> HaskellText)
type Qualifier -- info such as: Is this an internal module
instance Arbitrary
-- Some clever thing here
-- E.g.
-- ("Remove Nth (wrapping around) import line",...)
Other ideas:
Remove Nth language extension (internal modules only)
Remove Nth (wrapping around) explicit import list entry (in file...)
Turn Nth "everything" import into instance only, e.g. "import A()"
Or even, import A(xs...) where xs is an arbitrary subset of unqual identifiers in the file (not imported from elsewhere)
Remove N-th top-level definition (internal modules only)
Remove N-th entry from export list (internal modules only)
Add complete export list when none exists (always safe)
Remove dep from Cabal file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment