1
0
forked from GitHub/gf-core

Add unit test for literals (fails)

This commit is contained in:
John J. Camilleri
2021-03-22 08:37:59 +01:00
parent f900ea3885
commit 2d066853f1
6 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
abstract Literals = {
cat S ;
fun
mkString : String -> S ;
mkInt : Int -> S ;
mkFloat : Float -> S ;
}

View File

@@ -0,0 +1,9 @@
Literals: mkString "hello"
LiteralsCnc: hello
Literals: mkInt 123
LiteralsCnc: 123
Literals: mkFloat 30.809000
LiteralsCnc: 30.809000

View File

@@ -0,0 +1,3 @@
mkString "hello"
mkInt 123
mkFloat 30.809

View File

@@ -0,0 +1,7 @@
concrete LiteralsCnc of Literals = open Prelude in {
lincat S = SS ;
lin
mkString s = s ;
mkInt s = s ;
mkFloat s = s ;
}