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 ...@@ -8,7 +8,6 @@ module MarkovChain
, valmariMarkovChainB , valmariMarkovChainB
) where ) where
import Data.Semigroup
import Data.List (intersperse) import Data.List (intersperse)
import Data.Foldable import Data.Foldable
...@@ -148,7 +147,7 @@ valmariTransitionB t = ...@@ -148,7 +147,7 @@ valmariTransitionB t =
state = Build.decimal . (+ 1) -- states are numbered from 1 state = Build.decimal . (+ 1) -- states are numbered from 1
valmariBlocksB :: Int -> Maybe Partition -> Build.Builder valmariBlocksB :: Int -> Maybe Partition -> Build.Builder
valmariBlocksB n Nothing = "" valmariBlocksB _ Nothing = ""
valmariBlocksB _ (Just p) = valmariBlocksB _ (Just p) =
let blockMap :: IntMap [Int] let blockMap :: IntMap [Int]
blockMap = V.ifoldl' (\m s b -> M.insertWith (++) b [s] m) M.empty (stateAssignment p) blockMap = V.ifoldl' (\m s b -> M.insertWith (++) b [s] m) M.empty (stateAssignment p)
......
...@@ -4,7 +4,6 @@ module Main (main) where ...@@ -4,7 +4,6 @@ module Main (main) where
import Control.Applicative import Control.Applicative
import Control.Monad ( forM_ ) import Control.Monad ( forM_ )
import Data.Maybe ( listToMaybe )
import qualified Data.List.NonEmpty as NE import qualified Data.List.NonEmpty as NE
import Data.Word import Data.Word
...@@ -86,14 +85,6 @@ options = ...@@ -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.ReadM (OutputFormat, Maybe (NE.NonEmpty Char))
readOutput = OptParse.eitherReader $ \s -> case span (/= sep) s of readOutput = OptParse.eitherReader $ \s -> case span (/= sep) s of
([] , _ ) -> Left "a" ([] , _ ) -> Left "a"
......
module ValmariOutput (valmariB) where module ValmariOutput (valmariB) where
import Data.Monoid
import Data.Word import Data.Word
import qualified Data.Text.Lazy.Builder as Build import qualified Data.Text.Lazy.Builder as Build
import qualified Data.Text.Lazy.Builder.Int as Build import qualified Data.Text.Lazy.Builder.Int as Build
import Lens.Micro.Platform import Lens.Micro.Platform
import qualified Data.Vector.Unboxed as VU import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector as V
import Type 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