[Haskell-beginners] WinRT and Haskell

Antoine Latter aslatter at gmail.com
Thu Jan 5 16:59:04 CET 2012


On Thu, Jan 5, 2012 at 9:55 AM, AbdulSattar Mohammed
<codingtales at gmail.com> wrote:
> WinRT has a concept of projections that expose its API. Microsoft has
> implemented projections for Native (C and C++), HTML/Javascript and .NET
> (from Miguel de Caza's WinRT demystified
> post: http://tirania.org/blog/archive/2011/Sep-15.html). There's no mention
> of creating your own projections (or I have seen none). I don't see any
> reason why we can't create our own projections. If it's possible a Haskell
> projection could really help.
>

Yep, that's what I was thinking of.

I'm pretty sure the C/C++ projections rely on compiler extensions for
the MS C/C++ compiler, so I don't think we could use those directly
from Haskell.

Antoine

>
> On Thu, Jan 5, 2012 at 8:11 PM, Antoine Latter <aslatter at gmail.com> wrote:
>>
>> On Thu, Jan 5, 2012 at 5:12 AM, AbdulSattar Mohammed
>> <codingtales at gmail.com> wrote:
>> > I suppose this should go into the GUI mailing list, but it is filled
>> > with
>> > spam. So, WinRT does not depend on the .NET Framework. C++ applications
>> > can
>> > directly compile to x86 and be able to use WinRT. Do we have a room for
>> > Haskell development there?
>> >
>>
>> From what I understand, WinRT is a set of COM libraries - C++ can
>> directly compile to it because the MS C++ compiler has special
>> extensions to handle the COM resources in the library.
>>
>> There is a COM library for Haskell:
>>
>> http://hackage.haskell.org/package/com
>>
>> But I've never used it.
>>
>> The API is encoded in a special meta-data format, which is then used
>> by C++, .NET and Javascript to create the language-specific APIs - it
>> might be possible to generate Haskell bindings to the COM components
>> from this metadata.
>>
>> Antoine
>
>
>
>
> --
> Warm Regards,
>
> AbdulSattar Mohammed



More information about the Beginners mailing list