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.
This commit is contained in:
Albert Krewinkel 2017-05-14 09:28:08 +02:00
parent fbce4228a5
commit 7a17c3eb9f
No known key found for this signature in database
GPG key ID: 388DC0B21F631124

View file

@ -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