blunt-0.0.14: library/Blunt/Pointful.hs
module Blunt.Pointful where
import Data.List (isPrefixOf, isSuffixOf)
import Lambdabot.Pointful (pointful)
safePointful :: String -> Maybe String
safePointful input =
let output = pointful input
in if any (`isPrefixOf` output) ["Error:", "<unknown>.hs:"]
then Nothing
else if ";" `isSuffixOf` output && not (";" `isSuffixOf` input)
then Just (init output)
else Just output