diff options
| author | Thomas Hallgren <th-github@altocumulus.org> | 2019-03-13 01:51:26 +0100 |
|---|---|---|
| committer | Thomas Hallgren <th-github@altocumulus.org> | 2019-03-13 01:51:26 +0100 |
| commit | b11d7d93dcb22b26564f49158414f07f1bd3f4cc (patch) | |
| tree | 1c61f7824920b3661e8750804f51b096a0ad62fa /src/compiler/GF/Compile/ConcreteToHaskell.hs | |
| parent | ba9aeb33228b70185e92cdd192408587349e83de (diff) | |
GF.Grammar.Canonical: some Functor/Foldable/Traversable instances
Diffstat (limited to 'src/compiler/GF/Compile/ConcreteToHaskell.hs')
| -rw-r--r-- | src/compiler/GF/Compile/ConcreteToHaskell.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/ConcreteToHaskell.hs b/src/compiler/GF/Compile/ConcreteToHaskell.hs index 6d2bf398f..d74fcdacd 100644 --- a/src/compiler/GF/Compile/ConcreteToHaskell.hs +++ b/src/compiler/GF/Compile/ConcreteToHaskell.hs @@ -194,8 +194,8 @@ concrete2haskell opts else LambdaCase (map ppCase cs) where (ds,ts') = dedup ts - (ps,ts) = unzip [(p,t)|TableRowValue p t<-cs] - ppCase (TableRowValue p t) = (ppP p,ppTv (patVars p++vs) t) + (ps,ts) = unzip [(p,t)|TableRow p t<-cs] + ppCase (TableRow p t) = (ppP p,ppTv (patVars p++vs) t) {- ppPredef n = case predef n of @@ -309,8 +309,8 @@ instance Records LinValue where Selection v1 v2 -> records (v1,v2) _ -> S.empty -instance Records TableRowValue where - records (TableRowValue _ v) = records v +instance Records rhs => Records (TableRow rhs) where + records (TableRow _ v) = records v -- | Record subtyping is converted into explicit coercions in Haskell @@ -318,7 +318,7 @@ coerce env ty t = case (ty,t) of (_,VariantValue ts) -> VariantValue (map (coerce env ty) ts) (TableType ti tv,TableValue _ cs) -> - TableValue ti [TableRowValue p (coerce env tv t)|TableRowValue p t<-cs] + TableValue ti [TableRow p (coerce env tv t)|TableRow p t<-cs] (RecordType rt,RecordValue r) -> RecordValue [RecordRow l (coerce env ft f) | RecordRow l f<-r,ft<-[ft|RecordRow l' ft<-rt,l'==l]] |
