]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter.hs
Resurrection from bitrot
[Rakka.git] / Rakka / Wiki / Interpreter.hs
index 32e1a3aa0e1760516d67e533b2fdb59a1942df43..6bce1d06032f31277acf8be2a09285b2effa4adf 100644 (file)
@@ -1,3 +1,6 @@
+{-# LANGUAGE
+    UnicodeSyntax
+  #-}
 module Rakka.Wiki.Interpreter
     ( Interpreter(..)
     , InterpreterContext(..)
@@ -6,22 +9,21 @@ module Rakka.Wiki.Interpreter
     , commandType -- private
     )
     where
-
-import           Rakka.Page
-import           Rakka.Storage
-import           Rakka.SystemConfig
-import           Rakka.Wiki
-import           Text.XML.HXT.DOM.TypeDefs
-
+import Data.Text (Text)
+import Rakka.Page
+import Rakka.Storage
+import Rakka.SystemConfig
+import Rakka.Wiki
+import Text.XML.HXT.DOM.TypeDefs
 
 data Interpreter
     = InlineCommandInterpreter {
-        iciName      :: !String
-      , iciInterpret :: !(InterpreterContext -> InlineCommand -> IO InlineElement)
+        iciName      ∷ !Text
+      , iciInterpret ∷ !(InterpreterContext → InlineCommand → IO InlineElement)
       }
     | BlockCommandInterpreter {
-        bciName      :: !String
-      , bciInterpret :: !(InterpreterContext -> BlockCommand -> IO BlockElement)
+        bciName      ∷ !Text
+      , bciInterpret ∷ !(InterpreterContext → BlockCommand → IO BlockElement)
       }
 
 
@@ -35,12 +37,10 @@ data InterpreterContext
       , ctxSysConf    :: !SystemConfig
       }
 
-
-commandName :: Interpreter -> String
+commandName ∷ Interpreter → Text
 commandName (InlineCommandInterpreter name _) = name
 commandName (BlockCommandInterpreter  name _) = name
 
-
-commandType :: Interpreter -> CommandType
+commandType ∷ Interpreter → CommandType
 commandType (InlineCommandInterpreter _ _) = InlineCommandType
 commandType (BlockCommandInterpreter  _ _) = BlockCommandType