0

In a haskell file, I write

x = 2

and load it in ghci via spacemacs / intero

I have the following type :

:t x
x :: integer-gmp-1.0.0.1:GHC.Integer.Type.Integer

whereas if I just type in 2 I get the expected

 :t 2 
 2 :: GHC.Num.Num t => t

Is there a way to have the instance resolution be like ghci when editing a file ? of course this bites me when using some other datastucture where it can't find some Eq class

duplode
  • 33,731
  • 7
  • 79
  • 150
nicolas
  • 9,549
  • 3
  • 39
  • 83
  • 2
    Try disabling the monomorphism restriction in the Haskell source file. Or provide a full type signature for the binding `x`. – chi Apr 29 '17 at 15:52
  • 1
    This question is a mirror image of [*ghci - defaulting confusion*](http://stackoverflow.com/q/42233527/2751851), so you will find the discussion there relevant. – duplode Apr 29 '17 at 15:55
  • yes it's a duplicate of the ghci default. – nicolas Apr 29 '17 at 16:52

0 Answers0