Commit d803414d authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢
Browse files

Fix some GHC warnings

parent c69c027e
......@@ -8,7 +8,6 @@ module MarkovChain
, valmariMarkovChainB
) where
import Data.Semigroup
import Data.List (intersperse)
import Data.Foldable
......@@ -148,7 +147,7 @@ valmariTransitionB t =
state = Build.decimal . (+ 1) -- states are numbered from 1
valmariBlocksB :: Int -> Maybe Partition -> Build.Builder
valmariBlocksB n Nothing = ""
valmariBlocksB _ Nothing = ""
valmariBlocksB _ (Just p) =
let blockMap :: IntMap [Int]
blockMap = V.ifoldl' (\m s b -> M.insertWith (++) b [s] m) M.empty (stateAssignment p)
......
......@@ -4,7 +4,6 @@ module Main (main) where
import Control.Applicative
import Control.Monad ( forM_ )
import Data.Maybe ( listToMaybe )
import qualified Data.List.NonEmpty as NE
import Data.Word
......@@ -86,14 +85,6 @@ options =
)
readFormat :: OptParse.ReadM OutputFormat
readFormat = OptParse.maybeReader $ \case
"copar" -> Just Copar
"dot" -> Just Dot
"valmari" -> Just Valmari
_ -> Nothing
readOutput :: OptParse.ReadM (OutputFormat, Maybe (NE.NonEmpty Char))
readOutput = OptParse.eitherReader $ \s -> case span (/= sep) s of
([] , _ ) -> Left "a"
......
module ValmariOutput (valmariB) where
import Data.Monoid
import Data.Word
import qualified Data.Text.Lazy.Builder as Build
import qualified Data.Text.Lazy.Builder.Int as Build
import Lens.Micro.Platform
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector as V
import Type
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment