Skip to content

Instantly share code, notes, and snippets.

@isovector
Created January 28, 2019 18:40
Show Gist options
  • Select an option

  • Save isovector/bab23a17accfc7d22ad97aabede156e3 to your computer and use it in GitHub Desktop.

Select an option

Save isovector/bab23a17accfc7d22ad97aabede156e3 to your computer and use it in GitHub Desktop.
*** Core Lint errors : in result of Desugar (before optimization) ***
<no location info>: warning:
[RHS of $dSemigroup_auC6{v}[lid] :: Semigroup{tc 2K}
Int{(w) tc 3u}]
[RHS of $csconcat{v auCm}[lid] :: NonEmpty{tc rA4} Int{(w) tc 3u}
-> Int{(w) tc 3u}]
[RHS of $dSemigroup_auCq{v}[lid] :: Semigroup{tc 2K}
Int{(w) tc 3u}]
[RHS of $dSemigroup_auCq{v}[lid] :: Semigroup{tc 2K}
Int{(w) tc 3u}]
Substitution: [TCvSubst
In scope: InScope {$dSemigroup_auC6{v} $dNum_auC8{v} $dNum_auCa{v}
$c<>{v auCi} $csconcat{v auCm} $cstimes{v auCs} t
est{v rfaO}
$trModule{v rfaR}}
Type env: []
Co env: []]
$fSemigroupInt{v rfbv}[lidx[DFunId]] is out of scope
<no location info>: warning:
[RHS of $dSemigroup_auC6{v}[lid] :: Semigroup{tc 2K}
Int{(w) tc 3u}]
[RHS of $cstimes{v auCs}[lid] :: forall @b{tv afkP}[tv].
Integral{tc 27} b{tv afkP}[tv]
-> b{tv afkP}[tv] -> Int{(w) tc 3u} -> Int{(w) tc
3u}]
[in body of lambda with binder b{tv auCu}[tv] :: TYPE{(w) tc 32Q}
'LiftedRep{(w) d 63A}]
[in body of lambda with binder $dIntegral_auCw{v}[lid] :: Integral{tc 27}
b{tv auCu}[tv]]
[in body of letrec with binders $dIntegral_auCA{v}[lid] :: Integral{tc 27}
b{tv auCu}[tv]]
[RHS of $dSemigroup_auCy{v}[lid] :: Semigroup{tc 2K}
Int{(w) tc 3u}]
[RHS of $dSemigroup_auCy{v}[lid] :: Semigroup{tc 2K}
Int{(w) tc 3u}]
Substitution: [TCvSubst
In scope: InScope {$dSemigroup_auC6{v} $dNum_auC8{v} $dNum_auCa{v}
$c<>{v auCi} $csconcat{v auCm} $cstimes{v auCs} b
{tv auCu}
$dIntegral_auCw{v} $dIntegral_auCA{v} test{v rfaO
}
$trModule{v rfaR}}
Type env: []
Co env: []]
$fSemigroupInt{v rfbv}[lidx[DFunId]] is out of scope
*** Offending Program ***
Rec {
$dNum_auCa{v}[lid]
$dNum_auCa{v}[lid] = $dNum_auC8{v}[lid]
$dNum_auC8{v}[lid]
$dNum_auC8{v}[lid] = $fNumInt{v r7d2}[gid[DFunId]]
$dSemigroup_auC6{v}[lid]
$dSemigroup_auC6{v}[lid]
= letrec {
$c<>{v auCi}[lid]
$c<>{v auCi}[lid] = ok{v rbsd}[gid];
$csconcat{v auCm}[lid]
$csconcat{v auCm}[lid]
= let {
$dSemigroup_auCq{v}[lid]
$dSemigroup_auCq{v}[lid]
= $fSemigroupInt{v rfbv}[lidx[DFunId]] } in
$dmsconcat{v rAz}[gid] $dSemigroup_auCq{v}[lid];
$cstimes{v auCs}[lid]
$cstimes{v auCs}[lid]
= \ @ b{tv auCu}[tv] $dIntegral_auCw{v}[lid] ->
let {
$dIntegral_auCA{v}[lid]
$dIntegral_auCA{v}[lid] = $dIntegral_auCw{v}[lid] } in
let {
$dSemigroup_auCy{v}[lid]
$dSemigroup_auCy{v}[lid]
= $fSemigroupInt{v rfbv}[lidx[DFunId]] } in
$dmstimes{v rAB}[gid]
$dSemigroup_auCy{v}[lid] $dIntegral_auCA{v}[lid]; } in
C:Semigroup{v rCE}[gid[DataCon]]
$c<>{v auCi}[lid] $csconcat{v auCm}[lid] $cstimes{v auCs}[lid]
$trModule{v rfaR}[lidx]
$trModule{v rfaR}[lidx]
= Module{v r1Z}[gid[DataCon]]
(TrNameS{v r1M}[gid[DataCon]] "main"#)
(TrNameS{v r1M}[gid[DataCon]] "Lib"#)
test{v rfaO}[lidx]
test{v rfaO}[lidx]
= <>{v 08W}[gid[ClassOp]]
$dSemigroup_auC6{v}[lid]
(I#{(w) v 6j}[gid[DataCon]] 5#)
(I#{(w) v 6j}[gid[DataCon]] 6#)
end Rec }
*** End of Offense ***
@isovector
Copy link
Author

generated evidence

  letrec {
    $c<>_avUX :: Int -> Int -> Int
    [LclId]
    $c<>_avUX = ok;
    $csconcat_avV1 :: NonEmpty Int -> Int
    [LclId]
    $csconcat_avV1
      = let {
          $dSemigroup_avV5 :: Semigroup Int
          [LclId]
          $dSemigroup_avV5 = $fSemigroupInt } in                                        
        $dmsconcat @ Int $dSemigroup_avV5;
    $cstimes_avV7 :: forall b. Integral b => b -> Int -> Int                            
    [LclId]
    $cstimes_avV7
      = \ (@ b_avV9) ($dIntegral_avVb :: Integral b_avV9) ->                            
          let {
            $dIntegral_avVf :: Integral b_avV9                                          
            [LclId]
            $dIntegral_avVf = $dIntegral_avVb } in                                      
          let {
            $dSemigroup_avVd :: Semigroup Int                                           
            [LclId]
            $dSemigroup_avVd = $fSemigroupInt } in                                      
          $dmstimes @ Int $dSemigroup_avVd @ b_avV9 $dIntegral_avVf; } in               
  C:Semigroup @ Int $c<>_avUX $csconcat_avV1 $cstimes_avV7 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment