style suggestion for data decl.
authorBernhard Urban <lewurm@gmail.com>
Mon, 20 Aug 2012 20:18:47 +0000 (22:18 +0200)
committerBernhard Urban <lewurm@gmail.com>
Mon, 20 Aug 2012 20:18:47 +0000 (22:18 +0200)
Mate/Types.hs
scratch/ffiTest/.gitignore [new file with mode: 0644]
scratch/ffiTest/Makefile

index 5e5bf221e0ba26420943967d2b77e2cdcedb7ab6..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,12 +43,12 @@ data RawMethod = RawMethod {
 -- MethodInfo = relevant information about callee
 type TrapMap = M.Map NativeWord TrapCause
 
-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 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,
diff --git a/scratch/ffiTest/.gitignore b/scratch/ffiTest/.gitignore
new file mode 100644 (file)
index 0000000..298f709
--- /dev/null
@@ -0,0 +1 @@
+trapTest
index 1dde1e43ed3b68a30a822edd230038076601335e..968611dac10da7d7f99ec1591f7e47f873d89ee0 100644 (file)
@@ -6,4 +6,4 @@ ghci: all
        ghci -package containers -package random trapTest.o mate_support.o trapTest_stub.o trapTest.hs
 
 clean:
-       rm *.o *.hi trapTest trapTest_stub.c trapTest_stub.h
+       rm -f *.o *.hi trapTest trapTest_stub.c trapTest_stub.h