[2 of 2] Compiling Data.Type.Ordinal ( Data/Type/Ordinal.hs, dist/build/Data/Type/Ordinal.o )
Data/Type/Ordinal.hs:88:17:
Couldn't match type ‘n0’ with ‘a’
because type variable ‘a’ would escape its scope
This (rigid, skolem) type variable is bound by
a pattern with constructor
Monomorphic :: forall (k :: BOX) (k1 :: k -> *) (a :: k).
k1 a -> Monomorphic k1,
in a case alternative
at Data/Type/Ordinal.hs:87:7-20
Expected type: SNat n0
Actual type: Sing a
Relevant bindings include
sn :: Sing a (bound at Data/Type/Ordinal.hs:87:19)
In the first argument of ‘sS’, namely ‘sn’
In the first argument of ‘(%:<<=)’, namely ‘sS sn’
Data/Type/Ordinal.hs:89:20:
Could not deduce (('S a :<<= n) ~ 'True)
from the context (SingI n)
bound by the type signature for
unsafeFromInt :: SingI n => Int -> Ordinal n
at Data/Type/Ordinal.hs:84:18-54
or from (('S n0 :<<= n) ~ 'True)
bound by a pattern with constructor
STrue :: forall (z0 :: Bool). z0 ~ 'True => Sing z0,
in a case alternative
at Data/Type/Ordinal.hs:89:11-15
Relevant bindings include
sn :: Sing a (bound at Data/Type/Ordinal.hs:87:19)
unsafeFromInt :: Int -> Ordinal n
(bound at Data/Type/Ordinal.hs:85:1)
In the expression: sNatToOrd' (sing :: SNat n) sn
In a case alternative: STrue -> sNatToOrd' (sing :: SNat n) sn
In the expression:
case sS sn %:<<= (sing :: SNat n) of {
STrue -> sNatToOrd' (sing :: SNat n) sn
SFalse -> error "Bound over!" }
cabal: Error: some packages failed to install:
type-natural-0.2.1.1 failed during the building phase. The exception was:
ExitFailure 1
The error is the same whether I use a cabal sandbox or not.