
10 Jul
2023
10 Jul
'23
8:35 a.m.
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