haskell - Defaulting the following constraints to type 'Double' when using Scientific -


I have two scientific numbers which are essentially integers, I want to convert them down to the input.

Please ignore code conventions and code idioms.

  & gt; Importable data V & gt; Import data. Scientific & gt; CToTy (Array V) = Case V.toList v & gt; [String nm, number p, number s] & gt; | All (== true) $ Map Integer [P, S] - We are sure that they are always integers & gt; , [PR, SC] & lt; - Map (Blaatthitoin floating arringer) [P, S] - and then eject them & gt; Balesthoint :: (Real Flat R, Integral Eye) = & gt; Either RI - & gt; Int & G; Balaitectonant (left _e) = 0 - It should not be so, so we will default it to 0 at all times. & Gt; Balaththoite (right A) = One from the intracranial  

However, I get this warning and I can not understand how to get rid of them.

  JsonUtils. LHS: 76: 26: WARNING: The details of the following obstacles to type 'double' (real float R) arising out of the use of 'boltto-int', in the first argument of '(.)', I.e., 'ballotherroint' In the first argument of 'map', in the case of a 'Patrol Guard' (ST, SC) for the option of '(Balesthate FloatingOriteager)' case: [PR, SC] & lt; - Map (Blaheitoutoin floating orringer) [P, S]  

Does anyone have any ideas or ideas?

First of all, if you explicitly say "should not be" error; Second, you can leave RealFloat as backlink states; If you like double, then you can specify double more concrete than the third; If you write 'A to B' instead of 'B to A' in your names, then the fourth may help with the Hungarian sign. So you can write for example:

  intFromEither :: (Integral i) = & gt; Either double I -> Int intFromEither (left d) = Error $ "intFromEither" tried to empower "Left" + + "Show int to` `D + "IntFromEither (correct I) = intraregal i  

you can replace it with double to make it more common with x The most common type of signature is here (Integral A, Number B) => either TA -> B .


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -