Skip to content

Commit

Permalink
Style.
Browse files Browse the repository at this point in the history
  • Loading branch information
damianfral committed Jun 10, 2024
1 parent a2a58af commit 5afb277
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions benchmark/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ data Program = Program
}

parseBS :: ByteString -> IO BFProgram
parseBS =
either (throwIO . userError . show) pure
. parseBF
. unpack
. decodeUtf8With lenientDecode
parseBS = throwIfLeft . parseBF . unpack . decodeUtf8With lenientDecode
where
throwIfLeft (Left e) = throwIO . userError . show $ e
throwIfLeft (Right v) = pure v

brainfuckFiles :: [(FilePath, ByteString)]
brainfuckFiles = filter isBrainfuckFile files
Expand Down
1 change: 0 additions & 1 deletion src/Language/BrainHask/Optimizer.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}

module Language.BrainHask.Optimizer (optimize, OptimizationLevel (..)) where

Expand Down
2 changes: 1 addition & 1 deletion src/Language/BrainHask/Preprocessor.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Language.BrainHask.Preprocessor (preprocess) where

import Data.Functor (($>))
import Data.Transformer
import Language.BrainHask.Types
import Data.Functor (($>))

type Preprocessor a = Transformer BFOp (ILOp Int a)

Expand Down

0 comments on commit 5afb277

Please sign in to comment.