]> git.wincent.com - docvim.git/commitdiff
Move under Text.* namespace
authorGreg Hurrell <greg@hurrell.net>
Thu, 9 Jun 2016 15:36:56 +0000 (08:36 -0700)
committerGreg Hurrell <greg@hurrell.net>
Thu, 9 Jun 2016 15:36:56 +0000 (08:36 -0700)
Closes: https://github.com/wincent/docvim/issues/7
27 files changed:
README.md
docvim.cabal
lib/Text/Docvim/AST.hs [moved from lib/Docvim/AST.hs with 99% similarity]
lib/Text/Docvim/CLI.hs [moved from lib/Docvim/CLI.hs with 84% similarity]
lib/Text/Docvim/Compile.hs [moved from lib/Docvim/Compile.hs with 59% similarity]
lib/Text/Docvim/Options.hs [moved from lib/Docvim/Options.hs with 96% similarity]
lib/Text/Docvim/Parse.hs [moved from lib/Docvim/Parse.hs with 98% similarity]
lib/Text/Docvim/Printer/Markdown.hs [moved from lib/Docvim/Printer/Markdown.hs with 96% similarity]
lib/Text/Docvim/Printer/Vim.hs [moved from lib/Docvim/Printer/Vim.hs with 98% similarity]
lib/Text/Docvim/ReadDir.hs [moved from lib/Docvim/ReadDir.hs with 93% similarity]
lib/Text/Docvim/Util.hs [moved from lib/Docvim/Util.hs with 78% similarity]
lib/Text/Docvim/Visitor.hs [moved from lib/Docvim/Visitor.hs with 94% similarity]
lib/Text/Docvim/Visitor/Command.hs [moved from lib/Docvim/Visitor/Command.hs with 70% similarity]
lib/Text/Docvim/Visitor/Commands.hs [moved from lib/Docvim/Visitor/Commands.hs with 78% similarity]
lib/Text/Docvim/Visitor/Footer.hs [moved from lib/Docvim/Visitor/Footer.hs with 78% similarity]
lib/Text/Docvim/Visitor/Function.hs [moved from lib/Docvim/Visitor/Function.hs with 81% similarity]
lib/Text/Docvim/Visitor/Functions.hs [moved from lib/Docvim/Visitor/Functions.hs with 78% similarity]
lib/Text/Docvim/Visitor/Heading.hs [moved from lib/Docvim/Visitor/Heading.hs with 85% similarity]
lib/Text/Docvim/Visitor/Mapping.hs [moved from lib/Docvim/Visitor/Mapping.hs with 70% similarity]
lib/Text/Docvim/Visitor/Mappings.hs [moved from lib/Docvim/Visitor/Mappings.hs with 79% similarity]
lib/Text/Docvim/Visitor/Option.hs [moved from lib/Docvim/Visitor/Option.hs with 70% similarity]
lib/Text/Docvim/Visitor/Options.hs [moved from lib/Docvim/Visitor/Options.hs with 78% similarity]
lib/Text/Docvim/Visitor/Plugin.hs [moved from lib/Docvim/Visitor/Plugin.hs with 81% similarity]
lib/Text/Docvim/Visitor/Section.hs [moved from lib/Docvim/Visitor/Section.hs with 93% similarity]
lib/Text/Docvim/Visitor/Symbol.hs [moved from lib/Docvim/Visitor/Symbol.hs with 95% similarity]
src/Main.hs
tests/tasty.hs

index 772813805c8bfc96d450be75f60a63eef0785941..89e5f19d4c507187a1539c955fac32ea540c14b7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -150,7 +150,7 @@ stack repl
 
 # Cabal:
 cabal repl
-> import Docvim.Parse
+> import Text.Docvim.Parse
 > pp "let l:test=1" -- pretty-prints AST
 ```
 
index b6df9451ed7e0d9f5278abab6cbe0a0b80ecd60b..09d84f9da74868c344ff26b016115fa947276c57 100644 (file)
@@ -92,29 +92,29 @@ library
                ,    pretty-show
                ,    split
   default-language:    Haskell2010
-  exposed-modules:  Docvim.AST
-                 ,  Docvim.CLI
-                 ,  Docvim.Compile
-                 ,  Docvim.Options
-                 ,  Docvim.Parse
-                 ,  Docvim.Printer.Markdown
-                 ,  Docvim.Printer.Vim
-                 ,  Docvim.ReadDir
-                 ,  Docvim.Util
-                 ,  Docvim.Visitor
-                 ,  Docvim.Visitor.Command
-                 ,  Docvim.Visitor.Commands
-                 ,  Docvim.Visitor.Footer
-                 ,  Docvim.Visitor.Function
-                 ,  Docvim.Visitor.Functions
-                 ,  Docvim.Visitor.Heading
-                 ,  Docvim.Visitor.Mapping
-                 ,  Docvim.Visitor.Mappings
-                 ,  Docvim.Visitor.Option
-                 ,  Docvim.Visitor.Options
-                 ,  Docvim.Visitor.Plugin
-                 ,  Docvim.Visitor.Section
-                 ,  Docvim.Visitor.Symbol
+  exposed-modules:  Text.Docvim.AST
+                 ,  Text.Docvim.CLI
+                 ,  Text.Docvim.Compile
+                 ,  Text.Docvim.Options
+                 ,  Text.Docvim.Parse
+                 ,  Text.Docvim.Printer.Markdown
+                 ,  Text.Docvim.Printer.Vim
+                 ,  Text.Docvim.ReadDir
+                 ,  Text.Docvim.Util
+                 ,  Text.Docvim.Visitor
+                 ,  Text.Docvim.Visitor.Command
+                 ,  Text.Docvim.Visitor.Commands
+                 ,  Text.Docvim.Visitor.Footer
+                 ,  Text.Docvim.Visitor.Function
+                 ,  Text.Docvim.Visitor.Functions
+                 ,  Text.Docvim.Visitor.Heading
+                 ,  Text.Docvim.Visitor.Mapping
+                 ,  Text.Docvim.Visitor.Mappings
+                 ,  Text.Docvim.Visitor.Option
+                 ,  Text.Docvim.Visitor.Options
+                 ,  Text.Docvim.Visitor.Plugin
+                 ,  Text.Docvim.Visitor.Section
+                 ,  Text.Docvim.Visitor.Symbol
                  ,  Paths_docvim
   hs-source-dirs:   lib
 
similarity index 99%
rename from lib/Docvim/AST.hs
rename to lib/Text/Docvim/AST.hs
index 0e4db57f3244e4c9a54a0e6f46765420fce6f635..7b340c60a7a84661146c1f53f53112e4fb7aeb61 100644 (file)
@@ -1,6 +1,6 @@
 {-# LANGUAGE DeriveDataTypeable #-}
 
-module Docvim.AST where
+module Text.Docvim.AST where
 
 import Control.Lens.Fold (foldlOf)
 import Control.Lens.Getter (to)
similarity index 84%
rename from lib/Docvim/CLI.hs
rename to lib/Text/Docvim/CLI.hs
index 24d4d402ea01824188e91318eda4c81e6892ba7a..ebc9fa2abbd8a87eb23aedd7ed908988accc37a8 100644 (file)
@@ -1,16 +1,16 @@
 {-# LANGUAGE MultiWayIf #-}
 
 -- | The runnable part of the docvim executable.
-module Docvim.CLI (run) where
+module Text.Docvim.CLI (run) where
 
 import Control.Monad (when)
 import Data.Maybe (fromMaybe)
-import Docvim.Options (Options(..), options)
-import Docvim.Compile (compile)
-import Docvim.Parse (parse)
-import Docvim.Printer.Markdown (markdown)
-import Docvim.Printer.Vim (vimHelp)
-import Docvim.ReadDir (readDir)
+import Text.Docvim.Options (Options(..), options)
+import Text.Docvim.Compile (compile)
+import Text.Docvim.Parse (parse)
+import Text.Docvim.Printer.Markdown (markdown)
+import Text.Docvim.Printer.Vim (vimHelp)
+import Text.Docvim.ReadDir (readDir)
 import System.FilePath (takeExtension)
 import System.IO (hPutStrLn, stderr)
 
similarity index 59%
rename from lib/Docvim/Compile.hs
rename to lib/Text/Docvim/Compile.hs
index 9c83289abbc69051763dda4b3b3e38123285c791..93dab92ad1820d03dbf2db67a636dfdfb3c612b1 100644 (file)
@@ -1,23 +1,23 @@
-module Docvim.Compile (compile) where
+module Text.Docvim.Compile (compile) where
 
-import Docvim.AST (Node(Project))
-import Docvim.Visitor.Command (extractCommand)
-import Docvim.Visitor.Commands (extractCommands)
-import Docvim.Visitor.Footer (extractFooter)
-import Docvim.Visitor.Function (extractFunction)
-import Docvim.Visitor.Functions (extractFunctions)
-import Docvim.Visitor.Heading (injectTOC)
-import Docvim.Visitor.Mapping (extractMapping)
-import Docvim.Visitor.Mappings (extractMappings)
-import Docvim.Visitor.Option (extractOption)
-import Docvim.Visitor.Options (extractOptions)
-import Docvim.Visitor.Plugin (extractPlugin)
-import Docvim.Visitor.Section ( injectCommands
-                              , injectFunctions
-                              , injectMappings
-                              , injectOptions
-                              )
-import Docvim.Visitor (extract)
+import Text.Docvim.AST (Node(Project))
+import Text.Docvim.Visitor.Command (extractCommand)
+import Text.Docvim.Visitor.Commands (extractCommands)
+import Text.Docvim.Visitor.Footer (extractFooter)
+import Text.Docvim.Visitor.Function (extractFunction)
+import Text.Docvim.Visitor.Functions (extractFunctions)
+import Text.Docvim.Visitor.Heading (injectTOC)
+import Text.Docvim.Visitor.Mapping (extractMapping)
+import Text.Docvim.Visitor.Mappings (extractMappings)
+import Text.Docvim.Visitor.Option (extractOption)
+import Text.Docvim.Visitor.Options (extractOptions)
+import Text.Docvim.Visitor.Plugin (extractPlugin)
+import Text.Docvim.Visitor.Section ( injectCommands
+                                   , injectFunctions
+                                   , injectMappings
+                                   , injectOptions
+                                   )
+import Text.Docvim.Visitor (extract)
 
 -- | "Compile" a set of translation units into a project.
 compile :: [Node] -> Node
similarity index 96%
rename from lib/Docvim/Options.hs
rename to lib/Text/Docvim/Options.hs
index 1249445d3dbc85634f0004cf8c834edfe1ff20c1..136ed4d332671564efd551f6368602ad602bc102 100644 (file)
@@ -1,5 +1,5 @@
 -- | Options parser for the docvim executable.
-module Docvim.Options (Options(..), options) where
+module Text.Docvim.Options (Options(..), options) where
 
 import Options.Applicative
 import Data.Version (showVersion)
similarity index 98%
rename from lib/Docvim/Parse.hs
rename to lib/Text/Docvim/Parse.hs
index ea2a770f0c811e0a17a50c8df77851f3075750d8..8cb3f1b1c5604a72927770fe01edb50d547fbf55 100644 (file)
@@ -1,10 +1,10 @@
 {-# LANGUAGE FlexibleContexts #-}
 
-module Docvim.Parse ( parse
-                    , rstrip
-                    , strip
-                    , unit
-                    ) where
+module Text.Docvim.Parse ( parse
+                         , rstrip
+                         , strip
+                         , unit
+                         ) where
 
 import Control.Applicative ( (*>)
                            , (<$)
@@ -16,7 +16,7 @@ import Control.Applicative ( (*>)
                            )
 import Data.Char (toUpper)
 import Data.List (groupBy, intercalate)
-import Docvim.AST
+import Text.Docvim.AST
 import System.Exit (exitFailure)
 import System.IO (hPutStrLn, stderr)
 -- TODO: custom error messages with <?>
similarity index 96%
rename from lib/Docvim/Printer/Markdown.hs
rename to lib/Text/Docvim/Printer/Markdown.hs
index c3e0e22c80bc9eb51531af233ad607644a1d0fdf..ef332886708f00b976338a735270bac05fec473d 100644 (file)
@@ -1,12 +1,12 @@
-module Docvim.Printer.Markdown (markdown) where
+module Text.Docvim.Printer.Markdown (markdown) where
 
 import Control.Monad.Reader
 import Data.List (intercalate, sort)
 import Data.Maybe (fromMaybe)
-import Docvim.AST
-import Docvim.Parse (rstrip)
-import Docvim.Visitor.Plugin (getPluginName)
-import Docvim.Visitor.Symbol (getSymbols)
+import Text.Docvim.AST
+import Text.Docvim.Parse (rstrip)
+import Text.Docvim.Visitor.Plugin (getPluginName)
+import Text.Docvim.Visitor.Symbol (getSymbols)
 
 data Metadata = Metadata { symbols :: [String]
                          , pluginName :: Maybe String
similarity index 98%
rename from lib/Docvim/Printer/Vim.hs
rename to lib/Text/Docvim/Printer/Vim.hs
index 145a2927d7587da108da0dda986c05b21726ea80..9eb9a38fc964b584ea3d347f00a67c114e8938a5 100644 (file)
@@ -1,4 +1,4 @@
-module Docvim.Printer.Vim (vimHelp) where
+module Text.Docvim.Printer.Vim (vimHelp) where
 
 import Control.Arrow ((***))
 import Control.Monad (join)
@@ -9,10 +9,10 @@ import Data.List (intercalate, isSuffixOf, span, sort)
 import Data.List.Split (splitOn)
 import Data.Maybe (fromJust, fromMaybe)
 import Data.Tuple (swap)
-import Docvim.AST
-import Docvim.Parse (rstrip)
-import Docvim.Visitor.Plugin (getPluginName)
-import Docvim.Visitor.Symbol (getSymbols)
+import Text.Docvim.AST
+import Text.Docvim.Parse (rstrip)
+import Text.Docvim.Visitor.Plugin (getPluginName)
+import Text.Docvim.Visitor.Symbol (getSymbols)
 
 -- TODO: add indentation here (using local, or just stick it in Context)
 
similarity index 93%
rename from lib/Docvim/ReadDir.hs
rename to lib/Text/Docvim/ReadDir.hs
index 4f3d016e6f1776799f485d1b3fa0dd1577e46dec..8000e5f4a4e7c2c62863cc0a91f0b2f77854071f 100644 (file)
@@ -1,7 +1,7 @@
 -- | Recursively read the paths in a directory.
 --
 -- Based on `RecursiveContents` example in chapter 9 of "Real World Haskell".
-module Docvim.ReadDir (readDir) where
+module Text.Docvim.ReadDir (readDir) where
 
 import Control.Monad (forM)
 import System.Directory (doesDirectoryExist, getDirectoryContents)
similarity index 78%
rename from lib/Docvim/Util.hs
rename to lib/Text/Docvim/Util.hs
index fb56871a9f8604723137a697d43cf55ac0f42f1d..981aa26105422feb5bb6db525041684078728438 100644 (file)
@@ -1,18 +1,18 @@
 -- | Functions to facilitate automated and manual testing.
-module Docvim.Util ( compileUnit
-                   , p
-                   , pm
-                   , pp
-                   , ppm
-                   , ppv
-                   , pv
-                   ) where
+module Text.Docvim.Util ( compileUnit
+                        , p
+                        , pm
+                        , pp
+                        , ppm
+                        , ppv
+                        , pv
+                        ) where
 
-import Docvim.AST (Node)
-import Docvim.Compile (compile)
-import Docvim.Parse (unit)
-import Docvim.Printer.Markdown (markdown)
-import Docvim.Printer.Vim (vimHelp)
+import Text.Docvim.AST (Node)
+import Text.Docvim.Compile (compile)
+import Text.Docvim.Parse (unit)
+import Text.Docvim.Printer.Markdown (markdown)
+import Text.Docvim.Printer.Vim (vimHelp)
 import Text.Parsec (ParseError, runParser)
 import Text.Show.Pretty (ppShow)
 
similarity index 94%
rename from lib/Docvim/Visitor.hs
rename to lib/Text/Docvim/Visitor.hs
index aa48785900c1962d41c58560cebdcdf96ff9d911..ea34721052807044f5552c07fc7e7319f8bac986 100644 (file)
@@ -1,13 +1,13 @@
 {-# LANGUAGE LambdaCase #-}
 {-# LANGUAGE FlexibleContexts #-}
 
-module Docvim.Visitor (endSection, extract, extractBlocks) where
+module Text.Docvim.Visitor (endSection, extract, extractBlocks) where
 
 import Control.Applicative (Alternative, (<|>), empty)
 import Control.Monad ((>=>))
 import Control.Monad.Writer (runWriter, tell)
 import Data.Data.Lens
-import Docvim.AST
+import Text.Docvim.AST
 import qualified Data.DList as DList
 
 -- | Returns True if a node marks the end of a region/block/section.
similarity index 70%
rename from lib/Docvim/Visitor/Command.hs
rename to lib/Text/Docvim/Visitor/Command.hs
index 212767c8d25eb1354697af868bd37bee819f6737..0103cc3a939867d2fd8009c70ea84fbf384a6d19 100644 (file)
@@ -1,10 +1,10 @@
 {-# LANGUAGE LambdaCase #-}
 
-module Docvim.Visitor.Command (extractCommand) where
+module Text.Docvim.Visitor.Command (extractCommand) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(CommandAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(CommandAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) identified by the `@command`
 -- annotation of the source code.
similarity index 78%
rename from lib/Docvim/Visitor/Commands.hs
rename to lib/Text/Docvim/Visitor/Commands.hs
index 8813ad72588e27333afb3de6a4d37d7ffc991c3d..94c055b40b48c2c4fb186c32eb229ee5be808c7b 100644 (file)
@@ -1,8 +1,8 @@
-module Docvim.Visitor.Commands (extractCommands) where
+module Text.Docvim.Visitor.Commands (extractCommands) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(CommandsAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(CommandsAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) from the `@commands` section(s) of
 -- the source code.
similarity index 78%
rename from lib/Docvim/Visitor/Footer.hs
rename to lib/Text/Docvim/Visitor/Footer.hs
index e71ab201642017f717bd413d40ecb9a9e09c859f..6e9173920bbec434045fad1668bdf74aee95a5f2 100644 (file)
@@ -1,8 +1,8 @@
-module Docvim.Visitor.Footer (extractFooter) where
+module Text.Docvim.Visitor.Footer (extractFooter) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(FooterAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(FooterAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) from the `@footer` section(s) of
 -- the source code.
similarity index 81%
rename from lib/Docvim/Visitor/Function.hs
rename to lib/Text/Docvim/Visitor/Function.hs
index 61cd7603bc41ae635125550904246c90d6a6bbaa..945f7e3a1afaafc8da2cb50fd10a453024ba0053 100644 (file)
@@ -1,10 +1,10 @@
 {-# LANGUAGE LambdaCase #-}
 
-module Docvim.Visitor.Function (extractFunction) where
+module Text.Docvim.Visitor.Function (extractFunction) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(FunctionAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(FunctionAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) identified by the `@function`
 -- annotation of the source code.
similarity index 78%
rename from lib/Docvim/Visitor/Functions.hs
rename to lib/Text/Docvim/Visitor/Functions.hs
index 132e0adba7a4f5891a8a8456880b8ff47e60240a..d34ba309705ee217b98dd26e2dcfa9172a3cb9a8 100644 (file)
@@ -1,8 +1,8 @@
-module Docvim.Visitor.Functions (extractFunctions) where
+module Text.Docvim.Visitor.Functions (extractFunctions) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(FunctionsAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(FunctionsAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) from the `@functions` section(s) of
 -- the source code.
similarity index 85%
rename from lib/Docvim/Visitor/Heading.hs
rename to lib/Text/Docvim/Visitor/Heading.hs
index 29c2504f26daf5565ad03cca28c53a181758c94e..87defefc60b527664f2674ab2697934466a44025 100644 (file)
@@ -1,11 +1,11 @@
-module Docvim.Visitor.Heading ( getHeadings
-                              , injectTOC
-                              ) where
+module Text.Docvim.Visitor.Heading ( getHeadings
+                                   , injectTOC
+                                   ) where
 
 import Control.Lens
 import Control.Lens.Plated (transform)
 import Data.Data.Lens (uniplate)
-import Docvim.AST
+import Text.Docvim.AST
 
 -- | Returns a list of all headings, in the order in which they appear in the
 -- AST.
similarity index 70%
rename from lib/Docvim/Visitor/Mapping.hs
rename to lib/Text/Docvim/Visitor/Mapping.hs
index fc262bb60d657c486a7a90bc6cb8618215fec524..ee5b7c3055492844f4d2217d0d0c820b93efe3c8 100644 (file)
@@ -1,10 +1,10 @@
 {-# LANGUAGE LambdaCase #-}
 
-module Docvim.Visitor.Mapping (extractMapping) where
+module Text.Docvim.Visitor.Mapping (extractMapping) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(MappingAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(MappingAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) identified by the `@mapping`
 -- annotation of the source code.
similarity index 79%
rename from lib/Docvim/Visitor/Mappings.hs
rename to lib/Text/Docvim/Visitor/Mappings.hs
index a45b3a88ef70282a458baa685a99dde8dff1f3d8..4c56167ffd339d8bc4fa0b390e7284110bef2175 100644 (file)
@@ -1,8 +1,8 @@
-module Docvim.Visitor.Mappings (extractMappings) where
+module Text.Docvim.Visitor.Mappings (extractMappings) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(MappingsAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(MappingsAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) from the `@mappings` section(s) of
 -- the source code.
similarity index 70%
rename from lib/Docvim/Visitor/Option.hs
rename to lib/Text/Docvim/Visitor/Option.hs
index f9d4660e4c17911703d24c6dff702eaf189ae256..6dd4b51d1447cfe0039ad66af5ed3eeff5b02194 100644 (file)
@@ -1,10 +1,10 @@
 {-# LANGUAGE LambdaCase #-}
 
-module Docvim.Visitor.Option (extractOption) where
+module Text.Docvim.Visitor.Option (extractOption) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(OptionAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(OptionAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) identified by the `@option`
 -- annotation of the source code.
similarity index 78%
rename from lib/Docvim/Visitor/Options.hs
rename to lib/Text/Docvim/Visitor/Options.hs
index 98fc056d4ba93da086686137a653158736165d42..507cf9a2ba3df3cc6d376cda89c9cd8690464b07 100644 (file)
@@ -1,8 +1,8 @@
-module Docvim.Visitor.Options (extractOptions) where
+module Text.Docvim.Visitor.Options (extractOptions) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(OptionsAnnotation))
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(OptionsAnnotation))
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Extracts a list of nodes (if any exist) from the `@options` section(s) of
 -- the source code.
similarity index 81%
rename from lib/Docvim/Visitor/Plugin.hs
rename to lib/Text/Docvim/Visitor/Plugin.hs
index efa236877d6e4d40328e7d0eff64d8005e7ab055..051dcfe0bc74570665d87f8528c09807d0c96abf 100644 (file)
@@ -1,12 +1,12 @@
 {-# LANGUAGE LambdaCase #-}
 
-module Docvim.Visitor.Plugin ( getPluginName
-                             , extractPlugin
-                             ) where
+module Text.Docvim.Visitor.Plugin ( getPluginName
+                                  , extractPlugin
+                                  ) where
 
 import Control.Applicative (Alternative)
-import Docvim.AST (Node(PluginAnnotation), walk)
-import Docvim.Visitor (endSection, extractBlocks)
+import Text.Docvim.AST (Node(PluginAnnotation), walk)
+import Text.Docvim.Visitor (endSection, extractBlocks)
 
 -- | Returns the name of the plug-in or Nothing if none is found.
 --
similarity index 93%
rename from lib/Docvim/Visitor/Section.hs
rename to lib/Text/Docvim/Visitor/Section.hs
index 0718f2dd74af6223799b5c37fcf08dc160679519..cef891e5be1c4b6487c7ded6349650dccb323394 100644 (file)
@@ -2,16 +2,16 @@
 {-# LANGUAGE MultiWayIf #-}
 {-# LANGUAGE TemplateHaskell #-}
 
-module Docvim.Visitor.Section ( injectCommands
-                              , injectFunctions
-                              , injectMappings
-                              , injectOptions
-                              ) where
+module Text.Docvim.Visitor.Section ( injectCommands
+                                   , injectFunctions
+                                   , injectMappings
+                                   , injectOptions
+                                   ) where
 
 import Control.Lens
 import Control.Monad.State
 import Data.Data.Lens (uniplate)
-import Docvim.AST
+import Text.Docvim.AST
 
 data SectionInfo = SectionInfo { _hasCommand :: Bool
                                , _hasCommands :: Bool
similarity index 95%
rename from lib/Docvim/Visitor/Symbol.hs
rename to lib/Text/Docvim/Visitor/Symbol.hs
index ad2d27f14b07f5005d2485abb4070fe462dd130f..274baa8aa4caa7efc301a553a58d4ca7c8a74798 100644 (file)
@@ -1,10 +1,10 @@
-module Docvim.Visitor.Symbol (getSymbols) where
+module Text.Docvim.Visitor.Symbol (getSymbols) where
 
 import Data.Char (toLower)
 import Data.List (nub, sort)
 import qualified Data.Set as Set
-import Docvim.AST
-import Docvim.Visitor.Plugin (getPluginName)
+import Text.Docvim.AST
+import Text.Docvim.Visitor.Plugin (getPluginName)
 
 -- TODO: return Set instead of [String]
 -- TODO: use Either instead of dying unceremoniously with `error`
index 56acc55f8e7e1c4ed1d5f01c1bc7834b1c7359b0..4925bbf7547e408f0d6ab13846e570491936aa4e 100644 (file)
@@ -1,7 +1,7 @@
 -- | The docvim executable.
 module Main (main) where
 
-import Docvim.CLI (run)
+import Text.Docvim.CLI (run)
 
 -- | Run the executable using the supplied options.
 main :: IO ()
index c02a47a14b96ee89b6970a0ea4c2605b97ed97b0..5e5bf7c4216a6bfd296dd23b81b90f963b041607 100644 (file)
@@ -8,9 +8,9 @@ import Data.ByteString.Lazy.Char8 (pack, unpack)
 import Data.Char (chr)
 import Data.List (isPrefixOf, sort)
 import Data.Monoid (Sum(..))
-import Docvim.AST
-import Docvim.Util (compileUnit, p, pm, pv)
-import Docvim.Visitor.Symbol (getSymbols)
+import Text.Docvim.AST
+import Text.Docvim.Util (compileUnit, p, pm, pv)
+import Text.Docvim.Visitor.Symbol (getSymbols)
 import System.Exit (ExitCode(ExitSuccess))
 import System.FilePath ((<.>), replaceExtension, takeBaseName, takeFileName)
 import System.IO (hFlush, readFile)