[Haskell-cafe] Representing a type system in Haskell

Talha Qamar qamartalha at proton.me
Mon Jul 10 14:00:06 UTC 2023


This looks perfect! I think I'll spend a couple days looking this over and grokking it. Thanks for your time.

Sent from Proton Mail mobile

-------- Original Message --------
On Jul 10, 2023, 6:56 PM, Brandon Allbery wrote:

> You might look at https://web.cecs.pdx.edu/~mpj/thih/thih.pdf which shows how to implement Haskell's own type system (minus various GHC extensions) in Haskell, and adapt to whatever language you're implementing. On Mon, Jul 10, 2023 at 8:36 AM Talha Qamar via Haskell-Cafe  wrote: > > > Hello everyone, I'm working on a game engine in Haskell. The thing is, while I want to write the architecture in Haskell, I'm thinking of using something else as the actual scripting language. > > Long story short, how would I represent a type system in Haskell? I've gotten _something_ together that works a bit like this: > > ``` > data Type = -- ...all possible types > data Value = -- ...all possible types again > data TypedValue = TypedValye Type Value > ``` > But I'm concerned if this is the ideal way of doing things, particularly when I get to complex types like structs or tagged unions. > > Any help would be appreciated. > > Sent from Proton Mail mobile > > > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. -- brandon s allbery kf8nh allbery.b at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20230710/b641189f/attachment.html>


More information about the Haskell-Cafe mailing list