Commit 43859689 authored by simonm's avatar simonm
Browse files

[project @ 1998-12-02 13:17:09 by simonm]

Move 4.01 onto the main trunk.
parent 967cc47f

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -33,47 +33,24 @@
/* Define as the symbol which marks the end of the data section */
#undef DATA_SECTION_END_MARKER
/* Define as the decl which terminates the data section */
#undef DATA_SECTION_END_MARKER_DECL
/* Define if time.h or sys/time.h define the altzone variable */
#undef HAVE_ALTZONE
/* Define if you have /bin/sh */
#define HAVE_BIN_SH 0
/* Define if you have the GetModuleFileName function. */
#define HAVE_GETMODULEFILENAME 0
/* Define if C compiler supports long long types */
#undef HAVE_LONG_LONG
/* Define if fcntl.h defines O_BINARY */
#undef HAVE_O_BINARY
/* Define if compiler supports prototypes. */
#define HAVE_PROTOTYPES 0
/* Define if you have the WinExec function. */
#define HAVE_WINEXEC 0
/* Define if C Symbols have a leading underscore added by the compiler */
#undef LEADING_UNDERSCORE
/* Define as the symbol which marks the end of the text section */
#undef TEXT_SECTION_END_MARKER
/* Define to decl that terminates text section. */
#undef TEXT_SECTION_END_MARKER_DECL
/* Define to the type of the timezone variable (usually long or time_t) */
#undef TYPE_TIMEZONE
/* Define if signal handlers have type void (*)(int)
* (Otherwise, they're assumed to have type int (*)(void).)
*/
#define VOID_INT_SIGNALS 0
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
......
dnl $Id: aclocal.m4,v 1.34 1998/11/24 21:28:00 reid Exp $
dnl $Id: aclocal.m4,v 1.35 1998/12/02 13:17:10 simonm Exp $
dnl
dnl Extra autoconf macros for the Glasgow fptools
dnl
......@@ -470,7 +470,7 @@ for i in etext _etext __etext; do
fi
done
if test "$not_done" = 1; then
FPTOOLS_IN_SCOPE(etext asm("etext"),etext,fptools_cv_end_of_text)
FPTOOLS_IN_SCOPE(etext asm("etext"),etext,fptools_cv_end_of_text);
if test "$fptools_cv_end_of_text" = yes; then
AC_DEFINE(TEXT_SECTION_END_MARKER_DECL, etext asm("etext"))
AC_DEFINE(TEXT_SECTION_END_MARKER, etext)
......@@ -496,7 +496,7 @@ for i in end _end __end; do
fi
done
if test "$not_done" = 1; then
FPTOOLS_IN_SCOPE(end asm("end"),end,fptools_cv_end_of_data)
FPTOOLS_IN_SCOPE(end asm("end"),end,fptools_cv_end_of_data);
if test "$fptools_cv_end_of_data" = yes; then
AC_DEFINE(DATA_SECTION_END_MARKER_DECL, end asm("end"))
AC_DEFINE(DATA_SECTION_END_MARKER, end)
......
......@@ -436,7 +436,7 @@ dnl ** check for full ANSI header (.h) files
AC_HEADER_STDC
dnl ** check for specific header (.h) files that we are interested in
AC_CHECK_HEADERS(Files.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdlib.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h readline/readline.h bfd.h)
AC_CHECK_HEADERS(Files.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdlib.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h readline/readline.h bfd.h)
dnl ** check for DOS include files
AC_CHECK_HEADERS(dos.h conio.h io.h std.h)
......
The Glasgow Haskell Compiler -- version 3.02
The Glasgow Haskell Compiler -- version 4.01
==============================================
We are pleased to announce a new release of the Glasgow Haskell
Compiler (GHC), version 3.02. The source distribution is freely
Compiler (GHC), version 4.01. The source distribution is freely
available via the World-Wide Web and through anon. FTP; details below.
Haskell is "the" standard lazy functional programming language; the
......@@ -14,15 +14,19 @@ related information is available from the Haskell home page at
+ What's new
=============
GHC 3.02 is a source-only release. Major news items:
GHC 4.01 is a small increment over 4.00. Many bugs have been fixed.
The following features are new:
* A new specialiser,
* A new unsafeCoerce# primitive.
* A NOINLINE pragma.
* Many bugs fixed, including several performance-related ones,
* Weak pointers,
* The foreign function interface is now complete.
GHC 3.02 produces the fastest code since 0.29, but there's still
plenty of tuning to do.
In addition, bootstrapping the compiler should now work out of the box.
The following things have not been fixed yet:
* The native code generator is still flaky, and is turned off by
default for the time being.
* The profiler is still flaky.
+ Mailing lists
================
......@@ -64,21 +68,22 @@ for tar, please)!
+ System requirements
======================
To compile up this source-only release, you need a machine with 16+MB
To compile up this source-only release, you need a machine with 32+MB
memory, GNU C (`gcc'), `perl' plus a version of GHC installed (version
2.10 at least). We have seen GHC work on these platforms:
2.10 at least). This release is known to work on the following platforms:
* i386-unknown-{linux,solaris2,freebsd,cygwin32}
* sparc-sun-{sunos4,solaris2}
Ports to the following platforms should be relatively easy, but
haven't been tested due to lack of time/hardware:
* alpha-dec-osf{2,3}
* hppa1.1-hp-hpux{9,10}
* sparc-sun-{sunos4,solaris2}
* mips-sgi-irix{5,6}
* i386-unknown-{linux,solaris2,freebsd,cygwin32}.
* {rs6000,powerpc}-ibm-aix
Similar platforms should work with minimal hacking effort. The installer's
guide included in distribution gives a complete run-down of what-ports-work;
an on-line version can be found at
http://www.dcs.gla.ac.uk/fp/software/ghc/3.02/installation_guide/installing_toc.html
The installer's guide included in distribution gives a complete
run-down of what-ports-work; an on-line version can be found at
EOF
http://www.dcs.gla.ac.uk/fp/software/ghc/4.01/installation_guide/installing_toc.html
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.7 1997/03/24 08:39:19 sof Exp $
# $Id: Makefile,v 1.8 1998/12/02 13:17:13 simonm Exp $
#
TOP=.
......@@ -21,9 +21,9 @@ include $(TOP)/mk/boilerplate.mk
# we descend into compiler/ and lib/
#
ifeq "$(GhcWithHscBuiltViaC)" "NO"
SUBDIRS = utils driver includes runtime docs compiler lib
SUBDIRS = utils driver includes rts docs compiler lib
else
SUBDIRS = utils driver includes runtime docs lib compiler
SUBDIRS = utils driver includes rts docs lib compiler
endif
# Easier to copy
......
The Glamorous Glasgow Haskell Compiler, version 3.02, patchlevel 0
The Glamorous Glasgow Haskell Compiler, version 4.01, patchlevel 0
This is version 3.02 of the Glorious Glasgow Haskell compilation
system (GHC). GHC 3.02 is a compiler for Haskell 1.4.
This is version 4.01 of the Glorious Glasgow Haskell compilation
system (GHC). GHC 4.01 is a compiler for Haskell 1.4.
Haskell is "the" standard lazy functional programming language.
Haskell 1.4 is the current version of the language, released in
April 1997. The language definition is on the Web at
http://www.haskell.org/report/index.html.
More information on GHC can be found on its web page
http://www.dcs.gla.ac.uk/fp/software/ghc
GHC documentation of interest:
* docs/installing.{dvi,info,html}: How to configure, build, and
* docs/installing.{dvi,html}: How to configure, build, and
install the system.
The document, as with many others, is in TeX-produced DVI format
(.dvi suffix), or GNU Info format (.info); the latter is close to
plain ASCII, if that's what you want.
(.dvi suffix), or HTML.
* ghc/docs/users_guide/user.{dvi,info,html}: How to use GHC; e.g., what
* ghc/docs/users_guide/user.{dvi,html}: How to use GHC; e.g., what
options are available, how to cope with common problems, how to use
the profiling facilities, etc.
* ghc/docs/libraries/libs.{dvi,html}: Several libraries that are
provided by both GHC and Hugs.
We welcome your comments and suggestions about this software! Please
do not suffer or grumble in silence. The "bug reports" section of the
User's Guide (docs/users_guide/user.{dvi,info,html}) says what we
would like to know when you report a problem.
User's Guide says what we would like to know when you report a
problem.
Current AQUA team (all @dcs.gla.ac.uk):
Current GHC team:
Simon Peyton Jones ( simonpj@microsoft.com) [our Fearless Leader]
Sigbjorn Finne (v-sfinne@microsoft.com) [hired hand]
Simon Marlow (t-simonm@microsoft.com) [hired hand]
Past contributors and/or continuing advisors (all @dcs.gla.ac.uk):
Sigbjorn Finne (sof) [hired hand]
Hans Wolfgang Loidl (hwloidl) [PhD student]
Simon Marlow (simonm) [hired hand]
Thomas Nordin (nordin) [@cse.ogi.edu; Green Card Hero]
Simon Peyton Jones (simonpj) [our Fearless Leader]
Hans Wolfgang Loidl (hwloidl) [PhD student]
Patrick Sansom (sansom) [hired hand, Bidirectional Analyses]
Phil Trinder (trinder) [hired hand, Parade]
Past contributors and/or continuing advisors:
Andy Gill (andy) [PhD student; at HP]
Cordy Hall (cvh) [GRASP]
Kevin Hammond (kh) [GRASP; at St. Andrews]
......@@ -49,6 +55,8 @@ Past contributors and/or continuing advisors:
David N Turner (dnt) [Linear Types; at An-Teallach]
Phil Wadler (wadler) [GRASP; at Lucent]
And many others who've contributed bits of code / bug reports in the past.
Cool people who've let us use their machines:
sparc-sun-sunos{4,5} PacSoft, Oregon Graduate Institute
......@@ -65,14 +73,13 @@ Simon's projects' acronyms:
GRASP ('90-'92): Graph reduction applications support project
AQUA ('93- ): Declarative systems architecture: a quantitative approach
GHC WWW page: http://www.dcs.gla.ac.uk/fp/software/ghc/
E-mail contacts:
glasgow-haskell-bugs@dcs.gla.ac.uk (bug reports mailing list)
glasgow-haskell-users@dcs.gla.ac.uk (users' mailing list)
Send mail to majordomo@dcs.gla.ac.uk with 'help' in the body of the
message for information on joining either of these mailing lists.
message for information on joining/leaving either of these mailing
lists.
Anonymous FTP site: ftp://ftp.dcs.gla.ac.uk:pub/haskell/glasgow.
Mostly mirrored by ftp.cs.chalmers.se and haskell.org (same
......
ToDo
~~~~
* Test effect of eta-expanding past (case x of ..)
* Bottom strictness isn't right. Should be (eg) SSX, not just X.
* Enumeration types in worker/wrapper for strictness analysis
* Use (!) types in data cons to unbox.
* Check constant folding
* .hi file isn't updated if the only change is to the exports.
For example, UgenAll.lhs re-exports all of U_binding.hs; when a data type
decl in the latter changes, the .hi file for the former isn't updated.
I think this happens when a module exports another mdodule thus:
module UgenAll( module U_binding, ... ) where
* This should be reported as an error:
data T k = MkT (k Int#)
* Bogus report of overlapped pattern for
f (R {field = [c]}) = 1
f (R {}) = 2
This shows up for TyCon.maybeTyConSingleCon
* > module Main( main ) where
> f :: String -> Int
> f "=<" = 0
> f "=" = 0
> g :: [Char] -> Int
> g ['=','<'] = 0
> g ['='] = 0
> main = return ()
For ``f'' the following is reported.
tmp.lhs:4:
Pattern match(es) are overlapped in the definition of function `f'
"=" = ...
There are no complaints for definition for ``g''.
* Without -O I don't think we need change the module version
if the usages change; I forget why it changes even with -O
* Record selectors for existential type; no good! What to do?
Record update doesn't make sense either.
Need to be careful when figuring out strictness, and when generating
worker-wrapper split.
Also when deriving.
* Consructor re-use via CSE
Notes on module dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Name/Var/Type group is a bit complicated. Here's the deal
Name, PrimRep, FieldLabel (uses Type.Type)
then
Var (uses Const.Con, IdInfo.IdInfo, Type.GenType, Type.Kind)
then
VarEnv, VarSet
then
Class (uses TyCon.TyCon, Type.Type, SpecEnv.SpecEnv)
then
TyCon (uses Type.Type, Type.Kind, DataCon.DataCon)
then
Type (uses [DataCon.DataCon])
then
DataCon, TysPrim, Unify, SpecEnv, PprType
then
IdInfo, TysWiredIn (uses DataCon.mkDataCon, [MkId.mkDataConId])
then
PrimOp (uses PprType, TysWiredIn)
then
Const (needs PrimOp, [TysWiredIn.stringTy])
then
Id (needs Const.Con(..)), CoreSyn
then
CoreUtils, OccurAnal
then
CoreUnfold (uses OccurAnal)
then
MkId (uses CoreUnfold)
PrimOp uses TysWiredIn
Add
~~~
basicTypes/DataCon.lhs
basicTypes/DataCon.hi-boot
Remove
~~~~~~
specialise/SpecUtils.lhs
basicTypes/IdUtils.lhs
# -----------------------------------------------------------------------------
# $Id: Makefile,v 1.45 1998/08/21 11:03:30 sof Exp $
# $Id: Makefile,v 1.46 1998/12/02 13:17:15 simonm Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
......@@ -60,14 +60,21 @@ endif
HS_SRCS = $(SRCS_UGNHS) \
$(foreach dir,$(DIRS),$(wildcard $(dir)/*.lhs)) \
rename/ParseIface.hs
$(foreach dir,$(DIRS),$(wildcard $(dir)/*.lhs))
ifneq "$(GhcWithHscBuiltViaC)" "YES"
HS_SRCS += rename/ParseIface.hs
endif
# NB: it's no good to include *.hs in the top-line wildcard, because the .hs files
# in parser/ may not have been created at that point.
HCS = $(patsubst %.lhs, %.hc, $(patsubst %.hs, %.hc, $(HS_SRCS)))
# ParseIface.hs ain't part of HS_SRCS when this is on..
ifeq "$(GhcWithHscBuiltViaC)" "YES"
HCS += rename/ParseIface.hc
endif
HS_OBJS = \
$(patsubst %.hc, %.o, $(HCS)) \
......@@ -91,15 +98,14 @@ C_SRCS += $(SRCS_UGNC)
LIBOBJS = \
$(SRCS_UGN_OBJS) parser/hslexer.o parser/hsparser.tab.o \
parser/id.o parser/infix.o parser/syntax.o parser/type2context.o \
parser/util.o
parser/util.o parser/ctypes.o
#
# stuff you get for free in a source distribution
#
SRC_DIST_FILES += rename/ParseIface.hs \
parser/U_tree.c parser/tree.h parser/tree.c \
parser/hsparser.tab.c parser/hsparser.tab.h \
parser/hslexer.c
# SRC_DIST_FILES += rename/ParseIface.hs \
# parser/U_tree.c parser/tree.h parser/tree.c \
# parser/hsparser.tab.c parser/hsparser.tab.h \
# parser/hslexer.c
# -----------------------------------------------------------------------------
# Haskell compilations
......@@ -138,9 +144,13 @@ absCSyn/PprAbsC_HC_OPTS = -H10m
basicTypes/IdInfo_HC_OPTS = -K2m
hsSyn/HsExpr_HC_OPTS = -K2m
main/Main_HC_OPTS = -fvia-C
main/Constants_HC_OPTS = -DHscIfaceFileVersion=$(HscIfaceFileVersion)
ifneq "$(GhcWithHscBuiltViaC)" "YES"
ifeq "$(GhcReportCompiles)" "YES"
main/Main_HC_OPTS += -syslib misc -DREPORT_TO_MOTHERLODE
endif
endif
main/CmdLineOpts_HC_OPTS = -fvia-C
nativeGen/PprMach_HC_OPTS = -K2m
......@@ -179,13 +189,19 @@ rename/RnExpr_HC_OPTS = -H10m
rename/RnNames_HC_OPTS = -H12m
rename/RnMonad_HC_OPTS = -fvia-C
specialise/Specialise_HC_OPTS = -Onot -H12m
simplCore/Simplify_HC_OPTS = -H15m
typecheck/TcGenDeriv_HC_OPTS = -H10m
# tmp, -- SDM
specialise/Specialise_HC_OPTS += -fno-prune-tydecls
# Was 10m for 2.10
typecheck/TcHsSyn_HC_OPTS = -H15m
# Was 10m for 2.10
typecheck/TcExpr_HC_OPTS = -H15m
typecheck/TcBinds_HC_OPTS = -H10m
typecheck/TcEnv_HC_OPTS = -H10m
utils/Argv_HC_OPTS = -fvia-C
......@@ -240,7 +256,7 @@ SRC_FLEX_OPTS += -s
parser/hschooks.o : parser/hschooks.c
@$(RM) $@
$(HC) -c -o $@ $(HC_OPTS) parser/hschooks.c
$(HC) -c -o $@ -I$(GHC_INCLUDE_DIR) $(HC_OPTS) parser/hschooks.c
# Interface-file parser uses Happy
......@@ -266,9 +282,12 @@ CLEAN_FILES += hsp
# Linking
SRC_LD_OPTS += -no-link-chk
ifneq "$(GhcWithHscBuiltViaC)" "YES"
ifeq "$(GhcReportCompiles)" "YES"
SRC_LD_OPTS += -syslib misc -syslib exts
endif
endif
#-----------------------------------------------------------------------------
# install
......@@ -285,7 +304,11 @@ INSTALL_LIBEXECS += hsc hsp
#
# Before doing `make depend', need to build all derived Haskell source files
#
depend :: $(LOOPS) $(SRCS_UGNHS) rename/ParseIface.hs
depend :: $(LOOPS) $(SRCS_UGNHS)
ifneq "$(GhcWithHscBuiltViaC)" "YES"
depend :: rename/ParseIface.hs
endif
#-----------------------------------------------------------------------------
# clean
......
This diff is collapsed.
This diff is collapsed.
_interface_ CLabel 1
_exports_
CLabel CLabel mkReturnPtLabel;
_declarations_
1 data CLabel;
1 mkReturnPtLabel _:_ Unique.Unique -> CLabel ;;
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CLabel.lhs,v 1.21 1998/12/02 13:17:19 simonm Exp $
%
\section[CLabel]{@CLabel@: Information to make C Labels}
......@@ -8,6 +10,7 @@ module CLabel (
CLabel, -- abstract type
mkClosureLabel,
mkSRTLabel,
mkInfoTableLabel,
mkStdEntryLabel,
mkFastEntryLabel,
......@@ -15,30 +18,36 @@ module CLabel (
mkStaticConEntryLabel,
mkRednCountsLabel,
mkConInfoTableLabel,
mkPhantomInfoTableLabel,
mkStaticClosureLabel,
mkStaticInfoTableLabel,
mkVapEntryLabel,
mkVapInfoTableLabel,
mkConUpdCodePtrVecLabel,
mkStdUpdCodePtrVecLabel,
mkInfoTableVecTblLabel,
mkStdUpdVecTblLabel,
mkApEntryLabel,
mkApInfoTableLabel,
mkReturnPtLabel,
mkReturnInfoLabel,
mkVecTblLabel,
mkAltLabel,
mkDefaultLabel,
mkBitmapLabel,
mkClosureTblLabel,
mkAsmTempLabel,
mkErrorStdEntryLabel,
mkUpdEntryLabel,
mkBlackHoleInfoTableLabel,
mkRtsPrimOpLabel,
mkSelectorInfoLabel,
mkSelectorEntryLabel,
mkCC_Label, mkCCS_Label,
needsCDecl, isReadOnly, isAsmTemp, externallyVisibleCLabel,
CLabelType(..), labelType,
pprCLabel
#if ! OMIT_NATIVE_CODEGEN
, pprCLabel_asm
......@@ -52,19 +61,14 @@ module CLabel (
import {-# SOURCE #-} MachMisc ( underscorePrefix, fmtAsmLbl )
#endif
import CgRetConv ( CtrlReturnConvention(..), ctrlReturnConvAlg )
import CStrings ( pp_cSEP )
import Id ( externallyVisibleId,
isDataCon,
fIRST_TAG,
ConTag,
Id
)
import Maybes ( maybeToBool )
import PprType ( showTyCon )
import DataCon ( ConTag, DataCon )
import Name ( Name, isExternallyVisibleName )
import TyCon ( TyCon )
import Unique ( showUnique, pprUnique, Unique )
import Util ( assertPanic{-, pprTraceToDo:rm-} )
import Unique ( pprUnique, Unique )
import PrimOp ( PrimOp, pprPrimOp )
import CostCentre ( CostCentre, CostCentreStack )
import Util
import Outputable
\end{code}
......@@ -76,100 +80,72 @@ things we want to find out:
* does it need declarations at all? (v common Prelude things are pre-declared)
* what type does it have? (for generating accurate enough C declarations
so that the C compiler won't complain).
\begin{code}
data CLabel
= IdLabel -- A family of labels related to the
CLabelId -- definition of a particular Id
IdLabelInfo -- Includes DataCon
Name -- definition of a particular Id
IdLabelInfo
| TyConLabel -- A family of labels related to the
TyCon -- definition of a data type
TyConLabelInfo
| DataConLabel -- Ditto data constructors
Name
DataConLabelInfo
| CaseLabel -- A family of labels related to a particular case expression
Unique -- Unique says which case expression
CaseLabelInfo
| TyConLabel TyCon -- currently only one kind of TyconLabel,
-- a 'Closure Table'.
| AsmTempLabel Unique
| RtsLabel RtsLabelInfo
deriving (Eq, Ord)
\end{code}
The CLabelId is simply so we can declare alternative Eq and Ord
instances which use cmpId_SpecDataCon (instead of cmpId). This avoids
comparing the Uniques of two specialised data constructors (which have
the same as the uniques their respective unspecialised data
constructors). Instead, the specialising types and the uniques of the
unspecialised constructors are compared.
| CC_Label CostCentre
| CCS_Label CostCentreStack
\begin{code}
data CLabelId = CLabelId Id
instance Eq CLabelId where
CLabelId a == CLabelId b = case (a `compare` b) of { EQ -> True; _ -> False }
CLabelId a /= CLabelId b = case (a `compare` b) of { EQ -> False; _ -> True }
instance Ord CLabelId where
CLabelId a <= CLabelId b = case (a `compare` b) of { LT -> True; EQ -> True; GT -> False }
CLabelId a < CLabelId b = case (a `compare` b) of { LT -> True; EQ -> False; GT -> False }
CLabelId a >= CLabelId b = case (a `compare` b) of { LT -> False; EQ -> True; GT -> True }
CLabelId a > CLabelId b = case (a `compare` b) of { LT -> False; EQ -> False; GT -> True }
compare (CLabelId a) (CLabelId b) = a `compare` b
deriving (Eq, Ord)
\end{code}
\begin{code}
data IdLabelInfo
= Closure -- Label for (static???) closure
| StaticClosure -- Static closure -- e.g., nullary constructor