X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=wavpack.git;a=blobdiff_plain;f=examples%2FWvInfo.hs;fp=examples%2FWvInfo.hs;h=8b1f5b4dfdafbf659d46b34fc136e972ace9a5f5;hp=4c5cf88cf6b6c895021382b9617459467faae16a;hb=9128d47e1f753b82477535a1116b3a4f416243fc;hpb=9341c92aa88e46a371c2a6210933d69cbe161eec diff --git a/examples/WvInfo.hs b/examples/WvInfo.hs index 4c5cf88..8b1f5b4 100644 --- a/examples/WvInfo.hs +++ b/examples/WvInfo.hs @@ -1,9 +1,11 @@ {-# LANGUAGE - UnicodeSyntax + UnboxedTuples + , UnicodeSyntax #-} module Main where import Codec.Audio.WavPack.Block import qualified Data.ByteString.Lazy as L +import qualified Data.Strict as S import System.Environment main ∷ IO () @@ -13,8 +15,8 @@ main = do [wvFile] ← getArgs showWvInfo ∷ L.ByteString → IO () showWvInfo stream - = case findNextHeader stream of - Just (bh, _) - → print bh - Nothing + = case findNextBlock stream of + (# S.Just block, _ #) + → print block + (# S.Nothing , _ #) → fail "Can't find any WavPack block headers."