ddc-source-tetra-0.4.3.1: Disciplined Disciple Compiler source language.

Safe HaskellNone
LanguageHaskell98

DDC.Source.Tetra.Transform.Expand

Description

Look at type signatures and add quantifiers to bind any free type variables.

Given

   mapS (f : a -> S e b) (xx : List a) : S e (List b)
    = box case xx of
       Nil        -> Nil
       Cons x xs  -> Cons (run f x) (run mapS f xs)

We get:

   mapS [a e b : ?] (f : a -> S e b) (xx : List a) : S e (List b)
    = /(a e b : ?). box case xx of
       Nil        -> Nil
       Cons x xs  -> Cons (run f x) (run mapS f xs)

Synopsis

Documentation

expandModule :: SourcePos -> Module Source -> Module Source Source #

Run the expander on the given module.

class Expand c where Source #

Minimal complete definition

expand

Methods

expand :: SourcePos -> Env -> c -> c Source #

Add quantifiers to the types of binders. Also add holes for missing type arguments.