Skip to content
Permalink
Browse files

ValueId as String

  • Loading branch information...
nau committed Sep 11, 2019
1 parent 0e1576b commit 95b67b8d5eff760574a720b2f73168888b5e2600
@@ -31,7 +31,7 @@ genTimeout :: forall m. MonadGen m => MonadRec m => m Timeout
genTimeout = genSlot

genValueId :: forall m. MonadGen m => MonadRec m => m ValueId
genValueId = ValueId <$> genBigInteger
genValueId = ValueId <$> genString

genAlphaNum :: forall m. MonadGen m => MonadRec m => m Char
genAlphaNum = oneOf $ genAlpha :| [ genDigitChar ]
@@ -62,7 +62,7 @@ bigInteger = do
Nothing -> fail "not a valid BigInt"

valueId :: Parser String ValueId
valueId = ValueId <$> bigInteger
valueId = ValueId <$> text

slot :: Parser String Slot
slot = Slot <$> bigInteger
@@ -134,7 +134,7 @@ choiceOwner :: ChoiceId -> PubKey
choiceOwner (ChoiceId _ owner) = owner

newtype ValueId
= ValueId BigInteger
= ValueId String

derive instance genericValueId :: Generic ValueId _

0 comments on commit 95b67b8

Please sign in to comment.
You can’t perform that action at this time.