[Haskell-cafe] Representing a type system in Haskell

Talha Qamar qamartalha at proton.me
Mon Jul 10 12:35:39 UTC 2023


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20230710/4eb753a3/attachment.html>


More information about the Haskell-Cafe mailing list