Skip to content

Instantly share code, notes, and snippets.

@zeptometer
Last active February 16, 2019 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeptometer/4bddf9214a3bb38e661b1327d8cafe95 to your computer and use it in GitHub Desktop.
Save zeptometer/4bddf9214a3bb38e661b1327d8cafe95 to your computer and use it in GitHub Desktop.
@require: math
@import: mod1
let block1 = '<+math(${\pohe{}});>
@require: math
@import: mod2
let block2 = '<+math(${\pohe!{}});>
$ make
satysfi -b main.saty -o ../main.pdf
---- ---- ---- ----
target file: 'main.pdf'
dump file: 'main.satysfi-aux' (already exists)
parsing 'main.saty' ...
parsing 'stdja.satyh' ...
parsing 'pervasives.satyh' ...
parsing 'gr.satyh' ...
parsing 'geom.satyh' ...
parsing 'list.satyh' ...
parsing 'math.satyh' ...
parsing 'color.satyh' ...
parsing 'block1.satyh' ...
parsing 'mod1.satyh' ...
parsing 'block2.satyh' ...
parsing 'mod2.satyh' ...
---- ---- ---- ----
reading 'mod2.satyh' ...
type check passed.
---- ---- ---- ----
reading 'list.satyh' ...
type check passed.
---- ---- ---- ----
reading 'color.satyh' ...
type check passed.
---- ---- ---- ----
reading 'pervasives.satyh' ...
type check passed.
---- ---- ---- ----
reading 'mod1.satyh' ...
type check passed.
---- ---- ---- ----
reading 'geom.satyh' ...
type check passed.
---- ---- ---- ----
reading 'gr.satyh' ...
type check passed.
---- ---- ---- ----
reading 'math.satyh' ...
type check passed.
---- ---- ---- ----
reading 'stdja.satyh' ...
type check passed.
---- ---- ---- ----
reading 'block1.satyh' ...
type check passed.
---- ---- ---- ----
reading 'block2.satyh' ...
! [Type Error] at "block2.satyh", line 4, characters 30-35:
this expression has type
inline-text,
but is expected of type
math.
This constraint is required by the expression
at "mod1.satyh", line 3, characters 18-22.
make: *** [Makefile:2: all] Error 1
% -*- coding: utf-8 -*-
@require: stdja
@import: block1
@import: block2
StdJa.document (|
title = {};
author = {};
show-title = true;
show-toc = false;
|) '<#block1; #block2;>
all:
satysfi -b main.saty -o ../main.pdf
module Module1 : sig
direct \pohe : [math] math-cmd
end = struct
let-math \pohe arg = ${1}
end
module Module2 : sig
direct \pohe : [inline-text] math-cmd
end = struct
let-math \pohe arg = ${2}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment