[Haskell-cafe] Sifflet type checker [from Re: [Haskell] ANNOUNCE: Sifflet visual programming language, release 2.0.0.0]

gdweber at iue.edu gdweber at iue.edu
Mon Jul 9 18:51:29 CEST 2012


On 2012-Jul-07, Henning Thielemann wrote:
> 
> On Thu, 5 Jul 2012, gdweber at iue.edu wrote:
> 
> >Sifflet and sifflet-lib 2.0.0.0, now available on Hackage!
> >
> >This version introduces a type checker and partial support
> >for higher order functions in Sifflet, the visual, functional
> >programming language and support system for students learning
> >about recursion.
> 
> You have implemented your own type-checker, right?

It is my code implementing the type checker from Simon Peyton-Jones's
book "The Implementation of Functional Programming Languages" (1987).

> I plan to add a
> type-checker to our live-sequencer project. [1] So far I have
> thought about using the Helium type checker but I have not done it
> so far. If you want to make your type-checker useful for other
> projects, you may put it into a separate package without the hard to
> install dependencies on cairo and glib.
> 

I am very interested in receiving suggestions for modularizing
my packages, and I thank you for this one.

I should point out that the Sifflet type checker (unlike Helium's)
is not a type checker for Haskell, or even a reduced version of Haskell,
but for a very small language consisting of these expressions 
(from Language.Sifflet.Expr):

data Expr = EUndefined
          | ESymbol Symbol 
          | EBool Bool
          | EChar Char
          | ENumber Number
          | EString String
          | EIf Expr Expr Expr -- ^ if test branch1 branch2
          | EList [Expr]
          | ELambda Symbol Expr 
          | EApp Expr Expr -- ^ apply function to argument
          | ECall Symbol [Expr] -- ^ function name, arglist
          | EOp Operator Expr Expr -- ^ binary operator application
          | EGroup Expr            -- ^ grouping parentheses
            deriving (Eq, Show)

(there are some redundant variants there, because I
designed Expr before thinking about type checking and then
augmented it to add the type checker)

and these types

data Type = TypeVar TypeVarName          -- named type variable
          | TypeCons TypeConsName [Type] -- constructed type
            deriving (Eq)

Do you still think my type checker would be useful to you,
or to Haskellers generally?

> [1] http://www.youtube.com/watch?v=sXywCHR9WwE

Ah, I enjoyed the performance!

Greg

-- 
Gregory D. Weber, Ph. D.                            :
Associate Professor of Informatics                 / \
Indiana University East                           0   :
Tel. (765) 973-8420; FAX (765) 973-8550              / \
http://mypage.iu.edu/~gdweber/                      1  []



More information about the Haskell-Cafe mailing list