From 7a17c3eb9f5b7037764e9dfad854cc7d59b47abc Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 14 May 2017 09:28:08 +0200 Subject: 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. --- src/Text/Pandoc/Parsing.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') 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 -- cgit v1.2.3