diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2017-05-14 09:28:08 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2017-05-14 09:28:08 +0200 |
commit | 7a17c3eb9f5b7037764e9dfad854cc7d59b47abc (patch) | |
tree | f44e71fb53ca366850ff36af784887eded5c1c8c /src/Text | |
parent | fbce4228a52de9bba5a30197b165afc66a5a83dc (diff) | |
download | pandoc-7a17c3eb9f5b7037764e9dfad854cc7d59b47abc.tar.gz |
Parsing: replace partial with total function
Calling `tail` on an empty list raises an exception, while calling the
otherwise equivalent `drop 1` will return the empty list again.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index e90f64c5b..e4113f31f 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -1380,5 +1380,5 @@ insertIncludedFile blocks dirs f = do bs <- blocks setInput oldInput setPosition oldPos - updateState $ \s -> s{ stateContainers = tail $ stateContainers s } + updateState $ \s -> s{ stateContainers = drop 1 $ stateContainers s } return bs |