Frames library can only find 1 column of my CSV file

103 Views Asked by At

Using the following .csv file:

Desc,Status
"CT3","undone"

I have written the following program:

{-# LANGUAGE TemplateHaskell #-}    
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE QuasiQuotes #-}

module Main where

import Data.Text
import Frames

tableTypes "Todo" "todo.csv"

main = return ()

However, when I load the program into GHCI I get the following:

*Main> :i Todo
type Todo = Record '["Desc" :-> Text]

Why does Frames not find the status column from the csv file?

-Eric M.

1

There are 1 best solutions below

2
tylerweir On

I am working on a project with Frames right now, so I recreated your example. Below are my results with Frames 0.3.0.2:

Ok, one module loaded.
H> main
it :: ()
(0.00 secs, 329,800 bytes)
H> :i Todo 
type Todo = Record '["Desc" :-> Text, "Status" :-> Text]

If you put up a repo someplace, I can take another look.