Changes between Version 4 and Version 5 of Commentary/Compiler/CoreSynType


Ignore:
Timestamp:
Sep 8, 2006 4:45:17 PM (9 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/CoreSynType

    v4 v5  
    33= The {{{Core}}} type =
    44
    5 The Core language is GHC's central data types.  Core is a very small, explicitly-typed, variant of System F.  The exact variant is called System FC, and described by our paper [http://research.microsoft.com/~simonpj/papers/ext-f System F with equality coercions].  (Note: the move to FC was done in Autumn 2006, but earlier versions of GHC had a very similar language.)
     5The Core language is GHC's central data types.  Core is a very small, explicitly-typed, variant of System.  The exact variant is called System FC, and described by our paper [http://research.microsoft.com/~simonpj/papers/ext-f System F with equality coercions].  (Note: the move to FC was done in Autumn 2006, but earlier versions of GHC had a very similar language.)
    66
    77The {{{CoreSyn}}} type, and the functions that operate over it, gets an entire directory [[GhcFile(compiler/coreSyn)]]:
     
    7070A case expression is '''always strict''', even if there is only one alternative, and it is {{{DEFAULT}}}.  (This differs from Haskell!)  So
    7171{{{
    72 case loop of { DEFAULT -> True
     72case error "urk" of { DEFAULT -> True
    7373}}}
    74 will loop, rather then returning {{{True}}}.
     74will call {{{error}}}, rather then returning {{{True}}}.
    7575
    7676The {{{case_bndr}}} field, called the '''case binder''', is an unusual feature of GHC's case expressions.
     
    9090
    9191The most common application is to model call-by-value,
    92 byf using {{{case}}} instead of {{{let}}}. For example, here is how we might compile
     92by using {{{case}}} instead of {{{let}}}. For example, here is how we might compile
    9393the call {{{f (reverse xs)}}} if we knew that {{{f}}} was strict:
    9494{{{