mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-17 15:12:50 -06:00
correctly distinguish between fun and data judgements
This commit is contained in:
19
src/runtime/haskell/tests/basic_cnc.gf
Normal file
19
src/runtime/haskell/tests/basic_cnc.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
concrete basic_cnc of basic = open Prelude in {
|
||||
|
||||
lincat N = {s : Str; is_zero : Bool} ;
|
||||
lincat S = Str ;
|
||||
|
||||
lin z = {s="0"; is_zero=True} ;
|
||||
s n = {
|
||||
s = case n.is_zero of {
|
||||
True => "1" ;
|
||||
False => n.s ++ "+" ++ "1"
|
||||
} ;
|
||||
is_zero = False
|
||||
} ;
|
||||
|
||||
lin c n = n.s ;
|
||||
|
||||
lincat P = {};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user