[commit: ghc] wip/branchedness: a few changes along the lines of Richard's review in https://phabricator.haskell.org/rGHCb5be9b7fb82b (e19bc09)
git at git.haskell.org
git at git.haskell.org
Sat Aug 1 08:03:29 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/branchedness
Link : http://ghc.haskell.org/trac/ghc/changeset/e19bc0941cce8b0d50c33a6c6337478148585ad3/ghc
>---------------------------------------------------------------
commit e19bc0941cce8b0d50c33a6c6337478148585ad3
Author: Gabor Greif <ggreif at gmail.com>
Date: Sat Aug 1 10:04:11 2015 +0200
a few changes along the lines of Richard's review in https://phabricator.haskell.org/rGHCb5be9b7fb82b
>---------------------------------------------------------------
e19bc0941cce8b0d50c33a6c6337478148585ad3
compiler/types/CoAxiom.hs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/compiler/types/CoAxiom.hs b/compiler/types/CoAxiom.hs
index 4c6f478..5f36048 100644
--- a/compiler/types/CoAxiom.hs
+++ b/compiler/types/CoAxiom.hs
@@ -6,7 +6,7 @@
-- and newtypes
module CoAxiom (
- Branchedness(..), BranchIndex, BranchList(..),
+ Branched, Unbranched, BranchIndex, BranchList(..),
toBranchList, fromBranchList,
toBranchedList, toUnbranchedList,
brListLength, brListNth, brListMap, brListFoldr, brListMapM,
@@ -119,11 +119,15 @@ type BranchIndex = Int -- The index of the branch in the list of branches
-- Counting from zero
-- promoted data type
-data Branchedness = Unbranched | Branched
-deriving instance Typeable 'Unbranched
+data BranchFlag = Branched | Unbranched
+type Branched = 'Branched
deriving instance Typeable 'Branched
+type Unbranched = 'Unbranched
+--data Branchedness = Unbranched | Branched
+deriving instance Typeable 'Unbranched
+--deriving instance Typeable 'Branched
-data BranchList a (br :: Branchedness) where
+data BranchList a (br :: BranchFlag) where
FirstBranch :: a -> BranchList a br
NextBranch :: a -> BranchList a br -> BranchList a Branched
More information about the ghc-commits
mailing list