darcs-2.16.5: a distributed, interactive, smart revision control system

Safe Haskell | Safe-Inferred
Language | Haskell2010

Darcs.Patch.RepoType

Synopsis

- data RepoType = RepoType {
  - rebaseType :: RebaseType
  }
- class IsRepoType (rt :: RepoType) where
  - singletonRepoType :: SRepoType rt
- data SRepoType (repoType :: RepoType) where
  - SRepoType :: SRebaseType rebaseType -> SRepoType ('RepoType rebaseType)
- data RebaseType
  - = IsRebase
  - | NoRebase
- class IsRebaseType (rebaseType :: RebaseType)
- type family RebaseTypeOf (rt :: RepoType) :: RebaseType
- data SRebaseType (rebaseType :: RebaseType) where
  - SIsRebase :: SRebaseType 'IsRebase
  - SNoRebase :: SRebaseType 'NoRebase

# Documentation

data RepoType #

This type is intended to be used as a phantom type via the `DataKinds` extension. It tracks different types of repositories, e.g. to indicate when a rebase is in progress.

Constructors

RepoType |
Fields rebaseType :: RebaseType

class IsRepoType (rt :: RepoType) where #

Methods

singletonRepoType :: SRepoType rt #

Reflect `RepoType` to the value level so that code can explicitly switch on it.

#### Instances

Instances details

IsRebaseType rebaseType => IsRepoType ('RepoType rebaseType) # |
Instance details Defined in Darcs.Patch.RepoType Methods singletonRepoType :: SRepoType ('RepoType rebaseType) #

data SRepoType (repoType :: RepoType) where #

A reflection of `RepoType` at the value level so that code can explicitly switch on it.

Constructors

SRepoType :: SRebaseType rebaseType -> SRepoType ('RepoType rebaseType) |

data RebaseType #

This type is intended to be used as a phantom type via the `DataKinds` extension, normally as part of `RepoType`. Indicates whether or not a rebase is in progress.

Constructors

IsRebase |
NoRebase |

class IsRebaseType (rebaseType :: RebaseType) #

Minimal complete definition

singletonRebaseType

#### Instances

Instances details

IsRebaseType 'IsRebase # |
Instance details Defined in Darcs.Patch.RepoType Methods singletonRebaseType :: SRebaseType 'IsRebase
IsRebaseType 'NoRebase # |
Instance details Defined in Darcs.Patch.RepoType Methods singletonRebaseType :: SRebaseType 'NoRebase

type family RebaseTypeOf (rt :: RepoType) :: RebaseType #

Extract the `RebaseType` from a `RepoType`

#### Instances

Instances details

type RebaseTypeOf ('RepoType rebaseType) # |
Instance details Defined in Darcs.Patch.RepoType type RebaseTypeOf ('RepoType rebaseType) = rebaseType

data SRebaseType (rebaseType :: RebaseType) where #

A reflection of `RebaseType` at the value level so that code can explicitly switch on it.

Constructors

SIsRebase :: SRebaseType 'IsRebase |
SNoRebase :: SRebaseType 'NoRebase |