From 2b9ceaead3f3cd80e973cccecb9a3eebc51154f7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Jul 2016 19:21:56 +0200 Subject: Fixes for GHC 8.0.1 --- tp-bbcode/src/Thermoprint/Printout/BBCode.hs | 2 +- tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tp-bbcode/src/Thermoprint') diff --git a/tp-bbcode/src/Thermoprint/Printout/BBCode.hs b/tp-bbcode/src/Thermoprint/Printout/BBCode.hs index cbe2618..dd5edb0 100644 --- a/tp-bbcode/src/Thermoprint/Printout/BBCode.hs +++ b/tp-bbcode/src/Thermoprint/Printout/BBCode.hs @@ -104,7 +104,7 @@ morph :: DomForest -> Either SemanticError Printout -- ^ Parse a list of paragraphs -- -- Since we permit only cooked input via 'Raw' 'Paragraph' is identical to 'Block' -morph = fmap Seq.fromList . mapM (\t -> Seq.singleton . Cooked <$> parse BlockCtx t) +morph = fmap (Printout . Seq.fromList) . mapM (\t -> Paragraph . Seq.singleton . Cooked <$> parse BlockCtx t) parseDom :: DomTree -> ParseResult -- ^ Invoke 'asLine' and 'asBlock' to parse a single 'DomTree' diff --git a/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs b/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs index edd4c5a..8e15417 100644 --- a/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs +++ b/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs @@ -24,10 +24,10 @@ import Data.Monoid import Thermoprint.Printout cobbcode :: Printout -> Either UnicodeException Text -cobbcode (toList -> ps) = mconcat . intersperse "\n\n" <$> mapM handlePar ps +cobbcode (toList . getParagraphs -> ps) = mconcat . intersperse "\n\n" <$> mapM handlePar ps -handlePar :: Seq Chunk -> Either UnicodeException Text -handlePar (toList -> cs) = mconcat <$> mapM handleChunk cs +handlePar :: Paragraph -> Either UnicodeException Text +handlePar (toList . getChunks -> cs) = mconcat <$> mapM handleChunk cs handleChunk :: Chunk -> Either UnicodeException Text handleChunk (Cooked b) = Right $ handleBlock b -- cgit v1.2.3