Skip to content

Instantly share code, notes, and snippets.

@isovector
Last active January 29, 2019 21:22
Show Gist options
  • Select an option

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

Select an option

Save isovector/dd4ca195549dab8ec51190f01505cbb3 to your computer and use it in GitHub Desktop.
*** Core Lint errors : in result of Desugar (before optimization) ***
<no location info>: warning:
In the expression: $fNum[] $dNum_a2USl
$dNum_a2USl :: Num a_0
[LclId] is out of scope
<no location info>: warning:
In the expression: $fNum[] $dNum_a2USl
Non-function type in function position
Fun type: forall a. Num a => Num [a]
Arg type: Num a_-1
Arg: $dNum_a2USl
*** Offending Program ***
Rec {
$dNum_a2URA :: Num [Int]
[LclId]
$dNum_a2URA = $fNum[] $dNum_a3USl
$fNum[] [InlPrag=NOUSERINLINE CONLIKE]
:: forall a. Num a => Num [a]
[LclIdX[DFunId],
Unf=DFun: \ (@ a_-1) (v_B1 :: Num a_0) ->
C:Num TYPE: [a_-1]
$c+_a2URM @ a_0 v_B1
$c-_a2URO @ a_0 v_B1
$c*_a2URU @ a_0 v_B1
$cnegate_a2URW @ a_0 v_B1
$cabs_a2US2 @ a_0 v_B1
$csignum_a2US4 @ a_0 v_B1
$cfromInteger_a2US6 @ a_0 v_B1]
$fNum[]
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
C:Num
@ [a_a2URJ]
($c+_a2URM @ a_a3URJ $dNum_a3URK)
($c-_a2URO @ a_a3URJ $dNum_a3URK)
($c*_a2URU @ a_a3URJ $dNum_a3URK)
($cnegate_a2URW @ a_a3URJ $dNum_a3URK)
($cabs_a2US2 @ a_a3URJ $dNum_a3URK)
($csignum_a2US4 @ a_a3URJ $dNum_a3URK)
($cfromInteger_a2US6 @ a_a3URJ $dNum_a3URK)
$c-_a2URO :: forall a. Num a => [a] -> [a] -> [a]
[LclId]
$c-_a2URO
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
let {
$dNum_a2URS :: Num [a_a3URJ]
[LclId]
$dNum_a2URS = $fNum[] @ a_a3URJ $dNum_a3URK } in
$dm- @ [a_a2URJ] $dNum_a3URS
$cnegate_a2URW :: forall a. Num a => [a] -> [a]
[LclId]
$cnegate_a2URW
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
let {
$dNum_a2US0 :: Num [a_a3URJ]
[LclId]
$dNum_a2US0 = $fNum[] @ a_a3URJ $dNum_a3URK } in
$dmnegate @ [a_a2URJ] $dNum_a3US0
$c+_a2URM :: forall a. Num a => [a] -> [a] -> [a]
[LclId]
$c+_a2URM
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
noMethodBindingError
@ 'LiftedRep
@ ([a_a2URJ] -> [a_a3URJ] -> [a_a3URJ])
"<no location info>|+"#
$c*_a2URU :: forall a. Num a => [a] -> [a] -> [a]
[LclId]
$c*_a2URU
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
noMethodBindingError
@ 'LiftedRep
@ ([a_a2URJ] -> [a_a3URJ] -> [a_a3URJ])
"<no location info>|*"#
$cabs_a2US2 :: forall a. Num a => [a] -> [a]
[LclId]
$cabs_a2US2
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
noMethodBindingError
@ 'LiftedRep @ ([a_a2URJ] -> [a_a3URJ]) "<no location info>|abs"#
$csignum_a2US4 :: forall a. Num a => [a] -> [a]
[LclId]
$csignum_a2US4
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
noMethodBindingError
@ 'LiftedRep
@ ([a_a2URJ] -> [a_a3URJ])
"<no location info>|signum"#
$cfromInteger_a2US6 :: forall a. Num a => Integer -> [a]
[LclId]
$cfromInteger_a2US6
= \ (@ a_a2URJ) ($dNum_a3URK :: Num a_a3URJ) ->
let {
$dNum_a2USg :: Num a_a3URJ
[LclId]
$dNum_a2USg = $dNum_a3URK } in
let {
$dApplicative_a2USd :: Applicative []
[LclId]
$dApplicative_a2USd = $fApplicative[] } in
. @ a_a2URJ
@ [a_a2URJ]
@ Integer
(pure @ [] $dApplicative_a2USd @ a_a3URJ)
(fromInteger @ a_a2URJ $dNum_a3USg)
$trModule :: Module
[LclIdX]
$trModule = Module (TrNameS "main"#) (TrNameS "Lib"#)
test :: [Int]
[LclIdX]
test = break<-1>() fromInteger @ [Int] $dNum_a3URA 5
end Rec }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment