git.iko.soy/typeable/pandoc
on master help sign in
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.

commit7a17c3eb9f5b7037764e9dfad854cc7d59b47abc authorAlbert Krewinkel <albert@zeitkraut.de> dateSun 14 May 2017, 09:28 (9 years ago) parentfbce422
1 file changed+1−1
src/Text/Pandoc/Parsing.hs+1−1
src/Text/Pandoc/Parsing.hs+1−1
@@ -1380,5 +1380,5 @@ insertIncludedFile blocks dirs f = do
13801380 bs <- blocks
13811381 setInput oldInput
13821382 setPosition oldPos
1383− updateState $ \s -> s{ stateContainers = tail $ stateContainers s }
1383+ updateState $ \s -> s{ stateContainers = drop 1 $ stateContainers s }
13841384 return bs