agentm / agentm/project-m36

add support for ADTs in haskell module import

Offen
#387 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @agentm Auf GitHub ansehen
Vorherrschende Sprache
Haskell
Sterne
952
Forks
50
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.