From 0ddbcb63c3be33c9825569711099851be38f2a7f Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Mon, 20 Aug 2012 22:18:47 +0200 Subject: [PATCH] style suggestion for data decl. --- Mate/Types.hs | 19 ++++++++++++------- scratch/ffiTest/.gitignore | 1 + scratch/ffiTest/Makefile | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 scratch/ffiTest/.gitignore diff --git a/Mate/Types.hs b/Mate/Types.hs index 5e5bf22..5c5428c 100644 --- a/Mate/Types.hs +++ b/Mate/Types.hs @@ -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 index 0000000..298f709 --- /dev/null +++ b/scratch/ffiTest/.gitignore @@ -0,0 +1 @@ +trapTest diff --git a/scratch/ffiTest/Makefile b/scratch/ffiTest/Makefile index 1dde1e4..968611d 100644 --- a/scratch/ffiTest/Makefile +++ b/scratch/ffiTest/Makefile @@ -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 -- 2.25.1