From f8b73d593ca147e48a723d3dceda7c5977d21ae6 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 9 Oct 2014 19:34:12 +0000 Subject: Prelude.CAPIT is now a built-in primitive. It still generates &| in the Haskell runtime but will be intepreted in the C runtime --- src/compiler/GF/Compile/Compute/Predef.hs | 3 ++- src/compiler/GF/Compile/Compute/Value.hs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/compiler/GF/Compile/Compute') diff --git a/src/compiler/GF/Compile/Compute/Predef.hs b/src/compiler/GF/Compile/Compute/Predef.hs index b9bb01ce8..74697a89b 100644 --- a/src/compiler/GF/Compile/Compute/Predef.hs +++ b/src/compiler/GF/Compile/Compute/Predef.hs @@ -79,7 +79,7 @@ predefList = -- Canonical values: (cPBool,PBool),(cPFalse,PFalse),(cPTrue,PTrue),(cInt,Int), (cInts,Ints),(cNonExist,NonExist) - ,(cBIND,BIND),(cSOFT_BIND,SOFT_BIND)] + ,(cBIND,BIND),(cSOFT_BIND,SOFT_BIND),(cCAPIT,CAPIT)] --- add more functions!!! delta f vs = @@ -109,6 +109,7 @@ delta f vs = NonExist-> canonical BIND -> canonical SOFT_BIND->canonical + CAPIT -> canonical where canonical = delay delay = return (VApp f vs) -- wrong number of arguments diff --git a/src/compiler/GF/Compile/Compute/Value.hs b/src/compiler/GF/Compile/Compute/Value.hs index 64683a3de..f076e47ba 100644 --- a/src/compiler/GF/Compile/Compute/Value.hs +++ b/src/compiler/GF/Compile/Compute/Value.hs @@ -52,5 +52,5 @@ data Predefined = Drop | Take | Tk | Dp | EqStr | Occur | Occurs | ToUpper | Error -- Canonical values below: | PBool | PFalse | PTrue | Int | Ints | NonExist - | BIND | SOFT_BIND + | BIND | SOFT_BIND | CAPIT deriving (Show,Eq,Ord,Ix,Bounded,Enum) -- cgit v1.2.3