summaryrefslogtreecommitdiff
path: root/darcs-all
diff options
context:
space:
mode:
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>2007-08-28 06:18:51 +0000
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>2007-08-28 06:18:51 +0000
commit5822cb8d13aa3c05d2b46b4510c13d94b902eb21 (patch)
tree56f7ed6a9697c4bc119a8d21885370cba8fa3c8b /darcs-all
parentdb14f9df7f2f62039af85ac75ac59a4e22d09787 (diff)
downloadhaskell-5822cb8d13aa3c05d2b46b4510c13d94b902eb21.tar.gz
Type checking for type synonym families
This patch introduces type checking for type families of which associated type synonyms are a special case. E.g. type family Sum n m type instance Sum Zero n = n type instance Sum (Succ n) m = Succ (Sum n m) where data Zero -- empty type data Succ n -- empty type In addition we support equational constraints of the form: ty1 ~ ty2 (where ty1 and ty2 are arbitrary tau types) in any context where type class constraints are already allowed, e.g. data Equals a b where Equals :: a ~ b => Equals a b The above two syntactical extensions are disabled by default. Enable with the -XTypeFamilies flag. For further documentation about the patch, see: * the master plan http://hackage.haskell.org/trac/ghc/wiki/TypeFunctions * the user-level documentation http://haskell.org/haskellwiki/GHC/Indexed_types The patch is mostly backwards compatible, except for: * Some error messages have been changed slightly. * Type checking of GADTs now requires a bit more type declarations: not only should the type of a GADT case scrutinee be given, but also that of any identifiers used in the branches and the return type. Please report any unexpected behavior and incomprehensible error message for existing code. Contributors (code and/or ideas): Tom Schrijvers Manuel Chakravarty Simon Peyton-Jones Martin Sulzmann with special thanks to Roman Leshchinskiy
Diffstat (limited to 'darcs-all')
-rw-r--r--darcs-all5
1 files changed, 3 insertions, 2 deletions
diff --git a/darcs-all b/darcs-all
index 7743e8a857..f1934dcdb2 100644
--- a/darcs-all
+++ b/darcs-all
@@ -11,13 +11,14 @@ chomp $defaultrepo;
my $defaultrepo_base;
my $defaultrepo_lib;
-if ($defaultrepo =~ /:/) {
+if ($defaultrepo =~ /:\/\//) {
# HTTP or SSH
$defaultrepo_base = $defaultrepo;
$defaultrepo_base =~ s#/[^/]+/?$##;
$defaultrepo_lib = "$defaultrepo_base/packages";
}
-elsif ($defaultrepo =~ /^\//) {
+elsif (($defaultrepo =~ /^\//) or # unix
+ ($defaultrepo =~ /^.:/)) { # windows, e.g. c:
# Local filesystem, absolute path (assumes a checked-out tree):
$defaultrepo_base = $defaultrepo;
$defaultrepo_lib = "$defaultrepo/libraries";