Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into marlowe-dash-remodel
- Loading branch information
Showing
33 changed files
with
317 additions
and
327 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
wcFMAxN/6UuqwT7KARAAqcZiII85mNnH85I3QrpkKhpdNutboYszxOHGiUGWNqBh/ur3e60yrIPBaN84gVaXVHfV1jFD3+6L12sm5+Q1pjWy3CA2renpVcayFbToTkbA2GupmX6dKq7XU1vWhIQR6L/JD+we/ld0j82C/MRyuQvaHBGQVuzKeGAcS3+I1j8nK50ZrkWBZNAwdjVx1lxHnsMzpTvRGpRJJOKbZ4xEFMvtBKrQkpyLNSXb1LGcf7/slq5Zshc8iGH8WRgGIW5/oo4rcNH3L1OjzyRx+VYsHRfiLpFIkQq4DJcL+UdpLUfbwCvMq+pHBp44Yp9Lm+VdKS98XcSeb51kn1f67tn2L+Asfky2kKF/MteQ1Z4B03Kl+9ZaRfjeR2PFk8NERXaomh5HOcn+O68AcJ/TltzHu9YDcmBZdYkFp3iFvkQgA24k3p7I4FpMGDeWoOAY1QFQJyXYp9oFliHXrFRNpy1vcaRTV+4aggqh1mM7VKYonhdT75eX6TvEi5rfQql+JO7EOcoIvKCo0FlhK5b8jM7g3g7BKql7JWbkr868+iXlU9zr/fFpypLiT16qrNRS9VxeeLMY8p9MwdXRBoHvy/ACBCSZ/VaOdGo1D/KmhVgSywQnosK8N/n3M+1VRreqnZFTQM6irgJYztU2VQx2s8XFxieSsp7k21V/a2dXr5SZzmLS4AHkzS49v+ht/BbhQwgriw5YnuHGO+Ds4OXhp5Dg5uJbaszp4GLkrvc57MYQ+gJBjF4Dz0Hl8+CV4vhSu+HgheSEQ1PSuRyxz8O4Htos38U+4s8wDjXhQx4A |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
wcFMAxN/6UuqwT7KARAAC6PgPixd0BbkY73JR2DhPMmcoo1LgR2mawvR7m7YVf29d9PgLNWuF0i/lRIklldwcs4ydsyaPipNu40tWkdhXJo/9bWFVuVNxeM1auya1qDZRV6XBkt0zd/6mgT69v3qR+DxDWLMR2mx0NC7CGFRT+I6ySjAzbxCF73IhakAJEZWoaj5AImPI2OX4W4WOn2ILYOF1myOIpO5YhsOXL5Q5TPdRPmMLKPLBF1ik7EC/McPXsecdbQ9qAm11nKHOU3yU4EZyrY7nANCippVLQ+2nC/nDcegsf9Xb7OqImKXnta1ywapC1QxrIr8pc4p4M4MCS91/Y2cOrB2gjg0itmzANqOrJpMHcrNKVl74xVIxbzxKHI0WD3vEA3jB5KHeDsgGR216BVa2Fq5DycPHFn4M3NDZCtmEvaWzdfbRdhpbkfmuarWfj9E1+adTzsKgJVFPnxUPbrFJ+J052JFip8MiHFIk7ut2lwQNUs9bXF2hc8nu0EV9aN6B6vcIZXSr2Tbl4A+FE/4crn9FlFlmpjLLusqmI9qYIpY//CNFydxm4fY3HZwQPNX0vT4ZjzHBwN0g2cWZJpeqKWuJwngVmeCKIdwug5n07B0IZNlVSevS0ijMpAquGZ5z1CEhWajh3Ss0fcpl1TrHVTiS+97RLeoqIxyejNFagxBixbkjsXctWLS4AHkJBtbNTlJ7AdmdaO8MFWGd+FMzuAP4FjhCDbgZeIc4PYO4OjlZ2300WIk8f4fu3GYm3Wx7BRrXGWIHyJ6LQqblLGx79Dg9+MHh7PDF4JDHODe5H6mX+SM56SsXP4Ug5/hudXiBPmKCuEDGAA= |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module AppM where | ||
|
||
import Prelude | ||
import Control.Monad.Reader.Trans (class MonadAsk, ReaderT, asks, runReaderT) | ||
import Effect.Aff (Aff) | ||
import Effect.Aff.Class (class MonadAff) | ||
import Effect.Class (class MonadEffect) | ||
import Env (Env) | ||
import Type.Equality (class TypeEquals, from) | ||
|
||
newtype AppM a | ||
= AppM (ReaderT Env Aff a) | ||
|
||
runAppM :: Env -> AppM ~> Aff | ||
runAppM env (AppM m) = runReaderT m env | ||
|
||
derive newtype instance functorAppM :: Functor AppM | ||
|
||
derive newtype instance applyAppM :: Apply AppM | ||
|
||
derive newtype instance applicativeAppM :: Applicative AppM | ||
|
||
derive newtype instance bindAppM :: Bind AppM | ||
|
||
derive newtype instance monadAppM :: Monad AppM | ||
|
||
derive newtype instance monadEffectAppM :: MonadEffect AppM | ||
|
||
derive newtype instance monadAffAppM :: MonadAff AppM | ||
|
||
-- | We can't write instances for type synonyms, and we defined our environment (`Env`) as | ||
-- | a type synonym for convenience. To get around this, we can use `TypeEquals` to assert that | ||
-- | types `a` and `b` are in fact the same. | ||
-- | | ||
-- | In our case, we'll write a `MonadAsk` instance for the type `e`, and assert it is our `Env` type. | ||
-- | This is how we can write a type class instance for a type synonym, which is otherwise disallowed. | ||
instance monadAskAppM :: TypeEquals e Env => MonadAsk e AppM where | ||
ask = AppM $ asks from |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Env where | ||
|
||
import Servant.PureScript.Settings (SPSettings_) | ||
import Plutus.PAB.Webserver (SPParams_) | ||
|
||
-- Application enviroment configuration | ||
type Env | ||
= { ajaxSettings :: SPSettings_ SPParams_ | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.