style suggestion for data decl.
[mate.git] / Mate / Types.hs
index 0fe838e0edd9524f62fc186659ce75757402d296..5c5428ca8be81683e82dbc0a392bcce8b9e0db0f 100644 (file)
@@ -22,7 +22,12 @@ data BasicBlock = BasicBlock {
   successor :: BBEnd }
 
 -- describes (leaving) edges of a CFG node
-data BBEnd = Return | FallThrough BlockID | OneTarget BlockID | TwoTarget BlockID BlockID deriving Show
+data BBEnd
+  = Return
+  | FallThrough BlockID
+  | OneTarget BlockID
+  | TwoTarget BlockID BlockID
+  deriving Show
 
 type MapBB = M.Map BlockID BasicBlock
 
@@ -38,13 +43,12 @@ data RawMethod = RawMethod {
 -- MethodInfo = relevant information about callee
 type TrapMap = M.Map NativeWord TrapCause
 
-data TrapCause =
-  StaticMethod MethodInfo | -- for static calls
-  VirtualMethod Bool MethodInfo | -- for virtual calls
-  InterfaceMethod Bool MethodInfo | -- for interface calls
-  InstanceOf B.ByteString | -- class name
-  NewObject B.ByteString | -- class name
-  StaticField StaticFieldInfo deriving Show
+data TrapCause
+  = StaticMethod MethodInfo -- for static calls
+  | VirtualCall Bool MethodInfo (IO NativeWord) -- for invoke{interface,virtual}
+  | InstanceOf B.ByteString -- class name
+  | NewObject B.ByteString -- class name
+  | StaticField StaticFieldInfo
 
 data StaticFieldInfo = StaticFieldInfo {
   sfiClassName :: B.ByteString,