Skip to content

Instantly share code, notes, and snippets.

@startling
Created August 4, 2013 21:48
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 startling/6152089 to your computer and use it in GitHub Desktop.
Save startling/6152089 to your computer and use it in GitHub Desktop.
coatl test suite
Ok, modules loaded: Main, Language.Coatl.Abstract, Language.Coatl.Parser.Expression, Language.Coatl.Parser.Declaration, Language.Coatl.Graph, Language.Coatl.Check, Language.Coatl.Check.Types.
*Main> main
Language.Coatl.Parser.Expression
expression
- parses names
- parses operators
- parses infix operators
- parses lambdas
- parses the type of the identity function
- parses ordinary application
Language.Coatl.Parser.Declaration
declaration
- parses simple redefinitions
- parses definitions with newlines
- parses definitions to calls
- parses function definitions
- parses multiline definitions
- parses simple type signatures
- parses calls in type signatures
- parses multiline type signatures
- parses many declarations
Language.Coatl.Graph
path
- finds direct paths
- finds indirect paths
- does not find nonexistent paths
- finds paths from a node to itself only when appropriate
- does not get confused by loops
cycles
- finds single-element cycles
- finds ordinary cycles
- finds joined cycles
- doesn't find non-cycles
sort
- sorts nodes before their children
Language.Coatl.Check
checkNames
- errors for `the` without standard assumptions
- does not error for `the` with standard assumptions
- errors for `example` without assumptions
- errors for `example` even with standard assumptions
declarations
- errors for trivially unproductively-recursive functions
- should not error for `the`'s or `example`'s types or definitions
- doesn't error for 'x = const O x'
# PENDING: is this kind of thing worth the effort?
Language.Coatl.Check.Types
check
- allows monomorphic 'id'
- allows monomorphic 'const'
- allows polymorphic 'the'/'id' FAILED [1]
1) Language.Coatl.Check.Types.check allows polymorphic 'the'/'id' FAILED
predicate failed on: Left ["(~) unimplemented as of yet"]
Randomized with seed 4611685481061015035
Finished in 0.0223 seconds
35 examples, 1 failure, 1 pending
*** Exception: ExitFailure 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment