Skip to content

Commit

Permalink
format everything
Browse files Browse the repository at this point in the history
  • Loading branch information
bristermitten committed Dec 7, 2023
1 parent f91994c commit 99be9d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/JVM/Data/Convert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import Polysemy
jloName :: QualifiedClassName
jloName = parseQualifiedClassName "java.lang.Object"

convertClassAttributes :: ConvertEff r => [Abs.ClassFileAttribute] -> Sem r [Raw.AttributeInfo]
convertClassAttributes :: (ConvertEff r) => [Abs.ClassFileAttribute] -> Sem r [Raw.AttributeInfo]
convertClassAttributes = traverse convertClassAttribute
where
convertClassAttribute (Abs.SourceFile text) = do
Expand Down Expand Up @@ -62,7 +62,7 @@ convert Abs.ClassFile{..} = do
(V.fromList attributes')

let (bmIndex, finalConstantPool) = run $ runConstantPoolWith cpState $ do
let bootstrapAttr = BootstrapMethodsAttribute (IM.toVector cpState.bootstrapMethods)
let bootstrapAttr = BootstrapMethodsAttribute (IM.toVector cpState.bootstrapMethods)
attrNameIndex <- findIndexOf (CPUTF8Entry "BootstrapMethods")
pure $ Raw.AttributeInfo attrNameIndex bootstrapAttr

Expand Down
2 changes: 1 addition & 1 deletion src/JVM/Data/Convert/ConstantPool.hs
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@ runConstantPoolWith s =
. raiseUnder

runConstantPool :: Sem (ConstantPool ': r) a -> Sem r (a, ConstantPoolState)
runConstantPool = runConstantPoolWith mempty
runConstantPool = runConstantPoolWith mempty
2 changes: 1 addition & 1 deletion src/JVM/Data/Convert/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import JVM.Data.Convert.ConstantPool (ConstantPool, ConstantPoolState, runConsta
import Polysemy
import Polysemy.Error

type ConvertEff r = Members '[ConstantPool, Error CodeConverterError]r
type ConvertEff r = Members '[ConstantPool, Error CodeConverterError] r

runConvertM :: Sem (ConstantPool : Error CodeConverterError : r) a -> Sem r (Either CodeConverterError (a, ConstantPoolState))
runConvertM = runError . runConstantPool
Expand Down
2 changes: 1 addition & 1 deletion test/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import JVM.Data.Convert.ConstantPool (ConstantPoolState)
import JVM.Data.Convert.Instruction (convertInstructions, fullyRunCodeConverter)
import JVM.Data.Convert.Monad (runConvertM)
import JVM.Data.Raw.Instruction qualified as Raw
import Test.Hspec (HasCallStack)
import Polysemy
import Test.Hspec (HasCallStack)

runConv :: (MonadTest m) => [Abs.Instruction] -> m ([Raw.Instruction], ConstantPoolState)
runConv =
Expand Down

0 comments on commit 99be9d7

Please sign in to comment.