Skip to content

Instantly share code, notes, and snippets.

@hacklex
hacklex / Bug.fst
Last active October 11, 2021 07:04
New FStar versions crash on this one with "out of memory"
module Bug
type binary_op (a:Type) = a -> a -> a
type unary_op (a:Type) = a -> a
type predicate (a:Type) = a -> bool
type binary_relation (a: Type) = a -> a -> bool
[@@"opaque_to_smt"]
let is_reflexive (#a:Type) (r: binary_relation a) = forall (x:a). x `r` x
[@@"opaque_to_smt"]
@hacklex
hacklex / fstar.cson
Created August 20, 2021 05:29
Fix for `%reveal_opaque highlighting
scopeName: 'source.fstar'
name: 'F*'
fileTypes: [ 'fst', 'fsti', 'fs7' ]
patterns: [
{ include: '#comments' }
{ include: '#modules' }
{ include: '#options' }
@hacklex
hacklex / AlgebraTypes.fst
Last active July 23, 2021 22:18
line 285 admit is redundant, but F* fails without it!
module AlgebraTypes
#push-options "--ifuel 0 --fuel 0 --z3rlimit 1"
type binary_op (a:Type) = a -> a -> a
type unary_op (a:Type) = a -> a
type predicate (a:Type) = a -> bool
type binary_relation (a: Type) = a -> a -> bool
let is_reflexive (#a:Type) (r: binary_relation a) = forall (x:a). x `r` x