This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package service.utils | |
import scalaz.{-\/, \/, \/-} | |
import scalaz.zio.{DefaultRuntime, IO, ZIO} | |
import play.api.libs.concurrent.Execution.Implicits | |
import scalaz.concurrent.{Task => ZTask} | |
import scala.concurrent.{ExecutionContext, Future} | |
package object zio { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package domain | |
import domain.clientcompany.commands.ClientCompanyCommand | |
import domain.clientcompany.events.ClientCompanyEvent | |
import domain.clientcompany.models.{ClientCompanyError, ClientCompanyModel} | |
import domain.clientcompany.models.ClientCompanyModel.EmptyClientCompany | |
import domain.lot.commands.LotCommand | |
import domain.lot.events.LotEvent | |
import domain.lot.models.LotModel.EmptyLot | |
import domain.lot.models.{LotError, LotModel} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
module Domain.UnoGame.DomainEventModule (DomainEventApply(..), DomainEventDecide(..), DomainEventEmptyState(..)) where | |
import Domain.UnoGame.Events.UnoGameEvents (UnoGameEvent) | |
import Domain.UnoGame.Commands.UnoGameCommands (UnoGameCommand) | |
import Domain.UnoGame.Models.UnoGameState (State(..)) | |
import Domain.UnoGame.Events.UnoGameErrors (UnoGameError) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz.{@@, Show, Tag, \/} | |
import scalaz.Scalaz.ToEitherOps | |
/** | |
* Double représentant un pourcentage. | |
*/ | |
package object percentagedouble { | |
private[percentagedouble] sealed trait PositiveOrNegativePercentageDoubleTag | |
type PositiveOrNegativePercentageDouble = Double @@ PositiveOrNegativePercentageDoubleTag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package domain.common.collection | |
import domain.common.number.strictpositiveint.StrictPositiveInt | |
import scalaz.Scalaz.ToEitherOps | |
import scalaz.{@@, NonEmptyList, Tag, \/} | |
object NonEmptyListMaxSize { | |
private[NonEmptyListMaxSize] sealed trait NonEmptyListMaxSize2Tag | |
type NonEmptyListMaxSize2[A] = NonEmptyList[A] @@ NonEmptyListMaxSize2Tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import domain.common.number.positiveint.{InvalidRawValue, OperationError, PositiveInt} | |
import org.scalatest.{FunSuite, Matchers} | |
import scalaz.Scalaz.ToEitherOps | |
import PositiveInt.{IsEqual, IsHigher, IsLower, rawValue} | |
class PositiveIntTest extends FunSuite with Matchers { | |
test("PositiveInt should be positive") { | |
PositiveInt(-1) shouldBe InvalidRawValue("must be an integer > 0").left | |
PositiveInt(0) shouldBe InvalidRawValue("must be an integer > 0").left |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo npm install -g clever-tools | |
Password: | |
/Users/ugobourdon/.npm_install/bin/clever -> /Users/ugobourdon/.npm_install/lib/node_modules/clever-tools/bin/clever.js | |
/Users/ugobourdon/.npm_install/bin/install-clever-completion -> /Users/ugobourdon/.npm_install/lib/node_modules/clever-tools/scripts/install-autocomplete.sh | |
/Users/ugobourdon/.npm_install/bin/uninstall-clever-completion -> /Users/ugobourdon/.npm_install/lib/node_modules/clever-tools/scripts/uninstall-autocomplete.sh | |
> [email protected] install /Users/ugobourdon/.npm_install/lib/node_modules/clever-tools/node_modules/nodegit | |
> node lifecycleScripts/preinstall && node lifecycleScripts/install | |
[nodegit] Running pre-install script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data BBool a b = BTrue a | BFalse b deriving (Show) | |
true :: a -> BBool a b | |
true a = BTrue a | |
trueMap :: (a -> b) -> BBool a c -> BBool b c | |
trueMap f (BTrue x) = BTrue (f x) | |
trueMap _ (BFalse x) = BFalse x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Règle métier externe à l'aggrégat. ex: nom d'utilisateur unique | |
Représentation d'évènements venu d'un système extérieur (ex: CallEmmittedTo ou SendingServiceOrderReported) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Existant Anstel : | |
=============== | |
1 patrimoine = 1 agence (fictive) | |
1 provider associé à 1 agence | |
Tickets associés au patrimoine | |
PB: 1 provider peut être (dans le cas métier) associé à plusieurs agences(= patrimoines) | |
CSQ : Sur saisie de tickets, provider non accessible pour action (assignation, ect...) |