Compare commits

...

3 Commits

5 changed files with 8 additions and 18 deletions

View File

@ -14,7 +14,7 @@ common deps
NondecreasingIndentation,
ViewPatterns
build-depends:
base ^>= 4.14.2.0,
base >= 4.14.2.0 && < 4.17,
HsYAML ^>= 0.2.1.0,
bytestring ^>= 0.10.12.0,
containers ^>= 0.6.4.1,

View File

@ -1,7 +1,7 @@
module YAML (module YAML) where
module YAML (module YAML, module Data.YAML, untagged) where
import Data.YAML as YAML
import Data.YAML.Event as YAML (untagged)
import Data.YAML
import Data.YAML.Event (untagged)
import Data.Text (Text)
import qualified Data.Text as Text
import Misc
@ -32,13 +32,13 @@ list = Sequence () untagged . map toYAML
-- | read a chunk from the beginning of the file between a
-- @---@ and a @...@. throw an exception if there isn't one
readHeader :: FilePath -> IO (YAML.Node YAML.Pos)
readHeader :: FilePath -> IO (Node Pos)
readHeader file = IO.withFile file IO.ReadMode \h -> do
ln <- BS.hGetLine h
if (ln /= "---") then
fail $ file <> ": no header"
else
unwrap file . YAML.decode1 =<< linesUntil "..." h
unwrap file . decode1 =<< linesUntil "..." h
-- | read all the lines from a handle until the given terminator. return the
-- lines read, excluding the terminator

View File

@ -7,8 +7,7 @@ source-repository-package
location: https://git.rhiannon.website/rhi/filemanip.git
tag: 0edef8f7bbfe8e210f546e3222b735a32e6055e3
source-repository-package
type: git
location: https://git.rhiannon.website/rhi/svg-builder
tag: 6bda613b538b08e9947913382f3b94235ca92149
tag: 1cbcd594d3009f9fd71f253b52ac82673bf5482e

2
lang

@ -1 +1 @@
Subproject commit 604da055e463ebe3990334485a7e08f6c900992c
Subproject commit d23e0435aae964c4ed9dd74a7c15f3e6c8e1f254

View File

@ -32,15 +32,6 @@ $if(show-toc)$
$endif$
<main>
$body$
$if(blah)$
<dl>
$for(blah)$
<dt>$blah.a$
<dd>$blah.b$
$endfor$
</dl>
$endif$
</main>
$foot()$