haskell-gi:haskell-gi.git
7 years agoadd the beginnings of a test suite master
Dafydd Harries [Mon, 13 Jun 2011 06:14:43 +0000 (02:14 -0400)]
add the beginnings of a test suite

7 years agocabal file: enable some extra warnings
Dafydd Harries [Mon, 13 Jun 2011 06:13:43 +0000 (02:13 -0400)]
cabal file: enable some extra warnings

7 years agoGI.Type: remove redundant catch-all caases
Dafydd Harries [Mon, 13 Jun 2011 06:12:41 +0000 (02:12 -0400)]
GI.Type: remove redundant catch-all caases

They introduce pattern overlap warnings.

7 years agorename Main.hs to haskell-gi.hs
Dafydd Harries [Mon, 13 Jun 2011 06:10:24 +0000 (02:10 -0400)]
rename Main.hs to haskell-gi.hs

7 years agoMain: eliminate warnings
Dafydd Harries [Mon, 13 Jun 2011 06:08:42 +0000 (02:08 -0400)]
Main: eliminate warnings

7 years agoGI.CodeGen: eliminate warnings
Dafydd Harries [Mon, 13 Jun 2011 06:07:28 +0000 (02:07 -0400)]
GI.CodeGen: eliminate warnings

7 years agoGI.API: eliminate warnings
Dafydd Harries [Mon, 13 Jun 2011 06:03:25 +0000 (02:03 -0400)]
GI.API: eliminate warnings

7 years agoGI.API: remove unused unionName
Dafydd Harries [Mon, 13 Jun 2011 06:02:58 +0000 (02:02 -0400)]
GI.API: remove unused unionName

7 years agoGI.Internal.TypeLib: eliminate unused value warning
Dafydd Harries [Mon, 13 Jun 2011 06:02:27 +0000 (02:02 -0400)]
GI.Internal.TypeLib: eliminate unused value warning

7 years agoGI.Internal.ParamFlag: remove ParamPrivate member altogether
Dafydd Harries [Mon, 13 Jun 2011 06:02:03 +0000 (02:02 -0400)]
GI.Internal.ParamFlag: remove ParamPrivate member altogether

7 years agoGI.Internal.ConstantInfo: elimintate unused value warning
Dafydd Harries [Mon, 13 Jun 2011 06:00:34 +0000 (02:00 -0400)]
GI.Internal.ConstantInfo: elimintate unused value warning

7 years agoGI/Internal: clean up unused imports
Dafydd Harries [Mon, 13 Jun 2011 06:00:06 +0000 (02:00 -0400)]
GI/Internal: clean up unused imports

7 years agosplit genCode out from genModule
Dafydd Harries [Mon, 13 Jun 2011 05:40:52 +0000 (01:40 -0400)]
split genCode out from genModule

7 years agoerase extraneous NoCodes when mappending Codes
Dafydd Harries [Mon, 13 Jun 2011 01:53:00 +0000 (21:53 -0400)]
erase extraneous NoCodes when mappending Codes

This makes for more legible debug output.

7 years agoderive Eq for Code and CodeTag
Dafydd Harries [Mon, 13 Jun 2011 01:52:40 +0000 (21:52 -0400)]
derive Eq for Code and CodeTag

7 years agoMerge remote-tracking branch 'lucas/gtype-init-and-args'
Dafydd Harries [Thu, 12 May 2011 01:36:12 +0000 (21:36 -0400)]
Merge remote-tracking branch 'lucas/gtype-init-and-args'

7 years agoMain.hs: Make showHelp a little bit prettier
Lucas Stadler [Fri, 6 May 2011 11:49:13 +0000 (13:49 +0200)]
Main.hs: Make showHelp a little bit prettier

7 years agoAdd commandline help.
Lucas Stadler [Mon, 25 Apr 2011 10:24:48 +0000 (12:24 +0200)]
Add commandline help.

Seems to always call exitFailure when using -h or --help.

7 years agoBind GLib's g_type_init and use it for initialization.
Lucas Stadler [Mon, 25 Apr 2011 10:13:43 +0000 (12:13 +0200)]
Bind GLib's g_type_init and use it for initialization.

This way we can drop the dependency on gtk and yet get arguments back.
The g_type_init function initializes the type system of GLib and has to
be called before any other GObject functions.

7 years agoValue.hs: eliminate warnings
Dafydd Harries [Thu, 14 Apr 2011 21:32:11 +0000 (17:32 -0400)]
Value.hs: eliminate warnings

7 years agoCodeGen.hs: eliminate warnings
Dafydd Harries [Thu, 14 Apr 2011 21:30:03 +0000 (17:30 -0400)]
CodeGen.hs: eliminate warnings

7 years agouse upperName when generating enums, structs, flags
Dafydd Harries [Thu, 14 Apr 2011 21:27:43 +0000 (17:27 -0400)]
use upperName when generating enums, structs, flags

7 years agoupperName: add namespace prefix
Dafydd Harries [Thu, 14 Apr 2011 21:27:06 +0000 (17:27 -0400)]
upperName: add namespace prefix

7 years agoadd prefixes to interface names in argument types
Dafydd Harries [Thu, 14 Apr 2011 21:17:42 +0000 (17:17 -0400)]
add prefixes to interface names in argument types

7 years agomake foreignType call haskellType rather than vice versa
Dafydd Harries [Thu, 14 Apr 2011 21:15:51 +0000 (17:15 -0400)]
make foreignType call haskellType rather than vice versa

This makes things more consistent over all.

7 years agoupperName: handle names with underscores
Dafydd Harries [Thu, 14 Apr 2011 21:10:57 +0000 (17:10 -0400)]
upperName: handle names with underscores

7 years agoMain.hs: eliminate warnings
Dafydd Harries [Thu, 14 Apr 2011 21:09:50 +0000 (17:09 -0400)]
Main.hs: eliminate warnings

7 years agostore namespace as well as name in TInterface
Dafydd Harries [Thu, 14 Apr 2011 19:54:35 +0000 (15:54 -0400)]
store namespace as well as name in TInterface

7 years agofactor out prefix lookup code
Dafydd Harries [Thu, 14 Apr 2011 19:44:00 +0000 (15:44 -0400)]
factor out prefix lookup code

7 years agofix GType mapping
Dafydd Harries [Sat, 9 Apr 2011 21:54:32 +0000 (17:54 -0400)]
fix GType mapping

7 years agoadd comments with original names to generated functions + constants
Dafydd Harries [Sat, 9 Apr 2011 21:54:08 +0000 (17:54 -0400)]
add comments with original names to generated functions + constants

7 years agoadd namespace prefix to names of generated functions
Dafydd Harries [Sat, 9 Apr 2011 21:52:26 +0000 (17:52 -0400)]
add namespace prefix to names of generated functions

7 years agomove type-related code into GI.Type module
Dafydd Harries [Sat, 9 Apr 2011 18:06:39 +0000 (14:06 -0400)]
move type-related code into GI.Type module

7 years agointroduced Named type to keep track of namespaces
Dafydd Harries [Sat, 9 Apr 2011 09:38:26 +0000 (05:38 -0400)]
introduced Named type to keep track of namespaces

7 years agopass in dictionary of namespace prefixes to generator
Dafydd Harries [Sat, 9 Apr 2011 09:15:59 +0000 (05:15 -0400)]
pass in dictionary of namespace prefixes to generator

7 years agodon't use upperName to munge Haskell type names
Dafydd Harries [Sat, 9 Apr 2011 08:55:14 +0000 (04:55 -0400)]
don't use upperName to munge Haskell type names

It currently does more harm than good.

7 years agoadd support for UniChar type tag
Dafydd Harries [Fri, 8 Apr 2011 00:25:16 +0000 (20:25 -0400)]
add support for UniChar type tag

7 years agobind get_loaded_namespaces
Dafydd Harries [Thu, 7 Apr 2011 19:53:04 +0000 (15:53 -0400)]
bind get_loaded_namespaces

7 years agouse rename map when generating code
Dafydd Harries [Thu, 31 Mar 2011 23:20:26 +0000 (19:20 -0400)]
use rename map when generating code

7 years agokill haskell-gi-dump and rename haskell-gi-generate to haskell-gi
Dafydd Harries [Sat, 12 Mar 2011 22:55:56 +0000 (17:55 -0500)]
kill haskell-gi-dump and rename haskell-gi-generate to haskell-gi

The haskell-gi command has the -d option for dumping.

7 years agojust print the error message when outputting GErrors
Dafydd Harries [Sat, 12 Mar 2011 22:55:34 +0000 (17:55 -0500)]
just print the error message when outputting GErrors

7 years agohaskell-gi-generate: add option parsing
Dafydd Harries [Sat, 12 Mar 2011 22:46:41 +0000 (17:46 -0500)]
haskell-gi-generate: add option parsing

7 years agomake CodeGen a transformed Reader Config
Dafydd Harries [Sat, 12 Mar 2011 22:13:09 +0000 (17:13 -0500)]
make CodeGen a transformed Reader Config

7 years agoremove trailing whitespace
Dafydd Harries [Sat, 12 Mar 2011 19:12:30 +0000 (14:12 -0500)]
remove trailing whitespace

7 years agoadd value conversion for doubles
Dafydd Harries [Sat, 5 Mar 2011 23:18:18 +0000 (18:18 -0500)]
add value conversion for doubles

7 years agogenerate some code for enums, flags, callbacks and structs
Dafydd Harries [Sat, 5 Mar 2011 23:17:55 +0000 (18:17 -0500)]
generate some code for enums, flags, callbacks and structs

7 years agouse non-prefixed names for constuctors of GLib types
Dafydd Harries [Sat, 5 Mar 2011 23:17:26 +0000 (18:17 -0500)]
use non-prefixed names for constuctors of GLib types

7 years agoadd header to output indicating it's generated code
Dafydd Harries [Sat, 5 Mar 2011 21:40:48 +0000 (16:40 -0500)]
add header to output indicating it's generated code

7 years agoAPI.hs: export Enumeration and Flags
Dafydd Harries [Sat, 5 Mar 2011 20:45:16 +0000 (15:45 -0500)]
API.hs: export Enumeration and Flags

7 years agolowerName: handle names with multiple internal underscores
Dafydd Harries [Fri, 4 Mar 2011 21:12:03 +0000 (16:12 -0500)]
lowerName: handle names with multiple internal underscores

7 years agohaskellType/foreignType: handle Error/List/SList
Dafydd Harries [Fri, 4 Mar 2011 21:11:37 +0000 (16:11 -0500)]
haskellType/foreignType: handle Error/List/SList

7 years agobind GIUnionInfo
Dafydd Harries [Fri, 4 Mar 2011 21:10:52 +0000 (16:10 -0500)]
bind GIUnionInfo

7 years agowrap long line
Dafydd Harries [Fri, 4 Mar 2011 21:10:11 +0000 (16:10 -0500)]
wrap long line

7 years ago"in" and "data" are reserved words
Dafydd Harries [Fri, 4 Mar 2011 21:09:27 +0000 (16:09 -0500)]
"in" and "data" are reserved words

7 years agoadd type signatures for haskellType and foreignType
Dafydd Harries [Fri, 4 Mar 2011 21:08:41 +0000 (16:08 -0500)]
add type signatures for haskellType and foreignType

7 years agoextend API for flag structures
Dafydd Harries [Fri, 4 Mar 2011 19:18:32 +0000 (14:18 -0500)]
extend API for flag structures

7 years agoadd imports to generated code
Dafydd Harries [Fri, 4 Mar 2011 18:34:29 +0000 (13:34 -0500)]
add imports to generated code

7 years agoescape reserved words in argument names
Dafydd Harries [Fri, 4 Mar 2011 18:34:11 +0000 (13:34 -0500)]
escape reserved words in argument names

7 years agofix Ptr spelling
Dafydd Harries [Fri, 4 Mar 2011 18:33:05 +0000 (13:33 -0500)]
fix Ptr spelling

7 years agooutput imports before other code
Dafydd Harries [Mon, 29 Nov 2010 00:58:32 +0000 (19:58 -0500)]
output imports before other code

7 years agodeclare use of ForeignFunctionInterface
Dafydd Harries [Mon, 29 Nov 2010 00:57:19 +0000 (19:57 -0500)]
declare use of ForeignFunctionInterface

7 years ago"import foreign" -> "foreign import"
Dafydd Harries [Mon, 29 Nov 2010 00:56:50 +0000 (19:56 -0500)]
"import foreign" -> "foreign import"

7 years agogenerate module declarations
Dafydd Harries [Sun, 28 Nov 2010 23:56:08 +0000 (18:56 -0500)]
generate module declarations

7 years agofix names generated for constants
Dafydd Harries [Sun, 28 Nov 2010 23:55:44 +0000 (18:55 -0500)]
fix names generated for constants

7 years agoadd some Haskell <-> foreign argument conversion generation
Dafydd Harries [Mon, 22 Nov 2010 00:22:37 +0000 (19:22 -0500)]
add some Haskell <-> foreign argument conversion generation

7 years agouse blank instead of line ""
Dafydd Harries [Sun, 21 Nov 2010 17:59:36 +0000 (12:59 -0500)]
use blank instead of line ""

7 years agointroduce type constructor application utility function
Dafydd Harries [Fri, 19 Nov 2010 03:38:51 +0000 (22:38 -0500)]
introduce type constructor application utility function

7 years agogenerate code using a writer monad
Dafydd Harries [Fri, 19 Nov 2010 02:45:28 +0000 (21:45 -0500)]
generate code using a writer monad

7 years agobind RegisteredTypeInfo
Dafydd Harries [Thu, 18 Nov 2010 19:35:57 +0000 (14:35 -0500)]
bind RegisteredTypeInfo

7 years agosplit out foreign import generation
Dafydd Harries [Thu, 18 Nov 2010 19:35:19 +0000 (14:35 -0500)]
split out foreign import generation

7 years agosimplify toAPI
Dafydd Harries [Thu, 18 Nov 2010 18:08:54 +0000 (13:08 -0500)]
simplify toAPI

7 years agomake Enumeration a separate type like the others
Dafydd Harries [Thu, 18 Nov 2010 18:01:29 +0000 (13:01 -0500)]
make Enumeration a separate type like the others

7 years agobegin splitting function code into import + wrapper
Dafydd Harries [Tue, 16 Nov 2010 04:49:44 +0000 (23:49 -0500)]
begin splitting function code into import + wrapper

7 years agoadd code generation front end
Dafydd Harries [Tue, 16 Nov 2010 01:19:56 +0000 (20:19 -0500)]
add code generation front end

7 years agomake dump tool take name of typelib
Dafydd Harries [Tue, 16 Nov 2010 01:19:39 +0000 (20:19 -0500)]
make dump tool take name of typelib

7 years agobeginnings of code generation
Dafydd Harries [Tue, 16 Nov 2010 01:16:43 +0000 (20:16 -0500)]
beginnings of code generation

7 years agorename executable
Dafydd Harries [Tue, 16 Nov 2010 01:02:13 +0000 (20:02 -0500)]
rename executable

7 years agoremove boilerplate from Cabal file
Dafydd Harries [Tue, 16 Nov 2010 01:00:45 +0000 (20:00 -0500)]
remove boilerplate from Cabal file

7 years agomap Value to Type
Dafydd Harries [Tue, 16 Nov 2010 00:59:08 +0000 (19:59 -0500)]
map Value to Type

7 years agoGI.API: expose types
Dafydd Harries [Tue, 16 Nov 2010 00:46:19 +0000 (19:46 -0500)]
GI.API: expose types

7 years agomake info flags not be backwards
Dafydd Harries [Tue, 16 Nov 2010 00:43:51 +0000 (19:43 -0500)]
make info flags not be backwards

Oops.

7 years agomove printing code to Main
Dafydd Harries [Mon, 15 Nov 2010 22:34:29 +0000 (17:34 -0500)]
move printing code to Main

7 years agoinitialize attribute iterator
Dafydd Harries [Sun, 14 Nov 2010 00:17:24 +0000 (19:17 -0500)]
initialize attribute iterator

7 years agomake toInfo return single API item
Dafydd Harries [Sun, 14 Nov 2010 00:04:24 +0000 (19:04 -0500)]
make toInfo return single API item

7 years agobegin binding ObjectInfo
Dafydd Harries [Sun, 14 Nov 2010 00:03:23 +0000 (19:03 -0500)]
begin binding ObjectInfo

7 years agomake note about gtypes
Dafydd Harries [Sat, 13 Nov 2010 23:17:25 +0000 (18:17 -0500)]
make note about gtypes

7 years agobind callbacks
Dafydd Harries [Sat, 13 Nov 2010 23:07:41 +0000 (18:07 -0500)]
bind callbacks

CallbackInfo is a bit of a special case since is doesn't have any
type-specific methods, it just seems to act as a tag for a callable.

7 years agoimplement more type mappings
Dafydd Harries [Sat, 13 Nov 2010 23:07:28 +0000 (18:07 -0500)]
implement more type mappings

7 years agobegin binding StructInfo/FieldInfo
Dafydd Harries [Sat, 13 Nov 2010 22:58:03 +0000 (17:58 -0500)]
begin binding StructInfo/FieldInfo

7 years agogeneralize toPropertyFlags to toFlags and put it in Util.hs
Dafydd Harries [Sat, 13 Nov 2010 22:16:53 +0000 (17:16 -0500)]
generalize toPropertyFlags to toFlags and put it in Util.hs

7 years agorename type_ to argType
Dafydd Harries [Sat, 13 Nov 2010 21:26:22 +0000 (16:26 -0500)]
rename type_ to argType

7 years agobind PropertyInfo
Dafydd Harries [Sat, 13 Nov 2010 21:17:31 +0000 (16:17 -0500)]
bind PropertyInfo

And expose interface properties.

7 years agoto do
Dafydd Harries [Sat, 13 Nov 2010 07:36:13 +0000 (02:36 -0500)]
to do

7 years agobegin binding InterfaceInfo
Dafydd Harries [Sat, 13 Nov 2010 07:34:48 +0000 (02:34 -0500)]
begin binding InterfaceInfo

7 years agoTInterface: store name of interface info
Dafydd Harries [Sat, 13 Nov 2010 07:33:36 +0000 (02:33 -0500)]
TInterface: store name of interface info

This seems more useful than the type tag string, which is always "interface".

7 years agoType: actually take second type parameter
Dafydd Harries [Sat, 13 Nov 2010 07:32:24 +0000 (02:32 -0500)]
Type: actually take second type parameter

Instead of taking the first twice.

7 years agomake EnumInfo binding more consistent with others
Dafydd Harries [Sat, 13 Nov 2010 07:31:56 +0000 (02:31 -0500)]
make EnumInfo binding more consistent with others

7 years agointroduce getList utility function
Dafydd Harries [Sat, 13 Nov 2010 07:18:55 +0000 (02:18 -0500)]
introduce getList utility function

7 years agomake TypeInfoInterface return InterfaceInfo
Dafydd Harries [Sat, 13 Nov 2010 07:05:42 +0000 (02:05 -0500)]
make TypeInfoInterface return InterfaceInfo

7 years agomake separate Constant type
Dafydd Harries [Sat, 13 Nov 2010 06:52:51 +0000 (01:52 -0500)]
make separate Constant type