agentm / agentm/project-m36

add support for ADTs in haskell module import

Aperta
#387 0 commenti 0 reazioni 1 assegnatario Rivendicata da @agentm Vedi su GitHub
Lingua principale
Haskell
Stelle
952
Fork
50
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Currently, Project:M36 will effectively coalesce the atom function signature `Integer -> Integer` into `[IntegerAtom val1, IntegerAtom val2]` with a Haskell wrapper, but the wrapper does not support algebraic data types. The goal of this feature would be to support something like this:

```
import ProjectM36.Module

data Light = Red | Yellow | Green

carCanGo :: Light -> Bool
carCanGo Green = True
carCanGo _ = False

projectM36Functions = do
declareAtomFunction "carCanGo"
```

To achieve this, Project:M36 needs to verify that the database's definition of `Light` matches the modules version, then complete the type wrapper.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.