-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate pattern synonym for enum values
- Loading branch information
Showing
20 changed files
with
249 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
DeclNewtype (Newtype {newtypeName = "CFirst", newtypeConstr = "MkCFirst", newtypeField = "unCFirst", newtypeType = HsPrimType HsPrimCUInt}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = ("unCFirst",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = ("unCFirst",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CFirst", structConstr = "MkCFirst", structFields = ("unCFirst",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCFIRST1", patSynType = "CFirst", patSynConstr = "MkCFirst", patSynValue = 0}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCFIRST2", patSynType = "CFirst", patSynConstr = "MkCFirst", patSynValue = 1}) | ||
DeclNewtype (Newtype {newtypeName = "CSecond", newtypeConstr = "MkCSecond", newtypeField = "unCSecond", newtypeType = HsPrimType HsPrimCInt}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = ("unCSecond",HsPrimType HsPrimCInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = ("unCSecond",HsPrimType HsPrimCInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CSecond", structConstr = "MkCSecond", structFields = ("unCSecond",HsPrimType HsPrimCInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCSECONDA", patSynType = "CSecond", patSynConstr = "MkCSecond", patSynValue = -1}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCSECONDB", patSynType = "CSecond", patSynConstr = "MkCSecond", patSynValue = 0}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCSECONDC", patSynType = "CSecond", patSynConstr = "MkCSecond", patSynValue = 1}) | ||
DeclNewtype (Newtype {newtypeName = "CSame", newtypeConstr = "MkCSame", newtypeField = "unCSame", newtypeType = HsPrimType HsPrimCUInt}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CSame", structConstr = "MkCSame", structFields = ("unCSame",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CSame", structConstr = "MkCSame", structFields = ("unCSame",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CSame", structConstr = "MkCSame", structFields = ("unCSame",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCSAMEA", patSynType = "CSame", patSynConstr = "MkCSame", patSynValue = 1}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCSAMEB", patSynType = "CSame", patSynConstr = "MkCSame", patSynValue = 1}) | ||
DeclNewtype (Newtype {newtypeName = "CPackad", newtypeConstr = "MkCPackad", newtypeField = "unCPackad", newtypeType = HsPrimType HsPrimCSChar}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = ("unCPackad",HsPrimType HsPrimCSChar) ::: VNil}) (StorableInstance {storableSizeOf = 1, storableAlignment = 1, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = ("unCPackad",HsPrimType HsPrimCSChar) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CPackad", structConstr = "MkCPackad", structFields = ("unCPackad",HsPrimType HsPrimCSChar) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCPACKEDA", patSynType = "CPackad", patSynConstr = "MkCPackad", patSynValue = 0}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCPACKEDB", patSynType = "CPackad", patSynConstr = "MkCPackad", patSynValue = 1}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCPACKEDC", patSynType = "CPackad", patSynConstr = "MkCPackad", patSynValue = 2}) | ||
DeclNewtype (Newtype {newtypeName = "CEnumA", newtypeConstr = "MkCEnumA", newtypeField = "unCEnumA", newtypeType = HsPrimType HsPrimCUInt}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = ("unCEnumA",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = ("unCEnumA",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumA", structConstr = "MkCEnumA", structFields = ("unCEnumA",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCAFOO", patSynType = "CEnumA", patSynConstr = "MkCEnumA", patSynValue = 0}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCABAR", patSynType = "CEnumA", patSynConstr = "MkCEnumA", patSynValue = 1}) | ||
DeclNewtype (Newtype {newtypeName = "CEnumB", newtypeConstr = "MkCEnumB", newtypeField = "unCEnumB", newtypeType = HsPrimType HsPrimCUInt}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = ("unCEnumB",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = ("unCEnumB",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumB", structConstr = "MkCEnumB", structFields = ("unCEnumB",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCBFOO", patSynType = "CEnumB", patSynConstr = "MkCEnumB", patSynValue = 0}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCBBAR", patSynType = "CEnumB", patSynConstr = "MkCEnumB", patSynValue = 1}) | ||
DeclNewtype (Newtype {newtypeName = "CEnumC", newtypeConstr = "MkCEnumC", newtypeField = "unCEnumC", newtypeType = HsPrimType HsPrimCUInt}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = ("unCEnumC",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = ("unCEnumC",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumC", structConstr = "MkCEnumC", structFields = ("unCEnumC",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCCFOO", patSynType = "CEnumC", patSynConstr = "MkCEnumC", patSynValue = 0}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCCBAR", patSynType = "CEnumC", patSynConstr = "MkCEnumC", patSynValue = 1}) | ||
DeclNewtype (Newtype {newtypeName = "CEnumD", newtypeConstr = "MkCEnumD", newtypeField = "unCEnumD", newtypeType = HsPrimType HsPrimCUInt}) | ||
DeclInstance (InstanceStorable (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = ("unCEnumD",HsPrimType HsPrimCUInt) ::: VNil}) (StorableInstance {storableSizeOf = 4, storableAlignment = 4, storablePeek = Lambda "ptr" (Ap (StructCon (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = ("unCEnumD",HsPrimType HsPrimCUInt) ::: VNil})) [PeekByteOff 0 0]), storablePoke = Lambda "ptr" (Lambda "s" (ElimStruct 0 (Struct {structName = "CEnumD", structConstr = "MkCEnumD", structFields = ("unCEnumD",HsPrimType HsPrimCUInt) ::: VNil}) 1 (Seq [PokeByteOff 2 0 0])))})) | ||
DeclPatSyn (PatSyn {patSynName = "MkCDFOO", patSynType = "CEnumD", patSynConstr = "MkCEnumD", patSynValue = 0}) | ||
DeclPatSyn (PatSyn {patSynName = "MkCDBAR", patSynType = "CEnumD", patSynConstr = "MkCEnumD", patSynValue = 1}) | ||
DeclNewtype (Newtype {newtypeName = "CEnumDT", newtypeConstr = "MkCEnumDT", newtypeField = "unCEnumDT", newtypeType = HsTypRef "CEnumD"}) | ||
DeclNewtypeInstance Storable "CEnumDT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.