Home / plutonomicon / plutarch
Jan 10, 3-4 AM (0)
Jan 10, 4-5 AM (0)
Jan 10, 5-6 AM (0)
Jan 10, 6-7 AM (0)
Jan 10, 7-8 AM (0)
Jan 10, 8-9 AM (0)
Jan 10, 9-10 AM (0)
Jan 10, 10-11 AM (0)
Jan 10, 11-12 PM (0)
Jan 10, 12-1 PM (2)
Jan 10, 1-2 PM (1)
Jan 10, 2-3 PM (0)
Jan 10, 3-4 PM (0)
Jan 10, 4-5 PM (2)
Jan 10, 5-6 PM (2)
Jan 10, 6-7 PM (2)
Jan 10, 7-8 PM (3)
Jan 10, 8-9 PM (0)
Jan 10, 9-10 PM (0)
Jan 10, 10-11 PM (0)
Jan 10, 11-12 AM (0)
Jan 11, 12-1 AM (0)
Jan 11, 1-2 AM (0)
Jan 11, 2-3 AM (0)
Jan 11, 3-4 AM (0)
Jan 11, 4-5 AM (0)
Jan 11, 5-6 AM (0)
Jan 11, 6-7 AM (0)
Jan 11, 7-8 AM (0)
Jan 11, 8-9 AM (0)
Jan 11, 9-10 AM (0)
Jan 11, 10-11 AM (1)
Jan 11, 11-12 PM (2)
Jan 11, 12-1 PM (0)
Jan 11, 1-2 PM (0)
Jan 11, 2-3 PM (7)
Jan 11, 3-4 PM (0)
Jan 11, 4-5 PM (0)
Jan 11, 5-6 PM (2)
Jan 11, 6-7 PM (2)
Jan 11, 7-8 PM (3)
Jan 11, 8-9 PM (0)
Jan 11, 9-10 PM (0)
Jan 11, 10-11 PM (1)
Jan 11, 11-12 AM (0)
Jan 12, 12-1 AM (0)
Jan 12, 1-2 AM (0)
Jan 12, 2-3 AM (0)
Jan 12, 3-4 AM (0)
Jan 12, 4-5 AM (0)
Jan 12, 5-6 AM (0)
Jan 12, 6-7 AM (1)
Jan 12, 7-8 AM (0)
Jan 12, 8-9 AM (2)
Jan 12, 9-10 AM (2)
Jan 12, 10-11 AM (0)
Jan 12, 11-12 PM (0)
Jan 12, 12-1 PM (0)
Jan 12, 1-2 PM (1)
Jan 12, 2-3 PM (4)
Jan 12, 3-4 PM (3)
Jan 12, 4-5 PM (1)
Jan 12, 5-6 PM (5)
Jan 12, 6-7 PM (8)
Jan 12, 7-8 PM (4)
Jan 12, 8-9 PM (3)
Jan 12, 9-10 PM (2)
Jan 12, 10-11 PM (0)
Jan 12, 11-12 AM (0)
Jan 13, 12-1 AM (0)
Jan 13, 1-2 AM (0)
Jan 13, 2-3 AM (0)
Jan 13, 3-4 AM (0)
Jan 13, 4-5 AM (0)
Jan 13, 5-6 AM (3)
Jan 13, 6-7 AM (0)
Jan 13, 7-8 AM (0)
Jan 13, 8-9 AM (0)
Jan 13, 9-10 AM (0)
Jan 13, 10-11 AM (3)
Jan 13, 11-12 PM (2)
Jan 13, 12-1 PM (2)
Jan 13, 1-2 PM (1)
Jan 13, 2-3 PM (1)
Jan 13, 3-4 PM (0)
Jan 13, 4-5 PM (1)
Jan 13, 5-6 PM (9)
Jan 13, 6-7 PM (0)
Jan 13, 7-8 PM (0)
Jan 13, 8-9 PM (0)
Jan 13, 9-10 PM (0)
Jan 13, 10-11 PM (1)
Jan 13, 11-12 AM (0)
Jan 14, 12-1 AM (0)
Jan 14, 1-2 AM (0)
Jan 14, 2-3 AM (0)
Jan 14, 3-4 AM (0)
Jan 14, 4-5 AM (0)
Jan 14, 5-6 AM (0)
Jan 14, 6-7 AM (0)
Jan 14, 7-8 AM (0)
Jan 14, 8-9 AM (0)
Jan 14, 9-10 AM (0)
Jan 14, 10-11 AM (0)
Jan 14, 11-12 PM (0)
Jan 14, 12-1 PM (0)
Jan 14, 1-2 PM (1)
Jan 14, 2-3 PM (4)
Jan 14, 3-4 PM (4)
Jan 14, 4-5 PM (6)
Jan 14, 5-6 PM (5)
Jan 14, 6-7 PM (0)
Jan 14, 7-8 PM (4)
Jan 14, 8-9 PM (0)
Jan 14, 9-10 PM (0)
Jan 14, 10-11 PM (2)
Jan 14, 11-12 AM (1)
Jan 15, 12-1 AM (0)
Jan 15, 1-2 AM (0)
Jan 15, 2-3 AM (0)
Jan 15, 3-4 AM (0)
Jan 15, 4-5 AM (0)
Jan 15, 5-6 AM (0)
Jan 15, 6-7 AM (0)
Jan 15, 7-8 AM (0)
Jan 15, 8-9 AM (0)
Jan 15, 9-10 AM (0)
Jan 15, 10-11 AM (0)
Jan 15, 11-12 PM (0)
Jan 15, 12-1 PM (0)
Jan 15, 1-2 PM (0)
Jan 15, 2-3 PM (0)
Jan 15, 3-4 PM (0)
Jan 15, 4-5 PM (0)
Jan 15, 5-6 PM (0)
Jan 15, 6-7 PM (0)
Jan 15, 7-8 PM (0)
Jan 15, 8-9 PM (0)
Jan 15, 9-10 PM (0)
Jan 15, 10-11 PM (0)
Jan 15, 11-12 AM (0)
Jan 16, 12-1 AM (0)
Jan 16, 1-2 AM (0)
Jan 16, 2-3 AM (0)
Jan 16, 3-4 AM (0)
Jan 16, 4-5 AM (0)
Jan 16, 5-6 AM (0)
Jan 16, 6-7 AM (0)
Jan 16, 7-8 AM (0)
Jan 16, 8-9 AM (0)
Jan 16, 9-10 AM (0)
Jan 16, 10-11 AM (0)
Jan 16, 11-12 PM (0)
Jan 16, 12-1 PM (0)
Jan 16, 1-2 PM (0)
Jan 16, 2-3 PM (0)
Jan 16, 3-4 PM (0)
Jan 16, 4-5 PM (0)
Jan 16, 5-6 PM (0)
Jan 16, 6-7 PM (0)
Jan 16, 7-8 PM (0)
Jan 16, 8-9 PM (0)
Jan 16, 9-10 PM (0)
Jan 16, 10-11 PM (0)
Jan 16, 11-12 AM (0)
Jan 17, 12-1 AM (3)
Jan 17, 1-2 AM (0)
Jan 17, 2-3 AM (0)
Jan 17, 3-4 AM (0)
119 commits this week Jan 10, 2022 - Jan 17, 2022
Draft Plutarch.Monadic
```haskell
P.do
  PTxInfo y <- (x :: Term s PTxInfo)
  perror
```

The only missing thing is lets. I want to support let statements
with a syntax like the following:
```haskell
P.do
  z <- P.pure $ x + y
  perror
```

Not sure how to implement it efficiently yet.

In addition, fourmolu doesn't support this! Not sure what to do about that.
Draft PLift bidirectionality
This makes `pconstant True` be inferred to be of type `Term s PBool`.

There is however an issue: deriving via seems to work quite suboptimally.

We need two derives because there are two type classes now:
```haskell
data PBool (s :: S) = PTrue | PFalse
  deriving (PUnsafeLiftDecl) via (DerivePLiftViaCoercible Bool PBool Bool)

deriving via (DerivePConstant Bool) PBool instance (PConstant Bool)
```

The issue then is that the instance is:
```haskell
instance (PConstant h, PConstanted h ~ DerivePLiftViaCoercible h p r, Coercible h r, PLC.DefaultUni `PLC.Includes` r) => PUnsafeLiftDecl (DerivePLiftViaCoercible h p r) where
```
`PConstanted h ~ DerivePLiftViaCoercible h p r` fails to hold, because `PConstanted h` is set by another
derive. I'm not sure whether this is easy to fix.

The reason I switched away from functional dependencies is ironically that it seemed
easier to make newtype derives work.

Is there any solution that doesn't involve TH?