Git Product home page Git Product logo

frames-explore's People

Contributors

gagandeepb avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

frames-explore's Issues

"No instance ... Rec ..." errors

When I run this code from this context I get these errors:

jeff@jeff-ThinkCentre-M700:~/data-haskell/challenge/frames$ stack ghci
frames-0.1.0.0: initial-build-steps (lib)
Configuring GHCi with the following packages: frames
GHCi, version 8.4.4: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Lib              ( /home/jeff/data-haskell/challenge/frames/src/Lib.hs, interpreted )

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:43:25: error:
    • No instance for (RecElem
                         Rec
                         '("item", Text)
                         '("item", Text)
                         '[]
                         '[]
                         (Data.Vinyl.TypeLevel.RIndex '("item", Text) '[]))
        arising from a use of ‘rget’
    • In the first argument of ‘(/=)’, namely ‘rget @Item p’
      In the expression: rget @Item p /= Field "legal fees (1 hour)"
      In the first argument of ‘P.filter’, namely
        ‘(\ p -> rget @Item p /= Field "legal fees (1 hour)")’
   |
43 |     >-> P.filter (\p -> rget @Item p /= Field "legal fees (1 hour)")
   |                         ^^^^^^^^^^^^

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:49:12: error:
    • No instance for (RecElem
                         Rec
                         '("item", Text)
                         '("item", Text)
                         '[]
                         '[]
                         (Data.Vinyl.TypeLevel.RIndex '("item", Text) '[]))
        arising from a use of ‘innerJoin’
    • In the second argument of ‘($)’, namely
        ‘innerJoin @'[Item] price fpurchase’
      In a stmt of a 'do' block:
        return $ innerJoin @'[Item] price fpurchase
      In the expression:
        do price <- loadPrices
           fpurchase <- loadFilteredPurchase
           return $ innerJoin @'[Item] price fpurchase
   |
49 |   return $ innerJoin @'[Item] price fpurchase
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:64:13: error:
    • No instance for (RecElem
                         Rec
                         '("money-spent", Int)
                         '("money-spent", Int)
                         (RDelete '("item", Text) '[] Data.Vinyl.TypeLevel.++ '[MoneySpent])
                         (RDelete '("item", Text) '[] Data.Vinyl.TypeLevel.++ '[MoneySpent])
                         (Data.Vinyl.TypeLevel.RIndex
                            '("money-spent", Int)
                            (RDelete '("item", Text) '[]
                             Data.Vinyl.TypeLevel.++ '[MoneySpent])))
        arising from a use of ‘rput’
    • In the expression:
        rput
          (Field @"money-spent" $ mult (rget @UnitsBought r) (rget @Price r))
          r
      In the first argument of ‘fmap’, namely
        ‘(\ r
            -> rput
                 (Field @"money-spent" $ mult (rget @UnitsBought r) (rget @Price r))
                 r)’
      In the second argument of ‘($)’, namely
        ‘fmap
           (\ r
              -> rput
                   (Field @"money-spent" $ mult (rget @UnitsBought r) (rget @Price r))
                   r)
           zipped’
   |
64 |             rput (Field @"money-spent" $
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:81:13: error:
    • No instance for (Frames.InCore.RecVec
                         (RDelete '("item", Text) '[]
                          Data.Vinyl.TypeLevel.++ '[MoneySpent]))
        arising from a use of ‘filterFrame’
    • In the expression:
        filterFrame (\ r -> (rget @Person r) == Field @"person" up) a
      In the expression:
        (up, filterFrame (\ r -> (rget @Person r) == Field @"person" up) a)
      In the first argument of ‘map’, namely
        ‘(\ up
            -> (up, 
                filterFrame (\ r -> (rget @Person r) == Field @"person" up) a))’
   |
81 |           , filterFrame (\r -> (rget @Person r) == Field @"person" up) a
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:87:41: error:
    • No instance for (RMap
                         (RDelete '("item", Text) '[]
                          Data.Vinyl.TypeLevel.++ '[MoneySpent]))
        arising from a use of ‘print’
    • In the first argument of ‘mapM_’, namely ‘print’
      In a stmt of a 'do' block: (mapM_ print r)
      In the expression:
        do print a
           (mapM_ print r)
   |
87 |   mapM_ (\(a, r) -> do print a;  (mapM_ print  r) ) g
   |                                         ^^^^^

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:124:38: error:
    • No instance for (Frames.InCore.RecVec
                         (RDelete '("item", Text) '[]
                          Data.Vinyl.TypeLevel.++ '[MoneySpent]))
        arising from a use of ‘toFrame’
    • In the first argument of ‘zipFrames’, namely ‘(toFrame rs)’
      In the expression:
        zipFrames (toFrame rs) (createColumnAccumulated rs)
      In the expression:
        (a, zipFrames (toFrame rs) (createColumnAccumulated rs))
    |
124 |                         , zipFrames (toFrame rs) (createColumnAccumulated rs)
    |                                      ^^^^^^^^^^

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:124:51: error:
    • No instance for (RecElem
                         Rec
                         '("money-spent", Int)
                         '("money-spent", Int)
                         (RDelete '("item", Text) '[] Data.Vinyl.TypeLevel.++ '[MoneySpent])
                         (RDelete '("item", Text) '[] Data.Vinyl.TypeLevel.++ '[MoneySpent])
                         (Data.Vinyl.TypeLevel.RIndex
                            '("money-spent", Int)
                            (RDelete '("item", Text) '[]
                             Data.Vinyl.TypeLevel.++ '[MoneySpent])))
        arising from a use of ‘createColumnAccumulated’
    • In the second argument of ‘zipFrames’, namely
        ‘(createColumnAccumulated rs)’
      In the expression:
        zipFrames (toFrame rs) (createColumnAccumulated rs)
      In the expression:
        (a, zipFrames (toFrame rs) (createColumnAccumulated rs))
    |
124 |                         , zipFrames (toFrame rs) (createColumnAccumulated rs)
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:137:17: error:
    • No instance for (Frames.InCore.RecVec
                         ((RDelete '("item", Text) '[]
                           Data.Vinyl.TypeLevel.++ '[MoneySpent])
                          Data.Vinyl.TypeLevel.++ '['("accumulated-spending", Int)]))
        arising from a use of ‘filterFrame’
    • In the second argument of ‘($)’, namely
        ‘filterFrame (\ r -> unField (rget @Date r) <= 6) fr’
      In the expression:
        last . F.toList
          $ filterFrame (\ r -> unField (rget @Date r) <= 6) fr
      In the expression:
        (a, 
         last . F.toList
           $ filterFrame (\ r -> unField (rget @Date r) <= 6) fr)
    |
137 |                 filterFrame (\r ->
    |                 ^^^^^^^^^^^^^^^^^^...

/home/jeff/data-haskell/challenge/frames/src/Lib.hs:148:48: error:
    • No instance for (RecElem
                         Rec
                         '("accumulated-spending", Int)
                         '("accumulated-spending", Int)
                         ((RDelete '("item", Text) '[]
                           Data.Vinyl.TypeLevel.++ '[MoneySpent])
                          Data.Vinyl.TypeLevel.++ '['("accumulated-spending", Int)])
                         ((RDelete '("item", Text) '[]
                           Data.Vinyl.TypeLevel.++ '[MoneySpent])
                          Data.Vinyl.TypeLevel.++ '['("accumulated-spending", Int)])
                         (Data.Vinyl.TypeLevel.RIndex
                            '("accumulated-spending", Int)
                            ((RDelete '("item", Text) '[]
                              Data.Vinyl.TypeLevel.++ '[MoneySpent])
                             Data.Vinyl.TypeLevel.++ '['("accumulated-spending", Int)])))
        arising from a use of ‘rget’
    • In the second argument of ‘($)’, namely
        ‘rget @AccumulatedSpending r’
      In the expression:
        (fromIntegral . unField) $ rget @AccumulatedSpending r
      In the first argument of ‘map’, namely
        ‘(\ (_, r)
            -> (fromIntegral . unField) $ rget @AccumulatedSpending r)’
    |
148 |                     (fromIntegral . unField) $ rget @AccumulatedSpending r)
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed, no modules loaded.

<no location info>: error:
    Could not find module ‘Lib’
    It is not a module in the current program, or in any known package.
Loaded GHCi configuration from /tmp/haskell-stack-ghci/c6e38927/ghci-script
Prelude> 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.