SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Differences Haskell /
Frege
Towards making Frege a better
Haskell dialect/subset Ingo Wechsung
IT Consultant, contexo GmbH
Reutlingen, Germany
@iwechsu
State and Vision
GHC
Haskell
2010
Frege
GHC
Haskell
2010
Frege
Purpose of this Presentation
● To give a comprehensive overview about
really existing differences and what can be
done about them.
● Community to
○ discuss if and how to deal with them
○ create corresponding GitHub issues, if applicable
○ actually work on the issues
Preliminary notes
In the following slides, “Standard” refers to the Haskell
2010 Language Report https://haskell.
org/definition/haskell2010.pdf
Suggestions and estimations of importances and efforts
are my subjective opinions (well founded ones, of
course☺).
Haskell Compatibility Mode?
There are some Frege features that cannot get
abandoned without making Frege
● less practical for use on the JVM
● less good than it is
When otherwise unresolvable conflicts with
the Standard arise, should we have a “haskell
compatibility mode” (abbrev. HCM)?
Variable names
● Frege: allows apostrophes only at the end,
no underscores at start
● Standard: “An identifier consists of a letter followed
by zero or more letters, digits, underscores, and single
quotes.” (2.4, pg. 9)
● Effort: low (simple fix in lexical analyzer)
● Importance: low
● Suggestions: implement
Operator constructors (1)
● Frege: operator constructors are not
supported
● Standard: “An operator symbol starting with
a colon is a constructor.” (2.4, pg. 10)
data Complex = Double :+ Double
● Effort: medium (parsing)
● Importance: high
● Suggestion: implement
Operator constructors (2)
Note that GHC extension -XTypeOperators in addition
allows infix type constructors: Int :& Int :| Double :&
Double
Implementing this would entail a whole range of changes.
The critical point is that types could only get parsed once
the fixity of the operators is known. Currently, type
parsing is already complete when the parser is done.
Octal integer literals
● Frege: Java literal syntax, e.g. 032 == 26
● Standard: octal literals 0o32 (2.5, pg. 11)
● Effort: low, rewrite literal in lexer
● Importance: low
● Suggestion: implement. Interpret 032 as 32
in HCM. Or just get rid of octal literals
entirely.
String and Char literals
● Frege: certain escape sequences and gaps
in strings (multi line strings) won’t work
● Standard: 2.6, page 11f
● Effort: medium, bikeshedding
● Importance: low
● Suggestion: Need not be done all at once.
The gaps feature would be worth having.
Meaning of String Literals
● Frege: string literals mean (Java) strings
● Standard: “String literals are actually abbreviations
for lists of characters” (2.6, pg. 12)
● Effort: medium
● Importance: high
● Suggestions: overload string literals so that
list functions work, follow standard in HCM.
Layout (1)
● Frege: no insertion of {}
● Standard: “If the indentation of the non-brace
lexeme immediately following a where, let, do or of is
less than or equal to the current indentation level,
then … {} is inserted …” (2.7, pg. 12)
● Effort: medium
● Importance: medium
● Suggestion: adapt
Layout (2)
● Frege: no “syntactic” insertion of closing
brace except before in
● Standard: “... if an illegal lexeme is encountered at
a point where a close brace would be legal, a close
brace is inserted.” (2.7, pg. 12)
● Effort: high (layout is lexical only)
● Importance: low
● Suggestions: try to cover some cases
Overloaded Integer literals
● Frege: numeric literals are not overloaded
● Standard: “An integer literal represents the
application of the function fromInteger to the
appropriate value of type Integer” (3.2, page 17)
● Effort: low, possibly breaks existing code
● Importance: medium
● Suggestions: slightly in favor, but should be
done together with floating point literals
Overloaded Floating Point Literals
● Standard: “The floating point literal f is equivalent
to fromRational (n Ratio.% d ), where
fromRational is a method in class Fractional and
Ratio.% constructs a rational from two integers, as
defined in the Ratio library. The integers n and d are
chosen so that n/d = f.” (3.2, pg. 17)
● Effort: high, Fractional and Ratio don’t exist yet
● Importance: high
● Suggestions: first implement needed classes and types.
Overloading itself can be done later, or just in HCM.
Lambda abstractions
● Frege: only single pattern allowed
● Standard: “Lambda abstractions are written p1
. . .
pn
-> e, where the pi
are patterns.” (3.3, pg. 18)
● Effort: high
● Importance: medium
● Suggestion: would break existing programs
that have smth. like: x:xs -> x
Field Labels as Selectors
● Frege: field labels (selectors) not top level
● Standard: “Selectors are top level bindings ...”
(3.15.1, pg. 26)
● Effort: depending on solution
● Importance: low
● Suggestion: implement in HCM only
Construction using Field Labels
● Frege: all field labels must be mentioned
● Standard: Fields not mentioned are initialized to ⊥.
(3.15.2, pg. 26)
● Effort: low
● Importance: low
● Suggestions: HCM only
Updates Using Field Labels
● Frege: slightly different syntax
● Standard: “aexp<qcon>
{ fbind1
, . . . , fbind n
}”
(3.15.3, pg. 27)
● Effort: low
● Importance: medium
● Suggestions: implement, retire Frege dot-
syntax
Pattern syntax
● Frege: uses expression syntax
● Standard: defines extra syntax for patterns
(3.17.1, page 28), makes @ and ~ reserved
symbols
● Effort: surprisingly high, breaks Frege code
● Importance: high
● Suggestion: ???
Negative Patterns
● Frege: not supported
● Standard: allows them with numeric literals
(3.17.1, page 28)
● Effort: medium
● Importance: medium
● Suggestions: implement
Irrefutable pattern
● Frege: not supported
● Standard: ~apat (3.17.1, page 28)
● Effort, Importance, Suggestions: see
“Pattern syntax”
Context in Data Declaration
● Frege: not allowed
● Standard: data [context =>] simpletype [= constrs]
(4.2.1, page 40)
● Effort: medium
● Importance: very low
● Suggestion: don’t implement, as it is
considered bad practice anyway
“deriving” clause in data defs
● Frege: has separate derive definition
● Standard: optional deriving clause on data
declarations (4.2.1, page 40)
● Effort: medium
● Importance: high, though GHC now also has
separate deriving declaration
● Suggestion: implement
Datatype renamings
● Frege: can be achieved with data
● Standard: uses newtype for renaming, data
has slightly different semantics. (4.2.3,
page 43)
● Effort: low/medium
● Importance: high/low
● Suggestion: support syntax, ignore corner
data case except in HCM
Context in Class/Instance
Declarations
● Frege: class name first
● Standard: context first (4.3.1, 4.3.2, pages
44ff)
● Effort: small
● Importance: high
● Suggestion: this stupid error on my side
should long have been fixed. Requires
adaption of most existing code, though.
Numeric Type Defaulting
Frege: not done
Standard: specifies default declaration
Effort: medium
Importance: ?
Suggestion: In a first step, just the syntax
could be implemented.
Fixity Declarations
● Frege: top level only
● Standard: has them as nested declarations, they can
appear in class declarations and let/where (4.4.2,
page 50)
● Effort: medium
● Importance: low
● Suggestions: follow standard
Mutually Recursive Modules
● Frege modules form a directed acyclic
graph
● Standard: “allowed to be mutually recursive” (5,
page 62)
● Effort: quite high
● Importance: low?
● Suggestions: don’t touch for now.
Optional Module Header
● Frege: module header is mandatory
● Standard: “An abbreviated form of module,
consisting only of the module body, is permitted.”
(5.1, page 62)
● Importance: low
● Effort: low
● Suggestion: implement
Modules - Export Lists
● tell what can be imported by other modules
● in Frege, we have private/public/protected
● Effort: medium .. very high
● Importance: medium
● Suggestions: do this in multiple steps
a. parse them, but ignore them (everything public)
b. default to “private” when present
c. retire private/public/protected
Import Declarations
● Frege
○ doesn’t allow qualified names as module aliases
○ instead, all module names are mapped to
namespace names
○ doesn’t have the (..) syntax for “all sub-items”
○ doesn’t have qualified
● Standard: 5.3, pages 64ff.
● Suggestion: handle diffs in HCM
Comparison Haskell/Frege Imports
import A.B -- all
import A.B() -- none
import A.B(T(C))
import A.B(T(..))
import A.B(T)
import A.B(T())
import qualified A
import qualified A()
import a.B -- all
import a.B() -- none
import a.B(T(C))
import a.B(T)
import a.B(T())
import a.B(T())
import A()
-- makes no sense
Qualified Names and Module Names
● Frege uses module names only for imports.
Thereafter, only the namespace name can
be used for qualification.
● Standard: modid.name (5.5.1, page 67)
● Importance: low
● Effort: impossible
● Suggestion: leave as is
Standard Type Boolean
● Frege uses primitive JVM type:
data Bool = pure native boolean
Keyword literals true and false are provided.
● Standard: “The boolean type Bool is an
enumeration.”
data Bool = False | True
● Importance: high
● Suggestion: cheat in the compiler
Characters
● Frege Char are UTF-16 values
● Standard: “The character type Char is an
enumeration whose values represent Unicode
characters” (6.1.2, page 73)
● Importance: low (?)
● Effort: hack JVM
● Suggestions: hope for JVM evolution
Strings
● Frege uses native java.lang.String type
● Standard: “A string is a list of characters” (6.1.2,
page 73)
● Importance: medium (beginners!)
● Effort: medium
● Suggestion: overload string literals
IOERR
● Frege doesn’t have it
● Standard: “IOError is an abstract type representing
errors raised by I/O operations.” (6.1.7, page 75)
● Importance: low
● Effort: probably low
● Suggestions: can we get away with
type IOERR = IOException
class Read, read
● not implemented
● Standard: “The Read ... [class is] used to convert
values ... from strings.” (6.3.3, page 78)
● Importance: medium
● Effort: medium
● Suggestions: Implement at least for basic
types.
Numbers
● Frege doesn’t have all the type classes, no
rationals and complex numbers at this time.
● Standard: prescribes a complex web of
numeric type classes (6.4, page 81ff)
● Importance: medium
● Effort: high
● Suggestion: needs care. Or a
mathematically sound alternative.
IO Exception Handling
● Frege uses Java Exceptions
● Standard: IO Exception Handling (7.3, page
90)
● Importance: none
● Effort: N/A
● Suggestion: don’t change
Foreign Function Interface
● Frege has its own Native Interface
● Standard: (8, page 91ff)
● Importance: none
● Effort: small
● Suggestion: Haskell sources using standard
FFI (i.e. calls into C) are not portable
support the foreign import/export syntax
though?
Haskell 2010 Libraries
● missing, should be done:
○ Data.Array, Data.Complex, Data.Int, Data.Ix, Data.
Ratio, Data.Word, Numeric, System.Environment,
System.Exit
● present (may be incomplete) :
○ Data.Bits, Data.Char, Data.List, Data.Maybe
● not done:
○ Foreign, Foreign.*, System.IO, System.IO.Error
● obsolete: Control.Monad
Conclusion
● we have a long way to go
● much work to be done
● much can be done to enhance “Haskellnes”
Background, Pointers & Links
● Haskell 2010 Language Report
● GHC Language System
● Frege Wiki
○ https://github.com/Frege/frege/wiki/GHC-
Language-Options-vs.-Frege
○ https://github.com/Frege/frege/wiki/Differences-
between-Frege-and-Haskell
I need
a
break!

Weitere ähnliche Inhalte

Was ist angesagt?

New c sharp4_features_part_iii
New c sharp4_features_part_iiiNew c sharp4_features_part_iii
New c sharp4_features_part_iiiNico Ludwig
 
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16Innovecs
 
New c sharp4_features_part_v
New c sharp4_features_part_vNew c sharp4_features_part_v
New c sharp4_features_part_vNico Ludwig
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingRutvik Pensionwar
 
07 control+structures
07 control+structures07 control+structures
07 control+structuresbaran19901990
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Academy PRO: React JS. Typescript
Academy PRO: React JS. TypescriptAcademy PRO: React JS. Typescript
Academy PRO: React JS. TypescriptBinary Studio
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNico Ludwig
 
First draft programming c++
First draft programming c++First draft programming c++
First draft programming c++藝輝 王
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyserArchana Gopinath
 
Functional programming in TypeScript
Functional programming in TypeScriptFunctional programming in TypeScript
Functional programming in TypeScriptbinDebug WorkSpace
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#Sireesh K
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp PresentationVishwa Mohan
 

Was ist angesagt? (20)

New c sharp4_features_part_iii
New c sharp4_features_part_iiiNew c sharp4_features_part_iii
New c sharp4_features_part_iii
 
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
 
Introductory func prog
Introductory func progIntroductory func prog
Introductory func prog
 
New c sharp4_features_part_v
New c sharp4_features_part_vNew c sharp4_features_part_v
New c sharp4_features_part_v
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
Trans coder
Trans coderTrans coder
Trans coder
 
07 control+structures
07 control+structures07 control+structures
07 control+structures
 
Ruby
RubyRuby
Ruby
 
C-Sharp 6.0 ver2
C-Sharp 6.0 ver2C-Sharp 6.0 ver2
C-Sharp 6.0 ver2
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Academy PRO: React JS. Typescript
Academy PRO: React JS. TypescriptAcademy PRO: React JS. Typescript
Academy PRO: React JS. Typescript
 
F# and the DLR
F# and the DLRF# and the DLR
F# and the DLR
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
First draft programming c++
First draft programming c++First draft programming c++
First draft programming c++
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyser
 
Functional programming in TypeScript
Functional programming in TypeScriptFunctional programming in TypeScript
Functional programming in TypeScript
 
C#unit4
C#unit4C#unit4
C#unit4
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
 
C language
C languageC language
C language
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 

Andere mochten auch

FregeFX - JavaFX with Frege, a Haskell for the JVM
FregeFX - JavaFX with Frege, a Haskell for the JVMFregeFX - JavaFX with Frege, a Haskell for the JVM
FregeFX - JavaFX with Frege, a Haskell for the JVMDierk König
 
Os Keysholistic
Os KeysholisticOs Keysholistic
Os Keysholisticoscon2007
 
FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss)
FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss) FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss)
FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss) Dierk König
 
Os Ellistutorial
Os EllistutorialOs Ellistutorial
Os Ellistutorialoscon2007
 
Solr Presentation5
Solr Presentation5Solr Presentation5
Solr Presentation5oscon2007
 
J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Touroscon2007
 
Os Keyshacks
Os KeyshacksOs Keyshacks
Os Keyshacksoscon2007
 
Software Transactional Memory (STM) in Frege
Software Transactional Memory (STM) in Frege Software Transactional Memory (STM) in Frege
Software Transactional Memory (STM) in Frege Dierk König
 
Frege - consequently functional programming for the JVM
Frege - consequently functional programming for the JVMFrege - consequently functional programming for the JVM
Frege - consequently functional programming for the JVMDierk König
 
Frege Tutorial at JavaOne 2015
Frege Tutorial at JavaOne 2015Frege Tutorial at JavaOne 2015
Frege Tutorial at JavaOne 2015Dierk König
 
Os Peytonjones
Os PeytonjonesOs Peytonjones
Os Peytonjonesoscon2007
 
OCaml Labs introduction at OCaml Consortium 2012
OCaml Labs introduction at OCaml Consortium 2012OCaml Labs introduction at OCaml Consortium 2012
OCaml Labs introduction at OCaml Consortium 2012Anil Madhavapeddy
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modelingMario Fusco
 

Andere mochten auch (16)

FregeFX - JavaFX with Frege, a Haskell for the JVM
FregeFX - JavaFX with Frege, a Haskell for the JVMFregeFX - JavaFX with Frege, a Haskell for the JVM
FregeFX - JavaFX with Frege, a Haskell for the JVM
 
Os Harkins
Os HarkinsOs Harkins
Os Harkins
 
Os Keysholistic
Os KeysholisticOs Keysholistic
Os Keysholistic
 
FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss)
FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss) FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss)
FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss)
 
Os Ellistutorial
Os EllistutorialOs Ellistutorial
Os Ellistutorial
 
Solr Presentation5
Solr Presentation5Solr Presentation5
Solr Presentation5
 
J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Tour
 
Os Napier
Os NapierOs Napier
Os Napier
 
Os Keyshacks
Os KeyshacksOs Keyshacks
Os Keyshacks
 
Software Transactional Memory (STM) in Frege
Software Transactional Memory (STM) in Frege Software Transactional Memory (STM) in Frege
Software Transactional Memory (STM) in Frege
 
Frege - consequently functional programming for the JVM
Frege - consequently functional programming for the JVMFrege - consequently functional programming for the JVM
Frege - consequently functional programming for the JVM
 
Frege Tutorial at JavaOne 2015
Frege Tutorial at JavaOne 2015Frege Tutorial at JavaOne 2015
Frege Tutorial at JavaOne 2015
 
Os Raysmith
Os RaysmithOs Raysmith
Os Raysmith
 
Os Peytonjones
Os PeytonjonesOs Peytonjones
Os Peytonjones
 
OCaml Labs introduction at OCaml Consortium 2012
OCaml Labs introduction at OCaml Consortium 2012OCaml Labs introduction at OCaml Consortium 2012
OCaml Labs introduction at OCaml Consortium 2012
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 

Ähnlich wie FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo Wechsung)

javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892SRINIVAS C
 
Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytechyannick grenzinger
 
Java 8 best practices - Stephen Colebourne
Java 8 best practices - Stephen ColebourneJava 8 best practices - Stephen Colebourne
Java 8 best practices - Stephen ColebourneJAXLondon_Conference
 
Understanding Implicits in Scala
Understanding Implicits in ScalaUnderstanding Implicits in Scala
Understanding Implicits in Scaladatamantra
 
05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdf05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdfalivaisi1
 
Compiler design notes phases of compiler
Compiler design notes phases of compilerCompiler design notes phases of compiler
Compiler design notes phases of compilerovidlivi91
 
Go Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGo Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGlobalLogic Ukraine
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Raffi Khatchadourian
 
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Ovidiu Farauanu
 
Pattern-Based Debugging of Declarative Models
Pattern-Based Debugging of Declarative ModelsPattern-Based Debugging of Declarative Models
Pattern-Based Debugging of Declarative ModelsVajih Montaghami
 
Coding standards for java
Coding standards for javaCoding standards for java
Coding standards for javamaheshm1206
 
Custom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDBCustom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDBArangoDB Database
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golangBasil N G
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScriptJorg Janke
 

Ähnlich wie FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo Wechsung) (20)

C tour Unix
C tour UnixC tour Unix
C tour Unix
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892
 
Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytech
 
Java 8 best practices - Stephen Colebourne
Java 8 best practices - Stephen ColebourneJava 8 best practices - Stephen Colebourne
Java 8 best practices - Stephen Colebourne
 
Coding conventions
Coding conventionsCoding conventions
Coding conventions
 
Understanding Implicits in Scala
Understanding Implicits in ScalaUnderstanding Implicits in Scala
Understanding Implicits in Scala
 
05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdf05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdf
 
Compiler design notes phases of compiler
Compiler design notes phases of compilerCompiler design notes phases of compiler
Compiler design notes phases of compiler
 
Go Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii ShapovalGo Is Your Next Language — Sergii Shapoval
Go Is Your Next Language — Sergii Shapoval
 
Boost.Dispatch
Boost.DispatchBoost.Dispatch
Boost.Dispatch
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
 
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
 
Pattern-Based Debugging of Declarative Models
Pattern-Based Debugging of Declarative ModelsPattern-Based Debugging of Declarative Models
Pattern-Based Debugging of Declarative Models
 
14274730 (1).ppt
14274730 (1).ppt14274730 (1).ppt
14274730 (1).ppt
 
Coding standards for java
Coding standards for javaCoding standards for java
Coding standards for java
 
Custom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDBCustom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDB
 
C –FAQ:
C –FAQ:C –FAQ:
C –FAQ:
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golang
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScript
 

Mehr von Dierk König

OpenDolphin with GroovyFX Workshop at GreachConf, Madrid
OpenDolphin with GroovyFX Workshop at GreachConf, MadridOpenDolphin with GroovyFX Workshop at GreachConf, Madrid
OpenDolphin with GroovyFX Workshop at GreachConf, MadridDierk König
 
Greach, GroovyFx Workshop
Greach, GroovyFx WorkshopGreach, GroovyFx Workshop
Greach, GroovyFx WorkshopDierk König
 
Monads from Definition
Monads from DefinitionMonads from Definition
Monads from DefinitionDierk König
 
Quick into to Software Transactional Memory in Frege
Quick into to Software Transactional Memory in FregeQuick into to Software Transactional Memory in Frege
Quick into to Software Transactional Memory in FregeDierk König
 
UI Engineer - the missing profession, devoxx 2013
UI Engineer - the missing profession, devoxx 2013UI Engineer - the missing profession, devoxx 2013
UI Engineer - the missing profession, devoxx 2013Dierk König
 
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and Mobile
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and MobileOpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and Mobile
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and MobileDierk König
 

Mehr von Dierk König (6)

OpenDolphin with GroovyFX Workshop at GreachConf, Madrid
OpenDolphin with GroovyFX Workshop at GreachConf, MadridOpenDolphin with GroovyFX Workshop at GreachConf, Madrid
OpenDolphin with GroovyFX Workshop at GreachConf, Madrid
 
Greach, GroovyFx Workshop
Greach, GroovyFx WorkshopGreach, GroovyFx Workshop
Greach, GroovyFx Workshop
 
Monads from Definition
Monads from DefinitionMonads from Definition
Monads from Definition
 
Quick into to Software Transactional Memory in Frege
Quick into to Software Transactional Memory in FregeQuick into to Software Transactional Memory in Frege
Quick into to Software Transactional Memory in Frege
 
UI Engineer - the missing profession, devoxx 2013
UI Engineer - the missing profession, devoxx 2013UI Engineer - the missing profession, devoxx 2013
UI Engineer - the missing profession, devoxx 2013
 
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and Mobile
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and MobileOpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and Mobile
OpenDolphin: Enterprise Apps for collaboration on Desktop, Web, and Mobile
 

Kürzlich hochgeladen

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Kürzlich hochgeladen (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo Wechsung)

  • 1. Differences Haskell / Frege Towards making Frege a better Haskell dialect/subset Ingo Wechsung IT Consultant, contexo GmbH Reutlingen, Germany @iwechsu
  • 3. Purpose of this Presentation ● To give a comprehensive overview about really existing differences and what can be done about them. ● Community to ○ discuss if and how to deal with them ○ create corresponding GitHub issues, if applicable ○ actually work on the issues
  • 4. Preliminary notes In the following slides, “Standard” refers to the Haskell 2010 Language Report https://haskell. org/definition/haskell2010.pdf Suggestions and estimations of importances and efforts are my subjective opinions (well founded ones, of course☺).
  • 5. Haskell Compatibility Mode? There are some Frege features that cannot get abandoned without making Frege ● less practical for use on the JVM ● less good than it is When otherwise unresolvable conflicts with the Standard arise, should we have a “haskell compatibility mode” (abbrev. HCM)?
  • 6. Variable names ● Frege: allows apostrophes only at the end, no underscores at start ● Standard: “An identifier consists of a letter followed by zero or more letters, digits, underscores, and single quotes.” (2.4, pg. 9) ● Effort: low (simple fix in lexical analyzer) ● Importance: low ● Suggestions: implement
  • 7. Operator constructors (1) ● Frege: operator constructors are not supported ● Standard: “An operator symbol starting with a colon is a constructor.” (2.4, pg. 10) data Complex = Double :+ Double ● Effort: medium (parsing) ● Importance: high ● Suggestion: implement
  • 8. Operator constructors (2) Note that GHC extension -XTypeOperators in addition allows infix type constructors: Int :& Int :| Double :& Double Implementing this would entail a whole range of changes. The critical point is that types could only get parsed once the fixity of the operators is known. Currently, type parsing is already complete when the parser is done.
  • 9. Octal integer literals ● Frege: Java literal syntax, e.g. 032 == 26 ● Standard: octal literals 0o32 (2.5, pg. 11) ● Effort: low, rewrite literal in lexer ● Importance: low ● Suggestion: implement. Interpret 032 as 32 in HCM. Or just get rid of octal literals entirely.
  • 10. String and Char literals ● Frege: certain escape sequences and gaps in strings (multi line strings) won’t work ● Standard: 2.6, page 11f ● Effort: medium, bikeshedding ● Importance: low ● Suggestion: Need not be done all at once. The gaps feature would be worth having.
  • 11. Meaning of String Literals ● Frege: string literals mean (Java) strings ● Standard: “String literals are actually abbreviations for lists of characters” (2.6, pg. 12) ● Effort: medium ● Importance: high ● Suggestions: overload string literals so that list functions work, follow standard in HCM.
  • 12. Layout (1) ● Frege: no insertion of {} ● Standard: “If the indentation of the non-brace lexeme immediately following a where, let, do or of is less than or equal to the current indentation level, then … {} is inserted …” (2.7, pg. 12) ● Effort: medium ● Importance: medium ● Suggestion: adapt
  • 13. Layout (2) ● Frege: no “syntactic” insertion of closing brace except before in ● Standard: “... if an illegal lexeme is encountered at a point where a close brace would be legal, a close brace is inserted.” (2.7, pg. 12) ● Effort: high (layout is lexical only) ● Importance: low ● Suggestions: try to cover some cases
  • 14. Overloaded Integer literals ● Frege: numeric literals are not overloaded ● Standard: “An integer literal represents the application of the function fromInteger to the appropriate value of type Integer” (3.2, page 17) ● Effort: low, possibly breaks existing code ● Importance: medium ● Suggestions: slightly in favor, but should be done together with floating point literals
  • 15. Overloaded Floating Point Literals ● Standard: “The floating point literal f is equivalent to fromRational (n Ratio.% d ), where fromRational is a method in class Fractional and Ratio.% constructs a rational from two integers, as defined in the Ratio library. The integers n and d are chosen so that n/d = f.” (3.2, pg. 17) ● Effort: high, Fractional and Ratio don’t exist yet ● Importance: high ● Suggestions: first implement needed classes and types. Overloading itself can be done later, or just in HCM.
  • 16. Lambda abstractions ● Frege: only single pattern allowed ● Standard: “Lambda abstractions are written p1 . . . pn -> e, where the pi are patterns.” (3.3, pg. 18) ● Effort: high ● Importance: medium ● Suggestion: would break existing programs that have smth. like: x:xs -> x
  • 17. Field Labels as Selectors ● Frege: field labels (selectors) not top level ● Standard: “Selectors are top level bindings ...” (3.15.1, pg. 26) ● Effort: depending on solution ● Importance: low ● Suggestion: implement in HCM only
  • 18. Construction using Field Labels ● Frege: all field labels must be mentioned ● Standard: Fields not mentioned are initialized to ⊥. (3.15.2, pg. 26) ● Effort: low ● Importance: low ● Suggestions: HCM only
  • 19. Updates Using Field Labels ● Frege: slightly different syntax ● Standard: “aexp<qcon> { fbind1 , . . . , fbind n }” (3.15.3, pg. 27) ● Effort: low ● Importance: medium ● Suggestions: implement, retire Frege dot- syntax
  • 20. Pattern syntax ● Frege: uses expression syntax ● Standard: defines extra syntax for patterns (3.17.1, page 28), makes @ and ~ reserved symbols ● Effort: surprisingly high, breaks Frege code ● Importance: high ● Suggestion: ???
  • 21. Negative Patterns ● Frege: not supported ● Standard: allows them with numeric literals (3.17.1, page 28) ● Effort: medium ● Importance: medium ● Suggestions: implement
  • 22. Irrefutable pattern ● Frege: not supported ● Standard: ~apat (3.17.1, page 28) ● Effort, Importance, Suggestions: see “Pattern syntax”
  • 23. Context in Data Declaration ● Frege: not allowed ● Standard: data [context =>] simpletype [= constrs] (4.2.1, page 40) ● Effort: medium ● Importance: very low ● Suggestion: don’t implement, as it is considered bad practice anyway
  • 24. “deriving” clause in data defs ● Frege: has separate derive definition ● Standard: optional deriving clause on data declarations (4.2.1, page 40) ● Effort: medium ● Importance: high, though GHC now also has separate deriving declaration ● Suggestion: implement
  • 25. Datatype renamings ● Frege: can be achieved with data ● Standard: uses newtype for renaming, data has slightly different semantics. (4.2.3, page 43) ● Effort: low/medium ● Importance: high/low ● Suggestion: support syntax, ignore corner data case except in HCM
  • 26. Context in Class/Instance Declarations ● Frege: class name first ● Standard: context first (4.3.1, 4.3.2, pages 44ff) ● Effort: small ● Importance: high ● Suggestion: this stupid error on my side should long have been fixed. Requires adaption of most existing code, though.
  • 27. Numeric Type Defaulting Frege: not done Standard: specifies default declaration Effort: medium Importance: ? Suggestion: In a first step, just the syntax could be implemented.
  • 28. Fixity Declarations ● Frege: top level only ● Standard: has them as nested declarations, they can appear in class declarations and let/where (4.4.2, page 50) ● Effort: medium ● Importance: low ● Suggestions: follow standard
  • 29. Mutually Recursive Modules ● Frege modules form a directed acyclic graph ● Standard: “allowed to be mutually recursive” (5, page 62) ● Effort: quite high ● Importance: low? ● Suggestions: don’t touch for now.
  • 30. Optional Module Header ● Frege: module header is mandatory ● Standard: “An abbreviated form of module, consisting only of the module body, is permitted.” (5.1, page 62) ● Importance: low ● Effort: low ● Suggestion: implement
  • 31. Modules - Export Lists ● tell what can be imported by other modules ● in Frege, we have private/public/protected ● Effort: medium .. very high ● Importance: medium ● Suggestions: do this in multiple steps a. parse them, but ignore them (everything public) b. default to “private” when present c. retire private/public/protected
  • 32. Import Declarations ● Frege ○ doesn’t allow qualified names as module aliases ○ instead, all module names are mapped to namespace names ○ doesn’t have the (..) syntax for “all sub-items” ○ doesn’t have qualified ● Standard: 5.3, pages 64ff. ● Suggestion: handle diffs in HCM
  • 33. Comparison Haskell/Frege Imports import A.B -- all import A.B() -- none import A.B(T(C)) import A.B(T(..)) import A.B(T) import A.B(T()) import qualified A import qualified A() import a.B -- all import a.B() -- none import a.B(T(C)) import a.B(T) import a.B(T()) import a.B(T()) import A() -- makes no sense
  • 34. Qualified Names and Module Names ● Frege uses module names only for imports. Thereafter, only the namespace name can be used for qualification. ● Standard: modid.name (5.5.1, page 67) ● Importance: low ● Effort: impossible ● Suggestion: leave as is
  • 35. Standard Type Boolean ● Frege uses primitive JVM type: data Bool = pure native boolean Keyword literals true and false are provided. ● Standard: “The boolean type Bool is an enumeration.” data Bool = False | True ● Importance: high ● Suggestion: cheat in the compiler
  • 36. Characters ● Frege Char are UTF-16 values ● Standard: “The character type Char is an enumeration whose values represent Unicode characters” (6.1.2, page 73) ● Importance: low (?) ● Effort: hack JVM ● Suggestions: hope for JVM evolution
  • 37. Strings ● Frege uses native java.lang.String type ● Standard: “A string is a list of characters” (6.1.2, page 73) ● Importance: medium (beginners!) ● Effort: medium ● Suggestion: overload string literals
  • 38. IOERR ● Frege doesn’t have it ● Standard: “IOError is an abstract type representing errors raised by I/O operations.” (6.1.7, page 75) ● Importance: low ● Effort: probably low ● Suggestions: can we get away with type IOERR = IOException
  • 39. class Read, read ● not implemented ● Standard: “The Read ... [class is] used to convert values ... from strings.” (6.3.3, page 78) ● Importance: medium ● Effort: medium ● Suggestions: Implement at least for basic types.
  • 40. Numbers ● Frege doesn’t have all the type classes, no rationals and complex numbers at this time. ● Standard: prescribes a complex web of numeric type classes (6.4, page 81ff) ● Importance: medium ● Effort: high ● Suggestion: needs care. Or a mathematically sound alternative.
  • 41. IO Exception Handling ● Frege uses Java Exceptions ● Standard: IO Exception Handling (7.3, page 90) ● Importance: none ● Effort: N/A ● Suggestion: don’t change
  • 42. Foreign Function Interface ● Frege has its own Native Interface ● Standard: (8, page 91ff) ● Importance: none ● Effort: small ● Suggestion: Haskell sources using standard FFI (i.e. calls into C) are not portable support the foreign import/export syntax though?
  • 43. Haskell 2010 Libraries ● missing, should be done: ○ Data.Array, Data.Complex, Data.Int, Data.Ix, Data. Ratio, Data.Word, Numeric, System.Environment, System.Exit ● present (may be incomplete) : ○ Data.Bits, Data.Char, Data.List, Data.Maybe ● not done: ○ Foreign, Foreign.*, System.IO, System.IO.Error ● obsolete: Control.Monad
  • 44. Conclusion ● we have a long way to go ● much work to be done ● much can be done to enhance “Haskellnes”
  • 45. Background, Pointers & Links ● Haskell 2010 Language Report ● GHC Language System ● Frege Wiki ○ https://github.com/Frege/frege/wiki/GHC- Language-Options-vs.-Frege ○ https://github.com/Frege/frege/wiki/Differences- between-Frege-and-Haskell