From d786c741ea59f5346330d687d2ece7e2b9bc3833 Mon Sep 17 00:00:00 2001 From: Alice BRENON <alice.brenon@ens-lyon.fr> Date: Mon, 15 Mar 2021 16:06:30 +0100 Subject: [PATCH] =?UTF-8?q?Complete=20making=20CSV=20a=20special=20case=20?= =?UTF-8?q?by=20renaming=20the=20module=20to=20SSV=20for=20=C2=ABSomething?= =?UTF-8?q?-Separated=20Values=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Text/TEIWA/Source.hs | 6 +++--- lib/Text/TEIWA/Source/{CSV.hs => SSV.hs} | 2 +- teiwa.cabal | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename lib/Text/TEIWA/Source/{CSV.hs => SSV.hs} (98%) diff --git a/lib/Text/TEIWA/Source.hs b/lib/Text/TEIWA/Source.hs index f81d57e..b4664db 100644 --- a/lib/Text/TEIWA/Source.hs +++ b/lib/Text/TEIWA/Source.hs @@ -25,7 +25,7 @@ import Text.TEIWA.Config (Config(..)) import Text.TEIWA.Error (Error(..)) import Text.TEIWA.Source.Common (AnnotationContext(..), Row) import qualified Text.TEIWA.Source.ConLLX as ConLLX (getContext, sentences) -import qualified Text.TEIWA.Source.CSV as CSV (body, getContext) +import qualified Text.TEIWA.Source.SSV as SSV (body, getContext) type TEIWAParser = ParsecT Text () (ReaderT Config (Either Error)) type Format = TEIWAParser Annotation @@ -49,8 +49,8 @@ coNLLX = do ssv :: Char -> Format ssv separator = do - context <- CSV.getContext separator =<< reader formColumn - TokenLevel <$> (CSV.body separator >>= mapM (annotateToken context)) + context <- SSV.getContext separator =<< reader formColumn + TokenLevel <$> (SSV.body separator >>= mapM (annotateToken context)) csv :: Format csv = ssv ',' diff --git a/lib/Text/TEIWA/Source/CSV.hs b/lib/Text/TEIWA/Source/SSV.hs similarity index 98% rename from lib/Text/TEIWA/Source/CSV.hs rename to lib/Text/TEIWA/Source/SSV.hs index eed165c..1218701 100644 --- a/lib/Text/TEIWA/Source/CSV.hs +++ b/lib/Text/TEIWA/Source/SSV.hs @@ -1,6 +1,6 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE FlexibleContexts #-} -module Text.TEIWA.Source.CSV ( +module Text.TEIWA.Source.SSV ( body , getContext ) where diff --git a/teiwa.cabal b/teiwa.cabal index 01eb1bc..0724107 100644 --- a/teiwa.cabal +++ b/teiwa.cabal @@ -30,7 +30,7 @@ library , Text.TEIWA.Source , Text.TEIWA.Source.Common , Text.TEIWA.Source.ConLLX - , Text.TEIWA.Source.CSV + , Text.TEIWA.Source.SSV build-depends: base >=4.12 && <4.15 , bytestring , mtl -- GitLab