Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Delimiters = Delimiters {}
- restyleDelimited :: HasSystem env => Delimiters -> ([FilePath] -> RIO env result) -> [FilePath] -> RIO env result
- data DelimitedPath = DelimitedPath {
- dpSource :: FilePath
- dpParts :: [DelimitedPathPart]
- data DelimitedPathPart = DelimitedPathPart {}
- data DelimitedMeta = DelimitedMeta {}
- delimit :: HasSystem env => Delimiters -> FilePath -> RIO env DelimitedPath
- undelimit :: HasSystem env => Delimiters -> DelimitedPath -> RIO env ()
Documentation
data Delimiters Source #
Instances
:: HasSystem env | |
=> Delimiters | |
-> ([FilePath] -> RIO env result) | Restyle files inplace |
-> [FilePath] | |
-> RIO env result |
Restyle delimited content within paths using the given function
Exported for testing
data DelimitedPath Source #
Instances
Eq DelimitedPath Source # | |
Defined in Restyler.Delimited (==) :: DelimitedPath -> DelimitedPath -> Bool # (/=) :: DelimitedPath -> DelimitedPath -> Bool # | |
Show DelimitedPath Source # | |
Defined in Restyler.Delimited showsPrec :: Int -> DelimitedPath -> ShowS # show :: DelimitedPath -> String # showList :: [DelimitedPath] -> ShowS # |
data DelimitedPathPart Source #
Instances
Eq DelimitedPathPart Source # | |
Defined in Restyler.Delimited (==) :: DelimitedPathPart -> DelimitedPathPart -> Bool # (/=) :: DelimitedPathPart -> DelimitedPathPart -> Bool # | |
Show DelimitedPathPart Source # | |
Defined in Restyler.Delimited showsPrec :: Int -> DelimitedPathPart -> ShowS # show :: DelimitedPathPart -> String # showList :: [DelimitedPathPart] -> ShowS # |
data DelimitedMeta Source #
Instances
Eq DelimitedMeta Source # | |
Defined in Restyler.Delimited (==) :: DelimitedMeta -> DelimitedMeta -> Bool # (/=) :: DelimitedMeta -> DelimitedMeta -> Bool # | |
Show DelimitedMeta Source # | |
Defined in Restyler.Delimited showsPrec :: Int -> DelimitedMeta -> ShowS # show :: DelimitedMeta -> String # showList :: [DelimitedMeta] -> ShowS # |
delimit :: HasSystem env => Delimiters -> FilePath -> RIO env DelimitedPath Source #
Split a File into separate files of the content between delimiters
Given a foo.rb
containing text with delimiters, create
foo.rb.0
foo.rb.1
foo.rb.2
foo.rb.n
Where each file contains the content before, within, and after the given delimiters (repeatedly). The returned value tracks which paths hold content that was delimited in or out.
undelimit :: HasSystem env => Delimiters -> DelimitedPath -> RIO env () Source #
Re-construct a file from its delimited parts