Download presentation
Presentation is loading. Please wait.
1
Introducing HaskellLight Rijk-Jan, Arjan, Daan, Martijn L.
3
Teaching “Compiler framework” Goal
4
Demo
5
Design Language Haskell Error reporting – No classes Compiler Simplicity Error reporting eXtreme testing
6
Highlights Precise positions of errors Warnings Hints (type errors, undefined var.) Still fast, small and portable
7
Position Hugs: – ERROR Main.hs:1 - "f" multiply defined Where is the other definition? Helium: – (1, 1), (3, 1): duplicated function "f" f = 3 x = 3 f = 4
8
Warnings Which “id” was meant? Hugs – Silent Helium – (1, 3): variable "id" shadows the one at (3, 1) f id = id 3 id x = x
9
Warnings Unused parameters/functions... No type definition Unreachable code (in case)
10
Hints ERROR Main.hs:1 – Type error in function binding *** Term : map *** Type : c -> [a] -> [b] *** Does not match : [a] -> [b] (4, 11): type error in rhs of case: map ys type: b -> c previous rhs’s: [a] Probably too few arguments to 'map' in this right-hand side map f xs = case xs of []->[] y:ys->map ys
11
Fast, small, portable HeliumGHCHugs Compiler speed + (800l/s) - (400/s) ++ (4500l/s) Disk space + (1M)- (130M)+ (1M) Code speed +++- Code size +-N.A. Messages +++- Finished -+++
12
Code speed time in sec HugsHeliumGHCGHC –O Sieve312.40.80.5 Build & consume 322.70.80.6 Nfib 30702.42.51.4 GHC 5 x Helium 60 x Hugs
13
Implementation Lexer Parser Static Analysis Type Checker ToCore Lazy Virtual Machine (Daan Leijen)
14
Future of Helium Not yet modules where, lambda Float, tuples pattern-matching nested patterns comprehensions FFI (Java), GUI, IDE, interpreter “Never” classes Double, Integer records
15
Conclusion Helium is Haskell-- with nice error messages Helium will be “textbook Haskell” Helium will hopefully some day be used in education
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.