Skip to content

Instantly share code, notes, and snippets.

@pscollins
Created May 19, 2014 19:26
Show Gist options
  • Save pscollins/5c647cd4f1a764c56507 to your computer and use it in GitHub Desktop.
Save pscollins/5c647cd4f1a764c56507 to your computer and use it in GitHub Desktop.
signature WRAPPABLE = sig
datatype node' = A
end
structure CReturnTyToWrap = struct
datatype node' = A
end
functor WrapStruct(S : WRAPPABLE) = struct
structure S = S
datatype node = datatype S.node'
type t = node list
end
structure CReturnTy = WrapStruct (structure S = CReturnTyToWrap)
@pscollins
Copy link
Author

test-functor.sml:17.23-17.65 Error: unmatched type specification: node'
test-functor.sml:17.23-17.65 Error: unmatched constructor specification: A
/usr/lib/smlnj/bin/sml: Fatal error -- Uncaught exception Error with 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment